Fixes the baseturf bad arg runtime and fixes the jumpToNullSpace proc
This commit is contained in:
@@ -248,7 +248,7 @@
|
||||
if(istype(tunnel))
|
||||
// Small chance to have forks in our tunnel; otherwise dig our tunnel.
|
||||
if(i > 3 && prob(20))
|
||||
var/turf/open/floor/plating/asteroid/airless/cave/C = tunnel.ChangeTurf(data_having_type,FALSE,TRUE)
|
||||
var/turf/open/floor/plating/asteroid/airless/cave/C = tunnel.ChangeTurf(data_having_type,FALSE,FALSE,TRUE)
|
||||
C.going_backwards = FALSE
|
||||
C.produce_tunnel_from_data(rand(10, 15), dir)
|
||||
else
|
||||
@@ -274,7 +274,7 @@
|
||||
SpawnFlora(T)
|
||||
|
||||
SpawnMonster(T)
|
||||
T.ChangeTurf(turf_type,FALSE,TRUE)
|
||||
T.ChangeTurf(turf_type,FALSE,FALSE,TRUE)
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T)
|
||||
if(prob(30))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
SSblackbox.add_details("ore_mined",mineralType)
|
||||
for(var/obj/effect/temp_visual/mining_overlay/M in src)
|
||||
qdel(M)
|
||||
ChangeTurf(turf_type, defer_change)
|
||||
ChangeTurf(turf_type, FALSE, defer_change)
|
||||
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
..()
|
||||
if (prob(mineralChance))
|
||||
var/path = pickweight(mineralSpawnChanceList)
|
||||
var/turf/T = ChangeTurf(path,FALSE,TRUE)
|
||||
var/turf/T = ChangeTurf(path,FALSE,FALSE,TRUE)
|
||||
|
||||
if(T && ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
@@ -469,7 +469,7 @@
|
||||
G.quality = 2
|
||||
G.icon_state = "Gibtonite ore 2"
|
||||
|
||||
ChangeTurf(turf_type, defer_change)
|
||||
ChangeTurf(turf_type, FALSE, defer_change)
|
||||
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
continue
|
||||
W.connected = 1
|
||||
var/turf/cur_turf = get_turf(W)
|
||||
cur_turf.ChangeTurf(turf_type,FALSE,TRUE)
|
||||
cur_turf.ChangeTurf(turf_type,FALSE,FALSE,TRUE)
|
||||
var/turf/target_turf = get_turf(pick(river_nodes - W))
|
||||
if(!target_turf)
|
||||
break
|
||||
@@ -49,7 +49,7 @@
|
||||
cur_turf = get_step(cur_turf, cur_dir)
|
||||
continue
|
||||
else
|
||||
var/turf/river_turf = cur_turf.ChangeTurf(turf_type,FALSE,TRUE)
|
||||
var/turf/river_turf = cur_turf.ChangeTurf(turf_type,FALSE,FALSE,TRUE)
|
||||
river_turf.Spread(25, 11, whitelist_area)
|
||||
|
||||
for(var/WP in river_nodes)
|
||||
@@ -85,16 +85,16 @@
|
||||
|
||||
for(var/F in cardinal_turfs) //cardinal turfs are always changed but don't always spread
|
||||
var/turf/T = F
|
||||
if(!istype(T, logged_turf_type) && T.ChangeTurf(type,FALSE,TRUE) && prob(probability))
|
||||
if(!istype(T, logged_turf_type) && T.ChangeTurf(type,FALSE,FALSE,TRUE) && prob(probability))
|
||||
T.Spread(probability - prob_loss, prob_loss, whitelisted_area)
|
||||
|
||||
for(var/F in diagonal_turfs) //diagonal turfs only sometimes change, but will always spread if changed
|
||||
var/turf/T = F
|
||||
if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type,FALSE,TRUE))
|
||||
if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type,FALSE,FALSE,TRUE))
|
||||
T.Spread(probability - prob_loss, prob_loss, whitelisted_area)
|
||||
else if(ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.ChangeTurf(M.turf_type,FALSE,TRUE)
|
||||
M.ChangeTurf(M.turf_type,FALSE,FALSE,TRUE)
|
||||
|
||||
|
||||
#undef RANDOM_UPPER_X
|
||||
|
||||
+10
-10
@@ -197,11 +197,11 @@
|
||||
qdel(L)
|
||||
|
||||
//wrapper for ChangeTurf()s that you want to prevent/affect without overriding ChangeTurf() itself
|
||||
/turf/proc/TerraformTurf(path, defer_change = FALSE, ignore_air = FALSE, new_baseturf)
|
||||
return ChangeTurf(path, defer_change, ignore_air, new_baseturf)
|
||||
/turf/proc/TerraformTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE)
|
||||
return ChangeTurf(path, new_baseturf, defer_change, ignore_air)
|
||||
|
||||
//Creates a new turf
|
||||
/turf/proc/ChangeTurf(path, defer_change = FALSE, ignore_air = FALSE, new_baseturf)
|
||||
/turf/proc/ChangeTurf(path, new_baseturf, defer_change = FALSE, ignore_air = FALSE)
|
||||
if(!path)
|
||||
return
|
||||
if(!GLOB.use_preloader && path == type) // Don't no-op if the map loader requires it to be reconstructed
|
||||
@@ -409,18 +409,18 @@
|
||||
|
||||
/turf/proc/empty(turf_type=/turf/open/space, baseturf_type)
|
||||
// Remove all atoms except observers, landmarks, docking ports
|
||||
var/turf/T0 = src
|
||||
var/static/list/ignored_atoms = typecacheof(list(/turf, /mob/dead, /obj/effect/landmark, /obj/docking_port, /atom/movable/lighting_object))
|
||||
var/list/allowed_contents = typecache_filter_list(T0.GetAllContents(),ignored_atoms,reversed=TRUE)
|
||||
var/static/list/ignored_atoms = typecacheof(list(/mob/dead, /obj/effect/landmark, /obj/docking_port, /atom/movable/lighting_object))
|
||||
var/list/allowed_contents = typecache_filter_list(GetAllContents(),ignored_atoms,reversed=TRUE)
|
||||
allowed_contents -= src
|
||||
for(var/i in 1 to allowed_contents.len)
|
||||
var/thing = allowed_contents[i]
|
||||
qdel(thing, force=TRUE)
|
||||
|
||||
T0.ChangeTurf(turf_type, FALSE, FALSE, baseturf_type)
|
||||
var/turf/newT = ChangeTurf(turf_type, baseturf_type, FALSE, FALSE)
|
||||
|
||||
SSair.remove_from_active(T0)
|
||||
T0.CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(T0,1)
|
||||
SSair.remove_from_active(newT)
|
||||
newT.CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(newT,1)
|
||||
|
||||
/turf/proc/is_transition_turf()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user