mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +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:
@@ -46,7 +46,7 @@
|
||||
O.update() //Will cause anything on the open turf to fall if it should
|
||||
|
||||
/obj/structure/catwalk/proc/redraw_nearby_catwalks()
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/obj/structure/catwalk/L = locate() in get_step(src, direction)
|
||||
if(L)
|
||||
L.update_connections()
|
||||
|
||||
@@ -178,14 +178,14 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
||||
return FALSE
|
||||
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && get_dir(T, loc) & reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it.
|
||||
if(T && get_dir(T, loc) & GLOB.reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it.
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/cliff/proc/fall_off_cliff(mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
var/turf/T = get_step(src, reverse_dir[dir])
|
||||
var/turf/T = get_step(src, GLOB.reverse_dir[dir])
|
||||
var/displaced = FALSE
|
||||
|
||||
if(dir in list(EAST, WEST)) // Apply an offset if flying sideways, to help maintain the illusion of depth.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
|
||||
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for GLOB.cardinal directions.
|
||||
if( x == user.x )
|
||||
if( y > user.y )
|
||||
dir_to_set = 2
|
||||
@@ -130,7 +130,7 @@
|
||||
dir_to_set = 4
|
||||
else
|
||||
to_chat(user, span_notice("You can't reach."))
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
return //Only works for GLOB.cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, span_notice("There is already a window facing this way there."))
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
icon = 'icons/obj/smoothlattice.dmi'
|
||||
icon_state = "latticeblank"
|
||||
updateOverlays()
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/obj/structure/lattice/L
|
||||
if(locate(/obj/structure/lattice, get_step(src, dir)))
|
||||
L = locate(/obj/structure/lattice, get_step(src, dir))
|
||||
L.updateOverlays()
|
||||
|
||||
/obj/structure/lattice/Destroy()
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/obj/structure/lattice/L
|
||||
if(locate(/obj/structure/lattice, get_step(src, dir)))
|
||||
L = locate(/obj/structure/lattice, get_step(src, dir))
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
var/dir_sum = 0
|
||||
|
||||
for (var/direction in cardinal)
|
||||
for (var/direction in GLOB.cardinal)
|
||||
if(locate(/obj/structure/lattice, get_step(src, direction)))
|
||||
dir_sum += direction
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/structure/ledge/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(solidledge && get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(solidledge && get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
src.icon_state = "morgue3"
|
||||
if(broadcast)
|
||||
global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical")
|
||||
GLOB.global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical")
|
||||
else
|
||||
src.icon_state = "morgue1"
|
||||
return
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -1543,7 +1543,7 @@
|
||||
return
|
||||
|
||||
var/placement_dir = get_dir(user, A)
|
||||
if (!(placement_dir in cardinal))
|
||||
if (!(placement_dir in GLOB.cardinal))
|
||||
to_chat(user, span_warning("You must stand directly in front of the location you wish to place that on."))
|
||||
return
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
var/exit_delay = 2
|
||||
var/enter_delay = 1
|
||||
|
||||
// alldirs in global.dm is the same list of directions, but since
|
||||
// GLOB.alldirs in global.dm is the same list of directions, but since
|
||||
// the specific order matters to get a usable icon_state, it is
|
||||
// copied here so that, in the unlikely case that alldirs is changed,
|
||||
// copied here so that, in the unlikely case that GLOB.alldirs is changed,
|
||||
// this continues to work.
|
||||
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
|
||||
@@ -102,10 +102,10 @@
|
||||
return
|
||||
|
||||
var/timedifference = world.time - user.client.time_died_as_mouse
|
||||
if(user.client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600)
|
||||
if(user.client.time_died_as_mouse && timedifference <= CONFIG_GET(number/mouse_respawn_time) MINUTES)
|
||||
var/timedifference_text
|
||||
timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss")
|
||||
to_chat(user, span_warning("You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left."))
|
||||
timedifference_text = time2text(CONFIG_GET(number/mouse_respawn_time) MINUTES - timedifference,"mm:ss")
|
||||
to_chat(user, span_warning("You may only spawn again as a mouse more than [CONFIG_GET(number/mouse_respawn_time)] minutes after your death. You have [timedifference_text] left."))
|
||||
return
|
||||
|
||||
var/response = tgui_alert(user, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!"))
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
/obj/item/bikehorn/rubberducky/grey/attack_self(mob/user as mob)
|
||||
if(spam_flag == 0)
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != user.z || get_dist(user,L) > 10)
|
||||
continue
|
||||
else
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return TRUE
|
||||
if(is_fulltile())
|
||||
return FALSE //full tile window, you can't move into it!
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
if(get_dir(mover, target) == GLOB.reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
else
|
||||
return TRUE
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
var/obj/structure/grille/G = new /obj/structure/grille(src.loc)
|
||||
handle_grille_spawn(G)
|
||||
var/list/neighbours = list()
|
||||
for (var/dir in cardinal)
|
||||
for (var/dir in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
|
||||
if(!other)
|
||||
|
||||
Reference in New Issue
Block a user