Changed all translation to use new TransContext
This commit is contained in:
@@ -30,6 +30,7 @@ func isStarted() -> bool:
|
||||
func objectiveUpdated(objective:QuestObjective) -> void:
|
||||
QUEST.questUpdated.emit(self)
|
||||
|
||||
func getLocaleData() -> Dictionary[String, String]:
|
||||
var dict: Dictionary[String, String] = {}
|
||||
return dict
|
||||
func getTransContext() -> TransContext:
|
||||
var ctx:TransContext = TransContext.new()
|
||||
ctx.addTransPlural("title", title)
|
||||
return ctx
|
||||
|
@@ -40,8 +40,14 @@ func _onPlayerInventoryUpdated() -> void:
|
||||
func isCompleted() -> bool:
|
||||
return completed
|
||||
|
||||
func getLocaleData() -> Dictionary[String, String]:
|
||||
var dict:Dictionary[String, String] = {}
|
||||
dict.item = ITEM.getItemName(itemType, quantity)
|
||||
dict.quantity = LOCALE.formatInteger(quantity)
|
||||
return dict
|
||||
func getTransContext() -> TransContext:
|
||||
var ctx = TransContext.new()
|
||||
|
||||
ctx.addTrans("title", title)
|
||||
ctx.addTrans("description", description)
|
||||
|
||||
if objectiveType == Type.Item:
|
||||
ctx.addInteger("quantity", quantity)
|
||||
ctx.addContext("item", ITEM.getItem(itemType).getTransContext())
|
||||
|
||||
return ctx
|
||||
|
Reference in New Issue
Block a user