mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 23:14:18 +01:00
Fix cables not taking their direction from icon state (#15222)
This commit is contained in:
@@ -66,17 +66,17 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
/obj/structure/cable/white
|
||||
color = COLOR_WHITE
|
||||
|
||||
// Needs to run before init or we have sad cable knots on away sites
|
||||
/obj/structure/cable/New()
|
||||
. = ..()
|
||||
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
|
||||
var/dash = findtext(icon_state, "-")
|
||||
d1 = text2num(copytext(icon_state, 1, dash))
|
||||
d2 = text2num(copytext(icon_state, dash + 1))
|
||||
|
||||
/obj/structure/cable/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
|
||||
|
||||
var/dash = findtext(icon_state, "-")
|
||||
|
||||
d1 = text2num( copytext( icon_state, 1, dash ) )
|
||||
|
||||
d2 = text2num( copytext( icon_state, dash+1 ) )
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
if(level == 1 && !T.is_hole)
|
||||
hide(!T.is_plating())
|
||||
|
||||
Reference in New Issue
Block a user