Fixes runtimes when random mineral spawn rolled cave. (#36624)

* Fixes runtimes when random mineral spawn rolled cave.

* Actually the issue was bit deeper.
This commit is contained in:
AnturK
2018-03-23 15:03:11 -05:00
committed by KorPhaeron
parent 916241cbd2
commit abecd4e92e
2 changed files with 2 additions and 3 deletions
@@ -159,10 +159,9 @@
if (!flora_spawn_list)
flora_spawn_list = list(/obj/structure/flora/ash/leaf_shroom = 2 , /obj/structure/flora/ash/cap_shroom = 2 , /obj/structure/flora/ash/stem_shroom = 2 , /obj/structure/flora/ash/cacti = 1, /obj/structure/flora/ash/tall_shroom = 2)
. = ..()
if(!has_data)
produce_tunnel_from_data()
else
..() //do not continue after changeturfing or we will do a double initialize
/turf/open/floor/plating/asteroid/airless/cave/proc/get_cave_data(set_length, exclude_dir = -1)
// If set_length (arg1) isn't defined, get a random length; otherwise assign our length to the length arg.
+1 -1
View File
@@ -146,7 +146,7 @@
. = ..()
if (prob(mineralChance))
var/path = pickweight(mineralSpawnChanceList)
var/turf/T = ChangeTurf(path,FALSE,FALSE,TRUE)
var/turf/T = ChangeTurf(path,null,CHANGETURF_IGNORE_AIR)
if(T && ismineralturf(T))
var/turf/closed/mineral/M = T