mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Turn more unmanaged global vars into GLOB (#20446)
Turned a ton of unmanaged globals into managed globals. Refactored some UT output. Removed some unused things, including vars. Added a test to ensure people don't keep adding new unmanaged vars.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
GLOBAL_LIST_INIT_TYPED(bump_teleporters, /obj/effect/bump_teleporter, list())
|
||||
|
||||
/obj/effect/bump_teleporter
|
||||
name = "bump-teleporter"
|
||||
@@ -13,10 +13,10 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
|
||||
/obj/effect/bump_teleporter/New()
|
||||
..()
|
||||
BUMP_TELEPORTERS += src
|
||||
GLOB.bump_teleporters += src
|
||||
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
BUMP_TELEPORTERS -= src
|
||||
GLOB.bump_teleporters -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/bump_teleporter/CollidedWith(atom/bumped_atom)
|
||||
@@ -30,7 +30,7 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
//user.forceMove(src.loc) //Stop at teleporter location, there is nowhere to teleport to.
|
||||
return
|
||||
|
||||
for(var/obj/effect/bump_teleporter/BT in BUMP_TELEPORTERS)
|
||||
for(var/obj/effect/bump_teleporter/BT in GLOB.bump_teleporters)
|
||||
if(BT.id == src.id_target)
|
||||
usr.forceMove(BT.loc) //Teleport to location with correct id.
|
||||
return
|
||||
|
||||
@@ -48,10 +48,10 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
// will always spawn at the items location, even if it's moved.
|
||||
|
||||
/* Example:
|
||||
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
|
||||
steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
OPTIONAL: steam.attach(mob)
|
||||
steam.start() -- spawns the effect
|
||||
*/
|
||||
/////////////////////////////////////////////
|
||||
/obj/effect/effect/steam
|
||||
|
||||
@@ -289,14 +289,14 @@
|
||||
|
||||
/obj/effect/portal/revenant/Initialize(mapload)
|
||||
. = ..()
|
||||
if(revenants.revenant_rift)
|
||||
if(GLOB.revenants.revenant_rift)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
var/turf/T = get_turf(src)
|
||||
log_and_message_admins("Revenant Bluespace Rift spawned at \the [get_area(T)]", null, T)
|
||||
revenants.revenant_rift = src
|
||||
GLOB.revenants.revenant_rift = src
|
||||
|
||||
/obj/effect/portal/revenant/Destroy()
|
||||
revenants.destroyed_rift()
|
||||
GLOB.revenants.destroyed_rift()
|
||||
visible_message(FONT_LARGE(SPAN_DANGER("\The [src] collapses!")))
|
||||
new /obj/random/highvalue/no_crystal(src)
|
||||
new /obj/random/highvalue/no_crystal(src)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
SSexplosives.queue(data)
|
||||
|
||||
//Machines which report explosions.
|
||||
for(var/thing in doppler_arrays)
|
||||
for(var/thing in GLOB.doppler_arrays)
|
||||
var/obj/machinery/doppler_array/Array = thing
|
||||
Array.sense_explosion(epicenter.x,epicenter.y,epicenter.z,devastation_range,heavy_impact_range,light_impact_range)
|
||||
|
||||
|
||||
@@ -624,8 +624,8 @@
|
||||
/obj/item/proc/item_action_slot_check(mob/user, slot)
|
||||
return TRUE
|
||||
|
||||
//Defines which slots correspond to which slot flags
|
||||
var/list/global/slot_flags_enumeration = list(
|
||||
///Defines which slots correspond to which slot flags
|
||||
GLOBAL_LIST_INIT(slot_flags_enumeration, list(
|
||||
"[slot_wear_mask]" = SLOT_MASK,
|
||||
"[slot_back]" = SLOT_BACK,
|
||||
"[slot_wear_suit]" = SLOT_OCLOTHING,
|
||||
@@ -641,7 +641,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
"[slot_tie]" = SLOT_TIE,
|
||||
"[slot_wrists]" = SLOT_WRISTS,
|
||||
"[slot_pants]" = SLOT_PANTS
|
||||
)
|
||||
))
|
||||
|
||||
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
|
||||
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
|
||||
@@ -662,8 +662,8 @@ var/list/global/slot_flags_enumeration = list(
|
||||
return 0
|
||||
|
||||
//First check if the item can be equipped to the desired slot.
|
||||
if("[slot]" in slot_flags_enumeration)
|
||||
var/req_flags = slot_flags_enumeration["[slot]"]
|
||||
if("[slot]" in GLOB.slot_flags_enumeration)
|
||||
var/req_flags = GLOB.slot_flags_enumeration["[slot]"]
|
||||
if(!(req_flags & slot_flags))
|
||||
return 0
|
||||
|
||||
@@ -948,7 +948,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
if(M.stat || !(ishuman(M)))
|
||||
to_chat(M, SPAN_WARNING("You are unable to focus through \the [devicename]!"))
|
||||
cannotzoom = 1
|
||||
else if(!zoom && (global_hud.darkMask[1] in M.client.screen))
|
||||
else if(!zoom && (GLOB.global_hud.darkMask[1] in M.client.screen))
|
||||
to_chat(M, SPAN_WARNING("Your visor gets in the way of looking through the [devicename]!"))
|
||||
cannotzoom = 1
|
||||
else if(do_device_check && !zoom && M.get_active_hand() != src)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
desc = "Some dusty old blueprints. The markings are old, and seem entirely irrelevant for your wherabouts."
|
||||
return FALSE
|
||||
desc = "Blueprints for the daring souls wanting to establish a planetary outpost. Has some sketchy looking stains and what appears to be bite holes."
|
||||
var/area/overmap/map = global.map_overmap
|
||||
var/area/overmap/map = GLOB.map_overmap
|
||||
for(var/obj/effect/overmap/visitable/sector/exoplanet/E in map)
|
||||
valid_z_levels += E.map_z
|
||||
if(length(SSodyssey.scenario_zlevels))
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//Global list for housing active radiojammers:
|
||||
var/list/active_radio_jammers = list()
|
||||
GLOBAL_LIST_INIT_TYPED(active_radio_jammers, /obj/item/device/radiojammer, list())
|
||||
|
||||
// tests if an object is near a radio jammer
|
||||
// if need_all_blocked is false, the jammer only needs to be on JAMMER_SYNTHETIC to work
|
||||
/proc/within_jamming_range(var/atom/test, var/need_all_blocked = TRUE)
|
||||
if(length(active_radio_jammers))
|
||||
if(length(GLOB.active_radio_jammers))
|
||||
var/turf/our_turf = get_turf(test)
|
||||
for(var/obj/item/device/radiojammer/J in active_radio_jammers)
|
||||
for(var/obj/item/device/radiojammer/J in GLOB.active_radio_jammers)
|
||||
var/turf/jammer_turf = get_turf(J)
|
||||
if(our_turf.z != jammer_turf.z)
|
||||
continue
|
||||
@@ -37,7 +37,7 @@ var/list/active_radio_jammers = list()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/radiojammer/Destroy()
|
||||
active_radio_jammers -= src
|
||||
GLOB.active_radio_jammers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radiojammer/attack_self(mob/user)
|
||||
@@ -83,10 +83,10 @@ var/list/active_radio_jammers = list()
|
||||
|
||||
/obj/item/device/radiojammer/update_icon()
|
||||
if(active > 0)
|
||||
active_radio_jammers += src
|
||||
GLOB.active_radio_jammers += src
|
||||
icon_state = icon_state_active
|
||||
else
|
||||
active_radio_jammers -= src
|
||||
GLOB.active_radio_jammers -= src
|
||||
icon_state = icon_state_inactive
|
||||
|
||||
|
||||
@@ -156,11 +156,11 @@ var/list/active_radio_jammers = list()
|
||||
|
||||
/obj/item/device/radiojammer/improvised/update_icon()
|
||||
if(active > 0)
|
||||
active_radio_jammers += src
|
||||
GLOB.active_radio_jammers += src
|
||||
icon_state = icon_state_active
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
last_updated = world.time
|
||||
else
|
||||
active_radio_jammers -= src
|
||||
GLOB.active_radio_jammers -= src
|
||||
icon_state = initial(icon_state)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
@@ -74,15 +74,20 @@ Then check if it's true, if true return. This will stop the normal menu appearin
|
||||
var/pda_code = ""
|
||||
|
||||
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
/obj/item/device/uplink/hidden/New()
|
||||
spawn(2)
|
||||
if(!istype(loc, /obj/item))
|
||||
qdel(src)
|
||||
..()
|
||||
tgui_data = list()
|
||||
update_tgui_data()
|
||||
|
||||
/obj/item/device/uplink/hidden/Initialize(mapload, datum/mind/owner, new_telecrystals, new_bluecrystals)
|
||||
. = ..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/item/device/uplink/hidden/LateInitialize()
|
||||
// The hidden uplink MUST be inside an obj/item's contents.
|
||||
if(!istype(loc, /obj/item))
|
||||
qdel(src)
|
||||
|
||||
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
|
||||
/obj/item/device/uplink/hidden/proc/toggle()
|
||||
active = !active
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_random_selection/default()
|
||||
GLOBAL_DATUM_INIT(default_uplink_selection, /datum/uplink_random_selection, new/datum/uplink_random_selection/default())
|
||||
|
||||
/datum/uplink_random_item
|
||||
var/uplink_item // The uplink item
|
||||
@@ -12,7 +12,7 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
|
||||
src.keep_probability = keep_probability
|
||||
src.reselect_probability = reselect_probability
|
||||
|
||||
/datum/uplink_random_selection
|
||||
ABSTRACT_TYPE(/datum/uplink_random_selection)
|
||||
var/list/datum/uplink_random_item/items
|
||||
|
||||
/datum/uplink_random_selection/New()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/mob_icon_icon_states = list()
|
||||
GLOBAL_LIST_INIT(mob_icon_icon_states, list())
|
||||
|
||||
/obj/item/proc/get_mob_overlay(var/mob/living/carbon/human/H, var/mob_icon, var/mob_state, var/slot, var/main_call = TRUE)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
@@ -6,12 +6,12 @@ var/list/mob_icon_icon_states = list()
|
||||
RETURN_TYPE(/image)
|
||||
|
||||
// If we don't actually need to offset this, don't bother with any of the generation/caching.
|
||||
if(!mob_icon_icon_states[mob_icon])
|
||||
mob_icon_icon_states[mob_icon] = icon_states(mob_icon)
|
||||
if(!GLOB.mob_icon_icon_states[mob_icon])
|
||||
GLOB.mob_icon_icon_states[mob_icon] = icon_states(mob_icon)
|
||||
var/needs_shift = !(H.species.bodytype in sprite_sheets)
|
||||
if(!needs_shift && length(item_icons))
|
||||
needs_shift = (slot in item_icons)
|
||||
if(LAZYLEN(H.species.equip_adjust) && H.species.equip_adjust[slot] && length(H.species.equip_adjust[slot]) && (mob_state in mob_icon_icon_states[mob_icon]) && needs_shift)
|
||||
if(LAZYLEN(H.species.equip_adjust) && H.species.equip_adjust[slot] && length(H.species.equip_adjust[slot]) && (mob_state in GLOB.mob_icon_icon_states[mob_icon]) && needs_shift)
|
||||
// Check the cache for previously made icons.
|
||||
var/image_key_mod = get_image_key_mod()
|
||||
var/image_key = "[mob_icon]-[mob_state]-[color]-[slot][!isnull(image_key_mod) ? "-[image_key_mod]" : ""]"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
GLOBAL_LIST_INIT_TYPED(rod_recipes, /datum/stack_recipe, list(
|
||||
new /datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = TRUE, on_floor = TRUE),
|
||||
new /datum/stack_recipe("floor-mounted catwalk", /obj/structure/lattice/catwalk/indoor, 4, time = 10, one_per_turf = TRUE, on_floor = TRUE),
|
||||
new /datum/stack_recipe("grate, dark", /obj/structure/lattice/catwalk/indoor/grate, 1, time = 10, one_per_turf = TRUE, on_floor = TRUE),
|
||||
@@ -13,7 +13,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
new /datum/stack_recipe("bolt", /obj/item/arrow, 1, time = 6),
|
||||
new /datum/stack_recipe("small animal trap", /obj/item/trap/animal, 6, time = 10),
|
||||
new /datum/stack_recipe("medium animal trap", /obj/item/trap/animal/medium, 12, time = 20)
|
||||
)
|
||||
))
|
||||
|
||||
/obj/item/stack/rods
|
||||
name = "metal rod"
|
||||
@@ -58,7 +58,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
|
||||
/obj/item/stack/rods/New(var/loc, var/amount=null)
|
||||
..()
|
||||
recipes = rod_recipes
|
||||
recipes = GLOB.rod_recipes
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/attacking_item, mob/user)
|
||||
..()
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
item_state = "card-id"
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_ILLEGAL = 2)
|
||||
|
||||
var/const/NO_EMAG_ACT = -50
|
||||
/obj/item/card/emag/resolve_attackby(atom/A, mob/user, var/click_parameters)
|
||||
var/used_uses = A.emag_act(uses, user, src)
|
||||
if(used_uses == NO_EMAG_ACT)
|
||||
|
||||
@@ -255,20 +255,20 @@
|
||||
// Always update the UI, or buttons will spin indefinitely
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/var/global/list/id_card_states
|
||||
GLOBAL_LIST_INIT_TYPED(id_card_states, /datum/card_state, null)
|
||||
/proc/id_card_states()
|
||||
if(!id_card_states)
|
||||
id_card_states = list()
|
||||
if(!GLOB.id_card_states)
|
||||
GLOB.id_card_states = list()
|
||||
for(var/path in typesof(/obj/item/card/id))
|
||||
var/obj/item/card/id/ID = path
|
||||
var/datum/card_state/CS = new()
|
||||
CS.icon_state = initial(ID.icon_state)
|
||||
CS.item_state = initial(ID.item_state)
|
||||
CS.name = initial(ID.name) + " - " + initial(ID.icon_state)
|
||||
id_card_states += CS
|
||||
sortTim(id_card_states, GLOBAL_PROC_REF(cmp_cardstate), FALSE)
|
||||
GLOB.id_card_states += CS
|
||||
sortTim(GLOB.id_card_states, GLOBAL_PROC_REF(cmp_cardstate), FALSE)
|
||||
|
||||
return id_card_states
|
||||
return GLOB.id_card_states
|
||||
|
||||
/datum/card_state
|
||||
var/name
|
||||
|
||||
@@ -291,13 +291,13 @@
|
||||
if("Give in")
|
||||
K.visible_message(SPAN_NOTICE("[K]'s eyes become clearer, the evil gone, but not without leaving scars."))
|
||||
K.take_overall_damage(10, 20)
|
||||
thralls.remove_antagonist(K.mind)
|
||||
GLOB.thralls.remove_antagonist(K.mind)
|
||||
admin_attack_log(user, target_mob, "successfully deconverted", "was successfully deconverted by", "successfully deconverted")
|
||||
else if (vampire.status & VAMP_FRENZIED)
|
||||
K.visible_message(SPAN_DANGER("[user] thrusts \the [src] towards [K], who recoils in horror as they erupt into flames!"), SPAN_DANGER("[user] thrusts \the [src] towards you, its holy light scorching your corrupted flesh!"))
|
||||
K.adjust_fire_stacks(10)
|
||||
K.IgniteMob()
|
||||
else if(cult && (K.mind in cult.current_antagonists) && prob(75))
|
||||
else if(GLOB.cult && (K.mind in GLOB.cult.current_antagonists) && prob(75))
|
||||
if(do_after(user, 1.5 SECONDS))
|
||||
K.visible_message(SPAN_DANGER("[user] waves \the [src] over \the [K]'s head, [K] looks captivated by it."), SPAN_WARNING("[user] waves the [src] over your head. <b>You see a foreign light, asking you to follow it. Its presence burns and blinds.</b>"))
|
||||
var/choice = alert(K,"Do you want to give up your goal?","Become cleansed","Resist","Give in")
|
||||
@@ -310,7 +310,7 @@
|
||||
if("Give in")
|
||||
K.visible_message(SPAN_NOTICE("[K]'s eyes become clearer, the evil gone, but not without leaving scars."))
|
||||
K.take_overall_damage(10, 20)
|
||||
cult.remove_antagonist(K.mind)
|
||||
GLOB.cult.remove_antagonist(K.mind)
|
||||
admin_attack_log(user, target_mob, "successfully deconverted", "was successfully deconverted by", "successfully deconverted")
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("[user]'s concentration is broken!"), SPAN_WARNING("Your concentration is broken! You and your target need to stay uninterrupted for longer!"))
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/obj/item/circuitboard/security/engineering/New()
|
||||
..()
|
||||
network = engineering_networks
|
||||
network = GLOB.engineering_networks
|
||||
|
||||
/obj/item/circuitboard/security/mining
|
||||
name = T_BOARD("mining camera monitor")
|
||||
@@ -67,7 +67,7 @@
|
||||
to_chat(usr, "No input found please hang up and try your call again.")
|
||||
return
|
||||
var/list/tempnetwork = text2list(input, ",")
|
||||
tempnetwork = difflist(tempnetwork,restricted_camera_networks,1)
|
||||
tempnetwork = difflist(tempnetwork, GLOB.restricted_camera_networks, 1)
|
||||
if(tempnetwork.len < 1)
|
||||
to_chat(usr, "No network found please hang up and try your call again.")
|
||||
return
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
icon_state = "neutralizer[active ? "-a" : ""]"
|
||||
|
||||
/obj/item/bluespace_neutralizer/attack_self(mob/user)
|
||||
if(vamp.current_antagonists.len || revenants.revenant_rift || active)
|
||||
if(GLOB.vamp.current_antagonists.len || GLOB.revenants.revenant_rift || active)
|
||||
toggle(user)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [src] doesn't detect any large bluespace rifts in the region."))
|
||||
@@ -31,23 +31,23 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/bluespace_neutralizer/process()
|
||||
if(active && revenants.revenant_rift)
|
||||
if(active && GLOB.revenants.revenant_rift)
|
||||
var/turf/our_turf = get_turf(src)
|
||||
if(!(our_turf.z == revenants.revenant_rift.z && get_dist(src, revenants.revenant_rift) < 5 && is_in_sight(src, revenants.revenant_rift)))
|
||||
if(!(our_turf.z == GLOB.revenants.revenant_rift.z && get_dist(src, GLOB.revenants.revenant_rift) < 5 && is_in_sight(src, GLOB.revenants.revenant_rift)))
|
||||
tethered = FALSE
|
||||
return
|
||||
if(!tethered)
|
||||
visible_message(SPAN_DANGER("\The [src] tethers with \the [revenants.revenant_rift]!"))
|
||||
visible_message(SPAN_DANGER("\The [src] tethers with \the [GLOB.revenants.revenant_rift]!"))
|
||||
last_zap = world.time
|
||||
tethered = TRUE
|
||||
Beam(revenants.revenant_rift, icon_state="n_beam", icon = 'icons/effects/beam.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
Beam(GLOB.revenants.revenant_rift, icon_state="n_beam", icon = 'icons/effects/beam.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
playsound(get_turf(src), 'sound/magic/Charge.ogg', 70, TRUE, extrarange = 30)
|
||||
return
|
||||
revenants.revenant_rift.reduce_health(world.time - last_zap)
|
||||
GLOB.revenants.revenant_rift.reduce_health(world.time - last_zap)
|
||||
last_zap = world.time
|
||||
Beam(revenants.revenant_rift, icon_state="lightning[rand(1,12)]", icon = 'icons/effects/effects.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
Beam(GLOB.revenants.revenant_rift, icon_state="lightning[rand(1,12)]", icon = 'icons/effects/effects.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
playsound(get_turf(src), 'sound/magic/LightningShock.ogg', 50, TRUE, extrarange = 30)
|
||||
if(active && vamp.current_antagonists.len)
|
||||
if(active && GLOB.vamp.current_antagonists.len)
|
||||
for(var/obj/effect/dummy/veil_walk/veilwalk in range(src, 8))
|
||||
Beam(veilwalk, icon_state="lightning[rand(1,12)]", icon = 'icons/effects/effects.dmi', time=2, maxdistance=5, beam_datum_type=/datum/beam/held)
|
||||
playsound(get_turf(src), 'sound/magic/LightningShock.ogg', 50, TRUE, extrarange = 30)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/tape_roll_applications = list()
|
||||
GLOBAL_LIST_INIT(tape_roll_applications, list())
|
||||
|
||||
//Define all tape types in policetape.dm
|
||||
/obj/item/taperoll
|
||||
@@ -189,17 +189,17 @@ var/list/tape_roll_applications = list()
|
||||
var/turf/F = A
|
||||
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
|
||||
var/icon/hazard_overlay = hazard_overlays["[direction]"]
|
||||
if(tape_roll_applications[F] == null)
|
||||
tape_roll_applications[F] = 0
|
||||
if(GLOB.tape_roll_applications[F] == null)
|
||||
GLOB.tape_roll_applications[F] = 0
|
||||
|
||||
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
|
||||
if(GLOB.tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
|
||||
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
|
||||
F.CutOverlays(hazard_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
tape_roll_applications[F] &= ~direction
|
||||
GLOB.tape_roll_applications[F] &= ~direction
|
||||
else
|
||||
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
|
||||
F.AddOverlays(hazard_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
tape_roll_applications[F] |= direction
|
||||
GLOB.tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
/obj/item/tape/proc/crumple(var/mob/user)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
/obj/item/syndie/teleporter/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(!ready_to_use && burglars.is_antagonist(user.mind))
|
||||
if(!ready_to_use && GLOB.burglars.is_antagonist(user.mind))
|
||||
. += SPAN_NOTICE("Charging: [num2loadingbar(world.time / when_recharge)]")
|
||||
|
||||
/obj/item/syndie/teleporter/set_initial_maptext()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Special inhibitor handling. Different from the one used by teleport datums.
|
||||
*/
|
||||
/proc/check_inhibitors(var/turf/T)
|
||||
for(var/found_inhibitor in bluespace_inhibitors)
|
||||
for(var/found_inhibitor in GLOB.bluespace_inhibitors)
|
||||
var/obj/machinery/anti_bluespace/AB = found_inhibitor
|
||||
if(T.z != AB.z || get_dist(T, AB) > 8 || (AB.stat & (NOPOWER | BROKEN)))
|
||||
continue
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/global/all_tethers = list()
|
||||
GLOBAL_LIST_INIT_TYPED(all_tethers, /obj/item/tethering_device, list())
|
||||
|
||||
/obj/item/tethering_device
|
||||
name = "tethering device"
|
||||
@@ -18,7 +18,7 @@ var/list/global/all_tethers = list()
|
||||
|
||||
/obj/item/tethering_device/Initialize(mapload, ...)
|
||||
. = ..()
|
||||
all_tethers += src
|
||||
GLOB.all_tethers += src
|
||||
|
||||
/obj/item/tethering_device/update_icon()
|
||||
ClearOverlays()
|
||||
@@ -28,7 +28,7 @@ var/list/global/all_tethers = list()
|
||||
/obj/item/tethering_device/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
deactivate()
|
||||
all_tethers -= src
|
||||
GLOB.all_tethers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/tethering_device/attack_self(mob/user)
|
||||
@@ -44,7 +44,7 @@ var/list/global/all_tethers = list()
|
||||
|
||||
/obj/item/tethering_device/process()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/tether in all_tethers - src)
|
||||
for(var/tether in GLOB.all_tethers - src)
|
||||
var/obj/item/tethering_device/TD = tether
|
||||
if(!TD.active)
|
||||
continue
|
||||
@@ -74,7 +74,7 @@ var/list/global/all_tethers = list()
|
||||
for(var/beam in active_beams)
|
||||
var/datum/beam/exploration/B = active_beams[beam]
|
||||
B.End()
|
||||
for(var/tether in all_tethers)
|
||||
for(var/tether in GLOB.all_tethers)
|
||||
var/obj/item/tethering_device/TD = tether
|
||||
TD.untether(src)
|
||||
|
||||
|
||||
@@ -656,11 +656,11 @@
|
||||
var/stocktype = pickweight(spawntypes)
|
||||
switch (stocktype)
|
||||
if ("1")
|
||||
return pickweight(random_stock_rare)
|
||||
return pickweight(GLOB.random_stock_rare)
|
||||
if ("2")
|
||||
return pickweight(random_stock_uncommon)
|
||||
return pickweight(GLOB.random_stock_uncommon)
|
||||
if ("3")
|
||||
return pickweight(random_stock_common)
|
||||
return pickweight(GLOB.random_stock_common)
|
||||
|
||||
/obj/structure/closet/crate/extinguisher_cartridges
|
||||
name = "crate of extinguisher cartridges"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/obj/structure/undies_wardrobe/interact(var/mob/living/carbon/human/H)
|
||||
var/dat = list()
|
||||
dat += "<b>Underwear:</b><br>"
|
||||
for(var/datum/category_group/underwear/UWC in global_underwear.categories)
|
||||
for(var/datum/category_group/underwear/UWC in GLOB.global_underwear.categories)
|
||||
var/datum/category_item/underwear/UWI = H.all_underwear[UWC.name]
|
||||
var/item_name = UWI?.name || "None"
|
||||
dat += "[UWC.name]: <a href='?src=[REF(src)];change_underwear=[UWC.name]'>[item_name]</a>"
|
||||
@@ -68,7 +68,7 @@
|
||||
H.all_underwear -= href_list["remove_underwear"]
|
||||
. = TRUE
|
||||
else if(href_list["change_underwear"])
|
||||
var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[href_list["change_underwear"]]
|
||||
var/datum/category_group/underwear/UWC = GLOB.global_underwear.categories_by_name[href_list["change_underwear"]]
|
||||
if(!UWC)
|
||||
return
|
||||
var/datum/category_item/underwear/selected_underwear = tgui_input_list(H, "Choose your underwear.", "Choose Underwear", UWC.items, H.all_underwear[UWC.name])
|
||||
|
||||
Reference in New Issue
Block a user