Lots of localization setup, added controller BBCode stuff also.

This commit is contained in:
2025-05-25 14:09:40 -05:00
parent f5cb84e0c9
commit 6a39e1f2df
825 changed files with 16497 additions and 18 deletions

View File

@@ -25,31 +25,30 @@ func _enter_tree() -> void:
assert(false, "Missing item type: " + Item.Type.find_key(itemType))
static func isStackable(itemType:Item.Type) -> bool:
func isStackable(itemType:Item.Type) -> bool:
if not ITEM_MAP.has(itemType):
return false
var item:Item = ITEM_MAP[itemType]
return item.stackable
static func getItemName(itemType:Item.Type, count:int = 1) -> String:
func getItemName(itemType:Item.Type, count:int = 1) -> String:
if not ITEM_MAP.has(itemType):
return ""
var item:Item = ITEM_MAP[itemType]
if count > 1:
return str(count) + "x " + item.title
else:
return item.title
return tr_n(item.title, item.title + "_plural", count).format({
"count": count
})
static func getItemDescription(itemType:Item.Type) -> String:
func getItemDescription(itemType:Item.Type) -> String:
if not ITEM_MAP.has(itemType):
return ""
var item:Item = ITEM_MAP[itemType]
return item.description_text
static func getItemCategory(itemType:Item.Type) -> Item.Category:
func getItemCategory(itemType:Item.Type) -> Item.Category:
if not ITEM_MAP.has(itemType):
return Item.Category.INGREDIENT