Fixes clockwork walls/floors losing double CV if removed in a particular way (#22365)

This commit is contained in:
Joan Lung
2016-12-23 09:38:13 +13:00
committed by oranges
parent 4bd0e515be
commit db9d7553c7
2 changed files with 9 additions and 22 deletions
+4 -11
View File
@@ -76,19 +76,12 @@
change_construction_value(1)
/turf/open/floor/clockwork/Destroy()
be_removed()
return ..()
/turf/open/floor/clockwork/ChangeTurf(path, defer_change = FALSE)
if(path != type)
be_removed()
return ..()
/turf/open/floor/clockwork/proc/be_removed()
STOP_PROCESSING(SSobj, src)
change_construction_value(-1)
qdel(realappearence)
realappearence = null
if(realappearence)
qdel(realappearence)
realappearence = null
return ..()
/turf/open/floor/clockwork/Entered(atom/movable/AM)
..()
+5 -11
View File
@@ -63,21 +63,15 @@
user << "<span class='brass'>It is linked, generating components in a cache!</span>"
/turf/closed/wall/clockwork/Destroy()
be_removed()
return ..()
/turf/closed/wall/clockwork/ChangeTurf(path, defer_change = FALSE)
if(path != type)
be_removed()
return ..()
/turf/closed/wall/clockwork/proc/be_removed()
if(linkedcache)
linkedcache.linkedwall = null
linkedcache = null
change_construction_value(-5)
qdel(realappearence)
realappearence = null
if(realappearence)
qdel(realappearence)
realappearence = null
return ..()
/turf/closed/wall/clockwork/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weapon/weldingtool))