]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add puddle drawdepth (#32369)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Mon, 27 Jan 2025 12:44:16 +0000 (23:44 +1100)
committerGitHub <noreply@github.com>
Mon, 27 Jan 2025 12:44:16 +0000 (23:44 +1100)
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Shared/DrawDepth/DrawDepth.cs
Resources/Prototypes/Entities/Effects/puddle.yml
Resources/Prototypes/Entities/Objects/Misc/kudzu.yml
Resources/Prototypes/Entities/Structures/Machines/artifact_analyzer.yml
Resources/Prototypes/Entities/Structures/Machines/holopad.yml
Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml
Resources/Prototypes/Entities/Structures/cargo_telepad.yml
Resources/Prototypes/Entities/Structures/conveyor.yml

index d0d2daf5d90f022026427bb019ae9fe2e2fcbccb..4a93b5f0eaf37a467b937f86baa686fca3070835 100644 (file)
@@ -9,32 +9,42 @@ namespace Content.Shared.DrawDepth
         /// <summary>
         ///     This is for sub-floors, the floors you see after prying off a tile.
         /// </summary>
-        LowFloors = DrawDepthTag.Default - 11,
+        LowFloors = DrawDepthTag.Default - 14,
 
         // various entity types that require different
         // draw depths, as to avoid hiding
         #region SubfloorEntities
-        ThickPipe = DrawDepthTag.Default - 10,
-        ThickWire = DrawDepthTag.Default - 9,
-        ThinPipe = DrawDepthTag.Default - 8,
-        ThinWire = DrawDepthTag.Default - 7,
+        ThickPipe = DrawDepthTag.Default - 13,
+        ThickWire = DrawDepthTag.Default - 12,
+        ThinPipe = DrawDepthTag.Default - 11,
+        ThinWire = DrawDepthTag.Default - 10,
         #endregion
 
         /// <summary>
         ///     Things that are beneath regular floors.
         /// </summary>
-        BelowFloor = DrawDepthTag.Default - 7,
+        BelowFloor = DrawDepthTag.Default - 9,
 
         /// <summary>
         ///     Used for entities like carpets.
         /// </summary>
-        FloorTiles = DrawDepthTag.Default - 6,
+        FloorTiles = DrawDepthTag.Default - 8,
 
         /// <summary>
-        ///     Things that are actually right on the floor, like puddles. This does not mean objects like
+        ///     Things that are actually right on the floor, like ice crust or atmos devices. This does not mean objects like
         ///     tables, even though they are technically "on the floor".
         /// </summary>
-        FloorObjects = DrawDepthTag.Default - 5,
+        FloorObjects = DrawDepthTag.Default - 7,
+
+        /// <summary>
+        //     Discrete drawdepth to avoid z-fighting with other FloorObjects but also above floor entities.
+        /// </summary>
+        Puddles = DrawDepthTag.Default - 6,
+
+        /// <summary>
+        //     Objects that are on the floor, but should render above puddles. This includes kudzu, holopads, telepads and levers.
+        /// </summary>
+        HighFloorObjects = DrawDepthTag.Default - 5,
 
         DeadMobs = DrawDepthTag.Default - 4,
 
index 36f0faa1df1a8918d5abd07989a66707f9ca812f..0cc4d14c0ec7d4af4a3d3d5487ed5ab5960b08a7 100644 (file)
       layers:
         - sprite: Fluids/wet_floor_sparkles.rsi
           state: sparkles
-      drawdepth: FloorObjects
+      drawdepth: Puddles
       color: "#FFFFFF80"
 
 - type: entity
     layers:
     - sprite: Fluids/puddle.rsi
       state: splat0
-    drawdepth: FloorObjects
+    drawdepth: Puddles
     color: "#FFFFFF80"
   - type: Physics
     bodyType: Static
index 21b710a61803619e16d3fa1debf41a31a6ea83a1..c7a82d4183df8013d35d28adce954f0d9ed7b62c 100644 (file)
   parent: Kudzu
   components:
     - type: Sprite
-      drawdepth: FloorObjects
+      drawdepth: HighFloorObjects
       sprite: Objects/Misc/kudzuflower.rsi
       state: kudzu_11
     - type: Kudzu
index 741e0a397111e966ec964844dc80d411933d77b6..7d1719a7083f0dbc4beff5aa854e4a06a9742f46 100644 (file)
@@ -7,7 +7,7 @@
   - type: Sprite
     noRot: true
     sprite: Structures/Machines/artifact_analyzer.rsi
-    drawdepth: FloorObjects
+    drawdepth: HighFloorObjects
     layers:
     - state: icon
     - state: unshaded
index 421d2809d4a01ef34ec9d55a0afe84e81adbbe60..c95609c55abd703432c7b8463619faa92de8c198 100644 (file)
@@ -22,7 +22,7 @@
   - type: StationAiVision
   - type: Sprite
     sprite: Structures/Machines/holopad.rsi
-    drawdepth: FloorObjects
+    drawdepth: HighFloorObjects
     snapCardinals: true
     layers:
     - state: base
index 556d3d430a546a4a0dc032df3e1705887afee726..fddf753a209db5f5b3771cafc58f2a407cf6cfb2 100644 (file)
     - type: Clickable
     - type: InteractionOutline
     - type: Sprite
-      drawdepth: FloorObjects
+      drawdepth: HighFloorObjects
       sprite: Structures/conveyor.rsi
       layers:
         - state: switch-off
index c37a6338dc4948f8a9248419a130d024e59df21e..a99f35a7d9d1bb3dbe152ea193302a6e8bdaf2c6 100644 (file)
@@ -22,7 +22,7 @@
           - MachineMask
   - type: Sprite
     sprite: Structures/cargo_telepad.rsi
-    drawdepth: FloorObjects
+    drawdepth: HighFloorObjects
     layers:
     - state: offline
       map: [ "enum.CargoTelepadLayers.Base" ]
index d1281ceba6d1de7929e9d3fa2f2e7b6df120b9c5..2e94026c15f91995c8160a3fda253fe17e2a4fb9 100644 (file)
@@ -14,7 +14,7 @@
   - type: Sprite
     sprite: Structures/conveyor.rsi
     state: conveyor_started_cw
-    drawdepth: FloorObjects
+    drawdepth: HighFloorObjects
   - type: ApcPowerReceiver
   - type: ExtensionCableReceiver
   - type: Physics