I suppose it would be more efficient if my turrets didn't have to look for fires, but if the dummies were placed as soon as any fire was created anywhere, even if no turret was near it (the dummies are removed when the fires expire). But the common events like on_build don't trigger on fires. According to the wiki, fire inherits created_effect from Prototype/Entity, but I haven't been able to create dummies with it yet. Perhaps it's a wiki bug and the fire prototype doesn't support this property after all, but perhaps I'm doing it just wrong:
Code: Select all
local fires = data.raw.fire
for name, entity in pairs(fires) do
entity.created_effect = {
type = "direct",
source_effects = {
type = "create-entity",
entity_name = acids[name] and WT.acid_dummy_name or WT.fire_dummy_name,
trigger_created_entity = true
}
}
end