Fixes cables/lattices for lateloaded templates.

This commit is contained in:
AnturK
2018-01-12 18:08:21 +01:00
committed by CitadelStationBot
parent 3a2ac4d102
commit 269cbab223
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -193,6 +193,8 @@
newT.baseturfs = new_baseturfs
return newT
//If you modify this function, ensure it works correctly with lateloaded map templates.
/turf/proc/AfterChange(flags) //called after a turf has been replaced in ChangeTurf()
levelupdate()
CalculateAdjacentTurfs()
+3 -3
View File
@@ -239,19 +239,19 @@
/turf/proc/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
if(O.level == 1 && O.initialized)
O.hide(src.intact)
// override for space turfs, since they should never hide anything
/turf/open/space/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
if(O.level == 1 && O.initialized)
O.hide(0)
// Removes all signs of lattice on the pos of the turf -Donkieyo
/turf/proc/RemoveLattice()
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
if(L && L.initialized)
qdel(L)
/turf/proc/phase_damage_creatures(damage,mob/U = null)//>Ninja Code. Hurts and knocks out creatures on this turf //NINJACODE