Commit Graph
3570 Commits
Author SHA1 Message Date
bbassieandClaude Opus 5.5 6363f15cb9 Replace SILENT_TEST and VERBOSE_TEST with TEST_OUTPUT
The reporter now handles all three modes: verbose prints everything,
normal prints output from failing tests and hooks, silent prints only
the results. The integration spawn helper and setup_logging no longer
filter output themselves.

npm install output in plugin install now goes through the logger
instead of inherited stdio, so it follows the log level and is
captured in tests like the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:31:45 +00:00
bbassieandClaude Opus 5.5 838a43428b Only print test output for failing tests
A spec reporter subclass buffers console output, including winston's
ConsoleTransport and the integration child process lines, and prints it
above the failure line when a test or hook fails. VERBOSE_TEST streams
everything as before, and CI sets it on debug re-runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:27:29 +00:00
Daniel 5cf14eb15b Fix plugin list and header layout on mobile (#1223) 2026-11-17 12:14:36 +00:00
Bastiaan adc92fbdb0 Merge pull request #1222 from bbassie/chore/mocha-12
Bump mocha to 12
2026-11-17 12:14:08 +00:00
89f966bb68 Keep quick bar slots whose record is not in the blueprint library yet (#1221)
* Keep quick bar slots whose record is not in the blueprint library yet

A save gets a player's blueprint library from the client some seconds
after the join. The data of a player new to the save is applied before
that, so quick bar slots pointing at library records were cleared, and
the next upload stored the quick bar without them.

The entries are now kept. They are set once the record shows up, and an
upload before that stores them again as they came.

Fixes #1219

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7

* Leave missing quick bar records alone once the quick bar is not synced

An instance whose quick bar sync was turned off while a record entry was
pending still set the slot when the library arrived.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7

---------

Co-authored-by: ILLISIS <jayson.harris01@gmail.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 12:06:03 +00:00
BastiaanandClaude Opus 5.5 42e2e0284b Document the real user import and export commands (#1217)
The managing a cluster guide listed whitelist-bulk-import,
admin-bulk-import and banned-bulk-import, which don't exist. Describe
user import, restore and export with the JSON formats they read and
write. Also reword the README known issue now that the installer no
longer offers server_select and discord_bridge.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:11:45 +00:00
BastiaanandClaude Opus 5.5 c2c7edf1b7 Default to the newest Base Game pack on new clusters (#1216)
A new cluster gets the default mod packs but controller.default_mod_pack_id
stays null, so the first Create save or Start fails with "Default mod pack
not set on controller". When seeding the packs, also point the default at
the newest Base Game pack, unless an admin already set one. Clusters that
already have mod packs are left alone. The config is written with the
mod packs on the next autosave or shutdown.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 11:03:22 +00:00
BastiaanandClaude Opus 5.5 09d79d775f Fix small web interface nits from the RC smoke test (#1215)
Fix the "Permamently" typo in the delete instance confirm.

The Search Mod Portal dialog now opens on the default mod pack's
Factorio version, or the newest known version when there is no default
pack. It used to always start on 2.0. A version the user picks still
sticks while the page is open.

The mod portal cache key used request.hide_deprecated directly, and the
web interface never sends it, so the controller logged "2.0-undefined".
A missing value now counts as false, the same default
fetchAllModsFromPortal already uses, so "2.1" and "2.1-false" share a
cache entry.

Closes #1209

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:57:32 +00:00
BastiaanandClaude Opus 5.5 c6bc81b0df Confirm controller and host restarts in the web UI (#1214)
Restart on the Controller and host pages sent the request on click. A
host restart stops every running instance on it, and they stay down
unless instance.auto_start is set, so one misclick takes servers
offline. Both now open a confirm dialog first, and the host one names
the running instances it will stop.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:51:34 +00:00
BastiaanandClaude Opus 5.5 8acb54985c Print Set values in ctl tables as lists (#1213)
user list, user show and role list passed UserDetails and Role objects
straight to as-table, whose default String() turns the roleIds,
instances and permissions Sets into "[object Set]". Move the as-table
setup into command_ops.ts with a cell printer that joins Sets with
", ", and use it for the user and role commands.

The integration tests for role list and user list now capture the
output and check it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:44:39 +00:00
BastiaanandClaude Opus 5.5 ec2bc6504b Exit run scripts with the code that stopped the restart loop (#1212)
run-controller.sh and run-host.sh ran `exit $?` after the `[[ ]]` test,
so they exited with the test's status (0) even when the process exited
with 8 to ask not to be restarted. Save the status before testing it.

The .cmd scripts now pass 8 to `exit /b` explicitly instead of relying on
a bare `exit /b` to carry the errorlevel through.

Closes #1208.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:44:17 +00:00
Bastiaan 154ebe294a Merge pull request #1211 from bbassie/fix/pairing-restart-pending
Don't flag a restart when a new host pairs
2026-11-17 10:32:44 +00:00
Cooldude2606 61f2b01172 Prepare 2.1.0 v2.1.0 2026-11-14 22:53:42 +00:00
ILLISISandClaude Fable 5.2 a0c42225a4 Leave missing quick bar records alone once the quick bar is not synced
An instance whose quick bar sync was turned off while a record entry was
pending still set the slot when the library arrived.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7
2026-11-14 14:57:44 +11:00
ILLISISandClaude Fable 5.2 0b0e2fd377 Keep quick bar slots whose record is not in the blueprint library yet
A save gets a player's blueprint library from the client some seconds
after the join. The data of a player new to the save is applied before
that, so quick bar slots pointing at library records were cleared, and
the next upload stored the quick bar without them.

The entries are now kept. They are set once the record shows up, and an
upload before that stores them again as they came.

Fixes #1219

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7
2026-11-14 13:24:10 +11:00
Daniel 635b10a3dc Stop reading rejected save uploads to the controller (#1173)
* Stop reading rejected save uploads to the controller

When a host pushes a save to a stream that is gone, or that timed out
before anyone downloaded it, the controller answers 404 or 500 without
reading the body. Node then reads and throws away the rest of the body
to keep the connection open, so a proxy in front of the controller that
keeps passing the upload on made the whole save get uploaded for
nothing. Close the connection if the body hasn't ended a second after
the response.

Document turning off request buffering in reverse proxies, as a
buffering proxy holds the upload back until all of it has arrived.

* Remove the close listener when a rejected upload ends

A connection kept open for more requests got one more close listener
for every rejected upload that finished within the grace period.

* Stop reading all rejected uploads and close stalled transfers

Guard the export, save, mod and stream routes with one middleware that
closes the connection of an upload answered before its body was read,
and of a transfer that has made no progress for the new
controller.transfer_idle_timeout.

The save and mod uploads share one handler that responds on the first
error instead of reading the rest of the upload, and uploads cut short
now fail the transfer instead of leaving it hanging.

Node's 5 minute limit on receiving a request is turned off so large
uploads over slow connections are not cut off.

* Close requests moving too little instead of idle ones

Replace controller.transfer_idle_timeout with
controller.transfer_min_progress, the amount a request has to move
every 30 seconds, so a request trickled in is closed too. The check
now runs for every route.

Both ends of a proxy stream are judged on what the receiver has taken,
so a sender held back by a slow receiver is not closed.

Keep the limit on receiving headers, which turning off the request
timeout also turned off.
2026-11-13 23:17:57 +01:00
Daniel 79ef9aaeb0 Merge branch 'master' into fix/stream-reject-closes-connection 2026-11-13 23:17:41 +01:00
Danielv123 b31983e30b Close requests moving too little instead of idle ones
Replace controller.transfer_idle_timeout with
controller.transfer_min_progress, the amount a request has to move
every 30 seconds, so a request trickled in is closed too. The check
now runs for every route.

Both ends of a proxy stream are judged on what the receiver has taken,
so a sender held back by a slow receiver is not closed.

Keep the limit on receiving headers, which turning off the request
timeout also turned off.
2026-11-13 22:59:12 +01:00
8430dda888 Sync the page shown on each quick bar row (#1202)
* Sync the page shown on each quick bar row

player_sync restored the content of the quick bar slots but not which
page each row shows, which every save keeps per player on its own. After
switching servers the rows could show other pages, and with them another
set of slots.

Fixes #1201

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7

* Sync every quick bar slot when the pages are wider than 10

From Factorio 2.1 a quick bar page is as wide as the player set it, up to
100 slots. Only the first 100 slots were synced, so with wider pages the
later pages kept the content of the destination, and restoring the page
shown on a row could show those.

---------

Co-authored-by: ILLISIS <jayson.harris01@gmail.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Co-authored-by: Danielv123 <danielv@danielv.no>
2026-11-13 21:57:43 +00:00
Danielv123 87bdbd520f Sync every quick bar slot when the pages are wider than 10
From Factorio 2.1 a quick bar page is as wide as the player set it, up to
100 slots. Only the first 100 slots were synced, so with wider pages the
later pages kept the content of the destination, and restoring the page
shown on a row could show those.
2026-11-13 22:49:12 +01:00
Daniel e32367dc0b Create the character at spawn when it can't be made in place (#1189)
* Create the character at spawn when it can't be made in place

create_character needs a free spot within 200 tiles and does not
generate chunks to find one, so it failed for a player teleported into
a chunk that does not exist yet, and where there is only water or void.
The download then failed and left the player as a spectator.

Resolves #1187

* Cast player position to MapPosition.struct for the lint
2026-11-13 22:36:52 +01:00
Bastiaan e37bf31cd3 Merge pull request #1200 from bbassie/feature/log-retention
Delete log files older than a configurable number of days
2026-11-13 19:30:24 +00:00
ILLISISandClaude Fable 5.2 b781731ecc Sync the page shown on each quick bar row
player_sync restored the content of the quick bar slots but not which
page each row shows, which every save keeps per player on its own. After
switching servers the rows could show other pages, and with them another
set of slots.

Fixes #1201

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JyNnVzRW4jPWaoWTxCyhM7
2026-11-13 22:14:46 +11:00
Cooldude2606 9ec817c1c6 Share one connect and close listener between subscribers (#1171)
* Share one connect and close listener between subscribers

Every EventSubscriber added its own connect and close listener to the
connector, and Link caps the connector at 20 listeners per event. The
web Control and App use 13 close listeners, so the 8th plugin
subscriber made the browser log MaxListenersExceededWarning on every
page load. Subscribers on a connector now share one listener for each
event, which leaves the cap in place for everything else.

* Keep the connector subscribers as a static on EventSubscriber
2026-11-11 17:49:48 +00:00
BastiaanandClaude Opus 5.5 e2185e9269 Detect Steam's Factorio install on macOS in the installer (#1195)
Steam on macOS puts Factorio in ~/Library/Application Support/Steam/steamapps/common/Factorio, with the app bundle inside it. Point at factorio.app/Contents like the existing /Applications entry, since that's where data/ lives and the host finds MacOS/factorio next to it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:43:35 +00:00
BastiaanandClaude Opus 5.5 381d1d8573 Show online player count on the instance list (#1196)
Counts users per instance from the shared users subscription, the same
data the instance page's online players list reads, so the table adds
no per-row requests. The column is sortable and hidden without
core.user.subscribe.

Fixes #1193

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:42:16 +00:00
BastiaanandClaude Opus 5.5 ae707f7768 Always show the instance player list, collapsed when empty (#1197)
The list used to disappear when nobody was online. It is now a Collapse
that opens while players are online and closes when the last one leaves.
Once the user toggles it, their choice sticks for the page.

Fixes #1191

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:40:37 +00:00
BastiaanandClaude Opus 5.5 484cffc136 Add controller metrics for WebSocket session events (#1199)
Counts ready, resume, drop and session timeout per connection type
(host or control), plus resume attempts rejected for an unknown or
expired session. Lets a dashboard show hosts or users reconnecting.

Fixes #1192

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:37:13 +00:00
Daniel 7060bf2c16 Merge pull request #1198 from bbassie/feature/mod-search-focus
Focus the mod search inputs when they open
2026-11-11 13:55:48 +01:00
Danielv123 f86ebb6e66 Keep the connector subscribers as a static on EventSubscriber 2026-11-11 11:22:08 +01:00
bbassieandClaude Opus 5.5 3868efcead Focus the mod search inputs when they open
The "Add mods" card on the mod pack view mounts when shown, so autoFocus
is enough there. The Search Mod Portal modal stays mounted after the
first open, so it focuses the name input from afterOpenChange instead.

Fixes #1194

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:38:11 +00:00
Danielv123 49ddc9ebd1 Stop reading all rejected uploads and close stalled transfers
Guard the export, save, mod and stream routes with one middleware that
closes the connection of an upload answered before its body was read,
and of a transfer that has made no progress for the new
controller.transfer_idle_timeout.

The save and mod uploads share one handler that responds on the first
error instead of reading the rest of the upload, and uploads cut short
now fail the transfer instead of leaving it hanging.

Node's 5 minute limit on receiving a request is turned off so large
uploads over slow connections are not cut off.
2026-11-10 21:59:03 +01:00
Danielv123 60a4b103ab Merge remote-tracking branch 'origin/master' into fix/stream-reject-closes-connection 2026-11-10 21:32:23 +01:00
Bastiaan bd9c4a5fea Merge pull request #1188 from bbassie/fix/research-queue-message
Print only what changed in the research queue chat line
2026-11-07 14:51:42 +00:00
Cooldude2606andClaude Opus 5.5 7cf9cf8d3e Unpatch saves started with save patching disabled (#1184)
* Unpatch saves started with save patching disabled

Turning factorio.enable_save_patching off did nothing to a save that
was patched before. Its control.lua still loaded every module, so the
clusterio_api interface, player_sync's join handling and the other
module event handlers kept running with no plugin on the host side.

When patching is disabled the instance now restores the original
control.lua that patching kept as scenario.lua and removes the module
files, locale files included, as listed in clusterio.json. The patch
info stays with an empty module list so the patch number keeps
counting. Otherwise patching the save again would reuse the number
stored in the game and on_server_startup would not be raised. Data
the modules put in storage is left alone.

PatchInfo.fromSave dropped the version read from the save, so the
check against newer patch versions never fired. It now keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove scenario.lua when unpatching a save

Unpatching moves scenario.lua back to control.lua instead of copying it, so the save only keeps clusterio.json for the patch number. Patching such a save again copies control.lua back to scenario.lua.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 20:58:13 +00:00
BastiaanandClaude Opus 5.5 6d9a32d28b Show localised names of mod settings in the web UI (#1181)
The mod pack page only looked up mod-setting-name.<name>, so settings
with a localised_name showed the internal name, and rich text tags in
the locale showed up as raw text.

Resolve localised_name and localised_description from the exported
settings prototypes against the exported locale, falling back to the
mod-setting-name/mod-setting-description keys and then the internal
name. The resolver handles parameters, the "" and "?" keys and
__ITEM__/__ENTITY__/__TILE__/__FLUID__ references. Rich text
formatting tags are removed and prototype icons are replaced with
their name.

Fixes #768

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:02:37 +00:00
bbassieandClaude Opus 5.5 513d964a8b Remove scenario.lua when unpatching a save
Unpatching moves scenario.lua back to control.lua instead of copying it, so the save only keeps clusterio.json for the patch number. Patching such a save again copies control.lua back to scenario.lua.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 17:21:19 +00:00
BastiaanandClaude Opus 5.5 c6867de13d Keep users instance filter and icon search in the URL (#1185)
The instance picker on the users page and the search box on the icon
reference page held their value in component state, so leaving the page
and coming back with the browser history reset them. Both now go through
useTableQueryState like the table filters do, as user.instance and
icon.search.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:22:02 +00:00
BastiaanandClaude Opus 5.5 b0fb43d678 Merge recipe notifications against the restored force (#1182)
The instance works out the recipe notification delta against the cleared
list the player had when the download started, but the save applied it
after the download restored player.force. A player whose force changed
kept notifications they had cleared elsewhere, and recipes only the old
force had dropped out of the failed list and were lost on the next
upload.

The download record now keeps the cleared list it sent. The save rebuilds
the stored list from it and the delta, then merges that against the
force the player has once the data is applied, as it did before #997.
Nothing extra goes over RCON.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 01:25:32 +00:00
Bastiaan 4a2c164188 Merge pull request #1183 from bbassie/fix/save-patching-plugin-default
Default load_plugin to off when the instance lacks required features
2026-11-04 01:19:10 +00:00
Cooldude2606andClaude Opus 5.5 308cca9b7d Add HostManager for host records and host tokens (#1180)
* Add HostManager for host records and host tokens

controller.hosts is now a HostManager wrapping the hosts datastore, the
same way controller.users wraps the users datastore. It owns creating
hosts (moved from HostPairingManager), revoking them (moved from
ControlConnection) and signing and verifying host tokens (moved from
Controller, generateHostToken is renamed signHostToken to match
signUserToken).

UserManager gains verifyUserToken, replacing the copies of the user
token check in WsServer and routes. The WsServer copy accepted a token
without iat when the user had no tokenValidAfter; the shared check
always requires iat, which jsonwebtoken adds by default.

Follows Cooldude2606's comment on #1161.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Return the host record from verifyHostToken

Matches verifyUserToken returning the user. HostConnection._saveInfo is
renamed saveRecord to match User.saveRecord.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:51:36 +00:00
bbassieandClaude Opus 5.5 4c6aed3cff Return the host record from verifyHostToken
Matches verifyUserToken returning the user. HostConnection._saveInfo is
renamed saveRecord to match User.saveRecord.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:37:37 +00:00
bbassieandClaude Opus 5.5 e6554e09c7 Add HostManager for host records and host tokens
controller.hosts is now a HostManager wrapping the hosts datastore, the
same way controller.users wraps the users datastore. It owns creating
hosts (moved from HostPairingManager), revoking them (moved from
ControlConnection) and signing and verifying host tokens (moved from
Controller, generateHostToken is renamed signHostToken to match
signUserToken).

UserManager gains verifyUserToken, replacing the copies of the user
token check in WsServer and routes. The WsServer copy accepted a token
without iat when the user had no tokenValidAfter; the shared check
always requires iat, which jsonwebtoken adds by default.

Follows Cooldude2606's comment on #1161.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:37:37 +00:00
BastiaanandClaude Opus 5.5 5d1e98dafd Hide unknown mod pack settings and allow removing them (#1179)
Settings stored in a mod pack that no setting prototype in the export
data defines are now listed in a collapsed "Unknown settings" panel
under each scope instead of under an "Unknown Fields" heading. Each one
has a remove link, and a revert link once removed, matching what
`clusterioctl mod-pack edit --remove-setting` already allows. They are
never removed automatically.

Without export data nothing is called unknown and stored settings are
listed as before, without a mod heading.

Fixes #773

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:18:32 +00:00
bbassieandClaude Opus 5.5 ca3dbab49d Unpatch saves started with save patching disabled
Turning factorio.enable_save_patching off did nothing to a save that
was patched before. Its control.lua still loaded every module, so the
clusterio_api interface, player_sync's join handling and the other
module event handlers kept running with no plugin on the host side.

When patching is disabled the instance now restores the original
control.lua that patching kept as scenario.lua and removes the module
files, locale files included, as listed in clusterio.json. The patch
info stays with an empty module list so the patch number keeps
counting. Otherwise patching the save again would reuse the number
stored in the game and on_server_startup would not be raised. Data
the modules put in storage is left alone.

PatchInfo.fromSave dropped the version read from the save, so the
check against newer patch versions never fired. It now keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:16:52 +00:00
BastiaanandClaude Opus 5.5 d250394580 Show the mod pack an instance uses in the web UI (#1177)
InstanceDetails now carries factorio.mod_pack_id as modPackId, so the
instance list and pages can show it without fetching each config. The
web UI resolves an unset value to the controller default and tags it
"Default". The name links to the mod pack page.

Closes #852

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 00:07:26 +00:00
Cooldude2606andClaude Opus 5.5 6eaf48aefe Follow teleports of a syncing player in player_sync (#1168)
* Keep a syncing spectator where its body stood

A player waiting for player_sync data is a spectator who could walk away,
so restore_position teleported them back at the end. That also undid
teleports by other mods made during the sync, such as universal_edges
placing an arriving player.

The spectator is now pulled back on every tile change, and a jump of more
than 4 tiles or to another surface counts as another mod's teleport and
moves where the body comes back. A failed acquire that takes the body
keeps its place too.

Closes #908

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Rename body place to controller location

Review asked for location and controller over place and body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Let a syncing spectator look around

Review asked for the spectator to move freely while it waits. Only a jump
of more than 16 tiles from where it was last seen, or to another surface,
counts as a teleport and moves the restore location. The body place names
from #1156 become restore_location, keep_restore_location and
controller_taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 23:43:42 +00:00
bbassieandClaude Opus 5.5 1c804b05b7 Let a syncing spectator look around
Review asked for the spectator to move freely while it waits. Only a jump
of more than 16 tiles from where it was last seen, or to another surface,
counts as a teleport and moves the restore location. The body place names
from #1156 become restore_location, keep_restore_location and
controller_taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 07:36:20 +00:00
bbassieandClaude Opus 5.5 2fcf3f10c7 Rename body place to controller location
Review asked for location and controller over place and body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 07:34:06 +00:00
bbassieandClaude Opus 5.5 babc210a38 Keep a syncing spectator where its body stood
A player waiting for player_sync data is a spectator who could walk away,
so restore_position teleported them back at the end. That also undid
teleports by other mods made during the sync, such as universal_edges
placing an arriving player.

The spectator is now pulled back on every tile change, and a jump of more
than 4 tiles or to another surface counts as another mod's teleport and
moves where the body comes back. A failed acquire that takes the body
keeps its place too.

Closes #908

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 07:34:06 +00:00