Keep fallback UI labels Korean
This commit is contained in:
@@ -305,9 +305,9 @@ func _normalized_camp_conversations(source) -> Array:
|
||||
if lines.is_empty():
|
||||
continue
|
||||
seen[conversation_id] = true
|
||||
var label := str(entry.get("label", conversation_id.capitalize())).strip_edges()
|
||||
var label := str(entry.get("label", "대화")).strip_edges()
|
||||
if label.is_empty():
|
||||
label = conversation_id.capitalize()
|
||||
label = "대화"
|
||||
var speaker := str(entry.get("speaker", "")).strip_edges()
|
||||
var display_speaker := str(entry.get("display_speaker", speaker)).strip_edges()
|
||||
result.append({
|
||||
@@ -563,7 +563,10 @@ func _prepare_unit(source_unit: Dictionary) -> Dictionary:
|
||||
push_error("Unit has malformed position: %s" % str(source_unit))
|
||||
return {}
|
||||
unit["pos"] = Vector2i(int(pos_array[0]), int(pos_array[1]))
|
||||
unit["class"] = str(unit.get("class", unit.get("class_id", "Unit"))).capitalize()
|
||||
var resolved_class_name := str(unit.get("class", "")).strip_edges()
|
||||
if resolved_class_name.is_empty():
|
||||
resolved_class_name = _fallback_class_name(str(unit.get("class_id", "")))
|
||||
unit["class"] = resolved_class_name
|
||||
unit["hp"] = int(unit.get("hp", unit.get("max_hp", 1)))
|
||||
unit["max_hp"] = int(unit.get("max_hp", unit["hp"]))
|
||||
unit["max_mp"] = int(unit.get("max_mp", unit.get("mp", 0)))
|
||||
@@ -1177,7 +1180,49 @@ func _weapon_effectiveness_target_type(target: Dictionary) -> String:
|
||||
|
||||
|
||||
func _format_move_type(move_type: String) -> String:
|
||||
return move_type.replace("_", " ").capitalize()
|
||||
match move_type.strip_edges().to_lower():
|
||||
"foot":
|
||||
return "보병"
|
||||
"cavalry", "mounted":
|
||||
return "기병"
|
||||
"archer":
|
||||
return "궁병"
|
||||
"water":
|
||||
return "수군"
|
||||
"flying":
|
||||
return "비행"
|
||||
return "행군"
|
||||
|
||||
|
||||
func _fallback_class_name(class_id: String) -> String:
|
||||
match class_id.strip_edges().to_lower():
|
||||
"hero":
|
||||
return "영걸"
|
||||
"commander":
|
||||
return "도독"
|
||||
"cavalry":
|
||||
return "기병"
|
||||
"elite_cavalry":
|
||||
return "정예기병"
|
||||
"infantry":
|
||||
return "보병"
|
||||
"guard_captain":
|
||||
return "호위장"
|
||||
"warrior":
|
||||
return "무인"
|
||||
"champion":
|
||||
return "맹장"
|
||||
"archer":
|
||||
return "궁병"
|
||||
"marksman":
|
||||
return "강궁병"
|
||||
"strategist":
|
||||
return "책사"
|
||||
"military_advisor":
|
||||
return "군사"
|
||||
"bandit":
|
||||
return "산적"
|
||||
return "부대"
|
||||
|
||||
|
||||
func _equipped_weapon(unit: Dictionary) -> Dictionary:
|
||||
@@ -1439,7 +1484,7 @@ func _status_display_name(status: String) -> String:
|
||||
return "무장해제"
|
||||
if normalized == "debuff":
|
||||
return "약화"
|
||||
return normalized.replace("_", " ").capitalize()
|
||||
return "상태"
|
||||
|
||||
|
||||
func _status_stat_display_name(stat: String) -> String:
|
||||
@@ -1663,7 +1708,7 @@ func get_threatening_unit_names(cell: Vector2i, source_team := TEAM_ENEMY) -> Ar
|
||||
for unit in get_living_units(source_team):
|
||||
if not _unit_threat_cells(unit).has(cell):
|
||||
continue
|
||||
var unit_name := str(unit.get("name", unit.get("id", "Unit")))
|
||||
var unit_name := str(unit.get("name", unit.get("id", "부대")))
|
||||
if not result.has(unit_name):
|
||||
result.append(unit_name)
|
||||
return result
|
||||
@@ -1686,7 +1731,7 @@ func get_physical_threat_previews(cell: Vector2i, source_team := TEAM_ENEMY) ->
|
||||
var directional_info := get_directional_attack_info(unit, target)
|
||||
result.append({
|
||||
"source_id": str(unit.get("id", "")),
|
||||
"source_name": str(unit.get("name", unit.get("id", "Unit"))),
|
||||
"source_name": str(unit.get("name", unit.get("id", "부대"))),
|
||||
"damage": damage,
|
||||
"hit_chance": hit_chance,
|
||||
"target_hp_after": max(0, int(target.get("hp", 0)) - damage),
|
||||
@@ -2385,7 +2430,7 @@ func _team_status_text(team: String) -> String:
|
||||
return "아군"
|
||||
if team == TEAM_ENEMY:
|
||||
return "적군"
|
||||
return team.capitalize()
|
||||
return "전장"
|
||||
|
||||
|
||||
func get_turn_limit() -> int:
|
||||
@@ -2509,7 +2554,7 @@ func _build_skill_threat_preview(caster: Dictionary, skill_id: String, skill: Di
|
||||
var skill_kind := str(skill.get("kind", "damage"))
|
||||
var preview := {
|
||||
"source_id": str(caster.get("id", "")),
|
||||
"source_name": str(caster.get("name", caster.get("id", "Unit"))),
|
||||
"source_name": str(caster.get("name", caster.get("id", "부대"))),
|
||||
"skill_id": skill_id,
|
||||
"skill_name": str(skill.get("name", skill_id)),
|
||||
"kind": skill_kind,
|
||||
@@ -3053,7 +3098,7 @@ func _apply_class_runtime_fields(unit: Dictionary, class_id: String) -> void:
|
||||
var class_def := data_catalog.get_class_def(class_id)
|
||||
if class_def.is_empty():
|
||||
return
|
||||
unit["class"] = str(class_def.get("name", class_id.capitalize()))
|
||||
unit["class"] = str(class_def.get("name", _fallback_class_name(class_id)))
|
||||
unit["move"] = int(class_def.get("move", unit.get("move", 3)))
|
||||
unit["move_type"] = str(class_def.get("move_type", unit.get("move_type", "foot")))
|
||||
unit["growth"] = class_def.get("growth", {}).duplicate(true)
|
||||
@@ -3819,7 +3864,7 @@ func _level_up(unit: Dictionary) -> void:
|
||||
"type": "level_up",
|
||||
"unit_id": str(unit.get("id", "")),
|
||||
"officer_id": str(unit.get("officer_id", "")),
|
||||
"name": str(unit.get("name", "Unit")),
|
||||
"name": str(unit.get("name", "부대")),
|
||||
"from_level": previous_level,
|
||||
"to_level": int(unit.get("level", previous_level + 1)),
|
||||
"class_id": str(unit.get("class_id", "")),
|
||||
@@ -3844,7 +3889,7 @@ func _try_promote_unit(unit: Dictionary) -> void:
|
||||
if next_class_def.is_empty():
|
||||
return
|
||||
var previous_class_id := class_id
|
||||
var previous_class_name := str(class_def.get("name", class_id.capitalize()))
|
||||
var previous_class_name := str(class_def.get("name", _fallback_class_name(class_id)))
|
||||
_apply_stat_bonus_delta(unit, class_def.get("base_bonus", {}), next_class_def.get("base_bonus", {}))
|
||||
unit["class_id"] = next_class_id
|
||||
_apply_class_runtime_fields(unit, next_class_id)
|
||||
@@ -3855,12 +3900,12 @@ func _try_promote_unit(unit: Dictionary) -> void:
|
||||
"type": "promotion",
|
||||
"unit_id": str(unit.get("id", "")),
|
||||
"officer_id": str(unit.get("officer_id", "")),
|
||||
"name": str(unit.get("name", "Unit")),
|
||||
"name": str(unit.get("name", "부대")),
|
||||
"level": int(unit.get("level", 1)),
|
||||
"from_class_id": previous_class_id,
|
||||
"from_class": previous_class_name,
|
||||
"to_class_id": next_class_id,
|
||||
"to_class": str(unit.get("class", next_class_id.capitalize()))
|
||||
"to_class": str(unit.get("class", _fallback_class_name(next_class_id)))
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user