Split objective panel progress and risk
This commit is contained in:
@@ -1423,18 +1423,28 @@ func get_objective_cells() -> Array[Vector2i]:
|
||||
return result
|
||||
|
||||
|
||||
func get_objective_progress_lines(include_defeat_risks := false) -> Array[String]:
|
||||
func get_objective_progress_lines(include_defeat_risks := false, include_turn_limit := true) -> Array[String]:
|
||||
var result: Array[String] = []
|
||||
_append_condition_progress_lines(battle_conditions.get("victory", {}), result, "victory")
|
||||
if include_defeat_risks:
|
||||
_append_condition_progress_lines(battle_conditions.get("defeat", {}), result, "defeat")
|
||||
else:
|
||||
elif include_turn_limit:
|
||||
_append_turn_limit_progress_line(result)
|
||||
return result
|
||||
|
||||
|
||||
func get_objective_progress_text(include_defeat_risks := false) -> String:
|
||||
return _join_strings(get_objective_progress_lines(include_defeat_risks), " | ")
|
||||
func get_objective_progress_text(include_defeat_risks := false, include_turn_limit := true) -> String:
|
||||
return _join_strings(get_objective_progress_lines(include_defeat_risks, include_turn_limit), " | ")
|
||||
|
||||
|
||||
func get_defeat_progress_lines() -> Array[String]:
|
||||
var result: Array[String] = []
|
||||
_append_condition_progress_lines(battle_conditions.get("defeat", {}), result, "defeat")
|
||||
return result
|
||||
|
||||
|
||||
func get_defeat_progress_text() -> String:
|
||||
return _join_strings(get_defeat_progress_lines(), " | ")
|
||||
|
||||
|
||||
func get_first_skill_id(unit_id: String) -> String:
|
||||
|
||||
Reference in New Issue
Block a user