mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 09:03:53 +01:00
code/global.dm => code/_global_vars/ (#17244)
* 1 * Full conversion * . * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -196,10 +196,10 @@
|
||||
|
||||
// TODO - Eschew input/output machinery and just use dirs ~Leshana
|
||||
//Locate our output and input machinery.
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
|
||||
@@ -88,10 +88,10 @@
|
||||
stack_storage[s_matname] = 0
|
||||
stack_paths[s_matname] = S
|
||||
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(input)
|
||||
break
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(output)
|
||||
break
|
||||
|
||||
@@ -207,7 +207,7 @@ var/list/mining_overlay_cache = list()
|
||||
if(density && mineral)
|
||||
. = INITIALIZE_HINT_LATELOAD
|
||||
if(random_icon)
|
||||
dir = pick(alldirs)
|
||||
dir = pick(GLOB.alldirs)
|
||||
. = INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/turf/simulated/mineral/LateInitialize()
|
||||
@@ -229,7 +229,7 @@ var/list/mining_overlay_cache = list()
|
||||
icon_state = rock_icon_state
|
||||
|
||||
//Apply overlays if we should have borders
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T) && !T.density)
|
||||
add_overlay(get_cached_border(rock_side_icon_state,direction,icon,rock_side_icon_state))
|
||||
@@ -250,7 +250,7 @@ var/list/mining_overlay_cache = list()
|
||||
add_overlay("dug_overlay")
|
||||
|
||||
//Apply overlays if there's space
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(istype(get_step(src, direction), /turf/space) && !istype(get_step(src, direction), /turf/space/cracked_asteroid))
|
||||
add_overlay(get_cached_border("asteroid_edge",direction,icon,"asteroid_edges", 0))
|
||||
|
||||
@@ -264,7 +264,7 @@ var/list/mining_overlay_cache = list()
|
||||
add_overlay(overlay_detail_icon_path,overlay_detail)
|
||||
|
||||
if(update_neighbors)
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
if(istype(get_step(src, direction), /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = get_step(src, direction)
|
||||
M.update_icon()
|
||||
@@ -336,7 +336,7 @@ var/list/mining_overlay_cache = list()
|
||||
|
||||
/turf/simulated/mineral/proc/MineralSpread()
|
||||
if(mineral && mineral.spread)
|
||||
for(var/trydir in cardinal)
|
||||
for(var/trydir in GLOB.cardinal)
|
||||
if(prob(mineral.spread_chance))
|
||||
var/turf/simulated/mineral/target_turf = get_step(src, trydir)
|
||||
if(istype(target_turf) && target_turf.density && !target_turf.mineral)
|
||||
|
||||
Reference in New Issue
Block a user