Skip to content

Commit

Permalink
inserter migration #999
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jan 19, 2024
1 parent ea43b05 commit 5b088bf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.1.13
Date: 2024-1-19
Changes:
- Made the inserter migration really actually work for real this time
---------------------------------------------------------------------------------------------------
Version: 2.1.12
Date: 2024-1-19
Changes:
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pycoalprocessing",
"version": "2.1.12",
"version": "2.1.13",
"factorio_version": "1.1",
"title": "Pyanodons Coal Processing",
"author": "Pyanodon, Nexela, Kingarthur, notnotmelon, Mootykins, ShadowGlass, Archezekiel, Quintuple",
Expand Down
11 changes: 2 additions & 9 deletions migrations/2.1.12.lua → migrations/2.1.13.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
local i = 0
for _, surface in pairs(game.surfaces) do
for _, inserter in pairs(surface.find_entities_filtered{name={'fast-inserter', 'stack-inserter'}}) do
if not (inserter.get_control_behavior()
or next(inserter.circuit_connected_entities.red)
or next(inserter.circuit_connected_entities.green)
or inserter.get_filter(1)
or inserter.logistic_network)
then
inserter.inserter_filter_mode = 'blacklist'
end
for _, inserter in pairs(surface.find_entities_filtered{name={'long-handed-inserter', 'fast-inserter', 'stack-inserter'}}) do
inserter.inserter_filter_mode = 'blacklist'
end

for _, inserter in pairs(surface.find_entities_filtered{type='inserter',name={'filter-inserter', 'stack-filter-inserter'}}) do
Expand Down
1 change: 0 additions & 1 deletion scripts/inserters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Inserters.events.on_built = function(event)
or next(inserter.circuit_connected_entities.red)
or next(inserter.circuit_connected_entities.green)
or inserter.get_filter(1)
or inserter.logistic_network
then return end
inserter.inserter_filter_mode = 'blacklist'
end

0 comments on commit 5b088bf

Please sign in to comment.