mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Refactor weather to use Z traits, assorted related cleanup (#34633)
* Add a proc for getting the station center * Add a couple of comments to ZTRAIT defines * Remove unused global_map list * Refactor weather to use the trait system * Un-hardcode the transit z-level * Use Z traits to determine Portal Storm event areas * Fix loading away missions containing anything that reads traits
This commit is contained in:
@@ -52,7 +52,8 @@
|
||||
var/x = round((world.maxx - width)/2)
|
||||
var/y = round((world.maxy - height)/2)
|
||||
|
||||
var/list/bounds = maploader.load_map(file(mappath), x, y)
|
||||
var/datum/space_level/level = SSmapping.add_new_zlevel(name, UNAFFECTED, list(ZTRAIT_AWAY = TRUE))
|
||||
var/list/bounds = maploader.load_map(file(mappath), x, y, level.z_value, no_changeturf=(SSatoms.initialized == INITIALIZATION_INSSATOMS))
|
||||
if(!bounds)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -44,3 +44,8 @@
|
||||
if (S.traits[trait])
|
||||
. += S.z_value
|
||||
break
|
||||
|
||||
// Prefer not to use this one too often
|
||||
/datum/controller/subsystem/mapping/proc/get_station_center()
|
||||
var/station_z = levels_by_trait(ZTRAIT_STATION)[1]
|
||||
return locate(round(world.maxx * 0.5, 1), round(world.maxy * 0.5, 1), station_z)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// TODO: sleep here if the Z level needs to be cleared
|
||||
var/datum/space_level/S = new z_type(new_z, name, linkage, traits)
|
||||
z_list += S
|
||||
return new_z
|
||||
return S
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/get_level(z)
|
||||
. = z_list[z]
|
||||
|
||||
Reference in New Issue
Block a user