Dropdowns are siblings of the button that reads them, and the loop
bounds come from the interface count.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The interfaces are chests and constant combinators, so the inventory,
logistic sections and first circuit section always exist.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
get_player_roles always returns at least the default or root role, so
get_player_highest_role never returns nil, and callers were right to
treat it that way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`Roles.new_role` returned the result of `error`, which made it nullable,
and `set_permission_group` returned nil for an unknown group, which
broke the config chain with an index error rather than saying so.
Positions and bounding boxes read back from the game always use the
named members, so they are narrowed once where they enter a function.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Locals declared ahead of an assignment inside a callback were inferred
as nil at every use site.
The role event handlers are given a class so the table is not unified
with the other module handler tables.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`loadstring` was removed in Lua 5.2, `load` takes a string the same way.
Warp gui child lookups are optional, so they use the same assert the
rest of the repo does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`LogisticFilter.signal` became `value` in 2.0, so the clear loop broke
on the first slot and outdated signals were left behind.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emmylua takes self from the owner table, so `@param self ExpRoles.Role`
only applies with dot syntax. Call sites still use a colon.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`config.temp_warning_limit` does not exist, the warnings config defines
`script_warning_limit`, and the locale expects it as `__3__/__4__`, so
the command was printing nil.
map_tags is keyed by the force name joined to the tag number, and
custom_color is the Color union.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emmylua only parses the inline cast as `--[[@as T]]`, the spaced form
`--[[ @as T ]]` is treated as a plain comment, so all 149 of them were
doing nothing.
LuaGuiElement.style is a union because a style name can be assigned to
it, so reading it back needs the cast.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`get_contents` and `targeted_items_pickup`/`_deliver` return lists of
ItemWithQualityCount in 2.0, they are no longer name keyed dictionaries,
so the logistorage stats were indexing by array position.
PreferenceEnum is bidirectional, matching what ExpUtil.enum returns.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The registry and the prototype were both bare tables, so every
`datastore:method()` call resolved to nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The gui element locals are declared at the top and assigned far below,
so emmylua inferred them as nil at every use site.
circuit_oc was reassigned from a control behaviour to a logistic
section, which hid every section method behind the wrong type.
allowed_items entries carry heterogeneous optional properties, now
described by a class.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emmylua deserialises an unknown diagnostic code to a catch all that
matches no checker, so every `invisible`, `nil-check` and
`global-element` suppression was silently doing nothing. Renamed to the
emmylua codes. `name-style-check` has no equivalent and is dropped, it
was already disabled under luals.
The `get_tile` suppressions referenced an api typedef bug from 2024
which no longer reproduces.
need-check-nil is deferred rather than disabled on merit: a third of the
407 findings come from MapPosition and BoundingBox being aliased as
`struct|[double, double]`, so every `entity.position.x` reads as
possibly nil. The rest need per site knowledge of runtime invariants.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Migrate player list gui to scenario
Move modules/gui/player-list into exp_scenario/gui/player_list using the
new exp_gui element API, matching the other scenario guis.
- Store the selected player and action on the container's player data
instead of a datastore, folding the datastore on_update reactivity
into explicit setter functions
- Switch the actions config to injected accessor functions and the
exp-gui_player-list locale namespace
- Add the locale section, register in control.lua, and disable the
legacy module in the file loader
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Align names and call patterns to best practice
Apply the conventions from the rocket info gui review to the player list,
and remove the now migrated legacy module.
- Move row building onto the table def as calculate_row_data, and refresh
via refresh_player which computes the row data once per player
- Store the selection on the container with private/public accessor
methods instead of poking element data directly
- Store the selected player as a LuaPlayer rather than a string and update
the actions config to match
- Use :style{} on the player table and make the action and reason bars
their own element definitions
- Delete the migrated legacy gui and its file loader entry
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Address player list review feedback
- Rename the player table element data class to element_data
- Remove the redundant offline selection clear; on_player_left_game
already clears any selection pointing at a player who disconnects
- Move the action bar and reason bar visibility into their own refresh
methods so refresh_player just delegates to them
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Style and locale fixes
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com>
Apply the conventions from the rocket info gui review to the player list,
and remove the now migrated legacy module.
- Move row building onto the table def as calculate_row_data, and refresh
via refresh_player which computes the row data once per player
- Store the selection on the container with private/public accessor
methods instead of poking element data directly
- Store the selected player as a LuaPlayer rather than a string and update
the actions config to match
- Use :style{} on the player table and make the action and reason bars
their own element definitions
- Delete the migrated legacy gui and its file loader entry
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move modules/gui/player-list into exp_scenario/gui/player_list using the
new exp_gui element API, matching the other scenario guis.
- Store the selected player and action on the container's player data
instead of a datastore, folding the datastore on_update reactivity
into explicit setter functions
- Switch the actions config to injected accessor functions and the
exp-gui_player-list locale namespace
- Add the locale section, register in control.lua, and disable the
legacy module in the file loader
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The rocket info gui and its control module now live in
exp_scenario/gui/rocket_info, so delete the orphaned legacy files and
drop the disabled file loader entry.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Port modules/gui/rocket-info into exp_scenario/gui/rocket_info using the
new exp_gui element API, matching the other scenario guis. The per-force
stats, launch times and silo tracking from the legacy control module are
folded into the gui module.
- Drop the removed auto/remote launch controls and count launches via
on_cargo_pod_finished_ascending instead of the old launch event
- Add the exp-gui_rocket-info locale section
- Disable the legacy module in the file loader and re-enable the
gui/rocket-info role permission
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>