Skip to content

Add the missing GUI event handlers to utils/gui - #1656

Merged
grilledham merged 9 commits into
Refactorio:developfrom
lex:gui-handlers
Oct 25, 2026
Merged

grilledham merged 9 commits into
Refactorio:developfrom
lex:gui-handlers

Conversation

@lex

@lex lex commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1654 (Update to Factorio 2.1): until that merges this diff includes its commits too. The change for review is one commit: compare factorio-2.1...gui-handlers.

RedRafe's commit from #1569, cherry-picked (it keeps his authorship): utils/gui gets handler factories for the GUI events it was missing, the same way as the existing ones (one handler per element name, element and player checked valid, player added to the event):

  • Gui.on_confirmed, Gui.on_hover, Gui.on_leave, Gui.on_location_changed, Gui.on_selected_tab_changed
  • Gui.on_inventory_action, for 2.1's new inventory GUI element. on_gui_inventory_action only exists in 2.1, which is why this is stacked on Update to Factorio 2.1 #1654.

Nothing uses them yet. On a local 2.1.23 the develop and crashsite templates pass (58 and 90 passed, 0 failed); luacheck .: 0 warnings / 0 errors.

🤖 Generated with Claude Code

@lex lex mentioned this pull request Oct 25, 2026
RedRafe and others added 8 commits October 25, 2026 13:08
In 2.1 get_quick_bar_slot returns a table, {type, filter} or {type,
item}, not an item prototype, so .name on it was nil: auto stash failed
with "table index is nil" for any player with a quick bar slot set, and
saving quick bars saved empty bars. Both now take the name from the
slot's filter or item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.1 removed LuaEntity.neighbours. Underground belts now have
underground_belt_neighbour and pipes-to-ground fluidbox_neighbours,
which the Citadel, Fault Lines and Rivers tests use through connected().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since 2.1 a flow added with on_flow shows up in the statistics two ticks
later, so the tests read the counts before it had landed: the first
failed on every Danger Ores map, and "other items do not count" passed
without checking anything. Each test now waits for its own flow first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI now tests the latest stable 2.1 release, and AGENTS.md says the
scenario targets 2.1 and lists the 2.0 API it removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grilledham
grilledham merged commit d5d1d46 into Refactorio:develop Oct 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants