Show event-gated objective markers
This commit is contained in:
@@ -3621,6 +3621,7 @@ func _collect_objective_cells(condition_group, result: Array[Vector2i]) -> void:
|
||||
if typeof(condition_group) != TYPE_DICTIONARY:
|
||||
return
|
||||
if not _condition_gate_open(condition_group):
|
||||
_collect_after_event_objective_cells(str(condition_group.get("after_event", "")), result)
|
||||
return
|
||||
|
||||
var condition_type := str(condition_group.get("type", ""))
|
||||
@@ -3635,6 +3636,22 @@ func _collect_objective_cells(condition_group, result: Array[Vector2i]) -> void:
|
||||
result.append(cell)
|
||||
|
||||
|
||||
func _collect_after_event_objective_cells(event_id: String, result: Array[Vector2i]) -> void:
|
||||
if event_id.is_empty() or fired_event_ids.has(event_id):
|
||||
return
|
||||
var event := _event_by_id(event_id)
|
||||
if event.is_empty():
|
||||
return
|
||||
var when: Dictionary = event.get("when", {})
|
||||
if str(when.get("type", "")) != "unit_reaches_tile":
|
||||
return
|
||||
if not _event_gate_open(when) or not _campaign_flags_match(when.get("campaign_flags", {})):
|
||||
return
|
||||
for cell in _condition_cells(when):
|
||||
if not result.has(cell):
|
||||
result.append(cell)
|
||||
|
||||
|
||||
func _find_turn_limit(condition_group) -> int:
|
||||
if typeof(condition_group) == TYPE_ARRAY:
|
||||
var best_limit := 0
|
||||
|
||||
Reference in New Issue
Block a user