mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-20 19:42:34 +01:00
Fix catwalks initialization and destroy to not suck.
This commit is contained in:
@@ -8,26 +8,18 @@
|
||||
density = 0
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/catwalk/New()
|
||||
..()
|
||||
spawn(4)
|
||||
if(src)
|
||||
for(var/obj/structure/catwalk/C in get_turf(src))
|
||||
if(C != src)
|
||||
qdel(C)
|
||||
update_icon()
|
||||
redraw_nearby_catwalks()
|
||||
/obj/structure/catwalk/initialize()
|
||||
for(var/obj/structure/catwalk/C in get_turf(src))
|
||||
if(C != src)
|
||||
warning("Duplicate [type] in [loc] ([x], [y], [z])")
|
||||
qdel(C)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/catwalk/Destroy()
|
||||
..()
|
||||
redraw_nearby_catwalks()
|
||||
|
||||
/obj/structure/catwalk/proc/redraw_nearby_catwalks()
|
||||
for(var/direction in alldirs)
|
||||
if(locate(/obj/structure/catwalk, get_step(src, direction)))
|
||||
var/obj/structure/catwalk/L = locate(/obj/structure/catwalk, get_step(src, direction))
|
||||
L.update_icon() //so siding get updated properly
|
||||
|
||||
var/turf/location = loc
|
||||
. = ..()
|
||||
for(var/obj/structure/catwalk/L in orange(location, 1))
|
||||
L.update_icon()
|
||||
|
||||
/obj/structure/catwalk/update_icon()
|
||||
var/connectdir = 0
|
||||
|
||||
Reference in New Issue
Block a user