Add named equipment rewards
This commit is contained in:
@@ -3863,6 +3863,9 @@ func _equipment_item_id(equipment: Dictionary, slot: String) -> String:
|
||||
|
||||
func _format_equipment_bonus_text(item: Dictionary) -> String:
|
||||
var parts := []
|
||||
var rarity_text := _format_equipment_rarity_text(item)
|
||||
if not rarity_text.is_empty():
|
||||
parts.append(rarity_text)
|
||||
var bonuses: Dictionary = item.get("bonuses", {})
|
||||
for stat in ["hp", "mp", "atk", "def", "int", "agi"]:
|
||||
var amount := int(bonuses.get(stat, 0))
|
||||
@@ -3878,6 +3881,13 @@ func _format_equipment_bonus_text(item: Dictionary) -> String:
|
||||
return _join_strings(parts, ", ")
|
||||
|
||||
|
||||
func _format_equipment_rarity_text(item: Dictionary) -> String:
|
||||
var rarity := str(item.get("rarity", ""))
|
||||
if rarity == "named":
|
||||
return "Named"
|
||||
return ""
|
||||
|
||||
|
||||
func _format_equipment_effectiveness_text(item: Dictionary) -> String:
|
||||
if str(item.get("kind", "")) != "weapon":
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user