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:
Tad Hardesty
2018-01-21 11:33:11 -08:00
committed by CitadelStationBot
parent f692ffaa0c
commit 4451aca2e8
26 changed files with 114 additions and 122 deletions
+2 -2
View File
@@ -384,9 +384,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
icon_state = "blue-red"
else
var/weather_icon
for(var/V in SSweather.existing_weather)
for(var/V in SSweather.processing)
var/datum/weather/W = V
if(src in W.impacted_areas)
if(W.stage != END_STAGE && (src in W.impacted_areas))
W.update_areas()
weather_icon = TRUE
if(!weather_icon)
+1 -1
View File
@@ -657,7 +657,7 @@
flags_2 |= STATIONLOVING_2
/atom/movable/proc/relocate()
var/targetturf = find_safe_turf(ZLEVEL_STATION_PRIMARY)
var/targetturf = find_safe_turf()
if(!targetturf)
if(GLOB.blobstart.len > 0)
targetturf = get_turf(pick(GLOB.blobstart))
@@ -330,7 +330,7 @@
QDEL_IN(src, 3)
sleep(3)
GLOB.clockwork_gateway_activated = TRUE
var/turf/T = locate(round(world.maxx * 0.5, 1), round(world.maxy * 0.5, 1), ZLEVEL_STATION_PRIMARY) //approximate center of the station
var/turf/T = SSmapping.get_station_center()
new /obj/structure/destructible/clockwork/massive/ratvar(T)
SSticker.force_ending = TRUE
var/x0 = T.x