mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-10 09:22:05 +00:00
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. Conflicts: code/game/area/Space Station 13 areas.dm
34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
// Returns the lowest turf available on a given Z-level
|
|
var/global/list/base_turf_by_z = list(
|
|
"5" = /turf/simulated/floor/asteroid // Moonbase.
|
|
)
|
|
|
|
proc/get_base_turf(var/z)
|
|
if(!base_turf_by_z["[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"
|
|
set desc = "Set the base turf for a z-level."
|
|
|
|
if(!check_rights(R_DEBUG)) return
|
|
|
|
var/choice = input("Which Z-level do you wish to set the base turf for?") as num|null
|
|
if(!choice)
|
|
return
|
|
|
|
var/new_base_path = input("Please select a turf path (cancel to reset to /turf/space).") as null|anything in typesof(/turf)
|
|
if(!new_base_path)
|
|
new_base_path = /turf/space
|
|
base_turf_by_z["[choice]"] = new_base_path
|
|
message_admins("[key_name_admin(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].")
|
|
log_admin("[key_name(usr)] has set the base turf for z-level [choice] to [get_base_turf(choice)].") |