Allows you to define a base turf for an area which overrides the z-level's base turf in unsorted.dm.

It will first check to see if the turf is set, and if not it will still use the z-level default.
This means we can mark areas as having a base of space to override the z-level base of asteroid that we're using.
As a result, we can ensure the bombs, shuttles moving, etc. leave behind an space turf by defining shuttles, solars/"external" areas as using space as a base.
Areas will need to be updated to check with base_turf = /turf/space and references to the old get_base_turf proc updated so all calls (bombs, Nar'Sie, deconstruction, etc.) have the correct effect, but it's tired and I want to commit this now so I'm committed to finishing it tomorrow.
This commit is contained in:
Jon
2015-12-03 22:51:15 +00:00
parent 42bb4aee39
commit 1a94dea2ea
3 changed files with 15 additions and 6 deletions
+8 -1
View File
@@ -1,4 +1,4 @@
// Returns the lowest turf available on a given Z-level, defaults to space.
// Returns the lowest turf available on a given Z-level, defaults to asteroid for Polaris.
var/global/list/base_turf_by_z = list(
"1" = /turf/simulated/floor/asteroid,
"4" = /turf/simulated/floor/asteroid,
@@ -10,6 +10,13 @@ proc/get_base_turf(var/z)
base_turf_by_z["[z]"] = /turf/space
return base_turf_by_z["[z]"]
//An area can override the z-level base turf, so our solar array areas etc. can be space-based.
proc/get_base_turf_by_area(var/turf/T)
var/area/A = T.loc
if(A.base_turf)
return A.base_turf
return get_base_turf(T.z)
/client/proc/set_base_turf()
set category = "Debug"
set name = "Set Base Turf"