Skip to content

[Proposal] Add support for using a specific sprite for the placement overlay#6438

Open
Menshin wants to merge 7 commits intospace-wizards:masterfrom
Menshin:specificPlacementOverlaySprite
Open

[Proposal] Add support for using a specific sprite for the placement overlay#6438
Menshin wants to merge 7 commits intospace-wizards:masterfrom
Menshin:specificPlacementOverlaySprite

Conversation

@Menshin
Copy link
Contributor

@Menshin Menshin commented Mar 6, 2026

Rationale

The current Placement system is handling the placement overlay pretty straightforward : when entering placement mode the global placement overlay entity's sprite is generated from the associated prototype.

Content systems that needs more (construction, pipe layering, etc) can hijack the engine placement system to change its default behavior, but there's no way to change the Sandbox/Mapping native placement behavior.

While this is pretty often enough, situations arise when that limitation becomes problematic : for example, turnstiles can be a pain to place correctly because the default icon/sprite is used (while there are specific sprites showing the turnstill orientation that could be better used in placement mode).

What's proposed here

This PR propose a basic system to allows using a specific sprite on placement mode for a given prototype :

  • a new optional placementOverlaySprite field is added to SpriteComponent (could be its own component too), specifying a RSI/State texture.
  • if that field is set, the placement system is slightly modified to use this specific texture when building the placement overlay.

Showcase

Placing turnstills on Sandbox mode, using forementioned sprites for placement overlay :

Content.Client_QREX7qnnD5.mp4

Adapting the (content) construction system to use this feature :

Content.Client_GRLe932Iy5.mp4

@Menshin
Copy link
Contributor Author

Menshin commented Mar 7, 2026

@B-Kirill remark applied.

CI weirdly failed on the install dependencies step...

@B-Kirill
Copy link
Contributor

B-Kirill commented Mar 7, 2026

CI weirdly failed on the install dependencies step...

Things happen. Just create an empty commit to restart the tests.

@Menshin Menshin force-pushed the specificPlacementOverlaySprite branch from c5e4fc1 to f99329b Compare March 7, 2026 09:58
@Menshin Menshin force-pushed the specificPlacementOverlaySprite branch from 51faf72 to 31800c9 Compare March 7, 2026 15:08
@Menshin Menshin requested a review from Tayrtahn March 7, 2026 15:20
@Menshin
Copy link
Contributor Author

Menshin commented Mar 7, 2026

As requested, moved placementOverlay to its own component.

@Menshin
Copy link
Contributor Author

Menshin commented Mar 7, 2026

Thanks for the feedback and review, the formatting should be ok now.

@Menshin
Copy link
Contributor Author

Menshin commented Mar 11, 2026

Realized there was no reason for the overlay sprite noRotation and scale to be set according to the prototype sprite ones, so decoupled them.

Minus the potential reviews/requests, the PR should be in its final form.

Edit : CI failing for mysterious reasons (integration tests canceled)...

@Menshin Menshin force-pushed the specificPlacementOverlaySprite branch from d2831ce to ba57e67 Compare March 11, 2026 03:51
@Menshin Menshin requested a review from Tayrtahn March 22, 2026 18: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.

4 participants