Changed all translation to use new TransContext
This commit is contained in:
@@ -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