[Proposal] Add support for using a specific sprite for the placement overlay#6438
Open
Menshin wants to merge 7 commits intospace-wizards:masterfrom
Open
[Proposal] Add support for using a specific sprite for the placement overlay#6438Menshin wants to merge 7 commits intospace-wizards:masterfrom
Menshin wants to merge 7 commits intospace-wizards:masterfrom
Conversation
B-Kirill
reviewed
Mar 7, 2026
Robust.Client/GameObjects/Components/Renderable/SpriteComponent.cs
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@B-Kirill remark applied.
|
Contributor
Things happen. Just create an empty commit to restart the tests. |
c5e4fc1 to
f99329b
Compare
Tayrtahn
requested changes
Mar 7, 2026
Robust.Client/GameObjects/Components/Renderable/SpriteComponent.cs
Outdated
Show resolved
Hide resolved
51faf72 to
31800c9
Compare
Contributor
Author
|
As requested, moved placementOverlay to its own component. |
Tayrtahn
reviewed
Mar 7, 2026
Tayrtahn
reviewed
Mar 7, 2026
Contributor
Author
|
Thanks for the feedback and review, the formatting should be ok now. |
moonheart08
suggested changes
Mar 8, 2026
Contributor
Author
|
Realized there was no reason for the overlay sprite Minus the potential reviews/requests, the PR should be in its final form. Edit : CI failing for mysterious reasons (integration tests canceled)... |
…prototype sprite.
d2831ce to
ba57e67
Compare
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.
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 :
placementOverlaySpritefield is added toSpriteComponent(could be its own component too), specifying a RSI/State texture.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