This commit is contained in:
2025-04-18 00:16:15 +09:00
parent 669efa333e
commit 43593c5b48

View File

@@ -33,18 +33,16 @@ local rail_support_pole = {
if settings.startup['PHI-CT'].value then if settings.startup['PHI-CT'].value then
local function trash_creation(event) local function trash_creation(event)
local entity = event.created_entity or event.entity if not (event.entity and event.entity.valid) then
if not (entity and entity.valid) then
return return
end end
if entity.name == 'trash-chest' then if event.entity.name == 'trash-chest' then
entity.infinity_container_filters = {} event.entity.infinity_container_filters = {}
entity.remove_unfiltered_items = true event.entity.remove_unfiltered_items = true
elseif entity.name == 'trash-pipe' then elseif event.entity.name == 'trash-pipe' then
entity.set_infinity_pipe_filter(nil) event.entity.set_infinity_pipe_filter(nil)
end end
end end