Replace hardcoded z-level numbers with a trait system (#34090)

* Add basic structure of z-level traits

* Restore space transitions and add z-level debug verb

* Restore proper ruin spawning and transit level creation

* Replace station_z_levels and related checks with traits

* Eliminate more uses of ZLEVEL_{STATION_PRIMARY,LAVALAND}
This commit is contained in:
Tad Hardesty
2018-01-12 09:05:49 +13:00
committed by oranges
parent 1d914f6a86
commit 827c4b3f99
23 changed files with 277 additions and 126 deletions
+4 -1
View File
@@ -102,7 +102,10 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
if(href_list["random"] && !possible_destinations)
usr.changeNext_move(CLICK_CD_RAPID) //Anti-spam
var/turf/LZ = safepick(Z_TURFS(ZLEVEL_MINING)) //Pick a random mining Z-level turf
var/list/all_mining_turfs = list()
for (var/z_level in SSmapping.levels_by_trait(ZTRAIT_MINING))
all_mining_turfs += Z_TURFS(z_level)
var/turf/LZ = safepick(all_mining_turfs) //Pick a random mining Z-level turf
if(!ismineralturf(LZ) && !istype(LZ, /turf/open/floor/plating/asteroid))
//Find a suitable mining turf. Reduces chance of landing in a bad area
to_chat(usr, "<span class='warning'>Landing zone scan failed. Please try again.</span>")