mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-31 12:11:40 +09:00
.
This commit is contained in:
@@ -40,7 +40,10 @@ end)
|
|||||||
|
|
||||||
if settings.startup['PHI-CT'].value then
|
if settings.startup['PHI-CT'].value then
|
||||||
local function trash_entity_creation(event)
|
local function trash_entity_creation(event)
|
||||||
if event.entity and event.entity.valid and event.entity.name then
|
if not (event.entity and event.entity.valid and event.entity.name) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if event.entity.name == 'trash-chest' then
|
if event.entity.name == 'trash-chest' then
|
||||||
event.entity.infinity_container_filters = {}
|
event.entity.infinity_container_filters = {}
|
||||||
event.entity.remove_unfiltered_items = true
|
event.entity.remove_unfiltered_items = true
|
||||||
@@ -49,7 +52,6 @@ if settings.startup['PHI-CT'].value then
|
|||||||
event.entity.set_infinity_pipe_filter(nil)
|
event.entity.set_infinity_pipe_filter(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
local filter = {{filter = 'type', type = 'infinity-container', mode = 'or'}, {filter = 'type', type = 'infinity-pipe', mode = 'or'}}
|
local filter = {{filter = 'type', type = 'infinity-container', mode = 'or'}, {filter = 'type', type = 'infinity-pipe', mode = 'or'}}
|
||||||
script.on_event(defines.events.on_built_entity, trash_entity_creation, filter)
|
script.on_event(defines.events.on_built_entity, trash_entity_creation, filter)
|
||||||
|
|||||||
Reference in New Issue
Block a user