Skip to content

fix: DamageVisualsSystem now works for walls - #577

Open
JoulesMango wants to merge 4 commits into
michaelchessall:persistence_testingfrom
JoulesMango:Damage-visuals
Open

fix: DamageVisualsSystem now works for walls#577
JoulesMango wants to merge 4 commits into
michaelchessall:persistence_testingfrom
JoulesMango:Damage-visuals

Conversation

@JoulesMango

@JoulesMango JoulesMango commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

About the PR

image

(Oh god Im so tired)
I've been thinking about this for a while now!...
I suspected this had something to do with how the layers get drawn, like how the airlocks have a buch of layers and how the order wich they get drawn
I started reading how DrawDepth gets used but it only allows one drawdepth value, at least I learned a lot about SpriteSystem
SpriteSystem.AddLayers(); .RemoveLayer(); etc etc

This is when I realized that it had all to do with indexing!!
I saw how the Damagevisuals got appended first and then IconSmooth appended it's layers,

this is fixed, but previously the DamagedLayer layer index was always 0
image

Anyways, point is, eventually i stumbled into the 'ReorderOverlaySprite' function and realized that it wasn't using the 'SpriteSystem.AddLayer();' thing correctly

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

RSI Diff Bot; head commit 536fe35 merging into bafe740
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/_Persistence14/Structures/walls/shuttle_damage.rsi

State Old New Status
DamageOverlay_10 Added
DamageOverlay_20 Added
DamageOverlay_30 Added
DamageOverlay_5 Added

Resources/Textures/_Persistence14/Structures/walls/wall_damage.rsi

State Old New Status
DamageOverlay_10 Added
DamageOverlay_20 Added
DamageOverlay_30 Added
DamageOverlay_40 Added
DamageOverlay_5 Added

Edit: diff updated after 536fe35

@Zetaplx

Zetaplx commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

YOU ACTUALLY DID IT?!?!?!?!

I was banging my head against this wall for hours trying to figure this out. Good work.

Adds general wall damage overlay

also changed what the shuttle wall destroys into, now it destroys into reinforced girder instead of a normal girder.
@JoulesMango

Copy link
Copy Markdown
Contributor Author
image

new generic walls damage overlays!!

@JoulesMango
JoulesMango marked this pull request as ready for review August 22, 2026 05:23
- type: DamageVisuals
thresholds: [5, 10, 20]
damageDivisor: 20
damageDivisor: 2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change for shuttle windows intended? maybe something done for testing that slipped through?

5: { state: shuttle_construct-5, visible: true}
- type: Reflect
reflectProb: 1
reflectProb: 0.8

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change for shuttle walls intended? maybe also from testing?

@stinkiestdog

stinkiestdog commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Aside from those two, it would be great to have comments for all of these changes marking them as being made for persistence.

// Persistence: DamageVisualsSystem works for more structure types
or
# Persistence: DamageVisualsSystem works for more structure types
or

# Start Persistence: DamageVisualsSystem works for more structure types
<group of lines with changes>
# End Persistence

This makes resolving conflicts during upstream merges much easier & somewhat less likely to break things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants