feat: add missing wood opportunities
This commit is contained in:
@@ -222,10 +222,23 @@ func _remember(
|
||||
|
||||
|
||||
static func is_knowable_event(event: EconomicEventRecord) -> bool:
|
||||
if event == null or float(event.data["amount"]) <= 0.0:
|
||||
if event == null:
|
||||
return false
|
||||
var event_type := StringName(event.data["event_type"])
|
||||
var item_id := StringName(event.data["item_id"])
|
||||
if event_type == SimulationIds.EVENT_TASK_BLOCKED:
|
||||
return (
|
||||
int(event.data["actor_id"]) >= 0
|
||||
and StringName(event.data["source_id"]) == SimulationIds.STORAGE_VILLAGE_WOODPILE
|
||||
and item_id == SimulationIds.RESOURCE_WOOD
|
||||
and (
|
||||
StringName(event.data.get("action_id", &""))
|
||||
in [SimulationIds.ACTION_PATROL, SimulationIds.ACTION_STUDY]
|
||||
)
|
||||
and float(event.data.get("required_amount", 0.0)) > 0.0
|
||||
)
|
||||
if float(event.data["amount"]) <= 0.0:
|
||||
return false
|
||||
if event_type == SimulationIds.EVENT_STORAGE_DEPOSITED:
|
||||
return item_id == SimulationIds.RESOURCE_FOOD
|
||||
if event_type != SimulationIds.EVENT_STORAGE_WITHDRAWN:
|
||||
|
||||
Reference in New Issue
Block a user