Skip to content

Commit bf89a0b

Browse files
committed
Fix: alt+leftbracket for splitter filters got dropped somehow, bring it back
1 parent 11868b6 commit bf89a0b

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

control.lua

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3225,9 +3225,24 @@ EventManager.on_event(
32253225
local p = game.get_player(pindex)
32263226
local stack = p.cursor_stack
32273227

3228-
-- Only handle offshore pumps with alt+[
3228+
-- Handle offshore pumps with alt+[
32293229
if stack and stack.valid_for_read and stack.name == "offshore-pump" then
32303230
BuildingTools.build_offshore_pump_in_hand(pindex)
3231+
return
3232+
end
3233+
3234+
-- Handle splitter filter set/clear
3235+
local selected = p.selected
3236+
if selected and selected.valid and selected.type == "splitter" then
3237+
local result
3238+
if stack and stack.valid_for_read then
3239+
-- Set filter to item in hand
3240+
result = TransportBelts.set_splitter_priority(selected, nil, nil, stack, false)
3241+
else
3242+
-- Clear filter with empty hand
3243+
result = TransportBelts.set_splitter_priority(selected, nil, nil, nil, true)
3244+
end
3245+
Speech.speak(pindex, result)
32313246
end
32323247
end
32333248
)

locale/en/controls.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ fa-backspace=Clear field (Backspace)
77
fa-c-backspace=Delete blueprint/planner (Ctrl+Backspace)
88
fa-n=Circuit network immediate neighbors (N)
99
fa-s-n=Circuit network navigator (Shift+N)
10-
fa-a-leftbracket=Assisted offshore pump placement (Alt+[)
10+
fa-a-leftbracket=Assisted offshore pump placement / Set or clear splitter filter (Alt+[)

0 commit comments

Comments
 (0)