From 9cf351fba3b8d836a663a178599ecdc1319949e8 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 8 May 2026 23:44:29 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 9 ++------- PHI-CL/control/trash.lua | 12 ++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 PHI-CL/control/trash.lua diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 7ba8cce..66fc8a8 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -2,6 +2,7 @@ local cargo_landing_pad = require('control/cargo-landing-pad') local cargo_landing_chest = require('control/cargo-landing-chest') local lab = require('control/lab') local rail_support = require('control/rail-support') +local trash = require('control/trash') local inserter_direction = { [1] = defines.direction.north, @@ -99,13 +100,7 @@ local function entity_build(event) cargo_landing_chest.build(event) lab.build(event) rail_support.build(event) - - if event.entity.type == 'infinity-container' and event.entity.name == 'trash-chest' then - event.entity.remove_unfiltered_items = true - - elseif event.entity.type == 'infinity-pipe' and event.entity.name == 'trash-pipe' then - event.entity.set_infinity_pipe_filter(nil) - end + trash.build(event) end local function storage_init() diff --git a/PHI-CL/control/trash.lua b/PHI-CL/control/trash.lua new file mode 100644 index 0000000..a68cde6 --- /dev/null +++ b/PHI-CL/control/trash.lua @@ -0,0 +1,12 @@ +local main = {} + +function main.build(event) + if event.entity.type == 'infinity-container' and event.entity.name == 'trash-chest' then + event.entity.remove_unfiltered_items = true + + elseif event.entity.type == 'infinity-pipe' and event.entity.name == 'trash-pipe' then + event.entity.set_infinity_pipe_filter(nil) + end +end + +return main