mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] code/global.dm => code/_global_vars/ (#10689)
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a7718c6177
commit
f04f992cfe
@@ -101,7 +101,7 @@
|
||||
A.fire_act(air_contents, air_contents.temperature, air_contents.volume)
|
||||
|
||||
// Spreading behaviour
|
||||
for(var/direction in shuffle(cardinal))
|
||||
for(var/direction in shuffle(GLOB.cardinal))
|
||||
var/turf/simulated/enemy_tile = get_step(my_tile, direction)
|
||||
if(istype(enemy_tile))
|
||||
if(my_tile.open_directions & direction)
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
var/turf/T1 = get_turf(src)
|
||||
if(T1.get_lumcount() < 0.4)
|
||||
for(var/dirn in cardinal)
|
||||
for(var/dirn in GLOB.cardinal)
|
||||
var/turf/T2 = get_step(src, dirn)
|
||||
|
||||
if(!istype(T2) || locate(/obj/effect/dark) in T2 || istype(T2.loc, /area/arrival) || isspace(T2) || istype(T2, /turf/simulated/open))
|
||||
|
||||
@@ -752,7 +752,7 @@ rborosilicate = 12
|
||||
var/obj/O = new the_rcd.wall_frame_type(get_step(src,direction))
|
||||
O.dir = direction
|
||||
if(istype(O,/obj/machinery/light))
|
||||
O.dir = reverse_dir[O.dir]
|
||||
O.dir = GLOB.reverse_dir[O.dir]
|
||||
return TRUE
|
||||
var/list/adjusts = list(
|
||||
/obj/machinery/computer/security/telescreen/entertainment,
|
||||
|
||||
@@ -126,13 +126,13 @@
|
||||
/turf/simulated/shuttlewalls/proc/special_wall_connections(list/dirs, list/inrange)
|
||||
if(material.icon_base == "hull") // Could be improved...
|
||||
var/additional_dirs = 0
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(T && (locate(/obj/structure/hull_corner) in T))
|
||||
dirs += direction
|
||||
additional_dirs |= direction
|
||||
if(additional_dirs)
|
||||
for(var/diag_dir in cornerdirs)
|
||||
for(var/diag_dir in GLOB.cornerdirs)
|
||||
if ((additional_dirs & diag_dir) == diag_dir)
|
||||
dirs += diag_dir
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/datum/event/electrical_fire/start()
|
||||
if(!machines.len)
|
||||
if(!GLOB.machines.len)
|
||||
return
|
||||
|
||||
var/list/possible_machines = list()
|
||||
for(var/obj/machinery/M in machines)
|
||||
for(var/obj/machinery/M in GLOB.machines)
|
||||
var/area/A = get_area(M)
|
||||
if(!A)
|
||||
continue
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/datum/event/horde_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 60)
|
||||
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) //Gathering together all possible areas to spawn mobs.
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines) //Gathering together all possible areas to spawn mobs.
|
||||
//CHOMPEdit: Added a couple areas to the exclusion.
|
||||
var/area/in_area = get_area(temp_vent)
|
||||
if(in_area.flag_check(AREA_FORBID_EVENTS))
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/datum/event/horde_infestation/start()
|
||||
if(spiders)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
//CHOMPEdit: Added a couple areas to the exclusion. Also made this actually work.
|
||||
var/area/in_area = get_area(temp_vent)
|
||||
if(in_area.flag_check(AREA_FORBID_EVENTS))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/datum/event/meteor_wave/meatyores/tick()
|
||||
if(activeFor >= alarmWhen)
|
||||
for(var/obj/machinery/shield_diffuser/SD in global.machines)
|
||||
for(var/obj/machinery/shield_diffuser/SD in GLOB.machines)
|
||||
if(SD.z in affecting_z)
|
||||
SD.meteor_alarm(10)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
spawncount = rand(2 * severity, 4 * severity)
|
||||
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
//CHOMPEdit: Added a couple areas to the exclusion. Also made this actually work.
|
||||
var/area/in_area = get_area(temp_vent)
|
||||
if(in_area.flag_check(AREA_FORBID_EVENTS))
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/mob/living/simple_mob/humanoid/starhunter/hunter/harvester/handle_special() //wierd movement
|
||||
if(prob(20))
|
||||
step(src, pick(cardinal))
|
||||
step(src, pick(GLOB.cardinal))
|
||||
..()
|
||||
|
||||
/mob/living/simple_mob/humanoid/starhunter/hunter/ninja
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
//custom light flicker proc
|
||||
/mob/living/simple_mob/shadekin/proc/handle_phasein_flicker()
|
||||
if(phase_gentle) // gentle case: No light destruction. Flicker in 4 tile radius for 3s. Weaken for 3sec after
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != z || get_dist(src,L) > 4)
|
||||
continue
|
||||
L.flicker(3)
|
||||
@@ -90,7 +90,7 @@
|
||||
if(eye_state == PURPLE_EYES)
|
||||
destroy_lights = 25
|
||||
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z != z || get_dist(src,L) > 10)
|
||||
continue
|
||||
|
||||
|
||||
@@ -125,9 +125,9 @@
|
||||
|
||||
/obj/structure/filingcabinet/security/proc/populate()
|
||||
if(virgin)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
for(var/datum/data/record/G in GLOB.data_core.general)
|
||||
var/datum/data/record/S
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"]))
|
||||
S = R
|
||||
break
|
||||
@@ -160,9 +160,9 @@
|
||||
|
||||
/obj/structure/filingcabinet/medical/proc/populate()
|
||||
if(virgin)
|
||||
for(var/datum/data/record/G in data_core.general)
|
||||
for(var/datum/data/record/G in GLOB.data_core.general)
|
||||
var/datum/data/record/M
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if((R.fields["name"] == G.fields["name"] || R.fields["id"] == G.fields["id"]))
|
||||
M = R
|
||||
break
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
pda.id.rank = newjob.title
|
||||
pda.id.assignment = newassignment
|
||||
pda.id.name = text("[pda.id.registered_name]'s ID Card ([pda.id.assignment])")
|
||||
data_core.manifest_modify(pda.id.registered_name, pda.id.assignment, pda.id.rank)
|
||||
GLOB.data_core.manifest_modify(pda.id.registered_name, pda.id.assignment, pda.id.rank)
|
||||
pda.id.last_job_switch = world.time
|
||||
callHook("reassign_employee", list(pda.id))
|
||||
newjob.current_positions++
|
||||
@@ -131,7 +131,7 @@
|
||||
pda.id.rank = ptojob.title
|
||||
pda.id.assignment = ptojob.title
|
||||
pda.id.name = text("[pda.id.registered_name]'s ID Card ([pda.id.assignment])")
|
||||
data_core.manifest_modify(pda.id.registered_name, pda.id.assignment, pda.id.rank)
|
||||
GLOB.data_core.manifest_modify(pda.id.registered_name, pda.id.assignment, pda.id.rank)
|
||||
pda.id.last_job_switch = world.time
|
||||
callHook("reassign_employee", list(pda.id))
|
||||
user.mind.assigned_role = ptojob.title
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
/obj/machinery/v_garbosystem/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
src.crusher = locate(/obj/machinery/recycling/crusher, get_step(src, dir))
|
||||
if(src.crusher)
|
||||
crusher.hand_fed = FALSE
|
||||
break
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
src.button = locate(/obj/machinery/button/garbosystem, get_step(src, dir))
|
||||
if(src.button)
|
||||
button.grinder = src
|
||||
@@ -75,7 +75,7 @@
|
||||
if(!emagged && ishuman(L) && L.mind)
|
||||
playsound(src, 'sound/machines/warning-buzzer.ogg', 50, 0, 0)
|
||||
visible_message(span_warning("POSSIBLE CREW MEMBER DETECTED! EMERGENCY STOP ENGAGED!"))
|
||||
global_announcer.autosay("Possible crew member detected in grinder feed. Emergency Stop Protocols engaged!", "Recycling Grinder Alert", "Supply")
|
||||
GLOB.global_announcer.autosay("Possible crew member detected in grinder feed. Emergency Stop Protocols engaged!", "Recycling Grinder Alert", "Supply")
|
||||
operating = FALSE
|
||||
update()
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user