Re-anchor entities when loading apartment/room saves#1421
Merged
fenndragon merged 3 commits intoApr 24, 2026
Conversation
Room saves filter to anchored-only entities at serialization time but TransformComponent (and therefore the Anchored flag) is intentionally skipped, so reconstructed entities were spawning with prototype defaults and ending up loose on the floor. Add a TryReAnchorRoomEntity helper that snaps top-level non-contained entities back onto the snapgrid after spawn in ReconstructShipOnExistingGrid (the only caller, used by RoomGridSpawnerSystem). Contained entities and the full-ship ReconstructShip path are unaffected. :cl: - fix: Loading an apartment/room save no longer leaves furniture, walls and other anchored entities unanchored on the floor.
xemeraldwingx-dot
added a commit
that referenced
this pull request
Apr 24, 2026
NotLivyathan
added a commit
to NotLivyathan/HardLight
that referenced
this pull request
May 19, 2026
fenndragon
pushed a commit
that referenced
this pull request
May 20, 2026
* Start Port Starlight Languages #1253 * add some missing newlines * emergency fixes * Continue Port Starlight Languages #1253 * additional fixes * doing this one file at a time apparently * guh * Finish Port Starlight Languages #1253 * fix to make it work * remaining necessary port + linter fix for makesentient refactor * Port Starlight Language Fixes #1412 * Port Starlight Language Patch #1414 * Port Starlight PR #1416 & #1421 * Port Starlight Thaveyan Language + Thaven Speech Verbs PR #1440 * Port Starlight Language Tweaks #1446 * Port Starlight Silicon Language Base PR #1454 * Port Starlight Vulpkanin, Shadekin, & Vox Language Icons PR #1480 * Port Starlight PR #1512 & #1533 * Port Starlight Language Trait Tweaks #1599 * Port Starlight PR #1453, #1611, #1673, #1854, #2231, & #2291 * Port Starlight PR #1554, #1617, #2277, #2715 * Port Starlight PR #3019 & #3796 * two quick fixes * Port Starlight Translator Refactor PR #4242 * some more fixes * Port Starlight Animals Understand Common PR #4340 * Port Starlight PR #1509 + linter fix * port necessary files from Starlight PR #2935 to make icons work * minor optimization tweaks + enable chatbox icons + mouse language color * no idea what I'm doing * protogen tweak * synth fix * add language icon display toggle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About the PR
Apartment / room saves filter to anchored-only entities at serialization time, but
TransformComponent(and therefore theAnchoredflag) is intentionally skippedduring serialization. Reconstructed entities were spawning with prototype defaults
and ending up loose on the floor — walls, lockers, machines, etc.
Why / Balance
Pure bug fix. Restores the original anchored state that the save already implicitly
required. Only touches
ReconstructShipOnExistingGrid, which is exclusively calledby
RoomGridSpawnerSystem; the regular full-shipReconstructShippath isuntouched.
How
TryReAnchorRoomEntityhelper: defensive (existence/Transform/GridUid checks,try/catch with Debug log), no-ops on already-anchored or non-anchorable entities.
ReconstructShipOnExistingGrid. Contained (in-container) entities are skipped.Technical details
SerializeShipAreaalready filters tochildTransform.Anchored == true, soevery entity we re-anchor on load was anchored at save time.
AnchorEntitysnaps the entity onto the snapgrid cell and setsBodyType.Static,matching the entity's pre-save physics state.
Media
N/A — bug fix, no visual change beyond "things stay anchored".
Requirements
dotnet build Content.Server/Content.Server.csproj).Breaking changes
None.
Changelog
🆑
anchored entities unanchored on the floor.