mirror of
https://github.com/Wyrrrd/Autofilter.git
synced 2026-04-19 11:31:22 +02:00
Compare commits
5 Commits
2751d12b5c
...
5877674873
| Author | SHA1 | Date | |
|---|---|---|---|
| 5877674873 | |||
| fffc74e0e8 | |||
| c178327717 | |||
| 8eac59487b | |||
| aa5d98b0f9 |
@@ -1,4 +1,16 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.4
|
||||
Date: 2026-02-19
|
||||
Locale:
|
||||
- Update french and japanese
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.3
|
||||
Date: 2025-09-30
|
||||
Changes:
|
||||
- Update deprecated inventory defines
|
||||
Bugfixes:
|
||||
- Catch crash with infinity containers
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.2
|
||||
Date: 2024-12-19
|
||||
Locale:
|
||||
|
||||
+11
-5
@@ -69,11 +69,11 @@ end
|
||||
local function remove_noninsertable_items(items,entity)
|
||||
local search_inventories = {
|
||||
chest = {defines.inventory.chest},
|
||||
furnace = {defines.inventory.furnace_source},
|
||||
furnace = {defines.inventory.crafter_input},
|
||||
roboport = {defines.inventory.roboport_robot, defines.inventory.roboport_material},
|
||||
assembling_machine = {defines.inventory.assembling_machine_input},
|
||||
assembling_machine = {defines.inventory.crafter_input},
|
||||
lab = {defines.inventory.lab_input},
|
||||
rocket_silo = {defines.inventory.rocket_silo_rocket, defines.inventory.rocket_silo_input},
|
||||
rocket_silo = {defines.inventory.rocket_silo_rocket, defines.inventory.crafter_input},
|
||||
cargo_wagon = {defines.inventory.cargo_wagon},
|
||||
turret = {defines.inventory.turret_ammo},
|
||||
artillery_turret = {defines.inventory.artillery_turret_ammo},
|
||||
@@ -144,8 +144,14 @@ end
|
||||
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
|
||||
filter_items[#filter_items+1] = get_item_name(entity.get_filter(slot))
|
||||
if entity.type == "infinity-container" then
|
||||
if entity.get_infinity_container_filter(slot) then
|
||||
filter_items[#filter_items+1] = get_item_name(entity.get_infinity_container_filter(slot))
|
||||
end
|
||||
else
|
||||
if entity.get_filter(slot) then
|
||||
filter_items[#filter_items+1] = get_item_name(entity.get_filter(slot))
|
||||
end
|
||||
end
|
||||
end
|
||||
return filter_items
|
||||
|
||||
Reference in New Issue
Block a user