OoT: Add warp song text replacement

This commit is contained in:
espeon65536
2021-11-20 09:49:33 -06:00
parent cc3d5e60a1
commit 686812ee9e
8 changed files with 247 additions and 29 deletions

View File

@@ -11,7 +11,7 @@ import json
from enum import Enum
from .HintList import getHint, getHintGroup, Hint, hintExclusions
from .Messages import update_message_by_id
from .Messages import COLOR_MAP, update_message_by_id
from .TextBox import line_wrap
from .Utils import data_path, read_json
@@ -266,17 +266,6 @@ def getSimpleHintNoPrefix(item):
def colorText(gossip_text):
colorMap = {
'White': '\x40',
'Red': '\x41',
'Green': '\x42',
'Blue': '\x43',
'Light Blue': '\x44',
'Pink': '\x45',
'Yellow': '\x46',
'Black': '\x47',
}
text = gossip_text.text
colors = list(gossip_text.colors) if gossip_text.colors is not None else []
color = 'White'
@@ -292,7 +281,7 @@ def colorText(gossip_text):
splitText[1] = splitText[1][len(prefix):]
break
splitText[1] = '\x05' + colorMap[color] + splitText[1] + '\x05\x40'
splitText[1] = '\x05' + COLOR_MAP[color] + splitText[1] + '\x05\x40'
text = ''.join(splitText)
return text