Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render small mobs at an appropriate layer #8238

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Content.Shared/DrawDepth/DrawDepth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,23 @@ public enum DrawDepth
/// <summary>
/// Things that are beneath regular floors.
/// </summary>
BelowFloor = DrawDepthTag.Default - 5,
BelowFloor = DrawDepthTag.Default - 6,

/// <summary>
/// Used for entities like carpets.
/// </summary>
FloorTiles = DrawDepthTag.Default - 4,
FloorTiles = DrawDepthTag.Default - 5,

/// <summary>
/// Things that are actually right on the floor, like puddles. This does not mean objects like
/// tables, even though they are technically "on the floor".
/// </summary>
FloorObjects = DrawDepthTag.Default - 3,
FloorObjects = DrawDepthTag.Default - 4,

/// <summary>
/// Allows small mobs like mice and drones to render under tables and chairs but above puddles and vents
/// </summary>
SmallMobs = DrawDepthTag.Default - 3,

Walls = DrawDepthTag.Default - 2,

Expand Down
6 changes: 3 additions & 3 deletions Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@
- type: Speech
speechSounds: Squeak
- type: Sprite
drawdepth: FloorObjects
drawdepth: SmallMobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: mouse-0
Expand Down Expand Up @@ -755,7 +755,7 @@
id: MobMouse1
components:
- type: Sprite
drawdepth: Mobs
drawdepth: SmallMobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: mouse-1
Expand All @@ -778,7 +778,7 @@
id: MobMouse2
components:
- type: Sprite
drawdepth: Mobs
drawdepth: SmallMobs
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: mouse-2
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
types:
Heat : 1 #per second, scales with temperature & other constants
- type: Sprite
drawdepth: Mobs
drawdepth: SmallMobs
netsync: false
layers:
- state: shell
Expand Down