Age briefing and dialogue chrome
This commit is contained in:
@@ -60,12 +60,12 @@ const UNIT_ARROW_ATTACK_DURATION := 0.36
|
|||||||
const UNIT_COMMAND_ATTACK_DURATION := 0.38
|
const UNIT_COMMAND_ATTACK_DURATION := 0.38
|
||||||
const UNIT_HEAVY_ATTACK_DURATION := 0.34
|
const UNIT_HEAVY_ATTACK_DURATION := 0.34
|
||||||
const UNIT_TACTIC_CAST_DURATION := 0.42
|
const UNIT_TACTIC_CAST_DURATION := 0.42
|
||||||
const DIALOGUE_PANEL_POSITION := Vector2(60, 356)
|
const DIALOGUE_PANEL_POSITION := Vector2(40, 356)
|
||||||
const DIALOGUE_PANEL_SIZE := Vector2(1160, 304)
|
const DIALOGUE_PANEL_SIZE := Vector2(1200, 304)
|
||||||
const DIALOGUE_PORTRAIT_SIZE := Vector2(184, 262)
|
const DIALOGUE_PORTRAIT_SIZE := Vector2(220, 262)
|
||||||
const DIALOGUE_COLUMN_SIZE := Vector2(850, 266)
|
const DIALOGUE_COLUMN_SIZE := Vector2(850, 266)
|
||||||
const DIALOGUE_TEXT_SIZE := Vector2(830, 112)
|
const DIALOGUE_TEXT_SIZE := Vector2(830, 112)
|
||||||
const BRIEFING_CAMP_THUMBNAIL_SIZE := Vector2(138, 72)
|
const BRIEFING_CAMP_THUMBNAIL_SIZE := Vector2(188, 86)
|
||||||
const CAMP_TALK_PORTRAIT_SIZE := Vector2(58, 58)
|
const CAMP_TALK_PORTRAIT_SIZE := Vector2(58, 58)
|
||||||
const SHOP_MERCHANT_BADGE_SIZE := Vector2(50, 50)
|
const SHOP_MERCHANT_BADGE_SIZE := Vector2(50, 50)
|
||||||
const SHOP_ITEM_ICON_SIZE := Vector2(48, 48)
|
const SHOP_ITEM_ICON_SIZE := Vector2(48, 48)
|
||||||
@@ -424,7 +424,7 @@ func _age_panel_style(style: StyleBoxFlat, variant: String, border_width: int) -
|
|||||||
if style == null:
|
if style == null:
|
||||||
return
|
return
|
||||||
match variant:
|
match variant:
|
||||||
"paper", "dialogue", "result_tablet":
|
"paper", "dialogue", "result_tablet", "result_victory_tablet", "result_defeat_tablet":
|
||||||
style.set_border_width(SIDE_TOP, border_width + 4)
|
style.set_border_width(SIDE_TOP, border_width + 4)
|
||||||
style.set_border_width(SIDE_BOTTOM, border_width + 4)
|
style.set_border_width(SIDE_BOTTOM, border_width + 4)
|
||||||
style.set_border_width(SIDE_LEFT, border_width + 1)
|
style.set_border_width(SIDE_LEFT, border_width + 1)
|
||||||
@@ -455,27 +455,27 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
|
|||||||
var shadow_size := 6
|
var shadow_size := 6
|
||||||
match variant:
|
match variant:
|
||||||
"paper":
|
"paper":
|
||||||
fill = UI_BURNT_PAPER
|
fill = Color(0.42, 0.27, 0.10, 0.997)
|
||||||
border = UI_BAMBOO_DARK
|
border = UI_SOOT_EDGE
|
||||||
border_width = 12
|
border_width = 13
|
||||||
margin = 18
|
margin = 20
|
||||||
shadow_size = 24
|
shadow_size = 18
|
||||||
"edict":
|
"edict":
|
||||||
fill = Color(0.67, 0.49, 0.25, 0.998)
|
fill = Color(0.58, 0.39, 0.16, 0.998)
|
||||||
border = UI_BRUSH_RULE
|
border = UI_INK_WASH
|
||||||
border_width = 7
|
border_width = 8
|
||||||
margin = 16
|
margin = 16
|
||||||
shadow_size = 9
|
shadow_size = 9
|
||||||
"edict_compact":
|
"edict_compact":
|
||||||
fill = Color(0.66, 0.50, 0.27, 0.996)
|
fill = Color(0.48, 0.31, 0.13, 0.996)
|
||||||
border = UI_SCROLL_EDGE
|
border = UI_BRUSH_RULE
|
||||||
border_width = 3
|
border_width = 3
|
||||||
margin = 6
|
margin = 6
|
||||||
shadow_size = 2
|
shadow_size = 2
|
||||||
"notice_edict":
|
"notice_edict":
|
||||||
fill = Color(0.71, 0.54, 0.28, 0.998)
|
fill = Color(0.54, 0.34, 0.13, 0.998)
|
||||||
border = UI_SCROLL_EDGE
|
border = UI_INK_WASH
|
||||||
border_width = 5
|
border_width = 7
|
||||||
margin = 12
|
margin = 12
|
||||||
shadow_size = 10
|
shadow_size = 10
|
||||||
"seal":
|
"seal":
|
||||||
@@ -494,15 +494,15 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
|
|||||||
border_width = 5
|
border_width = 5
|
||||||
margin = 3
|
margin = 3
|
||||||
"dialogue":
|
"dialogue":
|
||||||
fill = Color(0.030, 0.012, 0.007, 0.998)
|
fill = Color(0.10, 0.045, 0.020, 0.975)
|
||||||
border = UI_BAMBOO_DARK
|
border = UI_SOOT_EDGE
|
||||||
border_width = 11
|
border_width = 11
|
||||||
margin = 20
|
margin = 20
|
||||||
shadow_size = 26
|
shadow_size = 18
|
||||||
"speech_scroll":
|
"speech_scroll":
|
||||||
fill = UI_OLD_SILK
|
fill = Color(0.64, 0.43, 0.18, 0.998)
|
||||||
border = UI_BRUSH_RULE
|
border = UI_INK_WASH
|
||||||
border_width = 7
|
border_width = 8
|
||||||
margin = 15
|
margin = 15
|
||||||
shadow_size = 7
|
shadow_size = 7
|
||||||
"notice":
|
"notice":
|
||||||
@@ -511,18 +511,18 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
|
|||||||
border_width = 3
|
border_width = 3
|
||||||
margin = 9
|
margin = 9
|
||||||
"map":
|
"map":
|
||||||
fill = Color(0.20, 0.12, 0.050, 1.0)
|
fill = Color(0.11, 0.060, 0.024, 1.0)
|
||||||
border = UI_INK_WASH
|
border = UI_INK_WASH
|
||||||
border_width = 5
|
border_width = 6
|
||||||
margin = 4
|
margin = 4
|
||||||
"silk_map":
|
"silk_map":
|
||||||
fill = Color(0.45, 0.30, 0.13, 0.994)
|
fill = Color(0.35, 0.22, 0.085, 0.994)
|
||||||
border = UI_BRUSH_RULE
|
border = UI_INK_WASH
|
||||||
border_width = 5
|
border_width = 6
|
||||||
margin = 10
|
margin = 10
|
||||||
shadow_size = 7
|
shadow_size = 7
|
||||||
"compact":
|
"compact":
|
||||||
fill = Color(0.058, 0.026, 0.014, 0.988)
|
fill = Color(0.10, 0.055, 0.030, 0.93)
|
||||||
border = UI_TARNISHED_BRONZE
|
border = UI_TARNISHED_BRONZE
|
||||||
border_width = 4
|
border_width = 4
|
||||||
margin = 8
|
margin = 8
|
||||||
@@ -540,11 +540,23 @@ func _apply_panel_style(panel: PanelContainer, variant: String) -> void:
|
|||||||
margin = 5
|
margin = 5
|
||||||
shadow_size = 2
|
shadow_size = 2
|
||||||
"result_tablet":
|
"result_tablet":
|
||||||
fill = UI_BURNT_PAPER
|
fill = Color(0.40, 0.25, 0.095, 0.997)
|
||||||
border = UI_BAMBOO_DARK
|
border = UI_SOOT_EDGE
|
||||||
border_width = 11
|
border_width = 13
|
||||||
margin = 20
|
margin = 22
|
||||||
shadow_size = 22
|
shadow_size = 22
|
||||||
|
"result_victory_tablet":
|
||||||
|
fill = Color(0.46, 0.31, 0.13, 0.997)
|
||||||
|
border = UI_TARNISHED_BRONZE
|
||||||
|
border_width = 12
|
||||||
|
margin = 22
|
||||||
|
shadow_size = 18
|
||||||
|
"result_defeat_tablet":
|
||||||
|
fill = Color(0.16, 0.055, 0.025, 0.997)
|
||||||
|
border = UI_SEAL_RED_DARK
|
||||||
|
border_width = 12
|
||||||
|
margin = 22
|
||||||
|
shadow_size = 20
|
||||||
"command_seal":
|
"command_seal":
|
||||||
fill = Color(0.065, 0.020, 0.012, 0.992)
|
fill = Color(0.065, 0.020, 0.012, 0.992)
|
||||||
border = UI_TARNISHED_BRONZE
|
border = UI_TARNISHED_BRONZE
|
||||||
@@ -624,9 +636,9 @@ func _apply_control_font(control: Control, bold: bool = false) -> void:
|
|||||||
func _apply_button_style(button: Button, important: bool = false) -> void:
|
func _apply_button_style(button: Button, important: bool = false) -> void:
|
||||||
if button == null:
|
if button == null:
|
||||||
return
|
return
|
||||||
var normal_fill := Color(0.34, 0.030, 0.018, 0.990) if important else Color(0.18, 0.095, 0.035, 0.988)
|
var normal_fill := Color(0.30, 0.040, 0.026, 0.98) if important else Color(0.16, 0.085, 0.035, 0.96)
|
||||||
var hover_fill := Color(0.48, 0.045, 0.025, 1.0) if important else Color(0.28, 0.135, 0.048, 1.0)
|
var hover_fill := Color(0.38, 0.085, 0.040, 1.0) if important else Color(0.24, 0.13, 0.055, 1.0)
|
||||||
var pressed_fill := Color(0.10, 0.030, 0.016, 1.0)
|
var pressed_fill := Color(0.090, 0.035, 0.020, 1.0)
|
||||||
button.add_theme_stylebox_override("normal", _make_button_style(normal_fill, UI_TARNISHED_BRONZE, 2))
|
button.add_theme_stylebox_override("normal", _make_button_style(normal_fill, UI_TARNISHED_BRONZE, 2))
|
||||||
button.add_theme_stylebox_override("hover", _make_button_style(hover_fill, UI_OLD_BRONZE, 2))
|
button.add_theme_stylebox_override("hover", _make_button_style(hover_fill, UI_OLD_BRONZE, 2))
|
||||||
button.add_theme_stylebox_override("pressed", _make_button_style(pressed_fill, UI_OLD_BRONZE, 2))
|
button.add_theme_stylebox_override("pressed", _make_button_style(pressed_fill, UI_OLD_BRONZE, 2))
|
||||||
@@ -1417,17 +1429,17 @@ func _create_hud() -> void:
|
|||||||
briefing_column.add_child(_make_section_caption("戰圖 · 軍幕 장계", 680))
|
briefing_column.add_child(_make_section_caption("戰圖 · 軍幕 장계", 680))
|
||||||
|
|
||||||
briefing_camp_overview_panel = PanelContainer.new()
|
briefing_camp_overview_panel = PanelContainer.new()
|
||||||
briefing_camp_overview_panel.custom_minimum_size = Vector2(680, 102)
|
briefing_camp_overview_panel.custom_minimum_size = Vector2(680, 108)
|
||||||
_apply_panel_style(briefing_camp_overview_panel, "silk_map")
|
_apply_panel_style(briefing_camp_overview_panel, "silk_map")
|
||||||
briefing_column.add_child(briefing_camp_overview_panel)
|
briefing_column.add_child(briefing_camp_overview_panel)
|
||||||
|
|
||||||
var briefing_camp_overview_shell := HBoxContainer.new()
|
var briefing_camp_overview_shell := HBoxContainer.new()
|
||||||
briefing_camp_overview_shell.add_theme_constant_override("separation", 10)
|
briefing_camp_overview_shell.add_theme_constant_override("separation", 10)
|
||||||
briefing_camp_overview_panel.add_child(briefing_camp_overview_shell)
|
briefing_camp_overview_panel.add_child(briefing_camp_overview_shell)
|
||||||
briefing_camp_overview_shell.add_child(_make_edict_marker_stack(["圖", "地"], 72))
|
briefing_camp_overview_shell.add_child(_make_edict_marker_stack(["圖", "地"], 86))
|
||||||
|
|
||||||
briefing_camp_overview_row = HBoxContainer.new()
|
briefing_camp_overview_row = HBoxContainer.new()
|
||||||
briefing_camp_overview_row.custom_minimum_size = Vector2(580, 84)
|
briefing_camp_overview_row.custom_minimum_size = Vector2(580, 92)
|
||||||
briefing_camp_overview_row.add_theme_constant_override("separation", 10)
|
briefing_camp_overview_row.add_theme_constant_override("separation", 10)
|
||||||
briefing_camp_overview_row.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
briefing_camp_overview_row.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||||
briefing_camp_overview_shell.add_child(briefing_camp_overview_row)
|
briefing_camp_overview_shell.add_child(briefing_camp_overview_row)
|
||||||
@@ -1445,7 +1457,7 @@ func _create_hud() -> void:
|
|||||||
briefing_camp_overview_texture.set_anchors_preset(Control.PRESET_FULL_RECT)
|
briefing_camp_overview_texture.set_anchors_preset(Control.PRESET_FULL_RECT)
|
||||||
briefing_camp_overview_texture.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
|
briefing_camp_overview_texture.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
|
||||||
briefing_camp_overview_texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
briefing_camp_overview_texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
|
||||||
briefing_camp_overview_texture.modulate = Color(0.78, 0.60, 0.35, 0.92)
|
briefing_camp_overview_texture.modulate = Color(0.90, 0.78, 0.56, 0.95)
|
||||||
camp_thumbnail_stack.add_child(briefing_camp_overview_texture)
|
camp_thumbnail_stack.add_child(briefing_camp_overview_texture)
|
||||||
|
|
||||||
briefing_camp_overview_fallback_label = Label.new()
|
briefing_camp_overview_fallback_label = Label.new()
|
||||||
@@ -1458,11 +1470,11 @@ func _create_hud() -> void:
|
|||||||
|
|
||||||
briefing_camp_overview_label = Label.new()
|
briefing_camp_overview_label = Label.new()
|
||||||
briefing_camp_overview_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
briefing_camp_overview_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||||
briefing_camp_overview_label.custom_minimum_size = Vector2(420, 72)
|
briefing_camp_overview_label.custom_minimum_size = Vector2(360, 86)
|
||||||
briefing_camp_overview_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
briefing_camp_overview_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||||
_apply_label_style(briefing_camp_overview_label, UI_AGED_INK, 14)
|
_apply_label_style(briefing_camp_overview_label, UI_AGED_INK, 14)
|
||||||
briefing_camp_overview_row.add_child(briefing_camp_overview_label)
|
briefing_camp_overview_row.add_child(briefing_camp_overview_label)
|
||||||
briefing_camp_overview_shell.add_child(_make_bamboo_gutter(14, 72))
|
briefing_camp_overview_shell.add_child(_make_bamboo_gutter(14, 86))
|
||||||
|
|
||||||
briefing_column.add_child(_make_scroll_rod(680, 4))
|
briefing_column.add_child(_make_scroll_rod(680, 4))
|
||||||
|
|
||||||
@@ -1740,11 +1752,18 @@ func _create_hud() -> void:
|
|||||||
_apply_panel_style(dialogue_speaker_panel, "speaker_seal")
|
_apply_panel_style(dialogue_speaker_panel, "speaker_seal")
|
||||||
dialogue_column.add_child(dialogue_speaker_panel)
|
dialogue_column.add_child(dialogue_speaker_panel)
|
||||||
|
|
||||||
|
var dialogue_speaker_row := HBoxContainer.new()
|
||||||
|
dialogue_speaker_row.add_theme_constant_override("separation", 8)
|
||||||
|
dialogue_speaker_panel.add_child(dialogue_speaker_row)
|
||||||
|
dialogue_speaker_row.add_child(_make_seal_tile("名", 24))
|
||||||
|
|
||||||
dialogue_speaker_label = Label.new()
|
dialogue_speaker_label = Label.new()
|
||||||
dialogue_speaker_label.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x - 24, 24)
|
dialogue_speaker_label.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x - 88, 24)
|
||||||
|
dialogue_speaker_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||||
dialogue_speaker_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
dialogue_speaker_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||||
_apply_label_style(dialogue_speaker_label, UI_PARCHMENT_TEXT, 18)
|
_apply_label_style(dialogue_speaker_label, UI_PARCHMENT_TEXT, 18)
|
||||||
dialogue_speaker_panel.add_child(dialogue_speaker_label)
|
dialogue_speaker_row.add_child(dialogue_speaker_label)
|
||||||
|
dialogue_speaker_row.add_child(_make_seal_tile("語", 24))
|
||||||
|
|
||||||
dialogue_text_panel = PanelContainer.new()
|
dialogue_text_panel = PanelContainer.new()
|
||||||
dialogue_text_panel.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x, 104)
|
dialogue_text_panel.custom_minimum_size = Vector2(DIALOGUE_TEXT_SIZE.x, 104)
|
||||||
@@ -1811,13 +1830,26 @@ func _create_hud() -> void:
|
|||||||
result_column.add_child(result_seal_ribbon)
|
result_column.add_child(result_seal_ribbon)
|
||||||
result_column.add_child(_make_section_caption("戰功 조서", 520))
|
result_column.add_child(_make_section_caption("戰功 조서", 520))
|
||||||
|
|
||||||
|
var result_body_panel := PanelContainer.new()
|
||||||
|
result_body_panel.custom_minimum_size = Vector2(520, 236)
|
||||||
|
_apply_panel_style(result_body_panel, "edict")
|
||||||
|
result_column.add_child(result_body_panel)
|
||||||
|
|
||||||
|
var result_body_row := HBoxContainer.new()
|
||||||
|
result_body_row.add_theme_constant_override("separation", 8)
|
||||||
|
result_body_panel.add_child(result_body_row)
|
||||||
|
result_body_row.add_child(_make_edict_marker_stack(["功", "賞", "命"], 198))
|
||||||
|
|
||||||
result_label = Label.new()
|
result_label = Label.new()
|
||||||
result_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
result_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||||
result_label.vertical_alignment = VERTICAL_ALIGNMENT_TOP
|
result_label.vertical_alignment = VERTICAL_ALIGNMENT_TOP
|
||||||
result_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
result_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||||
result_label.custom_minimum_size = Vector2(520, 236)
|
result_label.custom_minimum_size = Vector2(436, 198)
|
||||||
|
result_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||||
|
result_label.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||||
_apply_label_style(result_label, UI_AGED_INK, 16)
|
_apply_label_style(result_label, UI_AGED_INK, 16)
|
||||||
result_column.add_child(result_label)
|
result_body_row.add_child(result_label)
|
||||||
|
result_body_row.add_child(_make_edict_marker_stack(["封", "牘", "印"], 198))
|
||||||
|
|
||||||
result_column.add_child(_make_scroll_rod(520, 3))
|
result_column.add_child(_make_scroll_rod(520, 3))
|
||||||
|
|
||||||
@@ -3768,10 +3800,10 @@ func _format_objective_hud_text() -> String:
|
|||||||
var lines := []
|
var lines := []
|
||||||
var victory := String(state.objectives.get("victory", "적군을 모두 격파하라."))
|
var victory := String(state.objectives.get("victory", "적군을 모두 격파하라."))
|
||||||
if not victory.is_empty():
|
if not victory.is_empty():
|
||||||
lines.append("勝令: %s" % victory)
|
lines.append("勝令|%s" % victory)
|
||||||
var defeat := String(state.objectives.get("defeat", ""))
|
var defeat := String(state.objectives.get("defeat", ""))
|
||||||
if not defeat.is_empty():
|
if not defeat.is_empty():
|
||||||
lines.append("敗兆: %s" % defeat)
|
lines.append("敗兆|%s" % defeat)
|
||||||
if lines.is_empty():
|
if lines.is_empty():
|
||||||
return "勝令"
|
return "勝令"
|
||||||
return _join_strings(lines, "\n")
|
return _join_strings(lines, "\n")
|
||||||
@@ -4356,6 +4388,7 @@ func _update_result_panel() -> void:
|
|||||||
if campaign_complete_screen:
|
if campaign_complete_screen:
|
||||||
_clear_dialogue()
|
_clear_dialogue()
|
||||||
_clear_result_choices()
|
_clear_result_choices()
|
||||||
|
_apply_panel_style(result_panel, "result_victory_tablet")
|
||||||
result_panel.visible = true
|
result_panel.visible = true
|
||||||
if result_restart_button != null:
|
if result_restart_button != null:
|
||||||
result_restart_button.visible = false
|
result_restart_button.visible = false
|
||||||
@@ -4376,6 +4409,7 @@ func _update_result_panel() -> void:
|
|||||||
result_panel.visible = false
|
result_panel.visible = false
|
||||||
return
|
return
|
||||||
_apply_battle_result_once()
|
_apply_battle_result_once()
|
||||||
|
_apply_panel_style(result_panel, "result_victory_tablet")
|
||||||
result_panel.visible = true
|
result_panel.visible = true
|
||||||
_rebuild_result_choices()
|
_rebuild_result_choices()
|
||||||
if result_restart_button != null:
|
if result_restart_button != null:
|
||||||
@@ -4385,6 +4419,7 @@ func _update_result_panel() -> void:
|
|||||||
elif state.battle_status == BattleState.STATUS_DEFEAT:
|
elif state.battle_status == BattleState.STATUS_DEFEAT:
|
||||||
_clear_dialogue()
|
_clear_dialogue()
|
||||||
_clear_result_choices()
|
_clear_result_choices()
|
||||||
|
_apply_panel_style(result_panel, "result_defeat_tablet")
|
||||||
result_panel.visible = true
|
result_panel.visible = true
|
||||||
if result_restart_button != null:
|
if result_restart_button != null:
|
||||||
result_restart_button.visible = true
|
result_restart_button.visible = true
|
||||||
@@ -4401,14 +4436,14 @@ func _update_result_panel() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _format_victory_result_text() -> String:
|
func _format_victory_result_text() -> String:
|
||||||
return "승전 조서\n천명 이행: %s\n%s" % [
|
return "大勝 조서\n受命 勝令\n %s\n%s" % [
|
||||||
state.objectives.get("victory", ""),
|
state.objectives.get("victory", ""),
|
||||||
_format_battle_result_summary()
|
_format_battle_result_summary()
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
func _format_defeat_result_text() -> String:
|
func _format_defeat_result_text() -> String:
|
||||||
return "패전 비문\n흉조 성취: %s" % state.objectives.get("defeat", "")
|
return "敗軍 비문\n戒懼 敗兆\n %s" % state.objectives.get("defeat", "")
|
||||||
|
|
||||||
|
|
||||||
func _on_state_changed() -> void:
|
func _on_state_changed() -> void:
|
||||||
@@ -4454,11 +4489,11 @@ func _format_hanja_number(value: int) -> String:
|
|||||||
|
|
||||||
|
|
||||||
func _on_objective_updated(victory: String, defeat: String) -> void:
|
func _on_objective_updated(victory: String, defeat: String) -> void:
|
||||||
var notice_lines := ["새 軍令 봉인"]
|
var notice_lines := ["新詔 軍令 봉인"]
|
||||||
if not victory.is_empty():
|
if not victory.is_empty():
|
||||||
notice_lines.append("勝令: %s" % victory)
|
notice_lines.append("勝令|%s" % victory)
|
||||||
if not defeat.is_empty():
|
if not defeat.is_empty():
|
||||||
notice_lines.append("敗兆: %s" % defeat)
|
notice_lines.append("敗兆|%s" % defeat)
|
||||||
if objective_notice_label != null:
|
if objective_notice_label != null:
|
||||||
objective_notice_label.text = "\n".join(notice_lines)
|
objective_notice_label.text = "\n".join(notice_lines)
|
||||||
if objective_notice_panel != null:
|
if objective_notice_panel != null:
|
||||||
@@ -4798,7 +4833,7 @@ func _render_dialogue_line() -> void:
|
|||||||
_apply_dialogue_side(side)
|
_apply_dialogue_side(side)
|
||||||
dialogue_speaker_label.text = display_speaker
|
dialogue_speaker_label.text = display_speaker
|
||||||
dialogue_speaker_label.visible = not display_speaker.is_empty()
|
dialogue_speaker_label.visible = not display_speaker.is_empty()
|
||||||
dialogue_text_label.text = str(line.get("text", ""))
|
dialogue_text_label.text = _format_dialogue_body_text(str(line.get("text", "")))
|
||||||
_update_dialogue_portrait(display_speaker, str(line.get("portrait", "")))
|
_update_dialogue_portrait(display_speaker, str(line.get("portrait", "")))
|
||||||
_update_dialogue_controls()
|
_update_dialogue_controls()
|
||||||
dialogue_panel.visible = true
|
dialogue_panel.visible = true
|
||||||
@@ -4806,6 +4841,15 @@ func _render_dialogue_line() -> void:
|
|||||||
queue_redraw()
|
queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
|
func _format_dialogue_body_text(text: String) -> String:
|
||||||
|
var stripped := text.strip_edges()
|
||||||
|
if stripped.is_empty():
|
||||||
|
return ""
|
||||||
|
if stripped.begins_with("「") or stripped.begins_with("『"):
|
||||||
|
return stripped
|
||||||
|
return "「%s」" % stripped
|
||||||
|
|
||||||
|
|
||||||
func _update_dialogue_controls() -> void:
|
func _update_dialogue_controls() -> void:
|
||||||
if dialogue_progress_label != null:
|
if dialogue_progress_label != null:
|
||||||
dialogue_progress_label.text = "죽간 %s之%s" % [
|
dialogue_progress_label.text = "죽간 %s之%s" % [
|
||||||
@@ -5208,27 +5252,27 @@ func _format_briefing_objectives() -> String:
|
|||||||
var text := ""
|
var text := ""
|
||||||
var victory := str(state.objectives.get("victory", ""))
|
var victory := str(state.objectives.get("victory", ""))
|
||||||
if not victory.is_empty():
|
if not victory.is_empty():
|
||||||
text = "勝令:\n %s" % victory
|
text = "受命 勝令\n %s" % victory
|
||||||
var defeat := str(state.objectives.get("defeat", ""))
|
var defeat := str(state.objectives.get("defeat", ""))
|
||||||
if not defeat.is_empty():
|
if not defeat.is_empty():
|
||||||
if not text.is_empty():
|
if not text.is_empty():
|
||||||
text += "\n"
|
text += "\n"
|
||||||
text += "敗兆:\n %s" % defeat
|
text += "戒懼 敗兆\n %s" % defeat
|
||||||
var progress_lines := state.get_objective_progress_lines(false, false)
|
var progress_lines := state.get_objective_progress_lines(false, false)
|
||||||
if not progress_lines.is_empty():
|
if not progress_lines.is_empty():
|
||||||
if not text.is_empty():
|
if not text.is_empty():
|
||||||
text += "\n"
|
text += "\n"
|
||||||
text += "戰功 죽간:\n %s" % _join_strings(progress_lines, ", ")
|
text += "驗功 戰功 죽간\n %s" % _join_strings(progress_lines, " · ")
|
||||||
var risk_lines := state.get_defeat_progress_lines()
|
var risk_lines := state.get_defeat_progress_lines()
|
||||||
if not risk_lines.is_empty():
|
if not risk_lines.is_empty():
|
||||||
if not text.is_empty():
|
if not text.is_empty():
|
||||||
text += "\n"
|
text += "\n"
|
||||||
text += "凶兆 징후:\n %s" % _join_strings(risk_lines, ", ")
|
text += "不祥 凶兆 징후\n %s" % _join_strings(risk_lines, " · ")
|
||||||
var rewards_text := _format_briefing_rewards()
|
var rewards_text := _format_briefing_rewards()
|
||||||
if not rewards_text.is_empty():
|
if not rewards_text.is_empty():
|
||||||
if not text.is_empty():
|
if not text.is_empty():
|
||||||
text += "\n"
|
text += "\n"
|
||||||
text += "戰利 봉인:\n %s" % rewards_text
|
text += "封賞 戰利 봉인\n %s" % rewards_text
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
@@ -5274,28 +5318,33 @@ func _update_briefing_camp_overview(briefing: Dictionary, prep_locked: bool) ->
|
|||||||
|
|
||||||
|
|
||||||
func _format_briefing_camp_overview_text(briefing: Dictionary, prep_locked: bool) -> String:
|
func _format_briefing_camp_overview_text(briefing: Dictionary, prep_locked: bool) -> String:
|
||||||
var parts := []
|
var lines := []
|
||||||
var location := str(briefing.get("location", "")).strip_edges()
|
var location := str(briefing.get("location", "")).strip_edges()
|
||||||
if not location.is_empty():
|
if not location.is_empty():
|
||||||
parts.append(location)
|
lines.append("地勢 %s" % location)
|
||||||
parts.append("군자금 %d냥" % campaign_state.gold)
|
var camp_parts := ["軍資 %d냥" % campaign_state.gold]
|
||||||
var talk_text := _format_briefing_talk_overview_text()
|
var talk_text := _format_briefing_talk_overview_text()
|
||||||
if not talk_text.is_empty():
|
if not talk_text.is_empty():
|
||||||
parts.append(talk_text)
|
camp_parts.append(talk_text)
|
||||||
var shop_text := _format_briefing_shop_overview_text()
|
var shop_text := _format_briefing_shop_overview_text()
|
||||||
if not shop_text.is_empty():
|
if not shop_text.is_empty():
|
||||||
parts.append(shop_text)
|
camp_parts.append(shop_text)
|
||||||
|
if not camp_parts.is_empty():
|
||||||
|
lines.append("軍幕 %s" % _join_strings(camp_parts, " · "))
|
||||||
|
var prep_parts := []
|
||||||
var roster_text := _format_briefing_roster_overview_text()
|
var roster_text := _format_briefing_roster_overview_text()
|
||||||
if not roster_text.is_empty():
|
if not roster_text.is_empty():
|
||||||
parts.append(roster_text)
|
prep_parts.append(roster_text)
|
||||||
var formation_text := _format_briefing_formation_overview_text()
|
var formation_text := _format_briefing_formation_overview_text()
|
||||||
if not formation_text.is_empty():
|
if not formation_text.is_empty():
|
||||||
parts.append(formation_text)
|
prep_parts.append(formation_text)
|
||||||
if not state.get_controllable_player_units().is_empty():
|
if not state.get_controllable_player_units().is_empty():
|
||||||
parts.append("병장고 비축")
|
prep_parts.append("兵藏 비축")
|
||||||
|
if not prep_parts.is_empty():
|
||||||
|
lines.append("軍備 %s" % _join_strings(prep_parts, " · "))
|
||||||
if prep_locked:
|
if prep_locked:
|
||||||
parts.append("회상 두루마리 봉인")
|
lines.append("封印 회상 두루마리 봉인")
|
||||||
return _join_strings(parts, " · ")
|
return _join_strings(lines, "\n")
|
||||||
|
|
||||||
|
|
||||||
func _format_briefing_talk_overview_text() -> String:
|
func _format_briefing_talk_overview_text() -> String:
|
||||||
|
|||||||
@@ -211,12 +211,12 @@ func _check_objective_notice(failures: Array[String]) -> void:
|
|||||||
scene._on_objective_updated("Defeat the new vanguard.", "")
|
scene._on_objective_updated("Defeat the new vanguard.", "")
|
||||||
if scene.objective_notice_panel == null or not scene.objective_notice_panel.visible:
|
if scene.objective_notice_panel == null or not scene.objective_notice_panel.visible:
|
||||||
failures.append("objective notice panel should be visible after objective update")
|
failures.append("objective notice panel should be visible after objective update")
|
||||||
elif not scene.objective_notice_label.text.contains("새 軍令 봉인") or not scene.objective_notice_label.text.contains("勝令: Defeat the new vanguard."):
|
elif not scene.objective_notice_label.text.contains("新詔 軍令 봉인") or not scene.objective_notice_label.text.contains("勝令|Defeat the new vanguard."):
|
||||||
failures.append("objective notice label should use sealed edict wording: %s" % scene.objective_notice_label.text)
|
failures.append("objective notice label should use sealed edict wording: %s" % scene.objective_notice_label.text)
|
||||||
scene._on_objective_updated("", "Supply train is lost.")
|
scene._on_objective_updated("", "Supply train is lost.")
|
||||||
if scene.objective_notice_panel == null or not scene.objective_notice_panel.visible:
|
if scene.objective_notice_panel == null or not scene.objective_notice_panel.visible:
|
||||||
failures.append("objective notice panel should be visible after defeat update")
|
failures.append("objective notice panel should be visible after defeat update")
|
||||||
elif not scene.objective_notice_label.text.contains("새 軍令 봉인") or not scene.objective_notice_label.text.contains("敗兆: Supply train is lost."):
|
elif not scene.objective_notice_label.text.contains("新詔 軍令 봉인") or not scene.objective_notice_label.text.contains("敗兆|Supply train is lost."):
|
||||||
failures.append("objective notice label should use omen wording: %s" % scene.objective_notice_label.text)
|
failures.append("objective notice label should use omen wording: %s" % scene.objective_notice_label.text)
|
||||||
if scene._format_log_entry_text("Objective updated: Defeat the new vanguard.") != "軍令 개정: Defeat the new vanguard.":
|
if scene._format_log_entry_text("Objective updated: Defeat the new vanguard.") != "軍令 개정: Defeat the new vanguard.":
|
||||||
failures.append("objective log display should use edict wording")
|
failures.append("objective log display should use edict wording")
|
||||||
|
|||||||
@@ -2658,7 +2658,7 @@ func _check_scene_texture_loading(failures: Array[String]) -> void:
|
|||||||
if not merchant_notice.contains("군막 상인") or not merchant_notice.contains("길가의 물자"):
|
if not merchant_notice.contains("군막 상인") or not merchant_notice.contains("길가의 물자"):
|
||||||
failures.append("shop merchant notice should include name and flavor lines")
|
failures.append("shop merchant notice should include name and flavor lines")
|
||||||
var camp_overview := scene._format_briefing_camp_overview_text(scene.state.get_briefing(), false)
|
var camp_overview := scene._format_briefing_camp_overview_text(scene.state.get_briefing(), false)
|
||||||
for expected in ["영천, 중평 원년", "군자금 0냥", "군막 회의 · 3건", "보급 대기 1건", "군상 물품 · 2종", "출진 명부 2명 중 2명", "진형 배치 4칸", "병장고 비축"]:
|
for expected in ["地勢 영천, 중평 원년", "軍資 0냥", "군막 회의 · 3건", "보급 대기 1건", "군상 물품 · 2종", "출진 명부 2명 중 2명", "진형 배치 4칸", "兵藏 비축"]:
|
||||||
if not camp_overview.contains(expected):
|
if not camp_overview.contains(expected):
|
||||||
failures.append("camp overview should include %s: %s" % [expected, camp_overview])
|
failures.append("camp overview should include %s: %s" % [expected, camp_overview])
|
||||||
var bean: Dictionary = scene.state.get_item_def("bean")
|
var bean: Dictionary = scene.state.get_item_def("bean")
|
||||||
@@ -2778,27 +2778,27 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
|||||||
scene.free()
|
scene.free()
|
||||||
return
|
return
|
||||||
var briefing_text := scene._format_briefing_objectives()
|
var briefing_text := scene._format_briefing_objectives()
|
||||||
for expected in ["勝令:", "敗兆:", "戰功 죽간:", "凶兆 징후:", "戰利 봉인:"]:
|
for expected in ["受命 勝令", "戒懼 敗兆", "驗功 戰功 죽간", "不祥 凶兆 징후", "封賞 戰利 봉인"]:
|
||||||
if not briefing_text.contains(expected):
|
if not briefing_text.contains(expected):
|
||||||
failures.append("briefing objective parchment should use ancient heading `%s`: %s" % [expected, briefing_text])
|
failures.append("briefing objective parchment should use ancient heading `%s`: %s" % [expected, briefing_text])
|
||||||
var hud_objective := scene._format_objective_hud_text()
|
var hud_objective := scene._format_objective_hud_text()
|
||||||
if not hud_objective.contains("勝令:") or not hud_objective.contains("敗兆:"):
|
if not hud_objective.contains("勝令|") or not hud_objective.contains("敗兆|"):
|
||||||
failures.append("HUD objective should read as paired edict and omen text: %s" % hud_objective)
|
failures.append("HUD objective should read as paired edict and omen text: %s" % hud_objective)
|
||||||
var mission_text := scene._format_mission_panel_text()
|
var mission_text := scene._format_mission_panel_text()
|
||||||
for expected in ["勝令", "敗兆", "戰功 죽간", "凶兆 징후"]:
|
for expected in ["勝令", "敗兆", "戰功 죽간", "凶兆 징후"]:
|
||||||
if not mission_text.contains(expected):
|
if not mission_text.contains(expected):
|
||||||
failures.append("mission panel should use old campaign wording `%s`: %s" % [expected, mission_text])
|
failures.append("mission panel should use old campaign wording `%s`: %s" % [expected, mission_text])
|
||||||
_check_panel_style_fill(failures, scene.briefing_panel, "briefing panel", Color(0.33, 0.19, 0.075, 0.996))
|
_check_panel_style_fill(failures, scene.briefing_panel, "briefing panel", Color(0.42, 0.27, 0.10, 0.997))
|
||||||
_check_panel_style_frame(failures, scene.briefing_panel, "briefing panel", Color(0.20, 0.11, 0.045, 1.0), 13)
|
_check_panel_style_frame(failures, scene.briefing_panel, "briefing panel", Color(0.035, 0.018, 0.012, 1.0), 14)
|
||||||
_check_panel_style_fill(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.67, 0.49, 0.25, 0.998))
|
_check_panel_style_fill(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.58, 0.39, 0.16, 0.998))
|
||||||
_check_panel_style_frame(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.12, 0.060, 0.026, 0.98), 7)
|
_check_panel_style_frame(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.10, 0.065, 0.040, 1.0), 8)
|
||||||
_check_panel_style_fill(failures, scene.briefing_camp_overview_panel, "briefing silk map panel", Color(0.45, 0.30, 0.13, 0.994))
|
_check_panel_style_fill(failures, scene.briefing_camp_overview_panel, "briefing silk map panel", Color(0.35, 0.22, 0.085, 0.994))
|
||||||
_check_panel_style_frame(failures, scene.briefing_camp_overview_panel, "briefing silk map panel", Color(0.12, 0.060, 0.026, 0.98), 5)
|
_check_panel_style_frame(failures, scene.briefing_camp_overview_panel, "briefing silk map panel", Color(0.10, 0.065, 0.040, 1.0), 6)
|
||||||
_check_panel_style_fill(failures, scene.dialogue_panel, "dialogue panel", Color(0.030, 0.012, 0.007, 0.998))
|
_check_panel_style_fill(failures, scene.dialogue_panel, "dialogue panel", Color(0.10, 0.045, 0.020, 0.975))
|
||||||
_check_panel_style_frame(failures, scene.dialogue_panel, "dialogue panel", Color(0.20, 0.11, 0.045, 1.0), 12)
|
_check_panel_style_frame(failures, scene.dialogue_panel, "dialogue panel", Color(0.035, 0.018, 0.012, 1.0), 12)
|
||||||
_check_panel_style_fill(failures, scene.dialogue_portrait_panel, "dialogue portrait panel", Color(0.035, 0.014, 0.008, 1.0))
|
_check_panel_style_fill(failures, scene.dialogue_portrait_panel, "dialogue portrait panel", Color(0.035, 0.014, 0.008, 1.0))
|
||||||
_check_panel_style_fill(failures, scene.dialogue_speaker_panel, "dialogue speaker seal panel", Color(0.28, 0.020, 0.014, 1.0))
|
_check_panel_style_fill(failures, scene.dialogue_speaker_panel, "dialogue speaker seal panel", Color(0.28, 0.020, 0.014, 1.0))
|
||||||
_check_panel_style_fill(failures, scene.dialogue_text_panel, "dialogue text scroll panel", Color(0.61, 0.43, 0.20, 0.997))
|
_check_panel_style_fill(failures, scene.dialogue_text_panel, "dialogue text scroll panel", Color(0.64, 0.43, 0.18, 0.998))
|
||||||
_check_seal_ribbon(failures, scene.briefing_seal_ribbon, "briefing seal ribbon")
|
_check_seal_ribbon(failures, scene.briefing_seal_ribbon, "briefing seal ribbon")
|
||||||
_check_seal_ribbon(failures, scene.dialogue_seal_ribbon, "dialogue seal ribbon")
|
_check_seal_ribbon(failures, scene.dialogue_seal_ribbon, "dialogue seal ribbon")
|
||||||
_check_seal_ribbon(failures, scene.result_seal_ribbon, "result seal ribbon")
|
_check_seal_ribbon(failures, scene.result_seal_ribbon, "result seal ribbon")
|
||||||
@@ -2821,6 +2821,8 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
|||||||
scene._render_dialogue_line()
|
scene._render_dialogue_line()
|
||||||
if scene.dialogue_speaker_label == null or scene.dialogue_speaker_label.text != "조조":
|
if scene.dialogue_speaker_label == null or scene.dialogue_speaker_label.text != "조조":
|
||||||
failures.append("dialogue speaker label should render localized display_speaker")
|
failures.append("dialogue speaker label should render localized display_speaker")
|
||||||
|
if scene.dialogue_text_label == null or scene.dialogue_text_label.text != "「군령을 전하라.」":
|
||||||
|
failures.append("dialogue text should render as an old quotation scroll")
|
||||||
scene._hide_dialogue_panel()
|
scene._hide_dialogue_panel()
|
||||||
var enemy_lines := scene._normalized_dialogue_lines([{"speaker": "Wen Chou", "text": "전진!"}])
|
var enemy_lines := scene._normalized_dialogue_lines([{"speaker": "Wen Chou", "text": "전진!"}])
|
||||||
if enemy_lines.is_empty() or str((enemy_lines[0] as Dictionary).get("speaker", "")) != "문추":
|
if enemy_lines.is_empty() or str((enemy_lines[0] as Dictionary).get("speaker", "")) != "문추":
|
||||||
@@ -2869,10 +2871,13 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
|
|||||||
scene._update_briefing_camp_overview(scene.state.get_briefing(), false)
|
scene._update_briefing_camp_overview(scene.state.get_briefing(), false)
|
||||||
if scene.briefing_camp_overview_fallback_label == null or scene.briefing_camp_overview_fallback_label.text != "비단 전장도":
|
if scene.briefing_camp_overview_fallback_label == null or scene.briefing_camp_overview_fallback_label.text != "비단 전장도":
|
||||||
failures.append("briefing map fallback should read as an old campaign map")
|
failures.append("briefing map fallback should read as an old campaign map")
|
||||||
_check_panel_style_fill(failures, scene.result_panel, "result panel", Color(0.33, 0.19, 0.075, 0.996))
|
scene._apply_panel_style(scene.result_panel, "result_victory_tablet")
|
||||||
if not scene._format_victory_result_text().contains("승전 조서"):
|
_check_panel_style_fill(failures, scene.result_panel, "victory result panel", Color(0.46, 0.31, 0.13, 0.997))
|
||||||
|
scene._apply_panel_style(scene.result_panel, "result_defeat_tablet")
|
||||||
|
_check_panel_style_fill(failures, scene.result_panel, "defeat result panel", Color(0.16, 0.055, 0.025, 0.997))
|
||||||
|
if not scene._format_victory_result_text().contains("大勝 조서"):
|
||||||
failures.append("victory result should read like a bronze proclamation")
|
failures.append("victory result should read like a bronze proclamation")
|
||||||
if not scene._format_defeat_result_text().contains("패전 비문"):
|
if not scene._format_defeat_result_text().contains("敗軍 비문"):
|
||||||
failures.append("defeat result should read like a memorial tablet")
|
failures.append("defeat result should read like a memorial tablet")
|
||||||
var scroll_rod := scene._make_scroll_rod(120, 4)
|
var scroll_rod := scene._make_scroll_rod(120, 4)
|
||||||
if scroll_rod.get_child_count() != 5:
|
if scroll_rod.get_child_count() != 5:
|
||||||
|
|||||||
Reference in New Issue
Block a user