1
0
mirror of https://github.com/Wyrrrd/Autofilter.git synced 2026-04-17 18:54:50 +02:00

Remove debug messages

This commit is contained in:
Wyrrrd
2024-11-06 15:40:02 +01:00
committed by GitHub
parent 63166c92cd
commit b8b9fe494a

View File

@@ -145,10 +145,6 @@ local function get_items_by_entity_filter(entity)
local filter_items = {}
for slot = 1,entity.filter_slot_count do
if entity.get_filter(slot) then
-- Debug message
if __DebugAdapter then
__DebugAdapter.print("[Autofilter] " .. get_item_name(entity.get_filter(slot)))
end
filter_items[#filter_items+1] = get_item_name(entity.get_filter(slot))
end
end
@@ -212,16 +208,10 @@ local function on_built_entity(event)
-- Read inventory filter at pickup, write to filter
if inventory_pickup and inventory_pickup.is_filtered() then
items = concatenate_tables(items,get_items_by_inventory_filter(inventory_pickup))
if __DebugAdapter then
__DebugAdapter.print("[Autofilter] Inventory: " .. table.concat(items,", "))
end
end
-- Read entity filter at pickup, write to filter
if pickup[1].filter_slot_count > 0 then
items = concatenate_tables(items,get_items_by_entity_filter(pickup[1]))
if __DebugAdapter then
__DebugAdapter.print("[Autofilter] Entity: " .. table.concat(items,", "))
end
end
elseif step == "belt" then
-- Read belt transport lines at pickup, write to filter
@@ -263,4 +253,4 @@ end
--event handling
script.on_event({defines.events.on_lua_shortcut, "autofilter"}, toggle_shortcut)
script.on_event(defines.events.on_built_entity, on_built_entity,{{filter="type", type = "inserter"}})
script.on_event(defines.events.on_built_entity, on_built_entity,{{filter="type", type = "inserter"}})