Added a few translation helpers
This commit is contained in:
@@ -61,8 +61,11 @@ func setQuestObjective(objective = null):
|
||||
var quest = QUEST.quests[currentQuestKey];
|
||||
var questObjective = quest.objectives[objective]
|
||||
questObjectiveList.select(objective)
|
||||
|
||||
questObjectiveInfo.text = questObjective.title + "\n"
|
||||
|
||||
# Setup Description
|
||||
var data = quest.getLocaleData()
|
||||
data.merge(questObjective.getLocaleData())
|
||||
questObjectiveInfo.text = tr(questObjective.description).format(data)
|
||||
|
||||
|
||||
func open(questKey = null) -> void:
|
||||
@@ -77,19 +80,13 @@ func close() -> void:
|
||||
func isOpen() -> bool:
|
||||
return self.visible
|
||||
|
||||
|
||||
# Private methods
|
||||
func _updateQuestList():
|
||||
questList.clear()
|
||||
questList.deselect_all()
|
||||
for questKey in QUEST.quests:
|
||||
var q = QUEST.quests[questKey]
|
||||
var n = q.title;
|
||||
if q.isCompleted():
|
||||
n += " (Complete)"
|
||||
elif q.isStarted():
|
||||
n += " (Started)"
|
||||
questList.add_item(n)
|
||||
questList.add_item(q.title)
|
||||
|
||||
|
||||
# Event handlers
|
||||
|
Reference in New Issue
Block a user