fix: DamageVisualsSystem now works for walls - #577
Conversation
|
RSI Diff Bot; head commit 536fe35 merging into bafe740 Resources/Textures/_Persistence14/Structures/walls/shuttle_damage.rsi
Resources/Textures/_Persistence14/Structures/walls/wall_damage.rsi
|
|
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.
| - type: DamageVisuals | ||
| thresholds: [5, 10, 20] | ||
| damageDivisor: 20 | ||
| damageDivisor: 2 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
is this change for shuttle walls intended? maybe also from testing?
|
Aside from those two, it would be great to have comments for all of these changes marking them as being made for persistence.
This makes resolving conflicts during upstream merges much easier & somewhat less likely to break things |










About the PR
(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

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