Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i put shit on the wrong branch like an idiot #354

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.21
Date: 2024-2-14
Changes:
- Fixed that if an inserter had a filter set on any slot other than 1 it would get reset to blacklist
---------------------------------------------------------------------------------------------------
Version: 2.1.20
Date: 2024-2-7
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.20",
"version": "2.1.21",
"factorio_version": "1.1",
"title": "Pyanodons Coal Processing",
"author": "Pyanodon, Nexela, Kingarthur, notnotmelon, Mootykins, ShadowGlass, Archezekiel, Quintuple",
Expand Down
9 changes: 8 additions & 1 deletion scripts/inserters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ Inserters.events = {}
Inserters.events.on_built = function(event)
local inserter = event.entity or event.created_entity
if not inserter.valid or inserter.type ~= 'inserter' then return end
local slot_count = inserter.filter_slot_count
local has_filter = false
for i = 1,slot_count do
if inserter.get_filter(i) then
has_filter = true
end
end
if inserter.get_control_behavior()
or next(inserter.circuit_connected_entities.red)
or next(inserter.circuit_connected_entities.green)
or inserter.get_filter(1)
or has_filter
then return end
inserter.inserter_filter_mode = 'blacklist'
end
Loading