Merge pull request #6610 from eswordthecat/runtime-wormhole-z

Fix runtime error: Cannot read null.z
This commit is contained in:
Rob Nelson
2015-11-16 17:16:59 -08:00

View File

@@ -341,11 +341,15 @@ proc/move_mining_shuttle()
return
else
user.visible_message("<span class='notice'>[user.name] activates the [src.name]!</span>")
var/list/L = list()
var/list/L = new()
for (var/obj/item/beacon/B in beacons)
var/turf/T = get_turf(B)
if(T.z == STATION_Z)
L += B
if (!isnull(T))
if (T.z == map.zMainStation)
L.Add(B)
if(!L.len)
user << "<span class='notice'>The [src.name] failed to create a wormhole.</span>"
return