Merge pull request #4764 from Citadel-Station-13/upstream-merge-34090

[MIRROR] Replace hardcoded z-level numbers with a trait system
This commit is contained in:
deathride58
2018-01-12 17:41:28 +00:00
committed by GitHub
24 changed files with 517 additions and 366 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>")