diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 4f63cd4..48aa13d 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -32,8 +32,7 @@ local rail_support_pole = { if settings.startup['PHI-CT'].value then local function trash_chest_creation(event) - local entity = event.entity or event.created_entity - entity.remove_unfiltered_items = true + (event.entity or event.created_entity).remove_unfiltered_items = true end script.on_event(defines.events.on_built_entity, trash_chest_creation, {{filter='name', name='trash-chest'}})