Skip to content

Move the warp list into exp_scenario - #462

Open
bbassie wants to merge 1 commit into
explosivegaming:mainfrom
bbassie:feature/scenario-warp-list
Open

Move the warp list into exp_scenario#462
bbassie wants to merge 1 commit into
explosivegaming:mainfrom
bbassie:feature/scenario-warp-list

Conversation

@bbassie

@bbassie bbassie commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The warp system was a legacy control module plus a legacy gui, both on expcore.datastore. They are now one scenario gui, exp_scenario/module/gui/warp_list.lua, in the shape of the task list: per force warps and per player cooldown and proximity state live on the container's element data behind _get_force_data/_get_player_data and typed getters, each row cell is a Gui.define which carries its warp in element data, and refreshes compute a player's status once (get_status) and apply it to every row rather than recomputing per element. Warps are objects instead of string ids, the last editor is a LuaPlayer, ids are per force, and the cooldown counts ticks.

Behaviour is the same as before: spawn warp created for a force on its first player, warps sorted spawn first then by name, add button blocked near water, entities, or another warp, edit mode with icon picker and textfield where discarding a never confirmed warp removes it, teleport with vehicle handling, cooldown bar, proximity auto show/hide unless the player toggled the list themselves, same network check through the area's pole, and map tags restored when a player edits or removes them.

The locale moves to [exp-gui_warp-list] in en, zh-CN and zh-TW with keys named by region and use (tooltip-goto-*, tooltip-sub-*, add-warning-*), and the legacy [warp-list] sections are removed. The legacy modules and the file loader entry are deleted. The config stays in exp_legacy/config/gui/warps.lua for now, like the other gui configs.

Lua lint is clean. On my dev instance the scenario loads with 0 errors, and I drove the non gui paths over rcon: add, set_spawn_warp, sort order, tag creation, _make_area (tiles, pole reference, old tile), remove_warp (tiles restored, entities gone, tag destroyed), and clearing the spawn. I could not test the gui itself headless, so the row refresh, edit flow, cooldown bar and proximity show/hide need a real player before merging. The previous legacy version has been kept in behaviour but the code paths are new, so a smoke test with two players on one force (one editing while the other watches) would be the most useful check.

The warp system was split across a legacy control module and a legacy gui,
both built on expcore.datastore. They are now one exp_scenario gui,
exp_scenario/module/gui/warp_list.lua, in the shape of the task list: per
force warps and per player cooldown and proximity state live on the
container's element data, rows are element defines which carry their warp in
element data, and refreshes compute the player's status once and apply it to
every row. Warps are referenced as objects rather than string ids, the last
editor is a LuaPlayer, and the cooldown counts ticks.

The locale moves to [exp-gui_warp-list] in en, zh-CN and zh-TW with keys
named by region and use, and the legacy [warp-list] sections are removed
along with the two legacy modules and the file loader entry. The config
stays in exp_legacy/config/gui/warps.lua for now like the other gui configs.
@bbassie
bbassie force-pushed the feature/scenario-warp-list branch from 833d9dc to 70b94d0 Compare September 6, 2026 16:44
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.

1 participant