Skip to content

Commit e60512e

Browse files
committed
Fix layering when stakes are south
1 parent ceba478 commit e60512e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

mojave/icons/structure/bridge.dmi

52 Bytes
Binary file not shown.

mojave/structures/bridge.dm

+11-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@
4040
// Ropes and planks sprites
4141
. += mutable_appearance(icon, "rope_underplanks_[dir]", layer=TURF_DECAL_LAYER)
4242
. += mutable_appearance(icon, "rope_underchar_[dir]", layer=BELOW_MOB_LAYER)
43-
. += mutable_appearance(icon, "rope_overchar_[dir]", plane = GAME_PLANE_UPPER, layer=ABOVE_MOB_LAYER)
43+
44+
// Because of the layering, we need to use a special sprite when there are bridge stakes on the next turf south
45+
if (dir == WEST || dir == EAST)
46+
. += mutable_appearance(icon, "rope_overchar_[dir]", plane = GAME_PLANE_UPPER, layer=ABOVE_MOB_LAYER)
47+
else
48+
var/turf/turf_south = get_step(src, SOUTH)
49+
var/end = locate(/obj/structure/ms13/bridge_stakes) in turf_south
50+
if(end)
51+
. += mutable_appearance(icon, "rope_overchar_special", plane = GAME_PLANE_UPPER, layer=ABOVE_MOB_LAYER)
52+
else
53+
. += mutable_appearance(icon, "rope_overchar_[dir]", plane = GAME_PLANE_UPPER, layer=ABOVE_MOB_LAYER)
4454

4555
/// What happens when the bridge integrity reaches zero.
4656
/obj/structure/ms13/bridge/atom_destruction(damage_flag)

0 commit comments

Comments
 (0)