Updates all get_base_turf usages to get_base_turf_by_area.

This means that instead of the base turf being defined by the z-level, it's now defined by area and defaulted by z-level.

Updates all "shuttle" and "solar" areas to have a base_turf of space.
Updates docking arms 1, 2, and 3 on the main asteroid level to have a base_turf of space.

Other z-levels may still need updating.

This change means that all actions which destroy or dismantle a tile - for example bombs, a singularity, a shuttle leaving, or deconstruction - now leave these new areas as space not asteroid. Future mapping efforts may need to take this into account.
This commit is contained in:
Jon
2015-12-05 04:24:17 +00:00
parent 11904bd805
commit 85c704676f
9 changed files with 19 additions and 14 deletions

View File

@@ -962,7 +962,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
var/old_underlays = T.underlays.Copy()
if(platingRequired)
if(istype(B, get_base_turf(B.z)))
if(istype(B, get_base_turf_by_area(B)))
continue moving
var/turf/X = B

View File

@@ -147,6 +147,7 @@ area/space/atmosalert()
requires_power = 0
flags = RAD_SHIELDED
sound_env = SMALL_ENCLOSED
base_turf = /turf/space
/area/shuttle/arrival
name = "\improper Arrival Shuttle"
@@ -1025,14 +1026,17 @@ area/space/atmosalert()
/area/hallway/secondary/entry/D1
name = "\improper Shuttle Dock Hallway - Dock One"
icon_state = "entry_D1"
base_turf = /turf/space
/area/hallway/secondary/entry/D2
name = "\improper Shuttle Dock Hallway - Dock Two"
icon_state = "entry_D2"
base_turf = /turf/space
/area/hallway/secondary/entry/D3
name = "\improper Shuttle Dock Hallway - Dock Three"
icon_state = "entry_D3"
base_turf = /turf/space
/area/hallway/secondary/entry/D4
name = "\improper Shuttle Dock Hallway - Dock Four"
@@ -1603,6 +1607,7 @@ area/space/atmosalert()
requires_power = 1
always_unpowered = 1
lighting_use_dynamic = 0
base_turf = /turf/space
auxport
name = "\improper Fore Port Solar Array"

View File

@@ -223,9 +223,9 @@ var/global/list/narsie_list = list()
consume(AM2)
continue
if (dist <= consume_range && !istype(A, get_base_turf(A.z)))
if (dist <= consume_range && !istype(A, get_base_turf_by_area(A)))
var/turf/T2 = A
T2.ChangeTurf(get_base_turf(A.z))
T2.ChangeTurf(get_base_turf_by_area(A))
/obj/singularity/narsie/consume(const/atom/A) //This one is for the small ones.
if(!(A.singuloCanEat()))
@@ -265,9 +265,9 @@ var/global/list/narsie_list = list()
spawn (0)
AM2.singularity_pull(src, src.current_size)
if (dist <= consume_range && !istype(A, get_base_turf(A.z)))
if (dist <= consume_range && !istype(A, get_base_turf_by_area(A)))
var/turf/T2 = A
T2.ChangeTurf(get_base_turf(A.z))
T2.ChangeTurf(get_base_turf_by_area(A))
/obj/singularity/narsie/ex_act(severity) //No throwing bombs at it either. --NEO
return

View File

@@ -24,7 +24,7 @@
qdel(M)
for(var/obj/O in orange(1,src))
qdel(O)
var/base_turf = get_base_turf(src.z)
var/base_turf = get_base_turf_by_area(src)
for(var/turf/simulated/ST in orange(1,src))
if(ST.type == base_turf)
continue
@@ -87,6 +87,6 @@
//Destroying the turf
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
var/turf/simulated/ST = T
var/base_turf = get_base_turf(src.z)
var/base_turf = get_base_turf_by_area(src)
if(ST.type != base_turf)
ST.ChangeTurf(base_turf)

View File

@@ -284,7 +284,7 @@
if(do_after_cooldown(target))
if(disabled) return
chassis.spark_system.start()
target:ChangeTurf(get_base_turf(target.z))
target:ChangeTurf(get_base_turf_by_area(target))
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
chassis.use_power(energy_drain)
else if (istype(target, /obj/machinery/door/airlock))
@@ -297,7 +297,7 @@
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
chassis.use_power(energy_drain)
if(1)
if(istype(target, /turf/space) || istype(target,get_base_turf(target.z)))
if(istype(target, /turf/space) || istype(target,get_base_turf_by_area(target)))
occupant_message("Building Floor...")
set_ready_state(0)
if(do_after_cooldown(target))

View File

@@ -100,7 +100,7 @@
build_delay = 50
build_type = "airlock"
build_other = /obj/machinery/door/airlock
else if(!deconstruct && (istype(T,/turf/space) || istype(T,get_base_turf(T.z))))
else if(!deconstruct && (istype(T,/turf/space) || istype(T,get_base_turf_by_area(T))))
build_cost = 1
build_type = "floor"
build_turf = /turf/simulated/floor/airless

View File

@@ -2,14 +2,14 @@
//set src in oview(1)
switch(severity)
if(1.0)
src.ChangeTurf(get_base_turf(src.z))
src.ChangeTurf(get_base_turf_by_area(src))
if(2.0)
switch(pick(40;1,40;2,3))
if (1)
if(prob(33)) new /obj/item/stack/material/steel(src)
src.ReplaceWithLattice()
if(2)
src.ChangeTurf(get_base_turf(src.z))
src.ChangeTurf(get_base_turf_by_area(src))
if(3)
if(prob(33)) new /obj/item/stack/material/steel(src)
if(prob(80))

View File

@@ -1,5 +1,5 @@
/turf/proc/ReplaceWithLattice()
src.ChangeTurf(get_base_turf(src.z))
src.ChangeTurf(get_base_turf_by_area(src))
spawn()
new /obj/structure/lattice( locate(src.x, src.y, src.z) )

View File

@@ -107,7 +107,7 @@
continue
if(O.invisibility == 101)
O.singularity_act(src, current_size)
ChangeTurf(get_base_turf(src.z))
ChangeTurf(get_base_turf_by_area(src))
return 2
/turf/simulated/wall/singularity_pull(S, current_size)