From 43593c5b48af4cdf69e972d4155dd2693851d3b3 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 18 Apr 2025 00:16:15 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 0a62f92..be9304c 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -33,18 +33,16 @@ local rail_support_pole = { if settings.startup['PHI-CT'].value then local function trash_creation(event) - local entity = event.created_entity or event.entity - - if not (entity and entity.valid) then + if not (event.entity and event.entity.valid) then return end - if entity.name == 'trash-chest' then - entity.infinity_container_filters = {} - entity.remove_unfiltered_items = true + if event.entity.name == 'trash-chest' then + event.entity.infinity_container_filters = {} + event.entity.remove_unfiltered_items = true - elseif entity.name == 'trash-pipe' then - entity.set_infinity_pipe_filter(nil) + elseif event.entity.name == 'trash-pipe' then + event.entity.set_infinity_pipe_filter(nil) end end