diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm
index f1424f5560ec..765603df629c 100644
--- a/code/__DEFINES/__game.dm
+++ b/code/__DEFINES/__game.dm
@@ -103,7 +103,7 @@ block( \
#define SOUND_MIDI (1<<1)
#define SOUND_AMBIENCE (1<<2)
#define SOUND_LOBBY (1<<3)
-#define SOUND_INTERNET (1<<4)
+#define SOUND_INTERNET (1<<4) // Unused currently. Kept for default prefs compat only
#define SOUND_REBOOT (1<<5)
#define SOUND_ADMIN_MEME (1<<6)
#define SOUND_ADMIN_ATMOSPHERIC (1<<7)
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index 6844721cd7f0..31103fee93ee 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -22,7 +22,7 @@
#define NOTE_SYNTHETIC 4
#define NOTE_YAUTJA 5
///Note categories in text form, in order of their numerical #defines.
-var/global/list/note_categories = list("Admin", "Merit", "Commanding Officer", "Synthetic", "Yautja")
+GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Commanding Officer", "Synthetic", "Yautja"))
#define ADMIN_FLW(user) "(FLW)"
#define ADMIN_PP(user) "(PP)"
diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index de7eb672e87b..999a840b7fdd 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -37,9 +37,6 @@
#define GAS_TYPE_PHORON "phoron"
#define GAS_TYPE_CO2 "carbon dioxyde"
-/// This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
-var/MAX_EXPLOSION_RANGE = 14
-
/// Used in /obj/structure/pipes/vents/proc/create_gas
#define VENT_GAS_SMOKE "Smoke"
#define VENT_GAS_CN20 "CN20 Nerve Gas"
diff --git a/code/__DEFINES/clans.dm b/code/__DEFINES/clans.dm
index 1b95d11c030c..576bbf6b76d5 100644
--- a/code/__DEFINES/clans.dm
+++ b/code/__DEFINES/clans.dm
@@ -49,26 +49,6 @@
/// Scales with clan size
#define CLAN_LIMIT_SIZE 2
-var/global/list/datum/yautja_rank/clan_ranks = list(
- CLAN_RANK_UNBLOODED = new /datum/yautja_rank/unblooded(),
- CLAN_RANK_YOUNG = new /datum/yautja_rank/young(),
- CLAN_RANK_BLOODED = new /datum/yautja_rank/blooded(),
- CLAN_RANK_ELITE = new /datum/yautja_rank/elite(),
- CLAN_RANK_ELDER = new /datum/yautja_rank/elder(),
- CLAN_RANK_LEADER = new /datum/yautja_rank/leader(),
- CLAN_RANK_ADMIN = new /datum/yautja_rank/ancient()
-)
-
-var/global/list/clan_ranks_ordered = list(
- CLAN_RANK_UNBLOODED = CLAN_RANK_UNBLOODED_INT,
- CLAN_RANK_YOUNG = CLAN_RANK_YOUNG_INT,
- CLAN_RANK_BLOODED = CLAN_RANK_BLOODED_INT,
- CLAN_RANK_ELITE = CLAN_RANK_ELITE_INT,
- CLAN_RANK_ELDER = CLAN_RANK_ELDER_INT,
- CLAN_RANK_LEADER = CLAN_RANK_LEADER_INT,
- CLAN_RANK_ADMIN = CLAN_RANK_ADMIN_INT
-)
-
#define CLAN_HREF "clan_href"
#define CLAN_TARGET_HREF "clan_target_href"
diff --git a/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm b/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
index 89a65dad230e..56cd4dd8cd8e 100644
--- a/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
+++ b/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
@@ -33,3 +33,8 @@
/// From /mob/living/Collide(): (atom/A)
#define COMSIG_LIVING_PRE_COLLIDE "living_pre_collide"
#define COMPONENT_LIVING_COLLIDE_HANDLED (1<<0)
+
+///from base of mob/living/set_buckled(): (new_buckled)
+#define COMSIG_LIVING_SET_BUCKLED "living_set_buckled"
+///from base of mob/living/set_body_position()
+#define COMSIG_LIVING_SET_BODY_POSITION "living_set_body_position"
diff --git a/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm b/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
index 32717a2115f2..f4beec321c9e 100644
--- a/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
+++ b/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
@@ -37,10 +37,6 @@
#define COMSIG_MOB_FIRED_GUN_ATTACHMENT "mob_fired_gun_attachment"
/// From /mob/proc/death
#define COMSIG_MOB_DEATH "mob_death"
-/// From /mob/proc/update_canmove()
-#define COMSIG_MOB_GETTING_UP "mob_getting_up"
-/// From /mob/proc/update_canmove()
-#define COMSIG_MOB_KNOCKED_DOWN "mob_knocked_down"
/// For when a mob is dragged
#define COMSIG_MOB_DRAGGED "mob_dragged"
/// From /obj/item/proc/unequipped()
@@ -86,8 +82,6 @@
//from /mob/proc/on_deafness_loss()
#define COMSIG_MOB_REGAINED_HEARING "mob_regained_hearing"
-#define COMSIG_MOB_POST_UPDATE_CANMOVE "mob_can_move"
-
#define COMSIG_ATTEMPT_MOB_PULL "attempt_mob_pull"
#define COMPONENT_CANCEL_MOB_PULL (1<<0)
diff --git a/code/__DEFINES/equipment.dm b/code/__DEFINES/equipment.dm
index 6628a5c925c2..f0688282572d 100644
--- a/code/__DEFINES/equipment.dm
+++ b/code/__DEFINES/equipment.dm
@@ -493,7 +493,7 @@ GLOBAL_LIST_INIT(slot_to_contained_sprite_shorthand, list(
#define UNIFORM_VEND_DRESS_EXTRA "dress extra"
-var/global/list/uniform_categories = list(
+GLOBAL_LIST_INIT(uniform_categories, list(
"UTILITY" = list(UNIFORM_VEND_UTILITY_UNIFORM, UNIFORM_VEND_UTILITY_JACKET, UNIFORM_VEND_UTILITY_HEAD, UNIFORM_VEND_UTILITY_GLOVES, UNIFORM_VEND_UTILITY_SHOES),
"UTILITY EXTRAS" = list(UNIFORM_VEND_UTILITY_EXTRA),
"SERVICE" = list(UNIFORM_VEND_SERVICE_UNIFORM, UNIFORM_VEND_SERVICE_JACKET, UNIFORM_VEND_SERVICE_GLOVES, UNIFORM_VEND_SERVICE_SHOES),
@@ -502,7 +502,7 @@ var/global/list/uniform_categories = list(
"DRESS" = list(UNIFORM_VEND_DRESS_UNIFORM, UNIFORM_VEND_DRESS_JACKET, UNIFORM_VEND_DRESS_GLOVES, UNIFORM_VEND_DRESS_SHOES),
"DRESS HEADWEAR" = list(UNIFORM_VEND_DRESS_HEAD),
"DRESS EXTRAS" = list(UNIFORM_VEND_DRESS_EXTRA)
-)
+))
//=================================================
diff --git a/code/__DEFINES/job.dm b/code/__DEFINES/job.dm
index 56062cb0213b..ad3b9fe3af32 100644
--- a/code/__DEFINES/job.dm
+++ b/code/__DEFINES/job.dm
@@ -1,6 +1,6 @@
#define get_job_playtime(client, job) (client.player_data? LAZYACCESS(client.player_data.playtimes, job)? client.player_data.playtimes[job].total_minutes MINUTES_TO_DECISECOND : 0 : 0)
-#define GET_MAPPED_ROLE(title) (RoleAuthority?.role_mappings[title] ? RoleAuthority.role_mappings[title] : RoleAuthority.roles_by_name[title])
-#define GET_DEFAULT_ROLE(title) (RoleAuthority?.default_roles[title] ? RoleAuthority.default_roles[title] : title)
+#define GET_MAPPED_ROLE(title) (GLOB.RoleAuthority?.role_mappings[title] ? GLOB.RoleAuthority.role_mappings[title] : GLOB.RoleAuthority.roles_by_name[title])
+#define GET_DEFAULT_ROLE(title) (GLOB.RoleAuthority?.default_roles[title] ? GLOB.RoleAuthority.default_roles[title] : title)
// Squad name defines
#define SQUAD_MARINE_1 "Alpha"
@@ -24,7 +24,7 @@
#define JOB_SQUAD_ROLES /datum/timelock/squad
#define JOB_SQUAD_ROLES_LIST list(JOB_SQUAD_MARINE, JOB_SQUAD_LEADER, JOB_SQUAD_ENGI, JOB_SQUAD_MEDIC, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_TEAM_LEADER)
-var/global/list/job_squad_roles = JOB_SQUAD_ROLES_LIST
+GLOBAL_LIST_INIT(job_squad_roles, JOB_SQUAD_ROLES_LIST)
#define JOB_COLONIST "Colonist"
#define JOB_PASSENGER "Passenger"
@@ -72,7 +72,7 @@ var/global/list/job_squad_roles = JOB_SQUAD_ROLES_LIST
#define JOB_SO "Staff Officer"
#define JOB_COMMAND_ROLES /datum/timelock/command
#define JOB_COMMAND_ROLES_LIST list(JOB_CO, JOB_XO, JOB_SO)
-var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
+GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_AUXILIARY_OFFICER "Auxiliary Support Officer"
#define JOB_PILOT "Pilot Officer"
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index 072738184807..0dcd26de3e3a 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -374,7 +374,7 @@
// Hellhound strain flags
#define HELLHOUND_NORMAL "Normal"
-var/list/default_onmob_icons = list(
+GLOBAL_LIST_INIT(default_onmob_icons, list(
WEAR_L_HAND = 'icons/mob/humans/onmob/items_lefthand_0.dmi',
WEAR_R_HAND = 'icons/mob/humans/onmob/items_righthand_0.dmi',
WEAR_WAIST = 'icons/mob/humans/onmob/belt.dmi',
@@ -393,9 +393,9 @@ var/list/default_onmob_icons = list(
WEAR_HANDS = 'icons/mob/humans/onmob/hands.dmi',
WEAR_J_STORE = 'icons/mob/humans/onmob/suit_slot.dmi',
WEAR_ACCESSORIES = 'icons/mob/humans/onmob/ties.dmi'
- )
+ ))
-var/list/default_xeno_onmob_icons = list(
+GLOBAL_LIST_INIT(default_xeno_onmob_icons, list(
/mob/living/carbon/xenomorph/runner = 'icons/mob/xenos/onmob/runner.dmi',
/mob/living/carbon/xenomorph/praetorian = 'icons/mob/xenos/onmob/praetorian.dmi',
/mob/living/carbon/xenomorph/drone = 'icons/mob/xenos/onmob/drone.dmi',
@@ -403,7 +403,7 @@ var/list/default_xeno_onmob_icons = list(
/mob/living/carbon/xenomorph/defender = 'icons/mob/xenos/onmob/defender.dmi',
/mob/living/carbon/xenomorph/sentinel = 'icons/mob/xenos/onmob/sentinel.dmi',
/mob/living/carbon/xenomorph/spitter = 'icons/mob/xenos/onmob/spitter.dmi'
- )
+ ))
// species names
#define SPECIES_HUMAN "Human"
@@ -418,3 +418,32 @@ var/list/default_xeno_onmob_icons = list(
#define EXTREMITY_LIMBS list("l_leg","l_foot","r_leg","r_foot","l_arm","l_hand","r_arm","r_hand")
#define CORE_LIMBS list("chest","head","groin")
+#define SYMPTOM_ACTIVATION_PROB 3
+
+// Body position defines.
+/// Mob is standing up, usually associated with lying_angle value of 0.
+#define STANDING_UP 0
+/// Mob is lying down, usually associated with lying_angle values of 90 or 270.
+#define LYING_DOWN 1
+
+/// Possible value of [/atom/movable/buckle_lying]. If set to a different (positive-or-zero) value than this, the buckling thing will force a lying angle on the buckled.
+#define NO_BUCKLE_LYING -1
+
+// ====================================
+// /mob/living /tg/ mobility_flags
+// These represent in what capacity the mob is capable of moving
+// Because porting this is underway, NOT ALL FLAGS ARE CURRENTLY IN.
+
+/// can move
+#define MOBILITY_MOVE (1<<0)
+/// can, and is, standing up
+#define MOBILITY_STAND (1<<1)
+/// can rest
+#define MOBILITY_REST (1<<7)
+/// can lie down
+#define MOBILITY_LIEDOWN (1<<8)
+
+#define MOBILITY_FLAGS_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND)
+#define MOBILITY_FLAGS_CARBON_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)
+#define MOBILITY_FLAGS_REST_CAPABLE_DEFAULT (MOBILITY_MOVE | MOBILITY_STAND | MOBILITY_REST | MOBILITY_LIEDOWN)
+
diff --git a/code/__DEFINES/mode.dm b/code/__DEFINES/mode.dm
index 854da7a52b4c..218bfef5eb40 100644
--- a/code/__DEFINES/mode.dm
+++ b/code/__DEFINES/mode.dm
@@ -109,34 +109,34 @@
//=================================================
//Role defines, specifically lists of roles for job bans, crew manifests and the like.
-var/global/list/ROLES_COMMAND = list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_POLICE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_CHIEF_REQUISITION, JOB_CHIEF_ENGINEER, JOB_CMO, JOB_CHIEF_POLICE, JOB_SEA, JOB_SYNTH, JOB_WARDEN)
+GLOBAL_LIST_INIT(ROLES_COMMAND, list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_POLICE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_CHIEF_REQUISITION, JOB_CHIEF_ENGINEER, JOB_CMO, JOB_CHIEF_POLICE, JOB_SEA, JOB_SYNTH, JOB_WARDEN))
//Marine roles
#define ROLES_OFFICERS list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
-var/global/list/ROLES_CIC = list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO)
-var/global/list/ROLES_AUXIL_SUPPORT = list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT)
-var/global/list/ROLES_MISC = list(JOB_SYNTH, JOB_WORKING_JOE, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH)
-var/global/list/ROLES_POLICE = list(JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
-var/global/list/ROLES_ENGINEERING = list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH)
-var/global/list/ROLES_REQUISITION = list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION)
-var/global/list/ROLES_MEDICAL = list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR)
-var/global/list/ROLES_MARINES = list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE)
-var/global/list/ROLES_SQUAD_ALL = list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO, SQUAD_MARINE_INTEL)
+GLOBAL_LIST_INIT(ROLES_CIC, list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO))
+GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT, list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT))
+GLOBAL_LIST_INIT(ROLES_MISC, list(JOB_SYNTH, JOB_WORKING_JOE, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH))
+GLOBAL_LIST_INIT(ROLES_POLICE, list(JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE))
+GLOBAL_LIST_INIT(ROLES_ENGINEERING, list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH))
+GLOBAL_LIST_INIT(ROLES_REQUISITION, list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION))
+GLOBAL_LIST_INIT(ROLES_MEDICAL, list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR))
+GLOBAL_LIST_INIT(ROLES_MARINES, list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE))
+GLOBAL_LIST_INIT(ROLES_SQUAD_ALL, list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO, SQUAD_MARINE_INTEL))
+GLOBAL_LIST_INIT(ROLES_WO, list(JOB_WO_CO, JOB_WO_XO, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION, JOB_WO_CMO, JOB_WO_DOCTOR, JOB_WO_RESEARCHER, JOB_WO_SQUAD_MARINE, JOB_WO_SQUAD_MEDIC, JOB_WO_SQUAD_ENGINEER, JOB_WO_SQUAD_SMARTGUNNER, JOB_WO_SQUAD_SPECIALIST, JOB_WO_SQUAD_LEADER))
//Groundside roles
-var/global/list/ROLES_XENO = list(JOB_XENOMORPH_QUEEN, JOB_XENOMORPH)
-var/global/list/ROLES_WHITELISTED = list(JOB_SYNTH_SURVIVOR, JOB_CO_SURVIVOR, JOB_PREDATOR)
-var/global/list/ROLES_SPECIAL = list(JOB_SURVIVOR)
+GLOBAL_LIST_INIT(ROLES_XENO, list(JOB_XENOMORPH_QUEEN, JOB_XENOMORPH))
+GLOBAL_LIST_INIT(ROLES_WHITELISTED, list(JOB_SYNTH_SURVIVOR, JOB_CO_SURVIVOR, JOB_PREDATOR))
+GLOBAL_LIST_INIT(ROLES_SPECIAL, list(JOB_SURVIVOR))
-var/global/list/ROLES_USCM = ROLES_CIC + ROLES_POLICE + ROLES_AUXIL_SUPPORT + ROLES_MISC + ROLES_ENGINEERING + ROLES_REQUISITION + ROLES_MEDICAL + ROLES_MARINES - ROLES_WO
-var/global/list/ROLES_GROUND = ROLES_XENO + ROLES_SPECIAL + ROLES_WHITELISTED
+GLOBAL_LIST_INIT(ROLES_USCM, ROLES_CIC + GLOB.ROLES_POLICE + GLOB.ROLES_AUXIL_SUPPORT + GLOB.ROLES_MISC + GLOB.ROLES_ENGINEERING + GLOB.ROLES_REQUISITION + GLOB.ROLES_MEDICAL + GLOB.ROLES_MARINES - ROLES_WO)
+GLOBAL_LIST_INIT(ROLES_GROUND, GLOB.ROLES_XENO + ROLES_SPECIAL + ROLES_WHITELISTED)
-var/global/list/ROLES_DISTRESS_SIGNAL = ROLES_USCM + ROLES_GROUND
-var/global/list/ROLES_FACTION_CLASH = ROLES_USCM + JOB_PREDATOR
+GLOBAL_LIST_INIT(ROLES_DISTRESS_SIGNAL, GLOB.ROLES_USCM + GLOB.ROLES_GROUND)
+GLOBAL_LIST_INIT(ROLES_FACTION_CLASH, ROLES_USCM + JOB_PREDATOR)
-var/global/list/ROLES_UNASSIGNED = list(JOB_SQUAD_MARINE)
-var/global/list/ROLES_WO = list(JOB_WO_CO, JOB_WO_XO, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION, JOB_WO_CMO, JOB_WO_DOCTOR, JOB_WO_RESEARCHER, JOB_WO_SQUAD_MARINE, JOB_WO_SQUAD_MEDIC, JOB_WO_SQUAD_ENGINEER, JOB_WO_SQUAD_SMARTGUNNER, JOB_WO_SQUAD_SPECIALIST, JOB_WO_SQUAD_LEADER)
+GLOBAL_LIST_INIT(ROLES_UNASSIGNED, list(JOB_SQUAD_MARINE))
//Role lists used for switch() checks in show_blurb_uscm(). Cosmetic, determines ex. "Engineering, USS Almayer", "2nd Bat. 'Falling Falcons'" etc.
#define BLURB_USCM_COMBAT JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_SEA,\
JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE
@@ -153,7 +153,7 @@ var/global/list/ROLES_WO = list(JOB_WO_CO, JOB_WO_XO, JOB_WO_CORPORATE_LIAISON,
#define WHITELIST_COUNCIL "Council"
#define WHITELIST_LEADER "Leader"
-var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL, WHITELIST_LEADER)
+GLOBAL_LIST_INIT(whitelist_hierarchy, list(WHITELIST_NORMAL, WHITELIST_COUNCIL, WHITELIST_LEADER))
//=================================================
#define WHITELIST_YAUTJA (1<<0)
@@ -186,7 +186,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
#define WHITELIST_EVERYTHING (WHITELISTS_GENERAL|WHITELISTS_COUNCIL|WHITELISTS_LEADER)
-#define isCouncil(A) (RoleAuthority.roles_whitelist[A.ckey] & WHITELIST_YAUTJA_COUNCIL) || (RoleAuthority.roles_whitelist[A.ckey] & WHITELIST_SYNTHETIC_COUNCIL) || (RoleAuthority.roles_whitelist[A.ckey] & WHITELIST_COMMANDER_COUNCIL)
+#define isCouncil(A) (GLOB.RoleAuthority.roles_whitelist[A.ckey] & WHITELIST_YAUTJA_COUNCIL) || (GLOB.RoleAuthority.roles_whitelist[A.ckey] & WHITELIST_SYNTHETIC_COUNCIL) || (GLOB.RoleAuthority.roles_whitelist[A.ckey] & WHITELIST_COMMANDER_COUNCIL)
//=================================================
@@ -265,6 +265,6 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
// global vars to prevent spam of the "one xyz alive" messages
-var/global/last_ares_callout
+GLOBAL_VAR(last_ares_callout)
-var/global/last_qm_callout
+GLOBAL_VAR(last_qm_callout)
diff --git a/code/__DEFINES/objects.dm b/code/__DEFINES/objects.dm
index a6b95c879ae4..292b315360c5 100644
--- a/code/__DEFINES/objects.dm
+++ b/code/__DEFINES/objects.dm
@@ -54,6 +54,8 @@
#define SHOCK 8
#define SAFE 16
+#define CLOSED 2
+
//metal, glass, rod stacks
#define MAX_STACK_AMOUNT_METAL 50
#define MAX_STACK_AMOUNT_GLASS 50
@@ -77,14 +79,14 @@
#define GETPULSE_HAND 0 //less accurate (hand)
#define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc)
-var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them.
+GLOBAL_LIST_INIT(RESTRICTED_CAMERA_NETWORKS, list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them.)
"thunder",
"ERT",
"NUKE",
CAMERA_NET_LADDER,
CAMERA_NET_COLONY,
CAMERA_NET_OVERWATCH,
- )
+ ))
#define STASIS_IN_BAG 1
#define STASIS_IN_CRYO_CELL 2
diff --git a/code/__DEFINES/regex.dm b/code/__DEFINES/regex.dm
index f56871ec83f2..a0d9c9a7323b 100644
--- a/code/__DEFINES/regex.dm
+++ b/code/__DEFINES/regex.dm
@@ -6,38 +6,38 @@
// The lazy URL finder. Lazy in that it matches the bare minimum
// Replicates BYOND's own URL parser in functionality.
-var/global/regex/url_find_lazy
+GLOBAL_DATUM(url_find_lazy, /regex)
// REGEX datums used for process_chat_markup.
-var/global/regex/markup_bold
-var/global/regex/markup_italics
-var/global/regex/markup_strike
-var/global/regex/markup_underline
+GLOBAL_DATUM(markup_bold, /regex)
+GLOBAL_DATUM(markup_italics, /regex)
+GLOBAL_DATUM(markup_strike, /regex)
+GLOBAL_DATUM(markup_underline, /regex)
// Global list for mark-up REGEX datums.
// Initialized in the hook, to avoid passing by null value.
-var/global/list/markup_regex = list()
+GLOBAL_LIST_EMPTY(markup_regex)
// Global list for mark-up REGEX tag collection.
-var/global/list/markup_tags = list("/" = list("", ""),
+GLOBAL_LIST_INIT(markup_tags, list("/" = list("", ""),
"*" = list("", ""),
"~" = list("", ""),
- "_" = list("", ""))
+ "_" = list("", "")))
/proc/initialize_global_regex()
- url_find_lazy = new(@"((https?|byond):\/\/[^\s]*)", "g")
+ GLOB.url_find_lazy = new(@"((https?|byond):\/\/[^\s]*)", "g")
- markup_bold = new("((\\W|^)\\*)(\[^\\*\]*)(\\*(\\W|$))", "g")
- markup_italics = new("((\\W|^)\\/)(\[^\\/\]*)(\\/(\\W|$))", "g")
- markup_strike = new("((\\W|^)\\~)(\[^\\~\]*)(\\~(\\W|$))", "g")
- markup_underline = new("((\\W|^)\\_)(\[^\\_\]*)(\\_(\\W|$))", "g")
+ GLOB.markup_bold = new("((\\W|^)\\*)(\[^\\*\]*)(\\*(\\W|$))", "g")
+ GLOB.markup_italics = new("((\\W|^)\\/)(\[^\\/\]*)(\\/(\\W|$))", "g")
+ GLOB.markup_strike = new("((\\W|^)\\~)(\[^\\~\]*)(\\~(\\W|$))", "g")
+ GLOB.markup_underline = new("((\\W|^)\\_)(\[^\\_\]*)(\\_(\\W|$))", "g")
// List needs to be initialized here, due to DM mixing and matching pass-by-value and -reference as it chooses.
- markup_regex = list(
- "/" = markup_italics,
- "*" = markup_bold,
- "~" = markup_strike,
- "_" = markup_underline,
+ GLOB.markup_regex = list(
+ "/" = GLOB.markup_italics,
+ "*" = GLOB.markup_bold,
+ "~" = GLOB.markup_strike,
+ "_" = GLOB.markup_underline,
)
return 1
diff --git a/code/__DEFINES/sounds.dm b/code/__DEFINES/sounds.dm
index a6bb381100e7..541d95d28189 100644
--- a/code/__DEFINES/sounds.dm
+++ b/code/__DEFINES/sounds.dm
@@ -27,7 +27,7 @@
#define SOUND_CHANNEL_AMBIENCE 1019
#define SOUND_CHANNEL_WALKMAN 1020
#define SOUND_CHANNEL_SOUNDSCAPE 1021
-#define SOUND_CHANNEL_ADMIN_MIDI 1022
+//#define SOUND_CHANNEL_ADMIN_MIDI 1022
#define SOUND_CHANNEL_LOBBY 1023
#define SOUND_CHANNEL_Z 1024
diff --git a/code/__DEFINES/text.dm b/code/__DEFINES/text.dm
index e3724e65f620..0ce7e508daac 100644
--- a/code/__DEFINES/text.dm
+++ b/code/__DEFINES/text.dm
@@ -17,3 +17,10 @@
#define SHOW_MESSAGE_VISIBLE 1
#define SHOW_MESSAGE_AUDIBLE 2
+
+//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
+#define MAX_MESSAGE_LEN 1024
+#define MAX_EMOTE_LEN 256
+#define MAX_PAPER_MESSAGE_LEN 3072
+#define MAX_BOOK_MESSAGE_LEN 9216
+#define MAX_NAME_LEN 26
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index af8af22ca707..8962230946c8 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -143,10 +143,20 @@
// #define TRAIT_X "t_x"
//-- mob traits --
-/// Prevents voluntary movement.
-#define TRAIT_IMMOBILIZED "immobilized"
/// Apply this to make a mob not dense, and remove it when you want it to no longer make them undense, other sorces of undesity will still apply. Always define a unique source when adding a new instance of this!
#define TRAIT_UNDENSE "undense"
+/// Forces the user to stay unconscious.
+#define TRAIT_KNOCKEDOUT "knockedout"
+/// Prevents voluntary movement.
+#define TRAIT_IMMOBILIZED "immobilized"
+/// Prevents voluntary standing or staying up on its own.
+#define TRAIT_FLOORED "floored"
+/// Forces user to stay standing
+#define TRAIT_FORCED_STANDING "forcedstanding"
+/// Stuns preventing movement and using objects but without further impairement
+#define TRAIT_INCAPACITATED "incapacitated"
+/// Apply this to identify a mob as merged with weeds
+#define TRAIT_MERGED_WITH_WEEDS "merged_with_weeds"
// SPECIES TRAITS
/// Knowledge of Yautja technology
@@ -296,7 +306,10 @@ GLOBAL_LIST_INIT(mob_traits, list(
*/
GLOBAL_LIST_INIT(traits_by_type, list(
/mob = list(
+ "TRAIT_KNOCKEDOUT" = TRAIT_KNOCKEDOUT,
"TRAIT_IMMOBILIZED" = TRAIT_IMMOBILIZED,
+ "TRAIT_INCAPACITATED" = TRAIT_INCAPACITATED,
+ "TRAIT_FLOORED" = TRAIT_FLOORED,
"TRAIT_UNDENSE" = TRAIT_UNDENSE,
"TRAIT_YAUTJA_TECH" = TRAIT_YAUTJA_TECH,
"TRAIT_SUPER_STRONG" = TRAIT_SUPER_STRONG,
@@ -414,13 +427,39 @@ GLOBAL_LIST(trait_name_map)
//Status trait coming from clothing.
#define TRAIT_SOURCE_CLOTHING "t_s_clothing"
-/// traits associated with actively interacted machinery
-#define INTERACTION_TRAIT "interaction"
+/// trait associated to being buckled
+#define BUCKLED_TRAIT "buckled" // Yes the name doesn't conform. /tg/ appears to have changed naming style inbetween
+/// trait source when an effect is coming from a fakedeath effect (refactor this)
+#define FAKEDEATH_TRAIT "fakedeath"
+/// trait source where a condition comes from body state
+#define BODY_TRAIT "body"
+/// Trait associated to lying down (having a [lying_angle] of a different value than zero).
+#define LYING_DOWN_TRAIT "lying-down"
+/// trait associated to a stat value or range of
+#define STAT_TRAIT "stat"
+/// trait effect related to the queen ovipositor
+#define OVIPOSITOR_TRAIT "ovipositor"
+/// trait associated to being held in a chokehold
+#define CHOKEHOLD_TRAIT "chokehold"
/// trait effect related to active specialist gear
#define SPECIALIST_GEAR_TRAIT "specialist_gear"
/// traits associated with usage of snowflake dropship double seats
#define DOUBLE_SEATS_TRAIT "double_seats"
/// traits associated with xeno on-ground weeds
#define XENO_WEED_TRAIT "xeno_weed"
+/// traits associated with actively interacted machinery
+#define INTERACTION_TRAIT "interaction"
+/// traits bound by stunned status effects
+#define STUNNED_TRAIT "stunned"
+/// traits bound by knocked_down status effect
+#define KNOCKEDDOWN_TRAIT "knockeddown"
+/// traits bound by knocked_out status effect
+#define KNOCKEDOUT_TRAIT "knockedout"
+/// traits from being pounced
+#define POUNCED_TRAIT "pounced"
+/// traits from step_triggers on the map
+#define STEP_TRIGGER_TRAIT "step_trigger"
+/// traits from hacked machine interactions
+#define HACKED_TRAIT "hacked"
/// traits from chloroform usage
#define CHLOROFORM_TRAIT "chloroform"
diff --git a/code/__DEFINES/typecheck/items.dm b/code/__DEFINES/typecheck/items.dm
index 09153cde25c2..5c4d099b8112 100644
--- a/code/__DEFINES/typecheck/items.dm
+++ b/code/__DEFINES/typecheck/items.dm
@@ -1,10 +1,10 @@
#define iswelder(O) (istype(O, /obj/item/tool/weldingtool))
#define iscoil(O) (istype(O, /obj/item/stack/cable_coil))
#define iswire(O) (istype(O, /obj/item/stack/cable_coil))
-#define isweapon(O) (O && is_type_in_list(O, weapons))
+#define isweapon(O) (O && is_type_in_list(O, GLOB.weapons))
#define isgun(O) (istype(O, /obj/item/weapon/gun))
#define isbanana(O) (istype(O, /obj/item/reagent_container/food/snacks/grown/banana))
-#define istool(O) (O && is_type_in_list(O, common_tools))
+#define istool(O) (O && is_type_in_list(O, GLOB.common_tools))
#define ispowerclamp(O) (istype(O, /obj/item/powerloader_clamp))
#define isstorage(O) (istype(O, /obj/item/storage))
#define isclothing(O) (istype(O, /obj/item/clothing))
@@ -12,13 +12,13 @@
#define isdefenses(O) (istype(O, /obj/structure/machinery/defenses))
//Quick type checks for weapons
-var/global/list/weapons = list(
+GLOBAL_LIST_INIT(weapons, list(
/obj/item/weapon,
/obj/item/attachable/bayonet
-)
+))
//Quick type checks for some tools
-var/global/list/common_tools = list(
+GLOBAL_LIST_INIT(common_tools, list(
/obj/item/stack/cable_coil,
/obj/item/tool/wrench,
/obj/item/tool/weldingtool,
@@ -26,7 +26,7 @@ var/global/list/common_tools = list(
/obj/item/tool/wirecutters,
/obj/item/device/multitool,
/obj/item/tool/crowbar
-)
+))
/obj/item/proc/can_pry()
if(pry_capable > IS_PRY_CAPABLE_SIMPLE || HAS_TRAIT(src, TRAIT_TOOL_CROWBAR))
diff --git a/code/__DEFINES/weapon_stats.dm b/code/__DEFINES/weapon_stats.dm
index beac54d98892..3a69002a3b93 100644
--- a/code/__DEFINES/weapon_stats.dm
+++ b/code/__DEFINES/weapon_stats.dm
@@ -18,17 +18,17 @@ Accuracy determines if your bullets will hit whatever you're shooting at. Think
It DOES NOT control where your bullets go, that's scatter and projectile variance.
.../update_projectiles/guns/code.dm
-var/accuracy_mult //Base firearm accuracy when firing from a 2-hand, "secure", wielded, etc, whatever grip.
-var/accuracy_mult_unwielded //Base firearm accuracy when firing from hip. Both of these default to 1, with additions or subtractions from the mult vars.
+ var/accuracy_mult //Base firearm accuracy when firing from a 2-hand, "secure", wielded, etc, whatever grip.
+ var/accuracy_mult_unwielded //Base firearm accuracy when firing from hip. Both of these default to 1, with additions or subtractions from the mult vars.
.../updated_projectiles/ammo_datums.dm
-var/accuracy //This is added to the firearm's base accuracy when the specific ammo is shot.
-var/accuracy_var_low //These two vars are used for the upper and lower bounds of accuracy variance when a bullet is fired. Bullet 'wobble' if you will.
-var/accuracy_var_high
+ var/accuracy //This is added to the firearm's base accuracy when the specific ammo is shot.
+ var/accuracy_var_low //These two vars are used for the upper and lower bounds of accuracy variance when a bullet is fired. Bullet 'wobble' if you will.
+ var/accuracy_var_high
.../updated_projectiles/gun_attachables.dm
-var/accuracy_mult //Attachments ADD an additional multiplier to the base config value. Only ever use accuracy_mult config references.
-var/accuracy_mult_unwielded
+ var/accuracy_mult //Attachments ADD an additional multiplier to the base config value. Only ever use accuracy_mult config references.
+ var/accuracy_mult_unwielded
*/
#define HIT_ACCURACY_TIER_1 5
diff --git a/code/__HELPERS/#maths.dm b/code/__HELPERS/#maths.dm
index 5419b9cd9624..ccd077003e62 100644
--- a/code/__HELPERS/#maths.dm
+++ b/code/__HELPERS/#maths.dm
@@ -1,13 +1,10 @@
// Credits to Nickr5 for the useful procs I've taken from his library resource.
-var/const/E = 2.71828183
-var/const/Sqrt2 = 1.41421356
-
// List of square roots for the numbers 1-100.
-var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
+GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10)
+ 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10))
// MATH DEFINES
diff --git a/code/__HELPERS/_time.dm b/code/__HELPERS/_time.dm
index b929ae8636b3..8386feff41c2 100644
--- a/code/__HELPERS/_time.dm
+++ b/code/__HELPERS/_time.dm
@@ -15,19 +15,19 @@
#define DECISECONDS_TO_HOURS /36000
-var/midnight_rollovers = 0
-var/rollovercheck_last_timeofday = 0
+GLOBAL_VAR_INIT(midnight_rollovers, 0)
+GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
// Real time that is still reliable even when the round crosses over midnight time reset.
#define REALTIMEOFDAY (world.timeofday + (864000 * MIDNIGHT_ROLLOVER_CHECK))
-#define MIDNIGHT_ROLLOVER_CHECK ( rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : midnight_rollovers )
+#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
/proc/update_midnight_rollover()
- if(world.timeofday < rollovercheck_last_timeofday)
- midnight_rollovers++
+ if(world.timeofday < GLOB.rollovercheck_last_timeofday)
+ GLOB.midnight_rollovers++
- rollovercheck_last_timeofday = world.timeofday
- return midnight_rollovers
+ GLOB.rollovercheck_last_timeofday = world.timeofday
+ return GLOB.midnight_rollovers
///Returns the world time in english. Do not use to get date information - starts at 0 + a random time offset from 10 minutes to 24 hours.
/proc/worldtime2text(format = "hh:mm", time = world.time)
diff --git a/code/__HELPERS/animations.dm b/code/__HELPERS/animations.dm
new file mode 100644
index 000000000000..f85fb763a4a6
--- /dev/null
+++ b/code/__HELPERS/animations.dm
@@ -0,0 +1,2 @@
+/// The duration of the animate call in mob/living/update_transform
+#define UPDATE_TRANSFORM_ANIMATION_TIME (0.2 SECONDS)
diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm
index ff8e31ad3e8a..31308ac5812f 100644
--- a/code/__HELPERS/cmp.dm
+++ b/code/__HELPERS/cmp.dm
@@ -16,12 +16,12 @@
/proc/cmp_name_dsc(atom/a, atom/b)
return sorttext(a.name, b.name)
-var/cmp_field = "name"
+GLOBAL_LIST_INIT(cmp_field, "name")
/proc/cmp_records_asc(datum/data/record/a, datum/data/record/b)
- return sorttext((b ? b.fields[cmp_field] : ""), (a ? a.fields[cmp_field] : a))
+ return sorttext((b ? b.fields[GLOB.cmp_field] : ""), (a ? a.fields[GLOB.cmp_field] : a))
/proc/cmp_records_dsc(datum/data/record/a, datum/data/record/b)
- return sorttext(a.fields[cmp_field], b.fields[cmp_field])
+ return sorttext(a.fields[GLOB.cmp_field], b.fields[GLOB.cmp_field])
/proc/cmp_ckey_asc(client/a, client/b)
return sorttext(b.ckey, a.ckey)
@@ -53,7 +53,6 @@ var/cmp_field = "name"
if (!.)
. = B.qdels - A.qdels
-var/atom/cmp_dist_origin=null
/proc/cmp_typepaths_asc(A, B)
return sorttext("[B]","[A]")
diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm
index f88fe7168f8d..54bb438cd167 100644
--- a/code/__HELPERS/files.dm
+++ b/code/__HELPERS/files.dm
@@ -46,11 +46,11 @@
PLEASE USE RESPONSIBLY, Some log files canr each sizes of 4MB! */
/client/proc/file_spam_check()
- var/time_to_wait = fileaccess_timer - world.time
+ var/time_to_wait = GLOB.fileaccess_timer - world.time
if(time_to_wait > 0)
to_chat(src, "Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds.")
return 1
- fileaccess_timer = world.time + FTPDELAY
+ GLOB.fileaccess_timer = world.time + FTPDELAY
return 0
#undef FTPDELAY
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 37c623bc3215..5ef9ff7e35c3 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -52,9 +52,6 @@
turfs += T
return turfs
-
-//var/debug_mob = 0
-
// Will recursively loop through an atom's contents and check for mobs, then it will loop through every atom in that atom's contents.
// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
// being unable to hear people due to being in a box within a bag.
diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm
index 24e39ff16c89..97243002740d 100644
--- a/code/__HELPERS/icons.dm
+++ b/code/__HELPERS/icons.dm
@@ -14,8 +14,7 @@ CHANGING ICONS
Several new procs have been added to the /icon datum to simplify working with icons. To use them,
remember you first need to setup an /icon var like so:
-
-var/icon/my_icon = new('iconfile.dmi')
+ var/icon/my_icon = new('iconfile.dmi')
icon/ChangeOpacity(amount = 1)
A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm
index 5ecbff108725..c20db3da303f 100644
--- a/code/__HELPERS/logging.dm
+++ b/code/__HELPERS/logging.dm
@@ -35,27 +35,27 @@
// will get logs that are one big line if the system is Linux and they are using notepad. This solves it by adding CR to every line ending
// in the logs. ascii character 13 = CR
-/var/global/log_end= world.system_type == UNIX ? ascii2text(13) : ""
+GLOBAL_VAR_INIT(log_end, world.system_type == UNIX ? ascii2text(13) : "")
/proc/error(msg)
- world.log << "## ERROR: [msg][log_end]"
+ world.log << "## ERROR: [msg][GLOB.log_end]"
GLOB.STUI.debug.Add("\[[time_stamp()]]DEBUG: [msg]")
GLOB.STUI.processing |= STUI_LOG_DEBUG
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [src] usr: [usr].")
//print a warning message to world.log
/proc/warning(msg)
- world.log << "## WARNING: [msg][log_end]"
+ world.log << "## WARNING: [msg][GLOB.log_end]"
GLOB.STUI.debug.Add("\[[time_stamp()]]WARNING: [msg]")
GLOB.STUI.processing |= STUI_LOG_DEBUG
//print a testing-mode debug message to world.log
/proc/testing(msg)
- world.log << "## TESTING: [msg][log_end]"
+ world.log << "## TESTING: [msg][GLOB.log_end]"
GLOB.STUI.debug.Add("\[[time_stamp()]]TESTING: [msg]")
GLOB.STUI.processing |= STUI_LOG_DEBUG
/proc/log_admin(text)
var/time = time_stamp()
- admin_log.Add(text)
+ GLOB.admin_log.Add(text)
if (CONFIG_GET(flag/log_admin))
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text]")
LOG_REDIS("admin", "\[[time]\] [text]")
@@ -63,14 +63,14 @@
GLOB.STUI.processing |= STUI_LOG_ADMIN
/proc/log_asset(text)
- asset_log.Add(text)
+ GLOB.asset_log.Add(text)
if (CONFIG_GET(flag/log_asset))
var/time = time_stamp()
WRITE_LOG(GLOB.world_game_log, "ASSET: [text]")
LOG_REDIS("asset", "\[[time]\] [text]")
/proc/log_adminpm(text)
- admin_log.Add(text)
+ GLOB.admin_log.Add(text)
if (CONFIG_GET(flag/log_admin))
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text]")
GLOB.STUI.staff.Add("\[[time_stamp()]]ADMIN: [text]")
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 9aa1bdc3ea2f..55b234b1e419 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -51,8 +51,10 @@
return f_style
/proc/random_name(gender, species = "Human")
- if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
- else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
+ if(gender==FEMALE)
+ return capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
+ else
+ return capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
/proc/has_species(mob/M, species)
if(!M || !istype(M,/mob/living/carbon/human))
diff --git a/code/__HELPERS/sorts/TimSort.dm b/code/__HELPERS/sorts/TimSort.dm
index cfa55f0dfa3c..ae83bd9b0682 100644
--- a/code/__HELPERS/sorts/TimSort.dm
+++ b/code/__HELPERS/sorts/TimSort.dm
@@ -8,10 +8,14 @@
if(toIndex <= 0)
toIndex += L.len + 1
- sortInstance.L = L
- sortInstance.cmp = cmp
- sortInstance.associative = associative
+ var/datum/sortInstance/sort_instance = GLOB.sortInstance
+ if(!sort_instance)
+ sort_instance = new()
- sortInstance.timSort(fromIndex, toIndex)
+ sort_instance.L = L
+ sort_instance.cmp = cmp
+ sort_instance.associative = associative
+
+ sort_instance.timSort(fromIndex, toIndex)
return L
diff --git a/code/__HELPERS/sorts/_Main.dm b/code/__HELPERS/sorts/_Main.dm
index 7bc906be7e63..5d6f5210be47 100644
--- a/code/__HELPERS/sorts/_Main.dm
+++ b/code/__HELPERS/sorts/_Main.dm
@@ -8,8 +8,8 @@
//When we get into galloping mode, we stay there until both runs win less often than MIN_GALLOP consecutive times.
#define MIN_GALLOP 7
- //This is a global instance to allow much of this code to be reused. The interfaces are kept separately
-var/datum/sortInstance/sortInstance = new()
+//This is a global instance to allow much of this code to be reused. The interfaces are kept separately
+GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
/datum/sortInstance
//The array being sorted.
var/list/L
diff --git a/code/__HELPERS/status_effects.dm b/code/__HELPERS/status_effects.dm
new file mode 100644
index 000000000000..d06cb687f6a5
--- /dev/null
+++ b/code/__HELPERS/status_effects.dm
@@ -0,0 +1 @@
+#define TRAIT_STATUS_EFFECT(effect_id) "[effect_id]-trait"
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index d4d9eb320633..36dcfed6cfea 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -341,8 +341,8 @@
// ---Begin URL caching.
var/list/urls = list()
var/i = 1
- while (url_find_lazy.Find_char(message))
- urls["\ref[urls]-[i]"] = url_find_lazy.match
+ while (GLOB.url_find_lazy.Find_char(message))
+ urls["\ref[urls]-[i]"] = GLOB.url_find_lazy.match
i++
for (var/ref in urls)
@@ -350,9 +350,9 @@
// ---End URL caching
var/regex/tag_markup
- for (var/tag in (markup_tags - ignore_tags))
- tag_markup = markup_regex[tag]
- message = tag_markup.Replace_char(message, "$2[markup_tags[tag][1]]$3[markup_tags[tag][2]]$5")
+ for (var/tag in (GLOB.markup_tags - ignore_tags))
+ tag_markup = GLOB.markup_regex[tag]
+ message = tag_markup.Replace_char(message, "$2[GLOB.markup_tags[tag][1]]$3[GLOB.markup_tags[tag][2]]$5")
// ---Unload URL cache
for (var/ref in urls)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 38c02e776735..a7af9d7f6324 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -916,110 +916,110 @@
return FALSE
-var/global/image/busy_indicator_clock
-var/global/image/busy_indicator_medical
-var/global/image/busy_indicator_build
-var/global/image/busy_indicator_friendly
-var/global/image/busy_indicator_hostile
-var/global/image/emote_indicator_highfive
-var/global/image/emote_indicator_fistbump
-var/global/image/emote_indicator_headbutt
-var/global/image/emote_indicator_tailswipe
-var/global/image/emote_indicator_rock_paper_scissors
-var/global/image/emote_indicator_rock
-var/global/image/emote_indicator_paper
-var/global/image/emote_indicator_scissors
-var/global/image/action_red_power_up
-var/global/image/action_green_power_up
-var/global/image/action_blue_power_up
-var/global/image/action_purple_power_up
+GLOBAL_DATUM(busy_indicator_clock, /image)
+GLOBAL_DATUM(busy_indicator_medical, /image)
+GLOBAL_DATUM(busy_indicator_build, /image)
+GLOBAL_DATUM(busy_indicator_friendly, /image)
+GLOBAL_DATUM(busy_indicator_hostile, /image)
+GLOBAL_DATUM(emote_indicator_highfive, /image)
+GLOBAL_DATUM(emote_indicator_fistbump, /image)
+GLOBAL_DATUM(emote_indicator_headbutt, /image)
+GLOBAL_DATUM(emote_indicator_tailswipe, /image)
+GLOBAL_DATUM(emote_indicator_rock_paper_scissors, /image)
+GLOBAL_DATUM(emote_indicator_rock, /image)
+GLOBAL_DATUM(emote_indicator_paper, /image)
+GLOBAL_DATUM(emote_indicator_scissors, /image)
+GLOBAL_DATUM(action_red_power_up, /image)
+GLOBAL_DATUM(action_green_power_up, /image)
+GLOBAL_DATUM(action_blue_power_up, /image)
+GLOBAL_DATUM(action_purple_power_up, /image)
/proc/get_busy_icon(busy_type)
if(busy_type == BUSY_ICON_GENERIC)
- if(!busy_indicator_clock)
- busy_indicator_clock = image('icons/mob/mob.dmi', null, "busy_generic", "pixel_y" = 22)
- busy_indicator_clock.layer = FLY_LAYER
- return busy_indicator_clock
+ if(!GLOB.busy_indicator_clock)
+ GLOB.busy_indicator_clock = image('icons/mob/mob.dmi', null, "busy_generic", "pixel_y" = 22)
+ GLOB.busy_indicator_clock.layer = FLY_LAYER
+ return GLOB.busy_indicator_clock
else if(busy_type == BUSY_ICON_MEDICAL)
- if(!busy_indicator_medical)
- busy_indicator_medical = image('icons/mob/mob.dmi', null, "busy_medical", "pixel_y" = 0) //This shows directly on top of the mob, no offset!
- busy_indicator_medical.layer = FLY_LAYER
- return busy_indicator_medical
+ if(!GLOB.busy_indicator_medical)
+ GLOB.busy_indicator_medical = image('icons/mob/mob.dmi', null, "busy_medical", "pixel_y" = 0) //This shows directly on top of the mob, no offset!
+ GLOB.busy_indicator_medical.layer = FLY_LAYER
+ return GLOB.busy_indicator_medical
else if(busy_type == BUSY_ICON_BUILD)
- if(!busy_indicator_build)
- busy_indicator_build = image('icons/mob/mob.dmi', null, "busy_build", "pixel_y" = 22)
- busy_indicator_build.layer = FLY_LAYER
- return busy_indicator_build
+ if(!GLOB.busy_indicator_build)
+ GLOB.busy_indicator_build = image('icons/mob/mob.dmi', null, "busy_build", "pixel_y" = 22)
+ GLOB.busy_indicator_build.layer = FLY_LAYER
+ return GLOB.busy_indicator_build
else if(busy_type == BUSY_ICON_FRIENDLY)
- if(!busy_indicator_friendly)
- busy_indicator_friendly = image('icons/mob/mob.dmi', null, "busy_friendly", "pixel_y" = 22)
- busy_indicator_friendly.layer = FLY_LAYER
- return busy_indicator_friendly
+ if(!GLOB.busy_indicator_friendly)
+ GLOB.busy_indicator_friendly = image('icons/mob/mob.dmi', null, "busy_friendly", "pixel_y" = 22)
+ GLOB.busy_indicator_friendly.layer = FLY_LAYER
+ return GLOB.busy_indicator_friendly
else if(busy_type == BUSY_ICON_HOSTILE)
- if(!busy_indicator_hostile)
- busy_indicator_hostile = image('icons/mob/mob.dmi', null, "busy_hostile", "pixel_y" = 22)
- busy_indicator_hostile.layer = FLY_LAYER
- return busy_indicator_hostile
+ if(!GLOB.busy_indicator_hostile)
+ GLOB.busy_indicator_hostile = image('icons/mob/mob.dmi', null, "busy_hostile", "pixel_y" = 22)
+ GLOB.busy_indicator_hostile.layer = FLY_LAYER
+ return GLOB.busy_indicator_hostile
else if(busy_type == EMOTE_ICON_HIGHFIVE)
- if(!emote_indicator_highfive)
- emote_indicator_highfive = image('icons/mob/mob.dmi', null, "emote_highfive", "pixel_y" = 22)
- emote_indicator_highfive.layer = FLY_LAYER
- return emote_indicator_highfive
+ if(!GLOB.emote_indicator_highfive)
+ GLOB.emote_indicator_highfive = image('icons/mob/mob.dmi', null, "emote_highfive", "pixel_y" = 22)
+ GLOB.emote_indicator_highfive.layer = FLY_LAYER
+ return GLOB.emote_indicator_highfive
else if(busy_type == EMOTE_ICON_FISTBUMP)
- if(!emote_indicator_fistbump)
- emote_indicator_fistbump = image('icons/mob/mob.dmi', null, "emote_fistbump", "pixel_y" = 22)
- emote_indicator_fistbump.layer = FLY_LAYER
- return emote_indicator_fistbump
+ if(!GLOB.emote_indicator_fistbump)
+ GLOB.emote_indicator_fistbump = image('icons/mob/mob.dmi', null, "emote_fistbump", "pixel_y" = 22)
+ GLOB.emote_indicator_fistbump.layer = FLY_LAYER
+ return GLOB.emote_indicator_fistbump
else if(busy_type == EMOTE_ICON_ROCK_PAPER_SCISSORS)
- if(!emote_indicator_rock_paper_scissors)
- emote_indicator_rock_paper_scissors = image('icons/mob/mob.dmi', null, "emote_rps", "pixel_y" = 22)
- emote_indicator_rock_paper_scissors.layer = FLY_LAYER
- return emote_indicator_rock_paper_scissors
+ if(!GLOB.emote_indicator_rock_paper_scissors)
+ GLOB.emote_indicator_rock_paper_scissors = image('icons/mob/mob.dmi', null, "emote_rps", "pixel_y" = 22)
+ GLOB.emote_indicator_rock_paper_scissors.layer = FLY_LAYER
+ return GLOB.emote_indicator_rock_paper_scissors
else if(busy_type == EMOTE_ICON_ROCK)
- if(!emote_indicator_rock)
- emote_indicator_rock = image('icons/mob/mob.dmi', null, "emote_rock", "pixel_y" = 22)
- emote_indicator_rock.layer = FLY_LAYER
- return emote_indicator_rock
+ if(!GLOB.emote_indicator_rock)
+ GLOB.emote_indicator_rock = image('icons/mob/mob.dmi', null, "emote_rock", "pixel_y" = 22)
+ GLOB.emote_indicator_rock.layer = FLY_LAYER
+ return GLOB.emote_indicator_rock
else if(busy_type == EMOTE_ICON_PAPER)
- if(!emote_indicator_paper)
- emote_indicator_paper = image('icons/mob/mob.dmi', null, "emote_paper", "pixel_y" = 22)
- emote_indicator_paper.layer = FLY_LAYER
- return emote_indicator_paper
+ if(!GLOB.emote_indicator_paper)
+ GLOB.emote_indicator_paper = image('icons/mob/mob.dmi', null, "emote_paper", "pixel_y" = 22)
+ GLOB.emote_indicator_paper.layer = FLY_LAYER
+ return GLOB.emote_indicator_paper
else if(busy_type == EMOTE_ICON_SCISSORS)
- if(!emote_indicator_scissors)
- emote_indicator_scissors = image('icons/mob/mob.dmi', null, "emote_scissors", "pixel_y" = 22)
- emote_indicator_scissors.layer = FLY_LAYER
- return emote_indicator_scissors
+ if(!GLOB.emote_indicator_scissors)
+ GLOB.emote_indicator_scissors = image('icons/mob/mob.dmi', null, "emote_scissors", "pixel_y" = 22)
+ GLOB.emote_indicator_scissors.layer = FLY_LAYER
+ return GLOB.emote_indicator_scissors
else if(busy_type == EMOTE_ICON_HEADBUTT)
- if(!emote_indicator_headbutt)
- emote_indicator_headbutt = image('icons/mob/mob.dmi', null, "emote_headbutt", "pixel_y" = 22)
- emote_indicator_headbutt.layer = FLY_LAYER
- return emote_indicator_headbutt
+ if(!GLOB.emote_indicator_headbutt)
+ GLOB.emote_indicator_headbutt = image('icons/mob/mob.dmi', null, "emote_headbutt", "pixel_y" = 22)
+ GLOB.emote_indicator_headbutt.layer = FLY_LAYER
+ return GLOB.emote_indicator_headbutt
else if(busy_type == EMOTE_ICON_TAILSWIPE)
- if(!emote_indicator_tailswipe)
- emote_indicator_tailswipe = image('icons/mob/mob.dmi', null, "emote_tailswipe", "pixel_y" = 22)
- emote_indicator_tailswipe.layer = FLY_LAYER
- return emote_indicator_tailswipe
+ if(!GLOB.emote_indicator_tailswipe)
+ GLOB.emote_indicator_tailswipe = image('icons/mob/mob.dmi', null, "emote_tailswipe", "pixel_y" = 22)
+ GLOB.emote_indicator_tailswipe.layer = FLY_LAYER
+ return GLOB.emote_indicator_tailswipe
else if(busy_type == ACTION_RED_POWER_UP)
- if(!action_red_power_up)
- action_red_power_up = image('icons/effects/effects.dmi', null, "anger", "pixel_x" = 16)
- action_red_power_up.layer = FLY_LAYER
- return action_red_power_up
+ if(!GLOB.action_red_power_up)
+ GLOB.action_red_power_up = image('icons/effects/effects.dmi', null, "anger", "pixel_x" = 16)
+ GLOB.action_red_power_up.layer = FLY_LAYER
+ return GLOB.action_red_power_up
else if(busy_type == ACTION_GREEN_POWER_UP)
- if(!action_green_power_up)
- action_green_power_up = image('icons/effects/effects.dmi', null, "vitality", "pixel_x" = 16)
- action_green_power_up.layer = FLY_LAYER
- return action_green_power_up
+ if(!GLOB.action_green_power_up)
+ GLOB.action_green_power_up = image('icons/effects/effects.dmi', null, "vitality", "pixel_x" = 16)
+ GLOB.action_green_power_up.layer = FLY_LAYER
+ return GLOB.action_green_power_up
else if(busy_type == ACTION_BLUE_POWER_UP)
- if(!action_blue_power_up)
- action_blue_power_up = image('icons/effects/effects.dmi', null, "shock", "pixel_x" = 16)
- action_blue_power_up.layer = FLY_LAYER
- return action_blue_power_up
+ if(!GLOB.action_blue_power_up)
+ GLOB.action_blue_power_up = image('icons/effects/effects.dmi', null, "shock", "pixel_x" = 16)
+ GLOB.action_blue_power_up.layer = FLY_LAYER
+ return GLOB.action_blue_power_up
else if(busy_type == ACTION_PURPLE_POWER_UP)
- if(!action_purple_power_up)
- action_purple_power_up = image('icons/effects/effects.dmi', null, "pain", "pixel_x" = 16)
- action_purple_power_up.layer = FLY_LAYER
- return action_purple_power_up
+ if(!GLOB.action_purple_power_up)
+ GLOB.action_purple_power_up = image('icons/effects/effects.dmi', null, "pain", "pixel_x" = 16)
+ GLOB.action_purple_power_up.layer = FLY_LAYER
+ return GLOB.action_purple_power_up
/*
@@ -1089,7 +1089,7 @@ var/global/image/action_purple_power_up
target_orig_turf = get_turf(target)
var/obj/user_holding = busy_user.get_active_hand()
var/obj/target_holding
- var/cur_user_lying = busy_user.lying
+ var/cur_user_lying = busy_user.body_position
var/cur_target_lying
var/expected_total_time = delayfraction*numticks
var/time_remaining = expected_total_time
@@ -1097,7 +1097,7 @@ var/global/image/action_purple_power_up
if(has_target && istype(T))
cur_target_zone_sel = T.zone_selected
target_holding = T.get_active_hand()
- cur_target_lying = T.lying
+ cur_target_lying = T.body_position
. = TRUE
for(var/i in 1 to numticks)
@@ -1121,13 +1121,13 @@ var/global/image/action_purple_power_up
)
. = FALSE
break
- if(user_flags & INTERRUPT_KNOCKED_DOWN && busy_user.knocked_down || \
- target_is_mob && (target_flags & INTERRUPT_KNOCKED_DOWN && T.knocked_down)
+ if(user_flags & INTERRUPT_KNOCKED_DOWN && HAS_TRAIT(busy_user, TRAIT_FLOORED) || \
+ target_is_mob && (target_flags & INTERRUPT_KNOCKED_DOWN && HAS_TRAIT(T, TRAIT_FLOORED))
)
. = FALSE
break
- if(user_flags & INTERRUPT_STUNNED && busy_user.stunned || \
- target_is_mob && (target_flags & INTERRUPT_STUNNED && T.stunned)
+ if(user_flags & INTERRUPT_STUNNED && HAS_TRAIT(busy_user, TRAIT_INCAPACITATED)|| \
+ target_is_mob && (target_flags & INTERRUPT_STUNNED && HAS_TRAIT(T, TRAIT_INCAPACITATED))
)
. = FALSE
break
@@ -1201,8 +1201,8 @@ var/global/image/action_purple_power_up
)
. = FALSE
break
- if(user_flags & INTERRUPT_CHANGED_LYING && busy_user.lying != cur_user_lying || \
- target_is_mob && (target_flags & INTERRUPT_CHANGED_LYING && T.lying != cur_target_lying)
+ if(user_flags & INTERRUPT_CHANGED_LYING && busy_user.body_position != cur_user_lying || \
+ target_is_mob && (target_flags & INTERRUPT_CHANGED_LYING && T.body_position != cur_target_lying)
)
. = FALSE
break
@@ -1465,7 +1465,7 @@ var/global/image/action_purple_power_up
/*
Checks if that loc and dir has a item on the wall
*/
-var/list/WALLITEMS = list(
+GLOBAL_LIST_INIT(WALLITEMS, list(
/obj/structure/machinery/power/apc,
/obj/structure/machinery/alarm,
/obj/item/device/radio/intercom,
@@ -1486,10 +1486,11 @@ var/list/WALLITEMS = list(
/obj/structure/mirror,
/obj/structure/closet/fireaxecabinet,
/obj/structure/machinery/computer/cameras/telescreen/entertainment,
- )
+ ))
+
/proc/gotwallitem(loc, dir)
for(var/obj/O in loc)
- for(var/item in WALLITEMS)
+ for(var/item in GLOB.WALLITEMS)
if(istype(O, item))
//Direction works sometimes
if(O.dir == dir)
@@ -1513,7 +1514,7 @@ var/list/WALLITEMS = list(
//Some stuff is placed directly on the wallturf (signs)
for(var/obj/O in get_step(loc, dir))
- for(var/item in WALLITEMS)
+ for(var/item in GLOB.WALLITEMS)
if(istype(O, item))
if(O.pixel_x == 0 && O.pixel_y == 0)
return 1
@@ -1650,7 +1651,7 @@ var/list/WALLITEMS = list(
var/turf/Turf = get_turf(explosive)
if(!(Turf.loc.type in GLOB.explosive_antigrief_exempt_areas))
var/crash_occured = (SSticker?.mode?.is_in_endgame)
- if((Turf.z in SSmapping.levels_by_any_trait(list(ZTRAIT_MARINE_MAIN_SHIP, ZTRAIT_RESERVED))) && (security_level < SEC_LEVEL_RED) && !crash_occured)
+ if((Turf.z in SSmapping.levels_by_any_trait(list(ZTRAIT_MARINE_MAIN_SHIP, ZTRAIT_RESERVED))) && (GLOB.security_level < SEC_LEVEL_RED) && !crash_occured)
switch(CONFIG_GET(number/explosive_antigrief))
if(ANTIGRIEF_DISABLED)
return FALSE
diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index b85aa18fdb6b..541d1a05362d 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -369,6 +369,13 @@ DEFINE_BITFIELD(mob_flags, list(
"NOBIOSCAN" = NOBIOSCAN,
))
+DEFINE_BITFIELD(mobility_flags, list(
+ "MOVE" = MOBILITY_MOVE,
+ "STAND" = MOBILITY_STAND,
+ "REST" = MOBILITY_REST,
+ "LIEDOWN" = MOBILITY_LIEDOWN
+))
+
DEFINE_BITFIELD(flags, list(
"NO_BLOOD" = NO_BLOOD,
"NO_BREATHE" = NO_BREATHE,
diff --git a/code/_globalvars/global_lists.dm b/code/_globalvars/global_lists.dm
index 3ba92a7c4d0c..6e1b229e562f 100644
--- a/code/_globalvars/global_lists.dm
+++ b/code/_globalvars/global_lists.dm
@@ -20,14 +20,11 @@ GLOBAL_LIST_EMPTY(larva_burst_by_hive)
GLOBAL_LIST_INIT_TYPED(custom_huds_list, /datum/custom_hud, setup_all_huds())
GLOBAL_LIST_INIT_TYPED(custom_human_huds, /datum/custom_hud, setup_human_huds())
-//Since it didn't really belong in any other category, I'm putting this here
-//This is for procs to replace all the goddamn 'in world's that are chilling around the code
-
-var/readied_players = 0 //How many players are readied up in the lobby
+GLOBAL_VAR_INIT(readied_players, 0) //How many players are readied up in the lobby
GLOBAL_LIST_EMPTY_TYPED(other_factions_human_list, /mob/living/carbon/human)
-var/global/list/ai_mob_list = list() //List of all AIs
+GLOBAL_LIST_EMPTY(ai_mob_list) //List of all AIs
GLOBAL_LIST_EMPTY(freed_mob_list) // List of mobs freed for ghosts
@@ -109,12 +106,12 @@ GLOBAL_LIST_INIT_TYPED(resin_mark_meanings, /datum/xeno_mark_define, setup_resin
GLOBAL_REFERENCE_LIST_INDEXED(xeno_datum_list, /datum/caste_datum, caste_type)
//Chem Stuff
-var/global/list/chemical_reactions_filtered_list //List of all /datum/chemical_reaction datums filtered by reaction components. Used during chemical reactions
-var/global/list/chemical_reactions_list //List of all /datum/chemical_reaction datums indexed by reaction id. Used to search for the result instead of the components.
-var/global/list/chemical_reagents_list //List of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
-var/global/list/chemical_properties_list //List of all /datum/chem_property datums indexed by property name
+GLOBAL_LIST(chemical_reactions_filtered_list) //List of all /datum/chemical_reaction datums filtered by reaction components. Used during chemical reactions
+GLOBAL_LIST(chemical_reactions_list) //List of all /datum/chemical_reaction datums indexed by reaction id. Used to search for the result instead of the components.
+GLOBAL_LIST(chemical_reagents_list) //List of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
+GLOBAL_LIST(chemical_properties_list) //List of all /datum/chem_property datums indexed by property name
//List of all id's from classed /datum/reagent datums indexed by class or tier. Used by chemistry generator and chem spawners.
-var/global/list/list/chemical_gen_classes_list = list("C" = list(),"C1" = list(),"C2" = list(),"C3" = list(),"C4" = list(),"C5" = list(),"C6" = list(),"T1" = list(),"T2" = list(),"T3" = list(),"T4" = list(),"tau" = list())
+GLOBAL_LIST_INIT_TYPED(chemical_gen_classes_list, /list, list("C" = list(),"C1" = list(),"C2" = list(),"C3" = list(),"C4" = list(),"C5" = list(),"C6" = list(),"T1" = list(),"T2" = list(),"T3" = list(),"T4" = list(),"tau", list()))
//properties generated in chemicals, helps to make sure the same property doesn't show up 10 times
GLOBAL_LIST_INIT_TYPED(generated_properties, /list, list("positive" = list(), "negative" = list(), "neutral" = list()))
@@ -140,13 +137,12 @@ GLOBAL_LIST_INIT(surgical_patient_types, setup_surgical_patient_types())
GLOBAL_LIST_INIT_TYPED(gear_path_presets_list, /datum/equipment_preset, setup_gear_path_presets())
GLOBAL_LIST_INIT_TYPED(gear_name_presets_list, /datum/equipment_preset, setup_gear_name_presets())
-var/global/list/active_areas = list()
-var/global/list/all_areas = list()
+GLOBAL_LIST_EMPTY(active_areas)
+GLOBAL_LIST_EMPTY(all_areas)
-var/global/list/turfs = list()
-var/global/list/z1turfs = list()
+GLOBAL_LIST_EMPTY(turfs)
-/var/global/list/objects_of_interest // This is used to track the stealing objective for Agents.
+GLOBAL_LIST(objects_of_interest) // This is used to track the stealing objective for Agents.
// Areas exempt from explosive antigrief (not Z-levels)
GLOBAL_LIST_INIT(explosive_antigrief_exempt_areas, list(
@@ -209,23 +205,23 @@ GLOBAL_REFERENCE_LIST_INDEXED(hair_gradient_list, /datum/sprite_accessory/hair_g
GLOBAL_REFERENCE_LIST_INDEXED(yautja_hair_styles_list, /datum/sprite_accessory/yautja_hair, name)
//Backpacks
-var/global/list/backbaglist = list("Backpack", "Satchel")
+GLOBAL_LIST_INIT(backbaglist, list("Backpack", "Satchel"))
//Armor styles
GLOBAL_LIST_INIT(armor_style_list, list("Padded" = 1, "Padless" = 2, "Ridged" = 3, "Carrier" = 4, "Skull" = 5, "Smooth" = 6, "Random"))
// var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg)
-var/global/round_should_check_for_win = TRUE
+GLOBAL_VAR_INIT(round_should_check_for_win, TRUE)
-var/global/list/key_mods = list("CTRL", "ALT", "SHIFT")
+GLOBAL_LIST_INIT(key_mods, list("CTRL", "ALT", "SHIFT"))
// A list storing the pass flags for specific types of atoms
-var/global/list/pass_flags_cache = list()
+GLOBAL_LIST_EMPTY(pass_flags_cache)
//Parameterss cache
-var/global/list/paramslist_cache = list()
+GLOBAL_LIST_EMPTY(paramslist_cache)
//Turf Edge info uberlist -- a list whos states contain GLOB.edgeinfo_X keyed as different icon_states
-var/global/list/turf_edgeinfo_cache = list()
+GLOBAL_LIST_EMPTY(turf_edgeinfo_cache)
#define FULL_EDGE 1
#define HALF_EDGE_RIGHT 2
@@ -277,10 +273,10 @@ GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living))
GLOBAL_LIST_INIT(emote_list, init_emote_list())
/proc/cached_params_decode(params_data, decode_proc)
- . = paramslist_cache[params_data]
+ . = GLOB.paramslist_cache[params_data]
if(!.)
. = call(decode_proc)(params_data)
- paramslist_cache[params_data] = .
+ GLOB.paramslist_cache[params_data] = .
/proc/key_number_decode(key_number_data)
var/list/L = params2list(key_number_data)
@@ -461,10 +457,10 @@ GLOBAL_LIST_INIT(emote_list, init_emote_list())
/* // Uncomment to debug chemical reaction list.
/client/verb/debug_chemical_list()
- for (var/reaction in chemical_reactions_filtered_list)
- . += "chemical_reactions_filtered_list\[\"[reaction]\"\] = \"[chemical_reactions_filtered_list[reaction]]\"\n"
- if(islist(chemical_reactions_filtered_list[reaction]))
- var/list/L = chemical_reactions_filtered_list[reaction]
+ for (var/reaction in GLOB.chemical_reactions_filtered_list)
+ . += "GLOB.chemical_reactions_filtered_list\[\"[reaction]\"\] = \"[GLOB.chemical_reactions_filtered_list[reaction]]\"\n"
+ if(islist(GLOB.chemical_reactions_filtered_list[reaction]))
+ var/list/L = GLOB.chemical_reactions_filtered_list[reaction]
for(var/t in L)
. += " has: [t]\n"
world << .
@@ -478,22 +474,22 @@ GLOBAL_LIST_EMPTY(timelocks)
//the global list of specialist kits that haven't been claimed yet.
-var/global/list/available_specialist_sets = list(
+GLOBAL_LIST_INIT(available_specialist_sets, list(
"Scout Set",
"Sniper Set",
"Demolitionist Set",
"Heavy Grenadier Set",
"Pyro Set"
- )
+ ))
//Similar thing, but used in /obj/item/spec_kit
-var/global/list/available_specialist_kit_boxes = list(
+GLOBAL_LIST_INIT(available_specialist_kit_boxes, list(
"Pyro" = 2,
"Grenadier" = 2,
"Sniper" = 2,
"Scout" = 2,
"Demo" = 2,
- )
+ ))
/proc/init_global_referenced_datums()
init_keybindings()
diff --git a/code/_globalvars/lists/clans.dm b/code/_globalvars/lists/clans.dm
new file mode 100644
index 000000000000..f04915a37435
--- /dev/null
+++ b/code/_globalvars/lists/clans.dm
@@ -0,0 +1,19 @@
+GLOBAL_LIST_INIT_TYPED(clan_ranks, /datum/yautja_rank, list(
+ CLAN_RANK_UNBLOODED = new /datum/yautja_rank/unblooded(),
+ CLAN_RANK_YOUNG = new /datum/yautja_rank/young(),
+ CLAN_RANK_BLOODED = new /datum/yautja_rank/blooded(),
+ CLAN_RANK_ELITE = new /datum/yautja_rank/elite(),
+ CLAN_RANK_ELDER = new /datum/yautja_rank/elder(),
+ CLAN_RANK_LEADER = new /datum/yautja_rank/leader(),
+ CLAN_RANK_ADMIN = new /datum/yautja_rank/ancient()
+))
+
+GLOBAL_LIST_INIT(clan_ranks_ordered, list(
+ CLAN_RANK_UNBLOODED = CLAN_RANK_UNBLOODED_INT,
+ CLAN_RANK_YOUNG = CLAN_RANK_YOUNG_INT,
+ CLAN_RANK_BLOODED = CLAN_RANK_BLOODED_INT,
+ CLAN_RANK_ELITE = CLAN_RANK_ELITE_INT,
+ CLAN_RANK_ELDER = CLAN_RANK_ELDER_INT,
+ CLAN_RANK_LEADER = CLAN_RANK_LEADER_INT,
+ CLAN_RANK_ADMIN = CLAN_RANK_ADMIN_INT
+))
diff --git a/code/_globalvars/lists/names.dm b/code/_globalvars/lists/names.dm
new file mode 100644
index 000000000000..09ad2b422d3c
--- /dev/null
+++ b/code/_globalvars/lists/names.dm
@@ -0,0 +1,39 @@
+GLOBAL_LIST_INIT(ai_names, file2list("strings/ai.txt"))
+GLOBAL_LIST_INIT(first_names_male, file2list("strings/first_male.txt"))
+GLOBAL_LIST_INIT(first_names_female, file2list("strings/first_female.txt"))
+GLOBAL_LIST_INIT(last_names, file2list("strings/last.txt"))
+GLOBAL_LIST_INIT(clown_names, file2list("strings/clown.txt"))
+GLOBAL_LIST_INIT(operation_titles, file2list("strings/operation_title.txt"))
+GLOBAL_LIST_INIT(operation_prefixes, file2list("strings/operation_prefix.txt"))
+GLOBAL_LIST_INIT(operation_postfixes, file2list("strings/operation_postfix.txt"))
+
+GLOBAL_LIST_INIT(verbs, file2list("strings/verbs.txt"))
+//loaded on startup because of "
+//would include in rsc if ' was used
+
+
+GLOBAL_LIST_INIT(first_names_male_clf, list("Alan","Jack","Bil","Jonathan","John","Shiro","Gareth","Clark","Sam", "Lionel", "Aaron", "Charlie", "Scott", "Winston", "Aidan", "Ellis", "Mason", "Wesley", "Nicholas", "Calvin", "Nishikawa", "Hiroto", "Chiba", "Ouchi", "Furuse", "Takagi", "Oba", "Kishimoto"))
+GLOBAL_LIST_INIT(first_names_female_clf, list("Emma", "Adelynn", "Mary", "Halie", "Chelsea", "Lexie", "Arya", "Alicia", "Selah", "Amber", "Heather", "Myra", "Heidi", "Charlotte", "Oliva", "Lydia", "Tia", "Riko", "Ari", "Machida", "Ueki", "Mihara", "Noda"))
+GLOBAL_LIST_INIT(last_names_clf, list("Hawkins","Rickshaw","Elliot","Billard","Cooper","Fox", "Barlow", "Barrows", "Stewart", "Morgan", "Green", "Stone", "Burr", "Hunt", "Yuko", "Gesshin", "Takanibu", "Tetsuzan", "Tomomi", "Bokkai", "Takesi"))
+
+GLOBAL_LIST_INIT(first_names_male_colonist, list("Alan","Jack","Bil","Jonathan","John","Shiro","Gareth","Clark","Sam", "Lionel", "Aaron", "Charlie", "Scott", "Winston", "Aidan", "Ellis", "Mason", "Wesley", "Nicholas", "Calvin", "Nishikawa", "Hiroto", "Chiba", "Ouchi", "Furuse", "Takagi", "Oba", "Kishimoto"))
+GLOBAL_LIST_INIT(first_names_female_colonist, list("Emma", "Adelynn", "Mary", "Halie", "Chelsea", "Lexie", "Arya", "Alicia", "Selah", "Amber", "Heather", "Myra", "Heidi", "Charlotte", "Ashley", "Raven", "Tori", "Anne", "Madison", "Oliva", "Lydia", "Tia", "Riko", "Ari", "Machida", "Ueki", "Mihara", "Noda"))
+GLOBAL_LIST_INIT(last_names_colonist, list("Hawkins","Rickshaw","Elliot","Billard","Cooper","Fox", "Barlow", "Barrows", "Stewart", "Morgan", "Green", "Stone", "Titan", "Crowe", "Krantz", "Pathillo", "Driggers", "Burr", "Hunt", "Yuko", "Gesshin", "Takanibu", "Tetsuzan", "Tomomi", "Bokkai", "Takesi"))
+
+GLOBAL_LIST_INIT(first_names_male_upp, list("Badai","Mongkeemur","Alexei","Andrei","Artyom","Viktor","Xiangai","Ivan","Choban","Oleg", "Dayan", "Taghi", "Batu", "Arik", "Orda", "Ghazan", "Bala", "Gao", "Zhan", "Ren", "Hou", "Xue", "Serafim", "Luca", "Su", "György", "István", "Mihály", "Vladimir", "Aleksandr", "Fyodor", "Bhodar", "Qazem", "Łukasz", "Miłogost", "Radogost", "Uniegost", "Hostirad", "Hostimil", "Hostisvit", "Lubgost", "Gościsław", "Vseslav", "Bohuměr", "Bronisław", "Česćiměr", "Dobysław", "Horisław", "Jaroměr", "Mirosław", "Mječisław", "Radoměr", "Stanij", "Stanisław", "Wjeleměr", "Wójsław"))
+GLOBAL_LIST_INIT(first_names_female_upp, list("Altani","Cirina","Anastasiya","Saran","Wei","Oksana","Ren","Svena","Tatyana","Yaroslava", "Izabella", "Kata", "Krisztina", "Miruna", "Flori", "Lucia", "Anica", "Li", "Yimu", "Alona", "Hsiau-Li", "Xiaoling", "Erhong", "Baśka", "Angela", "Angelina", "Angja", "Ankica", "Biljana", "Bisera", "Bistra", "Blaga", "Blagica", "Blagorodna", "Verka", "Vladica", "Denica", "Živka", "Zlata", "Jagoda", "Letka", "Ljupka", "Mila", "Mirjana", "Mirka", "Rada", "Radmila", "Slavica", "Slavka", "Snežana", "Stojna", "Ubavka", "Jaromir", "Mscëwòj", "Subisłôw", "Swiãtopôłk", "Ji-Sun", "Chaeyong", "Chaewon", "Saerom", "Seoyeong", "Jiheon", "Hayoung"))
+GLOBAL_LIST_INIT(last_names_upp, list("Azarov","Bogdanov","Barsukov","Golovin","Davydov","Khan","Noica","Barbu","Zhukov","Ivanov","Mihai","Kasputin","Belov", "Belova","Melnikov", "Vasilevsky", "Aleksander", "Halkovich", "Stanislaw", "Proca", "Zaituc", "Arcos", "Kubat", "Kral", "Volf", "Xun", "Jia", "Bachoń", "Wang", "Ji", "Xiang", "Zhang", "Mei", "Ma", "Kim", "Yi", "Ri", "Pak", "Chong", "Baek", "Kwon", "Hwang", "Roh", "Lee", "Song"))
+
+GLOBAL_LIST_INIT(first_names_male_pmc, list("Owen","Luka","Nelson","Branson", "Tyson", "Leo", "Bryant", "Kobe", "Rohan", "Riley", "Aidan", "Watase","Egawa", "Hisakawa", "Koide", "Remy", "Martial", "Magnus", "Heiko", "Lennard"))
+GLOBAL_LIST_INIT(first_names_female_pmc, list("Madison","Jessica","Anna","Juliet", "Olivia", "Lea", "Diane", "Kaori", "Beatrice", "Riley", "Amy", "Natsue","Yumi", "Aiko", "Fujiko", "Jennifer", "Ashley", "Mary", "Hitomi", "Lisa"))
+GLOBAL_LIST_INIT(last_names_pmc, list("Bates","Shaw","Hansen","Black", "Chambers", "Hall", "Gibson", "Weiss", "Waller", "Burton", "Bakin", "Rohan", "Naomichi", "Yakumo", "Yosai", "Gallagher", "Hiles", "Bourdon", "Strassman", "Palau"))
+
+GLOBAL_LIST_INIT(first_names_male_gladiator, list("Augustus", "Maximus", "Octavius", "Septimus", "Titus", "Brutus", "Caesar", "Justinian"))
+GLOBAL_LIST_INIT(first_names_female_gladiator, list("Aelia", "Aquila", "Caecilia", "Camilla", "Claudia", "Flavia", "Martina", "Theodora"))
+
+GLOBAL_LIST_INIT(first_names_male_dutch, list("Raymond", "Jesse", "Jack", "John", "Sam", "Aaron", "Charlie", "Ellis", "Nick", "Francis", "Louis"))
+GLOBAL_LIST_INIT(first_names_female_dutch, list("Chelsea", "Mira", "Jessica", "Catherine", "Eliza", "Emma", "Ashley", "Annie", "Alicia", "Miranda", "Ellen"))
+
+GLOBAL_LIST_INIT(monkey_names, list("Abu", "Aldo", "Bear", "Bingo", "Clyde", "Crystal", "Gordo", "George", "Koko", "Marcel", "Nim", "Rafiki", "Spike", "Banana", "Boots", "Bubbles", "Smiley", "Winston"))
+
+GLOBAL_LIST_INIT(weapon_surnames, list("Adze", "Axe", "Bagh Nakha", "Bo", "Bola", "Bow", "Bowman", "Cannon", "Carbine", "Cestus", "Club", "Culverin", "Dagger", "Dao", "Derringer", "Dha", "Dussack", "Emeici", "Falchion", "Fan", "Flyssa", "Gauntlet", "Hammer", "Halberd", "Harquebus", "Hatchet", "Hwando", "Katar", "Kampilan", "Knuckles", "Lance", "Lancer", "Larim", "Maduvu", "Mace", "Maru", "Mauser", "Messer", "Mine", "Mubucae", "Nyepel", "Onager", "Pata", "Pike", "Ram", "Saber", "Seax", "Shamsir", "Sickle", "Sling", "Spear", "Spears", "Staff", "Sword", "Tekko"))
diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm
index cd6708198eae..0b7a4af0f05f 100644
--- a/code/_globalvars/misc.dm
+++ b/code/_globalvars/misc.dm
@@ -1,3 +1,89 @@
+GLOBAL_VAR_INIT(game_year, 2182)
+
+GLOBAL_VAR_INIT(ooc_allowed, TRUE)
+GLOBAL_VAR_INIT(looc_allowed, TRUE)
+GLOBAL_VAR_INIT(dsay_allowed, TRUE)
+GLOBAL_VAR_INIT(dooc_allowed, TRUE)
+GLOBAL_VAR_INIT(dlooc_allowed, FALSE)
+
+GLOBAL_VAR_INIT(enter_allowed, TRUE)
+
+GLOBAL_LIST_EMPTY(admin_log)
+GLOBAL_LIST_EMPTY(asset_log)
+
+// multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
+//It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
+#define CELLRATE 0.006
+
+// Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
+#define CHARGELEVEL 0.001
+
+GLOBAL_VAR(VehicleElevatorConsole)
+GLOBAL_VAR(VehicleGearConsole)
+
+//Spawnpoints.
+GLOBAL_LIST_EMPTY(fallen_list)
+/// This is for dogtags placed on crosses- they will show up at the end-round memorial.
+GLOBAL_LIST_EMPTY(fallen_list_cross)
+
+GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
+GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
+GLOBAL_LIST_INIT(reverse_dir, list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63))
+
+
+
+GLOBAL_VAR(join_motd)
+GLOBAL_VAR(current_tms)
+
+GLOBAL_LIST_INIT(BorgWireColorToFlag, RandomBorgWires())
+GLOBAL_LIST(BorgIndexToFlag)
+GLOBAL_LIST(BorgIndexToWireColor)
+GLOBAL_LIST(BorgWireColorToIndex)
+GLOBAL_LIST_INIT(AAlarmWireColorToFlag, RandomAAlarmWires())
+GLOBAL_LIST(AAlarmIndexToFlag)
+GLOBAL_LIST(AAlarmIndexToWireColor)
+GLOBAL_LIST(AAlarmWireColorToIndex)
+
+/// 3 minutes in the station.
+#define shuttle_time_in_station 3 MINUTES
+/// 10 minutes to arrive.
+#define shuttle_time_to_arrive 10 MINUTES
+
+ // For FTP requests. (i.e. downloading runtime logs.)
+ // However it'd be ok to use for accessing attack logs and such too, which are even laggier.
+GLOBAL_VAR_INIT(fileaccess_timer, 0)
+
+// Reference list for disposal sort junctions. Filled up by sorting junction's New()
+GLOBAL_LIST_EMPTY(tagger_locations)
+
+//added for Xenoarchaeology, might be useful for other stuff
+GLOBAL_LIST_INIT(alphabet_uppercase, list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"))
+GLOBAL_LIST_INIT(alphabet_lowercase, list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"))
+
+GLOBAL_LIST_INIT(greek_letters, list("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omnicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega"))
+GLOBAL_LIST_INIT(nato_phonetic_alphabet, list("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliett", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-Ray", "Yankee", "Zulu"))
+
+//Used for autocall procs on ERT
+GLOBAL_VAR_INIT(distress_cancel, FALSE)
+GLOBAL_VAR_INIT(destroy_cancel, FALSE)
+
+// Which lobby art is on display
+// This is updated by the lobby art turf when it initializes
+GLOBAL_VAR_INIT(displayed_lobby_art, -1)
+
+// Last global ID that was assigned to a mob (for round recording purposes)
+GLOBAL_VAR_INIT(last_mob_gid, 0)
+
+GLOBAL_LIST_INIT(almayer_ship_sections, list(
+ "Upper deck Foreship",
+ "Upper deck Midship",
+ "Upper deck Aftship",
+ "Lower deck Foreship",
+ "Lower deck Midship",
+ "Lower deck Aftship"
+))
+
+
GLOBAL_VAR_INIT(internal_tick_usage, 0.2 * world.tick_lag)
/// Global performance feature toggle flags
@@ -31,7 +117,7 @@ GLOBAL_DATUM_INIT(uscm_tacmap_status, /datum/tacmap/drawing/status_tab_view, new
GLOBAL_DATUM_INIT(xeno_tacmap_status, /datum/tacmap/drawing/status_tab_view/xeno, new)
/// List of roles that can be setup for each gamemode
-GLOBAL_LIST_INIT(gamemode_roles, list())
+GLOBAL_LIST_EMPTY(gamemode_roles)
GLOBAL_VAR_INIT(minimum_exterior_lighting_alpha, 255)
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 3b8ba26c07e9..b99d52086e36 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -375,7 +375,7 @@
tX = tX[1]
var/shiftX = C.pixel_x / world.icon_size
var/shiftY = C.pixel_y / world.icon_size
- var/list/actual_view = getviewsize(C ? C.view : world_view_size)
+ var/list/actual_view = getviewsize(C ? C.view : GLOB.world_view_size)
tX = Clamp(origin.x + text2num(tX) + shiftX - round(actual_view[1] / 2) - 1, 1, world.maxx)
tY = Clamp(origin.y + text2num(tY) + shiftY - round(actual_view[2] / 2) - 1, 1, world.maxy)
return locate(tX, tY, tZ)
diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm
index c6b642974881..22a24e022a3f 100644
--- a/code/_onclick/hud/_defines.dm
+++ b/code/_onclick/hud/_defines.dm
@@ -9,7 +9,7 @@
"1:2,3:4" is the square (1,3) with pixel offsets (+2, +4); slightly right and slightly above the turf grid.
Pixel offsets are used so you don't perfectly hide the turf under them, that would be crappy.
- The size of the user's screen is defined by client.view (indirectly by world_view_size), in our case "15x15".
+ The size of the user's screen is defined by client.view (indirectly by GLOB.world_view_size), in our case "15x15".
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
*/
diff --git a/code/_onclick/human.dm b/code/_onclick/human.dm
index 8f329656ef6c..b09c26ffb92f 100644
--- a/code/_onclick/human.dm
+++ b/code/_onclick/human.dm
@@ -64,7 +64,7 @@
/mob/living/carbon/human/UnarmedAttack(atom/A, proximity, click_parameters)
- if(lying) //No attacks while laying down
+ if(body_position == LYING_DOWN) //No attacks while laying down
return 0
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
@@ -88,7 +88,7 @@
/atom/proc/attack_hand(mob/user)
return
-/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/user)
+/mob/living/carbon/human/MouseDrop_T(atom/dropping, mob/living/user)
if(user != src)
return . = ..()
@@ -153,6 +153,4 @@
target.Move(user.loc, get_dir(target.loc, user.loc))
target.update_transform(TRUE)
- target.update_canmove()
-
diff --git a/code/_onclick/ventcrawl.dm b/code/_onclick/ventcrawl.dm
index b079cffe2afe..51afbc139fdd 100644
--- a/code/_onclick/ventcrawl.dm
+++ b/code/_onclick/ventcrawl.dm
@@ -45,7 +45,7 @@
to_chat(src, SPAN_WARNING("You must be conscious to do this!"))
return
- if(lying)
+ if(is_mob_incapacitated())
to_chat(src, SPAN_WARNING("You can't vent crawl while you're stunned!"))
return
@@ -88,7 +88,7 @@
return
updatehealth()
- if(stat || stunned || dazed || knocked_down || lying || health < 0 || !client || !ventcrawl_carry())
+ if(is_mob_incapacitated(src) || health < 0 || !client || !ventcrawl_carry())
vent_found.animate_ventcrawl_reset()
return
diff --git a/code/_onclick/xeno.dm b/code/_onclick/xeno.dm
index adb637dfe8fa..abb76ded498b 100644
--- a/code/_onclick/xeno.dm
+++ b/code/_onclick/xeno.dm
@@ -3,7 +3,7 @@
*/
/mob/living/carbon/xenomorph/UnarmedAttack(atom/target, proximity, click_parameters, tile_attack = FALSE, ignores_resin = FALSE)
- if(lying || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
+ if(body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED)) //No attacks while laying down
return FALSE
var/mob/alt
@@ -21,7 +21,7 @@
if (!L.is_xeno_grabbable() || L == src) //Xenos never attack themselves.
continue
- if (L.lying)
+ if (L.body_position == LYING_DOWN)
alt = L
continue
target = L
diff --git a/code/controllers/mc/admin.dm b/code/controllers/mc/admin.dm
index 78eb5c5b5a5a..8c5060864747 100644
--- a/code/controllers/mc/admin.dm
+++ b/code/controllers/mc/admin.dm
@@ -96,8 +96,8 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
set category = "Debug.Controllers"
set name = "Debug Role Authority"
- if(!RoleAuthority)
+ if(!GLOB.RoleAuthority)
to_chat(usr, "RoleAuthority not found!")
return
- debug_variables(RoleAuthority)
+ debug_variables(GLOB.RoleAuthority)
message_admins("Admin [key_name_admin(usr)] is debugging the Role Authority.")
diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm
index e54d045baff4..35031cf7334f 100644
--- a/code/controllers/shuttle_controller.dm
+++ b/code/controllers/shuttle_controller.dm
@@ -28,12 +28,12 @@
shuttle.location = 1
shuttle.warmup_time = 1
shuttle.move_time = ELEVATOR_TRANSIT_DURATION
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/supply/dock)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/supply/station)
shuttle.area_station = A
break
@@ -41,7 +41,7 @@
shuttles["Supply"] = shuttle
process_shuttles += shuttle
- supply_controller.shuttle = shuttle
+ GLOB.supply_controller.shuttle = shuttle
//---ELEVATOR---//
// Elevator I
@@ -50,17 +50,17 @@
shuttle.warmup_time = 10 SECONDS
shuttle.recharge_time = ELEVATOR_RECHARGE
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator1/underground)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator1/ground)
shuttle.area_station = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator1/transit)
shuttle.area_transition = A
break
@@ -76,17 +76,17 @@
shuttle.warmup_time = 10 SECONDS
shuttle.recharge_time = ELEVATOR_RECHARGE
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator2/underground)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator2/ground)
shuttle.area_station = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator2/transit)
shuttle.area_transition = A
break
@@ -102,17 +102,17 @@
shuttle.location = 0
shuttle.warmup_time = 10 SECONDS
shuttle.recharge_time = ELEVATOR_RECHARGE
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator3/underground)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator3/ground)
shuttle.area_station = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator3/transit)
shuttle.area_transition = A
break
@@ -127,17 +127,17 @@
shuttle.location = 0
shuttle.warmup_time = 10 SECONDS
shuttle.recharge_time = ELEVATOR_RECHARGE
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator4/underground)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator4/ground)
shuttle.area_station = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/elevator4/transit)
shuttle.area_transition = A
break
@@ -152,17 +152,17 @@
shuttle.location = 0
shuttle.warmup_time = 10 SECONDS
shuttle.recharge_time = ELEVATOR_RECHARGE
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/tri_trans1/omega)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/tri_trans1/alpha)
shuttle.area_station = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/tri_trans1/away)
shuttle.area_transition = A
break
@@ -178,17 +178,17 @@
shuttle.location = 0
shuttle.warmup_time = 10 SECONDS
shuttle.recharge_time = ELEVATOR_RECHARGE
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/tri_trans2/omega)
shuttle.area_offsite = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/tri_trans2/alpha)
shuttle.area_station = A
break
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.type == /area/shuttle/tri_trans2/away)
shuttle.area_transition = A
break
@@ -216,7 +216,7 @@
//search for the controllers, if we have one.
if(dock_controller_map.len)
- for(var/obj/structure/machinery/embedded_controller/radio/C in machines) //only radio controllers are supported at the moment
+ for(var/obj/structure/machinery/embedded_controller/radio/C in GLOB.machines) //only radio controllers are supported at the moment
if (istype(C.program, /datum/computer/file/embedded_program/docking))
if(dock_controller_map[C.id_tag])
shuttle = dock_controller_map[C.id_tag]
diff --git a/code/controllers/subsystem/cellauto.dm b/code/controllers/subsystem/cellauto.dm
index bcdd9d241ccf..b543ddd43c26 100644
--- a/code/controllers/subsystem/cellauto.dm
+++ b/code/controllers/subsystem/cellauto.dm
@@ -1,4 +1,4 @@
-var/list/cellauto_cells = list()
+GLOBAL_LIST_EMPTY(cellauto_cells)
SUBSYSTEM_DEF(cellauto)
name = "Cellular Automata"
@@ -9,12 +9,12 @@ SUBSYSTEM_DEF(cellauto)
var/list/currentrun = list()
/datum/controller/subsystem/cellauto/stat_entry(msg)
- msg = "C: [cellauto_cells.len]"
+ msg = "C: [GLOB.cellauto_cells.len]"
return ..()
/datum/controller/subsystem/cellauto/fire(resumed = FALSE)
if (!resumed)
- currentrun = cellauto_cells.Copy()
+ currentrun = GLOB.cellauto_cells.Copy()
while(currentrun.len)
var/datum/automata_cell/C = currentrun[currentrun.len]
diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm
index 8458436a53e5..95839b726151 100644
--- a/code/controllers/subsystem/communications.dm
+++ b/code/controllers/subsystem/communications.dm
@@ -66,78 +66,78 @@ Frequency range: 1200 to 1600
Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency, even during mapmaking)
*/
-var/const/MIN_FREE_FREQ = 1201 // -------------------------------------------------
+#define MIN_FREE_FREQ 1201 // -------------------------------------------------
//Misc channels
-var/const/YAUT_FREQ = 1205
-var/const/DUT_FREQ = 1210
-var/const/CMB_FREQ = 1220
-var/const/VAI_FREQ = 1215
-var/const/RMC_FREQ = 1216
+#define YAUT_FREQ 1205
+#define DUT_FREQ 1210
+#define CMB_FREQ 1220
+#define VAI_FREQ 1215
+#define RMC_FREQ 1216
//WY Channels (1230-1249)
-var/const/WY_FREQ = 1231
-var/const/PMC_CMD_FREQ = 1232
-var/const/PMC_FREQ = 1233
-var/const/PMC_ENGI_FREQ = 1234
-var/const/PMC_MED_FREQ = 1235
-var/const/PMC_CCT_FREQ = 1236
-var/const/WY_WO_FREQ = 1239
+#define WY_FREQ 1231
+#define PMC_CMD_FREQ 1232
+#define PMC_FREQ 1233
+#define PMC_ENGI_FREQ 1234
+#define PMC_MED_FREQ 1235
+#define PMC_CCT_FREQ 1236
+#define WY_WO_FREQ 1239
//UPP Channels (1250-1269)
-var/const/UPP_FREQ = 1251
-var/const/UPP_CMD_FREQ = 1252
-var/const/UPP_ENGI_FREQ = 1253
-var/const/UPP_MED_FREQ = 1254
-var/const/UPP_CCT_FREQ = 1255
-var/const/UPP_KDO_FREQ = 1259
+#define UPP_FREQ 1251
+#define UPP_CMD_FREQ 1252
+#define UPP_ENGI_FREQ 1253
+#define UPP_MED_FREQ 1254
+#define UPP_CCT_FREQ 1255
+#define UPP_KDO_FREQ 1259
//CLF Channels (1270-1289)
-var/const/CLF_FREQ = 1271
-var/const/CLF_CMD_FREQ = 1272
-var/const/CLF_ENGI_FREQ = 1273
-var/const/CLF_MED_FREQ = 1274
-var/const/CLF_CCT_FREQ = 1275
+#define CLF_FREQ 1271
+#define CLF_CMD_FREQ 1272
+#define CLF_ENGI_FREQ 1273
+#define CLF_MED_FREQ 1274
+#define CLF_CCT_FREQ 1275
-var/const/MIN_FREQ = 1460 // ------------------------------------------------------
-var/const/PUB_FREQ = 1461
-var/const/MAX_FREQ = 1468 // ------------------------------------------------------
+#define MIN_FREQ 1460 // ------------------------------------------------------
+#define PUB_FREQ 1461
+#define MAX_FREQ 1468 // ------------------------------------------------------
//USCM High Command (USCM 1470-1499)
-var/const/HC_FREQ = 1471
-var/const/SOF_FREQ = 1472
-var/const/PVST_FREQ = 1473
-var/const/CBRN_FREQ = 1474
+#define HC_FREQ 1471
+#define SOF_FREQ 1472
+#define PVST_FREQ 1473
+#define CBRN_FREQ 1474
//Ship department channels
-var/const/SENTRY_FREQ = 1480
-var/const/COMM_FREQ = 1481
-var/const/MED_FREQ = 1482
-var/const/ENG_FREQ = 1483
-var/const/SEC_FREQ = 1484
-var/const/REQ_FREQ = 1485
-var/const/JTAC_FREQ = 1486
-var/const/INTEL_FREQ = 1487
-
-var/const/DS1_FREQ = 1488
-var/const/DS2_FREQ = 1489
+#define SENTRY_FREQ 1480
+#define COMM_FREQ 1481
+#define MED_FREQ 1482
+#define ENG_FREQ 1483
+#define SEC_FREQ 1484
+#define REQ_FREQ 1485
+#define JTAC_FREQ 1486
+#define INTEL_FREQ 1487
+
+#define DS1_FREQ 1488
+#define DS2_FREQ 1489
//Marine Squad channels
-var/const/ALPHA_FREQ = 1491
-var/const/BRAVO_FREQ = 1492
-var/const/CHARLIE_FREQ = 1493
-var/const/DELTA_FREQ = 1494
-var/const/ECHO_FREQ = 1495
-var/const/CRYO_FREQ = 1496
+#define ALPHA_FREQ 1491
+#define BRAVO_FREQ 1492
+#define CHARLIE_FREQ 1493
+#define DELTA_FREQ 1494
+#define ECHO_FREQ 1495
+#define CRYO_FREQ 1496
//Civilian channels
-var/const/COLONY_FREQ = 1469
+#define COLONY_FREQ 1469
-var/const/AI_FREQ = 1500
+#define AI_FREQ 1500
-var/const/MAX_FREE_FREQ = 1599 // -------------------------------------------------
+#define MAX_FREE_FREQ 1599 // -------------------------------------------------
-var/list/radiochannels = list(
+GLOBAL_LIST_INIT(radiochannels, list(
RADIO_CHANNEL_YAUTJA = YAUT_FREQ,
RADIO_CHANNEL_VAI = VAI_FREQ,
RADIO_CHANNEL_CMB = CMB_FREQ,
@@ -191,7 +191,7 @@ var/list/radiochannels = list(
RADIO_CHANNEL_CLF_ENGI = CLF_ENGI_FREQ,
RADIO_CHANNEL_CLF_MED = CLF_MED_FREQ,
RADIO_CHANNEL_CLF_CCT = CLF_CCT_FREQ,
-)
+))
// Response Teams
#define ERT_FREQS list(VAI_FREQ, DUT_FREQ, YAUT_FREQ, CMB_FREQ, RMC_FREQ)
@@ -217,17 +217,17 @@ var/list/radiochannels = list(
//This is done for performance, so we don't send signals to lots of machines unnecessarily.
//This filter is special because devices belonging to default also receive signals sent to any other filter.
-var/const/RADIO_DEFAULT = "radio_default"
-
-var/const/RADIO_TO_AIRALARM = "radio_airalarm" //air alarms
-var/const/RADIO_FROM_AIRALARM = "radio_airalarm_rcvr" //devices interested in receiving signals from air alarms
-var/const/RADIO_CHAT = "radio_telecoms"
-var/const/RADIO_SIGNALS = "radio_signals"
-var/const/RADIO_ATMOSIA = "radio_atmos"
-var/const/RADIO_NAVBEACONS = "radio_navbeacon"
-var/const/RADIO_AIRLOCK = "radio_airlock"
-var/const/RADIO_MULEBOT = "radio_mulebot"
-var/const/RADIO_MAGNETS = "radio_magnet"
+#define RADIO_DEFAULT "radio_default"
+
+#define RADIO_TO_AIRALARM "radio_airalarm" //air alarms
+#define RADIO_FROM_AIRALARM "radio_airalarm_rcvr" //devices interested in receiving signals from air alarms
+#define RADIO_CHAT "radio_telecoms"
+#define RADIO_SIGNALS "radio_signals"
+#define RADIO_ATMOSIA "radio_atmos"
+#define RADIO_NAVBEACONS "radio_navbeacon"
+#define RADIO_AIRLOCK "radio_airlock"
+#define RADIO_MULEBOT "radio_mulebot"
+#define RADIO_MAGNETS "radio_magnet"
//callback used by objects to react to incoming radio signals
/obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
diff --git a/code/controllers/subsystem/fz_transitions.dm b/code/controllers/subsystem/fz_transitions.dm
index fd41ce1ccb55..d12ab1358535 100644
--- a/code/controllers/subsystem/fz_transitions.dm
+++ b/code/controllers/subsystem/fz_transitions.dm
@@ -1,6 +1,6 @@
-var/list/projectors = list()
-var/list/clones = list()
-var/list/clones_t = list()
+GLOBAL_LIST_EMPTY(projectors)
+GLOBAL_LIST_EMPTY(clones)
+GLOBAL_LIST_EMPTY(clones_t)
SUBSYSTEM_DEF(fz_transitions)
name = "Z-Transitions"
@@ -10,18 +10,18 @@ SUBSYSTEM_DEF(fz_transitions)
flags = SS_KEEP_TIMING
/datum/controller/subsystem/fz_transitions/stat_entry(msg)
- msg = "P:[projectors.len]|C:[clones.len]|T:[clones_t.len]"
+ msg = "P:[GLOB.projectors.len]|C:[GLOB.clones.len]|T:[GLOB.clones_t.len]"
return ..()
/datum/controller/subsystem/fz_transitions/Initialize()
for(var/obj/effect/projector/P in world)
- projectors.Add(P)
+ GLOB.projectors.Add(P)
return SS_INIT_SUCCESS
/datum/controller/subsystem/fz_transitions/fire(resumed = FALSE)
- for(var/obj/effect/projector/P in projectors)
+ for(var/obj/effect/projector/P in GLOB.projectors)
if(!P || !P.loc)
- projectors -= P
+ GLOB.projectors -= P
continue
if(!P.loc.clone)
P.loc.create_clone(P.vector_x, P.vector_y)
@@ -36,13 +36,13 @@ SUBSYSTEM_DEF(fz_transitions)
O.clone.proj_y = P.vector_y
- for(var/atom/movable/clone/C in clones)
+ for(var/atom/movable/clone/C in GLOB.clones)
if(C.mstr == null || !istype(C.mstr.loc, /turf))
C.mstr.destroy_clone() //Kill clone if master has been destroyed or picked up
else
if(C != C.mstr)
C.mstr.update_clone() //NOTE: Clone updates are also forced by player movement to reduce latency
- for(var/atom/T in clones_t)
+ for(var/atom/T in GLOB.clones_t)
if(T.clone && T.icon_state) //Just keep the icon updated for explosions etc.
T.clone.icon_state = T.icon_state
diff --git a/code/controllers/subsystem/hijack.dm b/code/controllers/subsystem/hijack.dm
index 55b5aa75caf8..ee3e86e6095e 100644
--- a/code/controllers/subsystem/hijack.dm
+++ b/code/controllers/subsystem/hijack.dm
@@ -216,13 +216,13 @@ SUBSYSTEM_DEF(hijack)
switch(announce)
if(1)
- marine_announcement("Emergency fuel replenishment at 25 percent. Lifeboat emergency early launch now available.[marine_warning_areas ? "\nTo increase speed restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
+ marine_announcement("Emergency fuel replenishment is at 25 percent. Lifeboat emergency early launch is now available.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
if(2)
- marine_announcement("Emergency fuel replenishment at 50 percent.[marine_warning_areas ? "\nTo increase speed restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
+ marine_announcement("Emergency fuel replenishment is at 50 percent.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
if(3)
- marine_announcement("Emergency fuel replenishment at 75 percent.[marine_warning_areas ? "\nTo increase speed restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
+ marine_announcement("Emergency fuel replenishment is at 75 percent.[marine_warning_areas ? "\nTo increase speed, restore power to the following areas: [marine_warning_areas]" : " All fueling areas operational."]", HIJACK_ANNOUNCE)
if(4)
- marine_announcement("Emergency fuel replenishment at 100 percent. Safe utilization of lifeboats now possible.", HIJACK_ANNOUNCE)
+ marine_announcement("Emergency fuel replenishment is at 100 percent. Safe utilization of lifeboats and pods is now possible.", HIJACK_ANNOUNCE)
if(!admin_sd_blocked)
addtimer(CALLBACK(src, PROC_REF(unlock_self_destruct)), 8 SECONDS)
@@ -238,7 +238,7 @@ SUBSYSTEM_DEF(hijack)
return "Complete"
/datum/controller/subsystem/hijack/proc/get_sd_eta()
- if(!sd_time_remaining)
+ if(sd_detonated)
return "Complete"
if(overloaded_generators <= 0)
@@ -254,7 +254,7 @@ SUBSYSTEM_DEF(hijack)
evac_status = EVACUATION_STATUS_INITIATED
ai_announcement("Attention. Emergency. All personnel must evacuate immediately.", 'sound/AI/evacuate.ogg')
- for(var/obj/structure/machinery/status_display/cycled_status_display in machines)
+ for(var/obj/structure/machinery/status_display/cycled_status_display in GLOB.machines)
if(is_mainship_level(cycled_status_display.z))
cycled_status_display.set_picture("evac")
for(var/obj/docking_port/mobile/crashable/escape_shuttle/shuttle in SSshuttle.mobile)
@@ -269,7 +269,7 @@ SUBSYSTEM_DEF(hijack)
deactivate_lifeboats()
ai_announcement("Evacuation has been cancelled.", 'sound/AI/evacuate_cancelled.ogg')
- for(var/obj/structure/machinery/status_display/cycled_status_display in machines)
+ for(var/obj/structure/machinery/status_display/cycled_status_display in GLOB.machines)
if(is_mainship_level(cycled_status_display.z))
cycled_status_display.set_sec_level_picture()
diff --git a/code/controllers/subsystem/influxstats.dm b/code/controllers/subsystem/influxstats.dm
index 01015b83191d..066c94cc2593 100644
--- a/code/controllers/subsystem/influxstats.dm
+++ b/code/controllers/subsystem/influxstats.dm
@@ -104,7 +104,7 @@ SUBSYSTEM_DEF(influxstats)
/datum/controller/subsystem/influxstats/proc/run_job_statistics()
var/list/team_job_stats = list()
- var/list/squad_job_stats = ROLES_SQUAD_ALL.Copy()
+ var/list/squad_job_stats = GLOB.ROLES_SQUAD_ALL.Copy()
for(var/squad in squad_job_stats)
squad_job_stats[squad] = list()
diff --git a/code/controllers/subsystem/init/landmarks.dm b/code/controllers/subsystem/init/landmarks.dm
index 59bba7c7922b..31b71c074a5d 100644
--- a/code/controllers/subsystem/init/landmarks.dm
+++ b/code/controllers/subsystem/init/landmarks.dm
@@ -1,4 +1,4 @@
-var/list/item_pool_landmarks = list()
+GLOBAL_LIST_EMPTY(item_pool_landmarks)
SUBSYSTEM_DEF(landmark_init)
name = "Landmark Init"
@@ -9,7 +9,7 @@ SUBSYSTEM_DEF(landmark_init)
// List of all the datums we need to loop through
var/list/datum/item_pool_holder/pools = list()
- for (var/obj/effect/landmark/item_pool_spawner/L in item_pool_landmarks)
+ for (var/obj/effect/landmark/item_pool_spawner/L in GLOB.item_pool_landmarks)
var/curr_pool_name = L.pool_name
@@ -48,8 +48,8 @@ SUBSYSTEM_DEF(landmark_init)
continue
if (pool.quota > pool.turfs.len)
- log_debug("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [turfs.len] instances of [pool.type_to_spawn] instead. Code: ITEM_POOL_4")
- message_admins("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [turfs.len] instances of [pool.type_to_spawn] instead. Tell the devs. Code: ITEM_POOL_4")
+ log_debug("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [pool.turfs.len] instances of [pool.type_to_spawn] instead. Code: ITEM_POOL_4")
+ message_admins("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [pool.turfs.len] instances of [pool.type_to_spawn] instead. Tell the devs. Code: ITEM_POOL_4")
pool.quota = pool.turfs.len
// Quota times, pick a random turf, spawn an item there, then remove that turf from the list.
diff --git a/code/controllers/subsystem/item_cleanup.dm b/code/controllers/subsystem/item_cleanup.dm
index 35d1fc2859e9..26958eb8742b 100644
--- a/code/controllers/subsystem/item_cleanup.dm
+++ b/code/controllers/subsystem/item_cleanup.dm
@@ -1,4 +1,4 @@
-var/global/list/item_cleanup_list = list()
+GLOBAL_LIST_EMPTY(item_cleanup_list)
SUBSYSTEM_DEF(item_cleanup)
name = "Item Cleanup"
@@ -34,9 +34,9 @@ SUBSYSTEM_DEF(item_cleanup)
break
//We transfer items from the global garbage list onto the next iteration list
- while(!isnull(item_cleanup_list) && item_cleanup_list.len > 0)
- addToListNoDupe(items_to_clean_up, item_cleanup_list[item_cleanup_list.len])
- item_cleanup_list -= item_cleanup_list[item_cleanup_list.len]
+ while(!isnull(GLOB.item_cleanup_list) && GLOB.item_cleanup_list.len > 0)
+ addToListNoDupe(items_to_clean_up, GLOB.item_cleanup_list[GLOB.item_cleanup_list.len])
+ GLOB.item_cleanup_list -= GLOB.item_cleanup_list[GLOB.item_cleanup_list.len]
log_debug("item_cleanup deleted [deleted] garbage out of total [total_items]")
@@ -57,9 +57,9 @@ SUBSYSTEM_DEF(item_cleanup)
qdel(o)
/proc/add_to_garbage(atom/a)
- addToListNoDupe(item_cleanup_list, a)
+ addToListNoDupe(GLOB.item_cleanup_list, a)
/proc/remove_from_garbage(atom/a)
- item_cleanup_list -= a
+ GLOB.item_cleanup_list -= a
if(SSitem_cleanup)
SSitem_cleanup.items_to_clean_up -= a
diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm
index 7f86689874ff..6a0f938475a1 100644
--- a/code/controllers/subsystem/machinery.dm
+++ b/code/controllers/subsystem/machinery.dm
@@ -1,8 +1,8 @@
-var/list/machines = list()
-var/list/processing_machines = list()
+GLOBAL_LIST_EMPTY(machines)
+GLOBAL_LIST_EMPTY(processing_machines)
-var/list/datum/powernet/powernets = list() //Holds all powernet datums in use or pooled
-var/list/datum/powernet/powernets_by_name = list() //Holds all powernet datums in use or pooled
+GLOBAL_LIST_EMPTY(powernets) //Holds all powernet datums in use or pooled
+GLOBAL_LIST_EMPTY(powernets_by_name) //Holds all powernet datums in use or pooled
SUBSYSTEM_DEF(machinery)
@@ -19,12 +19,12 @@ SUBSYSTEM_DEF(machinery)
return SS_INIT_SUCCESS
/datum/controller/subsystem/machinery/stat_entry(msg)
- msg = "M:[global.processing_machines.len]"
+ msg = "M:[GLOB.processing_machines.len]"
return ..()
/datum/controller/subsystem/machinery/fire(resumed = FALSE)
if (!resumed)
- currentrunmachines = processing_machines.Copy()
+ currentrunmachines = GLOB.processing_machines.Copy()
while (currentrunmachines.len)
var/obj/structure/machinery/M = currentrunmachines[currentrunmachines.len]
diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm
index d28fe916291a..64f4b92a1edd 100644
--- a/code/controllers/subsystem/minimap.dm
+++ b/code/controllers/subsystem/minimap.dm
@@ -874,7 +874,7 @@ SUBSYSTEM_DEF(minimaps)
if(faction == FACTION_MARINE)
COOLDOWN_START(GLOB, uscm_canvas_cooldown, canvas_cooldown_time)
var/mob/living/carbon/human/human_leader = user
- for(var/datum/squad/current_squad in RoleAuthority.squads)
+ for(var/datum/squad/current_squad in GLOB.RoleAuthority.squads)
current_squad.send_maptext("Tactical map update in progress...", "Tactical Map:")
human_leader.visible_message(SPAN_BOLDNOTICE("Tactical map update in progress..."))
playsound_client(human_leader.client, "sound/effects/sos-morse-code.ogg")
diff --git a/code/controllers/subsystem/nanoui.dm b/code/controllers/subsystem/nanoui.dm
index 1f33227a7fee..d89474dd50f1 100644
--- a/code/controllers/subsystem/nanoui.dm
+++ b/code/controllers/subsystem/nanoui.dm
@@ -1,10 +1,15 @@
SUBSYSTEM_DEF(nano)
name = "Nano UI"
- flags = SS_NO_INIT
wait = 2 SECONDS
priority = SS_PRIORITY_NANOUI
runlevels = RUNLEVELS_DEFAULT|RUNLEVEL_LOBBY
var/list/currentrun = list()
+ var/datum/nanomanager/nanomanager
+
+/datum/controller/subsystem/nano/New()
+ . = ..()
+
+ nanomanager = new()
/datum/controller/subsystem/nano/stat_entry(msg)
msg = "P:[nanomanager.processing_uis.len]"
diff --git a/code/controllers/subsystem/power.dm b/code/controllers/subsystem/power.dm
index 16f4f2ab6127..9908a60420b2 100644
--- a/code/controllers/subsystem/power.dm
+++ b/code/controllers/subsystem/power.dm
@@ -1,4 +1,4 @@
-var/list/power_machines = list()
+GLOBAL_LIST_EMPTY(power_machines)
SUBSYSTEM_DEF(power)
name = "Power"
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(power)
var/list/currentrun_areas = list()
/datum/controller/subsystem/power/stat_entry(msg)
- msg = "PN:[powernets.len]|PM:[power_machines.len]|A:[active_areas.len]"
+ msg = "PN:[GLOB.powernets.len]|PM:[GLOB.power_machines.len]|A:[GLOB.active_areas.len]"
return ..()
@@ -23,9 +23,9 @@ SUBSYSTEM_DEF(power)
/datum/controller/subsystem/power/fire(resumed = FALSE)
if (!resumed)
- currentrun_powerents = global.powernets.Copy()
- currentrun_areas = active_areas.Copy()
- currentrun_power_machines = global.power_machines.Copy()
+ currentrun_powerents = GLOB.powernets.Copy()
+ currentrun_areas = GLOB.active_areas.Copy()
+ currentrun_power_machines = GLOB.power_machines.Copy()
// First we reset the powernets.
// This is done first because we want the power machinery to have acted last on the powernet between intervals.
@@ -49,7 +49,7 @@ SUBSYSTEM_DEF(power)
var/obj/structure/machinery/M = X
if (M.process() == PROCESS_KILL)
//M.inMachineList = FALSE
- power_machines.Remove(M)
+ GLOB.power_machines.Remove(M)
continue
if (MC_TICK_CHECK)
diff --git a/code/controllers/subsystem/reagents.dm b/code/controllers/subsystem/reagents.dm
index 5a310801b191..187479509385 100644
--- a/code/controllers/subsystem/reagents.dm
+++ b/code/controllers/subsystem/reagents.dm
@@ -17,33 +17,33 @@ SUBSYSTEM_DEF(reagents)
/datum/controller/subsystem/reagents/proc/prepare_properties()
//Chemical Properties - Initialises all /datum/chem_property into a list indexed by property name
var/paths = typesof(/datum/chem_property)
- chemical_properties_list = list()
+ GLOB.chemical_properties_list = list()
//Some filters
- chemical_properties_list["negative"] = list()
- chemical_properties_list["neutral"] = list()
- chemical_properties_list["positive"] = list()
- chemical_properties_list["rare"] = list()
+ GLOB.chemical_properties_list["negative"] = list()
+ GLOB.chemical_properties_list["neutral"] = list()
+ GLOB.chemical_properties_list["positive"] = list()
+ GLOB.chemical_properties_list["rare"] = list()
//Save
for(var/path in paths)
var/datum/chem_property/prop = new path()
if(!prop.name)
continue
- chemical_properties_list[prop.name] = prop
+ GLOB.chemical_properties_list[prop.name] = prop
if(prop.starter)
//Add a separate instance to the chemical property database
var/datum/chem_property/chem = new path()
chem.level = 0
- chemical_data.research_property_data += chem
+ GLOB.chemical_data.research_property_data += chem
if(prop.rarity > PROPERTY_DISABLED)
//Filters for the generator picking properties
if(prop.rarity == PROPERTY_RARE || prop.rarity == PROPERTY_LEGENDARY)
- chemical_properties_list["rare"][prop.name] = prop
+ GLOB.chemical_properties_list["rare"][prop.name] = prop
else if(isNegativeProperty(prop))
- chemical_properties_list["negative"][prop.name] = prop
+ GLOB.chemical_properties_list["negative"][prop.name] = prop
else if(isNeutralProperty(prop))
- chemical_properties_list["neutral"][prop.name] = prop
+ GLOB.chemical_properties_list["neutral"][prop.name] = prop
else if(isPositiveProperty(prop))
- chemical_properties_list["positive"][prop.name] = prop
+ GLOB.chemical_properties_list["positive"][prop.name] = prop
/datum/controller/subsystem/reagents/proc/prepare_reagents()
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
@@ -51,11 +51,11 @@ SUBSYSTEM_DEF(reagents)
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
//Generated chemicals should be initialized last, hence the substract then readd.
var/list/paths = subtypesof(/datum/reagent) - typesof(/datum/reagent/generated) - subtypesof(/datum/reagent/generated) + subtypesof(/datum/reagent/generated)
- chemical_reagents_list = list()
+ GLOB.chemical_reagents_list = list()
for(var/path in paths)
var/datum/reagent/chem = new path()
chem.save_chemclass()
- chemical_reagents_list[chem.id] = chem
+ GLOB.chemical_reagents_list[chem.id] = chem
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
// It is filtered into multiple lists within a list.
@@ -63,11 +63,11 @@ SUBSYSTEM_DEF(reagents)
// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron
var/list/regular_paths = subtypesof(/datum/chemical_reaction) - typesof(/datum/chemical_reaction/generated)
var/list/generated_paths = subtypesof(/datum/chemical_reaction/generated) //Generated chemicals should be initialized last
- chemical_reactions_filtered_list = list()
- chemical_reactions_list = list()
+ GLOB.chemical_reactions_filtered_list = list()
+ GLOB.chemical_reactions_list = list()
for(paths in list(regular_paths, generated_paths))
for(var/path in paths)
var/datum/chemical_reaction/react = new path()
- chemical_reactions_list[react.id] = react
+ GLOB.chemical_reactions_list[react.id] = react
react.add_to_filtered_list()
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index 972f61aa530f..2da87df90995 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -1,11 +1,11 @@
-var/global/datum/controller/shuttle_controller/shuttle_controller
-
SUBSYSTEM_DEF(oldshuttle)
name = "Old Shuttle"
wait = 5.5 SECONDS
init_order = SS_INIT_SHUTTLE
priority = SS_PRIORITY_SHUTTLE
+ var/datum/controller/shuttle_controller/shuttle_controller
+
/datum/controller/subsystem/oldshuttle/Initialize()
if(GLOB.perf_flags & PERF_TOGGLE_SHUTTLES)
can_fire = FALSE
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 88627669aa3b..0153f03565f6 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -97,7 +97,7 @@ SUBSYSTEM_DEF(ticker)
if(!roundend_check_paused && mode.check_finished(force_ending) || force_ending)
current_state = GAME_STATE_FINISHED
- ooc_allowed = TRUE
+ GLOB.ooc_allowed = TRUE
mode.declare_completion(force_ending)
REDIS_PUBLISH("byond.round", "type" = "round-complete")
flash_clients()
@@ -135,8 +135,8 @@ SUBSYSTEM_DEF(ticker)
REDIS_PUBLISH("byond.round", "type" = "round-start")
for(var/client/C in GLOB.admins)
- remove_verb(C, roundstart_mod_verbs)
- admin_verbs_minor_event -= roundstart_mod_verbs
+ remove_verb(C, GLOB.roundstart_mod_verbs)
+ GLOB.admin_verbs_minor_event -= GLOB.roundstart_mod_verbs
return TRUE
@@ -173,14 +173,14 @@ SUBSYSTEM_DEF(ticker)
if(!mode.can_start(bypass_checks))
to_chat(world, "Reverting to pre-game lobby.")
QDEL_NULL(mode)
- RoleAuthority.reset_roles()
+ GLOB.RoleAuthority.reset_roles()
return FALSE
CHECK_TICK
if(!mode.pre_setup() && !bypass_checks)
QDEL_NULL(mode)
to_chat(world, "Error in pre-setup for [GLOB.master_mode]. Reverting to pre-game lobby.")
- RoleAuthority.reset_roles()
+ GLOB.RoleAuthority.reset_roles()
return FALSE
CHECK_TICK
@@ -194,7 +194,7 @@ SUBSYSTEM_DEF(ticker)
if(CONFIG_GET(flag/autooocmute))
- ooc_allowed = FALSE
+ GLOB.ooc_allowed = FALSE
round_start_time = world.time
@@ -213,7 +213,7 @@ SUBSYSTEM_DEF(ticker)
var/roles_to_roll = null
if(length(mode.roles_to_roll))
roles_to_roll = mode.roles_to_roll
- RoleAuthority.setup_candidates_and_roles(roles_to_roll) //Distribute jobs
+ GLOB.RoleAuthority.setup_candidates_and_roles(roles_to_roll) //Distribute jobs
if(mode.flags_round_type & MODE_NEW_SPAWN)
create_characters() // Create and equip characters
else
@@ -235,7 +235,7 @@ SUBSYSTEM_DEF(ticker)
setup_economy()
- shuttle_controller?.setup_shuttle_docks()
+ SSoldshuttle.shuttle_controller?.setup_shuttle_docks()
PostSetup()
return TRUE
@@ -251,15 +251,15 @@ SUBSYSTEM_DEF(ticker)
// Switch back to default automatically
save_mode(CONFIG_GET(string/gamemode_default))
- if(round_statistics)
- to_chat_spaced(world, html = FONT_SIZE_BIG(SPAN_ROLE_BODY("Welcome to [round_statistics.round_name]")))
+ if(GLOB.round_statistics)
+ to_chat_spaced(world, html = FONT_SIZE_BIG(SPAN_ROLE_BODY("Welcome to [GLOB.round_statistics.round_name]")))
- supply_controller.process() //Start the supply shuttle regenerating points -- TLE
+ GLOB.supply_controller.process() //Start the supply shuttle regenerating points -- TLE
for(var/i in GLOB.closet_list) //Set up special equipment for lockers and vendors, depending on gamemode
var/obj/structure/closet/C = i
INVOKE_ASYNC(C, TYPE_PROC_REF(/obj/structure/closet, select_gamemode_equipment), mode.type)
- for(var/obj/structure/machinery/vending/V in machines)
+ for(var/obj/structure/machinery/vending/V in GLOB.machines)
INVOKE_ASYNC(V, TYPE_PROC_REF(/obj/structure/machinery/vending, select_gamemode_equipment), mode.type)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_POST_SETUP)
@@ -376,7 +376,7 @@ SUBSYSTEM_DEF(ticker)
world.Reboot(TRUE)
/datum/controller/subsystem/ticker/proc/create_characters()
- if(!RoleAuthority)
+ if(!GLOB.RoleAuthority)
return
for(var/mob/new_player/player in GLOB.player_list)
@@ -386,7 +386,7 @@ SUBSYSTEM_DEF(ticker)
INVOKE_ASYNC(src, PROC_REF(spawn_and_equip_char), player)
/datum/controller/subsystem/ticker/proc/spawn_and_equip_char(mob/new_player/player)
- var/datum/job/J = RoleAuthority.roles_for_mode[player.job]
+ var/datum/job/J = GLOB.RoleAuthority.roles_for_mode[player.job]
if(J.job_options && player?.client?.prefs?.pref_special_job_options[J.title])
J.handle_job_options(player.client.prefs.pref_special_job_options[J.title])
if(J.handle_spawn_and_equip)
@@ -424,7 +424,7 @@ SUBSYSTEM_DEF(ticker)
if(player.job == JOB_CO)
captainless = FALSE
if(player.job)
- RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], late_join = FALSE)
+ GLOB.RoleAuthority.equip_role(player, GLOB.RoleAuthority.roles_by_name[player.job], late_join = FALSE)
EquipCustomItems(player)
if(player.client)
var/client/C = player.client
diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm
index 325c45fe2300..a3fdfe509a96 100644
--- a/code/controllers/subsystem/weather.dm
+++ b/code/controllers/subsystem/weather.dm
@@ -1,4 +1,4 @@
-var/list/weather_notify_objects = list()
+GLOBAL_LIST_EMPTY(weather_notify_objects)
SUBSYSTEM_DEF(weather)
name = "Weather"
@@ -46,7 +46,7 @@ SUBSYSTEM_DEF(weather)
/datum/controller/subsystem/weather/proc/setup_weather_areas()
weather_areas = list()
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.weather_enabled && map_holder.should_affect_area(A))
weather_areas += A
diff --git a/code/datums/ASRS.dm b/code/datums/ASRS.dm
index 86a7363f07ea..73b0f4e1c6a9 100644
--- a/code/datums/ASRS.dm
+++ b/code/datums/ASRS.dm
@@ -132,3 +132,8 @@
buyable = 0
group = "ASRS"
cost = ASRS_VERY_LOW_WEIGHT
+
+/datum/supply_packs/ingredient/asrs
+ buyable = 0
+ group = "ASRS"
+ cost = ASRS_LOW_WEIGHT
diff --git a/code/datums/_atmos_setup.dm b/code/datums/_atmos_setup.dm
index be4dc62faeff..3075e98ac464 100644
--- a/code/datums/_atmos_setup.dm
+++ b/code/datums/_atmos_setup.dm
@@ -14,18 +14,18 @@
#define PIPE_COLOR_YELLOW "#ffcc00"
#define PIPE_COLOR_PURPLE "#5c1ec0"
-var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)
+GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE))
/proc/pipe_color_lookup(color)
- for(var/C in pipe_colors)
- if(color == pipe_colors[C])
+ for(var/C in GLOB.pipe_colors)
+ if(color == GLOB.pipe_colors[C])
return "[C]"
/proc/pipe_color_check(color)
if(!color)
return 1
- for(var/C in pipe_colors)
- if(color == pipe_colors[C])
+ for(var/C in GLOB.pipe_colors)
+ if(color == GLOB.pipe_colors[C])
return 1
return 0
@@ -89,10 +89,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
var/image/I = image('icons/obj/pipes/pipes.dmi', icon_state = state)
pipe_icons[cache_name] = I
- for(var/pipe_color in pipe_colors)
+ for(var/pipe_color in GLOB.pipe_colors)
I = image('icons/obj/pipes/pipes.dmi', icon_state = state)
- I.color = pipe_colors[pipe_color]
- pipe_icons[state + "[pipe_colors[pipe_color]]"] = I
+ I.color = GLOB.pipe_colors[pipe_color]
+ pipe_icons[state + "[GLOB.pipe_colors[pipe_color]]"] = I
pipe = new ('icons/obj/pipes/heat.dmi')
for(var/state in pipe.IconStates())
@@ -122,10 +122,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
if(findtext(state, "core") || findtext(state, "4way"))
var/image/I = image('icons/obj/pipes/manifold.dmi', icon_state = state)
manifold_icons[state] = I
- for(var/pipe_color in pipe_colors)
+ for(var/pipe_color in GLOB.pipe_colors)
I = image('icons/obj/pipes/manifold.dmi', icon_state = state)
- I.color = pipe_colors[pipe_color]
- manifold_icons[state + pipe_colors[pipe_color]] = I
+ I.color = GLOB.pipe_colors[pipe_color]
+ manifold_icons[state + GLOB.pipe_colors[pipe_color]] = I
/datum/pipe_icon_manager/proc/gen_device_icons()
if(!device_icons)
@@ -170,13 +170,13 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
var/cache_name = state
- for(var/D in cardinal)
+ for(var/D in GLOB.cardinals)
var/image/I = image('icons/obj/pipes/pipe_underlays.dmi', icon_state = state, dir = D)
underlays[cache_name + "[D]"] = I
- for(var/pipe_color in pipe_colors)
+ for(var/pipe_color in GLOB.pipe_colors)
I = image('icons/obj/pipes/pipe_underlays.dmi', icon_state = state, dir = D)
- I.color = pipe_colors[pipe_color]
- underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
+ I.color = GLOB.pipe_colors[pipe_color]
+ underlays[state + "[D]" + "[GLOB.pipe_colors[pipe_color]]"] = I
/*
Leaving the old icon manager code commented out for now, as we may want to rewrite the new code to cleanly
@@ -202,7 +202,7 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
if(state == "")
continue
- for(var/D in cardinal)
+ for(var/D in GLOB.cardinals)
var/image/I = image('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D)
switch(state)
if("intact")
diff --git a/code/datums/_ndatabase/code/interfaces/connection_settings.dm b/code/datums/_ndatabase/code/interfaces/connection_settings.dm
index 4092ee712ba9..0c990b2b9cbc 100644
--- a/code/datums/_ndatabase/code/interfaces/connection_settings.dm
+++ b/code/datums/_ndatabase/code/interfaces/connection_settings.dm
@@ -33,5 +33,3 @@
if(!typestr)
typestr = /datum/db/connection_settings/native
return new typestr(config)
-
-var/global/datum/db/connection_settings/connection_settings
diff --git a/code/datums/_ndatabase/subsystems/database_query_manager.dm b/code/datums/_ndatabase/subsystems/database_query_manager.dm
index 7eef5842e2dd..596d55121920 100644
--- a/code/datums/_ndatabase/subsystems/database_query_manager.dm
+++ b/code/datums/_ndatabase/subsystems/database_query_manager.dm
@@ -19,8 +19,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
-var/datum/controller/subsystem/database_query_manager/SSdatabase
-
+GLOBAL_REAL(SSdatabase, /datum/controller/subsystem/database_query_manager)
/datum/controller/subsystem/database_query_manager
name = "Database QM"
wait = 1
diff --git a/code/datums/_ndatabase/subsystems/entity_manager.dm b/code/datums/_ndatabase/subsystems/entity_manager.dm
index 667f2a855563..833bc6926e09 100644
--- a/code/datums/_ndatabase/subsystems/entity_manager.dm
+++ b/code/datums/_ndatabase/subsystems/entity_manager.dm
@@ -19,7 +19,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
-var/datum/controller/subsystem/entity_manager/SSentity_manager
+GLOBAL_REAL(SSentity_manager, /datum/controller/subsystem/entity_manager)
/datum/controller/subsystem/entity_manager
name = "Entity Manager"
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 47b302e09aac..0510a43415a7 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -187,8 +187,10 @@
I.ui_action_click(owner, holder_item)
/datum/action/item_action/can_use_action()
- if(ishuman(owner) && !owner.is_mob_incapacitated() && !owner.lying)
- return TRUE
+ if(ishuman(owner) && !owner.is_mob_incapacitated())
+ var/mob/living/carbon/human/human = owner
+ if(human.body_position == STANDING_UP)
+ return TRUE
/datum/action/item_action/update_button_icon()
button.overlays.Cut()
diff --git a/code/datums/agents/tools/chloroform.dm b/code/datums/agents/tools/chloroform.dm
index c6e3320688eb..b1c666ac9ec8 100644
--- a/code/datums/agents/tools/chloroform.dm
+++ b/code/datums/agents/tools/chloroform.dm
@@ -50,7 +50,6 @@
ADD_TRAIT(M, TRAIT_IMMOBILIZED, CHLOROFORM_TRAIT)
ADD_TRAIT(M, TRAIT_UNDENSE, CHLOROFORM_TRAIT)
M.able_to_speak = FALSE
- M.update_canmove()
M.drop_inv_item_on_ground(M.wear_mask, force = TRUE)
@@ -79,7 +78,6 @@
/obj/item/weapon/chloroform/proc/remove_stun(mob/living/M)
animate(M, pixel_x = 0, pixel_y = 0, time = 0.2 SECONDS, easing = QUAD_EASING)
M.anchored = FALSE
- M.density = TRUE
M.able_to_speak = TRUE
M.layer = MOB_LAYER
REMOVE_TRAIT(M, TRAIT_IMMOBILIZED, CHLOROFORM_TRAIT)
diff --git a/code/datums/agents/tools/tracker.dm b/code/datums/agents/tools/tracker.dm
index 1d6d6d4801b4..2f3063afb78c 100644
--- a/code/datums/agents/tools/tracker.dm
+++ b/code/datums/agents/tools/tracker.dm
@@ -12,7 +12,7 @@
overlays.Cut()
if(active && tracked_object)
- overlays += icon(icon, "+tracker_arrow", get_dir(src, tracked_object))
+ overlays += icon(icon, "+tracker_arrow", Get_Compass_Dir(src, tracked_object))
/obj/item/device/tracker/attack_self(mob/user)
if(!skillcheckexplicit(user, SKILL_ANTAG, SKILL_ANTAG_AGENT))
@@ -48,12 +48,12 @@
return ..()
/obj/item/device/tracker/proc/select_object(mob/user)
- if(!LAZYLEN(objects_of_interest))
+ if(!LAZYLEN(GLOB.objects_of_interest))
to_chat(user, SPAN_WARNING("There are nothing of interest to track."))
return
var/list/object_choices = list()
- for(var/obj/O in objects_of_interest)
+ for(var/obj/O in GLOB.objects_of_interest)
var/z_level_to_compare_from = O.z
if(istype(O.loc, /obj/structure/surface))
z_level_to_compare_from = O.loc.z
diff --git a/code/datums/ammo/ammo.dm b/code/datums/ammo/ammo.dm
index a858c6b1f5a7..9faaf299669d 100644
--- a/code/datums/ammo/ammo.dm
+++ b/code/datums/ammo/ammo.dm
@@ -138,7 +138,7 @@
/datum/ammo/proc/knockback(mob/living/living_mob, obj/projectile/fired_projectile, max_range = 2)
if(!living_mob || living_mob == fired_projectile.firer)
return
- if(fired_projectile.distance_travelled > max_range || living_mob.lying)
+ if(fired_projectile.distance_travelled > max_range || living_mob.body_position == LYING_DOWN)
return //Two tiles away or more, basically.
if(living_mob.mob_size >= MOB_SIZE_BIG)
@@ -180,8 +180,8 @@
else
living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET)
-/datum/ammo/proc/pushback(mob/target_mob, obj/projectile/fired_projectile, max_range = 2)
- if(!target_mob || target_mob == fired_projectile.firer || fired_projectile.distance_travelled > max_range || target_mob.lying)
+/datum/ammo/proc/pushback(mob/living/target_mob, obj/projectile/fired_projectile, max_range = 2)
+ if(!target_mob || target_mob == fired_projectile.firer || fired_projectile.distance_travelled > max_range || target_mob.body_position == LYING_DOWN)
return
if(target_mob.mob_size >= MOB_SIZE_BIG)
diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm
index 4cedb8b3ee69..77e1e6401472 100644
--- a/code/datums/ammo/bullet/shotgun.dm
+++ b/code/datums/ammo/bullet/shotgun.dm
@@ -334,7 +334,7 @@
if(P.distance_travelled > 8)
knockback(M, P, 12)
- else if(!M || M == P.firer || M.lying) //These checks are included in knockback and would be redundant above.
+ else if(!M || M == P.firer || M.body_position == LYING_DOWN) //These checks are included in knockback and would be redundant above.
return
shake_camera(M, 3, 4)
diff --git a/code/datums/ammo/misc.dm b/code/datums/ammo/misc.dm
index bdb284753dc4..1d04692c0360 100644
--- a/code/datums/ammo/misc.dm
+++ b/code/datums/ammo/misc.dm
@@ -190,7 +190,7 @@
if(P.contents.len == 1)
for(var/obj/item/reagent_container/food/drinks/cans/souto/S in P.contents)
M.put_in_active_hand(S)
- for(var/mob/O in viewers(world_view_size, P)) //find all people in view.
+ for(var/mob/O in viewers(GLOB.world_view_size, P)) //find all people in view.
O.show_message(SPAN_DANGER("[M] catches the [S]!"), SHOW_MESSAGE_VISIBLE) //Tell them the can was caught.
return //Can was caught.
if(ishuman(M))
diff --git a/code/datums/ammo/xeno.dm b/code/datums/ammo/xeno.dm
index 75c78298fe4f..9ecc9ebf9321 100644
--- a/code/datums/ammo/xeno.dm
+++ b/code/datums/ammo/xeno.dm
@@ -49,9 +49,9 @@
if(!isxeno(M))
if(insta_neuro)
- if(M.knocked_down < 3)
+ if(M.GetKnockDownValueNotADurationDoNotUse() < 3) // If they have less than somewhere random between 4 and 6 seconds KD left and assuming it doesnt get refreshed itnernally
M.adjust_effect(1 * power, WEAKEN)
- return
+ return
if(ishuman(M))
M.apply_effect(2.5, SUPERSLOW)
@@ -65,7 +65,7 @@
no_clothes_neuro = TRUE
if(no_clothes_neuro)
- if(M.knocked_down < 5)
+ if(M.GetKnockDownValueNotADurationDoNotUse() < 5) // If they have less than somewhere random between 8 and 10 seconds KD left and assuming it doesnt get refreshed itnernally
M.adjust_effect(1 * power, WEAKEN) // KD them a bit more
M.visible_message(SPAN_DANGER("[M] falls prone."))
@@ -79,7 +79,7 @@
H.visible_message(SPAN_DANGER("[M] shrugs off the neurotoxin!"))
return
- if(M.knocked_down < 0.7) // apply knockdown only if current knockdown is less than 0.7 second
+ if(M.GetKnockDownValueNotADurationDoNotUse() < 0.7) // basically (knocked_down && prob(90))
M.apply_effect(0.7, WEAKEN)
M.visible_message(SPAN_DANGER("[M] falls prone."))
diff --git a/code/datums/autocells/auto_cell.dm b/code/datums/autocells/auto_cell.dm
index accc5f180119..fb679c56676e 100644
--- a/code/datums/autocells/auto_cell.dm
+++ b/code/datums/autocells/auto_cell.dm
@@ -37,7 +37,7 @@
in_turf = T
LAZYADD(in_turf.autocells, src)
- cellauto_cells += src
+ GLOB.cellauto_cells += src
birth()
@@ -48,7 +48,7 @@
LAZYREMOVE(in_turf.autocells, src)
in_turf = null
- cellauto_cells -= src
+ GLOB.cellauto_cells -= src
death()
@@ -88,7 +88,7 @@
// Get cardinal neighbors
if(neighbor_type & NEIGHBORS_CARDINAL)
- for(var/dir in cardinal)
+ for(var/dir in GLOB.cardinals)
var/turf/T = get_step(in_turf, dir)
if(QDELETED(T))
continue
@@ -100,7 +100,7 @@
// Get ordinal/diagonal neighbors
if(neighbor_type & NEIGHBORS_ORDINAL)
- for(var/dir in diagonals)
+ for(var/dir in GLOB.diagonals)
var/turf/T = get_step(in_turf, dir)
if(QDELETED(T))
continue
diff --git a/code/datums/autocells/explosion.dm b/code/datums/autocells/explosion.dm
index 42e1409d595f..970e5618bae3 100644
--- a/code/datums/autocells/explosion.dm
+++ b/code/datums/autocells/explosion.dm
@@ -109,7 +109,7 @@
survivor.power += dying.power
// Two waves travling towards each other weakens the explosion
- if(survivor.direction == reverse_dir[dying.direction])
+ if(survivor.direction == GLOB.reverse_dir[dying.direction])
survivor.power -= dying.power
return is_stronger
@@ -120,11 +120,11 @@
// If the cell is the epicenter, propagate in all directions
if(isnull(direction))
- return alldirs
+ return GLOB.alldirs
- var/dir = reflected ? reverse_dir[direction] : direction
+ var/dir = reflected ? GLOB.reverse_dir[direction] : direction
- if(dir in cardinal)
+ if(dir in GLOB.cardinals)
propagation_dirs += list(dir, turn(dir, 45), turn(dir, -45))
else
propagation_dirs += dir
@@ -180,7 +180,7 @@
for(var/dir in to_spread)
// Diagonals are longer, that should be reflected in the power falloff
var/dir_falloff = 1
- if(dir in diagonals)
+ if(dir in GLOB.diagonals)
dir_falloff = 1.414
if(isnull(direction))
@@ -210,7 +210,7 @@
// Set the direction the explosion is traveling in
E.direction = dir
//Diagonal cells have a small delay when branching off the center. This helps the explosion look circular
- if(!direction && (dir in diagonals))
+ if(!direction && (dir in GLOB.diagonals))
E.delay = 1
setup_new_cell(E)
diff --git a/code/datums/autocells/vomit_wave.dm b/code/datums/autocells/vomit_wave.dm
index 62ea1d4c6e7e..396bf6d3e528 100644
--- a/code/datums/autocells/vomit_wave.dm
+++ b/code/datums/autocells/vomit_wave.dm
@@ -37,7 +37,7 @@
return
// Propagate to cardinal directions
- var/list/to_spread = cardinal.Copy()
+ var/list/to_spread = GLOB.cardinals.Copy()
for(var/datum/automata_cell/vomit_wave/C in neighbors)
to_spread -= get_dir(in_turf, C.in_turf)
diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm
index ef77aaf471dc..6eaaa6e76af5 100644
--- a/code/datums/components/footstep.dm
+++ b/code/datums/components/footstep.dm
@@ -47,7 +47,7 @@
if(!T)
return
var/mob/living/parent_mob = parent
- if(parent_mob.lying && (isfile(drag_sounds) || istext(drag_sounds)))
+ if(parent_mob.body_position == LYING_DOWN && (isfile(drag_sounds) || istext(drag_sounds)))
playsound(T, drag_sounds, volume, rand(20000, 25000), range, falloff = falloff)
else if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, rand(20000, 25000), range, falloff = falloff)
diff --git a/code/datums/components/weed_food.dm b/code/datums/components/weed_food.dm
index 16be8665f55b..648478aa6140 100644
--- a/code/datums/components/weed_food.dm
+++ b/code/datums/components/weed_food.dm
@@ -260,6 +260,7 @@
merged = TRUE
ADD_TRAIT(parent_mob, TRAIT_UNDENSE, XENO_WEED_TRAIT)
+ ADD_TRAIT(parent_mob, TRAIT_MERGED_WITH_WEEDS, XENO_WEED_TRAIT)
parent_mob.anchored = TRUE
parent_mob.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
parent_mob.plane = FLOOR_PLANE
@@ -288,6 +289,7 @@
UnregisterSignal(absorbing_weeds, COMSIG_PARENT_QDELETING)
absorbing_weeds = null
+ REMOVE_TRAIT(parent_mob, TRAIT_MERGED_WITH_WEEDS, XENO_WEED_TRAIT)
parent_mob.anchored = FALSE
parent_mob.mouse_opacity = MOUSE_OPACITY_ICON
parent_mob.plane = GAME_PLANE
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 213a959296fb..02cbc5b2d019 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -8,16 +8,16 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/locked[] = list()
/datum/datacore/proc/get_manifest(monochrome, OOC, nonHTML)
- var/list/cic = ROLES_CIC.Copy()
- var/list/auxil = ROLES_AUXIL_SUPPORT.Copy()
- var/list/misc = ROLES_MISC.Copy()
- var/list/mp = ROLES_POLICE.Copy()
- var/list/eng = ROLES_ENGINEERING.Copy()
- var/list/req = ROLES_REQUISITION.Copy()
- var/list/med = ROLES_MEDICAL.Copy()
- var/list/marines_by_squad = ROLES_SQUAD_ALL.Copy()
+ var/list/cic = GLOB.ROLES_CIC.Copy()
+ var/list/auxil = GLOB.ROLES_AUXIL_SUPPORT.Copy()
+ var/list/misc = GLOB.ROLES_MISC.Copy()
+ var/list/mp = GLOB.ROLES_POLICE.Copy()
+ var/list/eng = GLOB.ROLES_ENGINEERING.Copy()
+ var/list/req = GLOB.ROLES_REQUISITION.Copy()
+ var/list/med = GLOB.ROLES_MEDICAL.Copy()
+ var/list/marines_by_squad = GLOB.ROLES_SQUAD_ALL.Copy()
for(var/squad_name in marines_by_squad)
- marines_by_squad[squad_name] = ROLES_MARINES.Copy()
+ marines_by_squad[squad_name] = GLOB.ROLES_MARINES.Copy()
var/list/isactive = new()
// If we need not the HTML table, but list
@@ -43,7 +43,7 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/has_department = FALSE
for(var/department in departments)
// STOP SIGNING ALL MARINES IN ALPHA!
- if(department in ROLES_SQUAD_ALL)
+ if(department in GLOB.ROLES_SQUAD_ALL)
if(squad != department)
continue
var/list/jobs = departments[department]
@@ -83,7 +83,7 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
// sort mobs
var/dept_flags = NO_FLAGS //Is there anybody in the department?.
- var/list/squad_sublists = ROLES_SQUAD_ALL.Copy() //Are there any marines in the squad?
+ var/list/squad_sublists = GLOB.ROLES_SQUAD_ALL.Copy() //Are there any marines in the squad?
for(var/datum/data/record/t in GLOB.data_core.general)
if(t.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
@@ -107,34 +107,34 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
isactive[name] = t.fields["p_stat"]
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
- if(real_rank in ROLES_CIC)
+ if(real_rank in GLOB.ROLES_CIC)
dept_flags |= FLAG_SHOW_CIC
LAZYSET(cic[real_rank], name, rank)
- else if(real_rank in ROLES_AUXIL_SUPPORT)
+ else if(real_rank in GLOB.ROLES_AUXIL_SUPPORT)
dept_flags |= FLAG_SHOW_AUXIL_SUPPORT
LAZYSET(auxil[real_rank], name, rank)
- else if(real_rank in ROLES_MISC)
+ else if(real_rank in GLOB.ROLES_MISC)
dept_flags |= FLAG_SHOW_MISC
LAZYSET(misc[real_rank], name, rank)
- else if(real_rank in ROLES_POLICE)
+ else if(real_rank in GLOB.ROLES_POLICE)
dept_flags |= FLAG_SHOW_POLICE
LAZYSET(mp[real_rank], name, rank)
- else if(real_rank in ROLES_ENGINEERING)
+ else if(real_rank in GLOB.ROLES_ENGINEERING)
dept_flags |= FLAG_SHOW_ENGINEERING
LAZYSET(eng[real_rank], name, rank)
- else if(real_rank in ROLES_REQUISITION)
+ else if(real_rank in GLOB.ROLES_REQUISITION)
dept_flags |= FLAG_SHOW_REQUISITION
LAZYSET(req[real_rank], name, rank)
- else if(real_rank in ROLES_MEDICAL)
+ else if(real_rank in GLOB.ROLES_MEDICAL)
dept_flags |= FLAG_SHOW_MEDICAL
LAZYSET(med[real_rank], name, rank)
- else if(real_rank in ROLES_MARINES)
+ else if(real_rank in GLOB.ROLES_MARINES)
if(isnull(squad_name))
continue
dept_flags |= FLAG_SHOW_MARINES
squad_sublists[squad_name] = TRUE
///If it is a real squad in the USCM squad list to prevent the crew manifest from breaking
- if(!(squad_name in ROLES_SQUAD_ALL))
+ if(!(squad_name in GLOB.ROLES_SQUAD_ALL))
continue
LAZYSET(marines_by_squad[squad_name][real_rank], name, rank)
@@ -155,7 +155,7 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
even = !even
if(dept_flags & FLAG_SHOW_MARINES)
dat += "
Marines
"
- for(var/squad_name in ROLES_SQUAD_ALL)
+ for(var/squad_name in GLOB.ROLES_SQUAD_ALL)
if(!squad_sublists[squad_name])
continue
dat += "
[squad_name]
"
@@ -205,7 +205,7 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
if(!nosleep)
sleep(40)
- var/list/jobs_to_check = ROLES_CIC + ROLES_AUXIL_SUPPORT + ROLES_MISC + ROLES_POLICE + ROLES_ENGINEERING + ROLES_REQUISITION + ROLES_MEDICAL + ROLES_MARINES
+ var/list/jobs_to_check = GLOB.ROLES_CIC + GLOB.ROLES_AUXIL_SUPPORT + GLOB.ROLES_MISC + GLOB.ROLES_POLICE + GLOB.ROLES_ENGINEERING + GLOB.ROLES_REQUISITION + GLOB.ROLES_MEDICAL + GLOB.ROLES_MARINES
for(var/mob/living/carbon/human/H in GLOB.human_mob_list)
if(is_admin_level(H.z))
continue
diff --git a/code/datums/disease.dm b/code/datums/disease.dm
index d2f466ebeb39..024337c8e065 100644
--- a/code/datums/disease.dm
+++ b/code/datums/disease.dm
@@ -7,7 +7,7 @@ to null does not delete the object itself. Thank you.
*/
-var/list/diseases = typesof(/datum/disease) - /datum/disease
+GLOBAL_LIST_INIT(diseases, typesof(/datum/disease) - /datum/disease)
/datum/disease
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index ad4703ba65fe..d933b81eb620 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -9,15 +9,15 @@
#define RANDOM_STARTING_LEVEL 2
-var/list/archive_diseases = list()
+GLOBAL_LIST_EMPTY(archive_diseases)
// The order goes from easy to cure to hard to cure.
-var/list/advance_cures = list(
+GLOBAL_LIST_INIT(advance_cures, list(
"nutriment", "sugar", "orangejuice",
"spaceacillin", "kelotane", "ethanol",
"leporazine", "lipozine",
"silver", "gold", "phoron"
- )
+ ))
/*
@@ -50,10 +50,10 @@ var/list/advance_cures = list(
/datum/disease/advance/New(process = 1, datum/disease/advance/D)
// Setup our dictionary if it hasn't already.
- if(!dictionary_symptoms.len)
- for(var/symp in list_symptoms)
+ if(!GLOB.dictionary_symptoms.len)
+ for(var/symp in GLOB.list_symptoms)
var/datum/symptom/S = new symp
- dictionary_symptoms[S.id] = symp
+ GLOB.dictionary_symptoms[S.id] = symp
if(!istype(D))
D = null
@@ -142,7 +142,7 @@ var/list/advance_cures = list(
// Generate symptoms. By default, we only choose non-deadly symptoms.
var/list/possible_symptoms = list()
- for(var/symp in list_symptoms)
+ for(var/symp in GLOB.list_symptoms)
var/datum/symptom/S = new symp
if(S.level <= type_level_limit)
if(!HasSymptom(S))
@@ -170,13 +170,13 @@ var/list/advance_cures = list(
var/list/properties = GenerateProperties()
AssignProperties(properties)
- if(!archive_diseases[GetDiseaseID()])
+ if(!GLOB.archive_diseases[GetDiseaseID()])
if(new_name)
AssignName()
- archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
- archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
+ GLOB.archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
+ GLOB.archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
- var/datum/disease/advance/A = archive_diseases[GetDiseaseID()]
+ var/datum/disease/advance/A = GLOB.archive_diseases[GetDiseaseID()]
AssignName(A.name)
//Generate disease properties based on the effects. Returns an associated list.
@@ -254,11 +254,11 @@ var/list/advance_cures = list(
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
/datum/disease/advance/proc/GenerateCure(list/properties = list())
if(properties && properties.len)
- var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
- cure_id = advance_cures[res]
+ var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, GLOB.advance_cures.len)
+ cure_id = GLOB.advance_cures[res]
// Get the cure name from the cure_id
- var/datum/reagent/D = chemical_reagents_list[cure_id]
+ var/datum/reagent/D = GLOB.chemical_reagents_list[cure_id]
cure = D.name
@@ -373,7 +373,7 @@ var/list/advance_cures = list(
var/list/symptoms = list()
symptoms += "Done"
- symptoms += list_symptoms.Copy()
+ symptoms += GLOB.list_symptoms.Copy()
do
var/symptom = tgui_input_list(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
if(istext(symptom))
diff --git a/code/datums/diseases/advance/symptoms/symptoms.dm b/code/datums/diseases/advance/symptoms/symptoms.dm
index 72a132cf517e..7746a03b4f89 100644
--- a/code/datums/diseases/advance/symptoms/symptoms.dm
+++ b/code/datums/diseases/advance/symptoms/symptoms.dm
@@ -1,9 +1,7 @@
// Symptoms are the effects that engineered advanced diseases do.
-var/list/list_symptoms = typesof(/datum/symptom) - /datum/symptom
-var/list/dictionary_symptoms = list()
-
-var/global/const/SYMPTOM_ACTIVATION_PROB = 3
+GLOBAL_LIST_INIT(list_symptoms, typesof(/datum/symptom) - /datum/symptom)
+GLOBAL_LIST_EMPTY(dictionary_symptoms)
/datum/symptom
// Buffs/Debuffs the symptom has to the overall engineered disease.
@@ -18,7 +16,7 @@ var/global/const/SYMPTOM_ACTIVATION_PROB = 3
var/id = ""
/datum/symptom/New()
- var/list/S = list_symptoms
+ var/list/S = GLOB.list_symptoms
for(var/i = 1; i <= S.len; i++)
if(src.type == S[i])
id = "[i]"
diff --git a/code/datums/diseases/advance/symptoms/voice_change.dm b/code/datums/diseases/advance/symptoms/voice_change.dm
index 7547242473db..e5af4a8eaab4 100644
--- a/code/datums/diseases/advance/symptoms/voice_change.dm
+++ b/code/datums/diseases/advance/symptoms/voice_change.dm
@@ -38,10 +38,10 @@ Bonus
var/random_name = ""
switch(H.gender)
if(MALE)
- random_name = pick(first_names_male)
+ random_name = pick(GLOB.first_names_male)
else
- random_name = pick(first_names_female)
- random_name += " [pick(last_names)]"
+ random_name = pick(GLOB.first_names_female)
+ random_name += " [pick(GLOB.last_names)]"
H.SetSpecialVoice(random_name)
return
diff --git a/code/datums/diseases/cold.dm b/code/datums/diseases/cold.dm
index 46cd8952dda1..fd3fbc3a7d2d 100644
--- a/code/datums/diseases/cold.dm
+++ b/code/datums/diseases/cold.dm
@@ -20,7 +20,7 @@
cure()
return
*/
- if(affected_mob.lying && prob(40)) //changed FROM prob(10) until sleeping is fixed
+ if(affected_mob.body_position == LYING_DOWN && prob(40)) //changed FROM prob(10) until sleeping is fixed
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
cure()
return
@@ -43,7 +43,7 @@
cure()
return
*/
- if(affected_mob.lying && prob(25)) //changed FROM prob(5) until sleeping is fixed
+ if(affected_mob.body_position == LYING_DOWN && prob(25)) //changed FROM prob(5) until sleeping is fixed
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
cure()
return
diff --git a/code/datums/diseases/flu.dm b/code/datums/diseases/flu.dm
index f2c029587616..fad0b15228b1 100644
--- a/code/datums/diseases/flu.dm
+++ b/code/datums/diseases/flu.dm
@@ -21,7 +21,7 @@
stage--
return
*/
- if(affected_mob.lying && prob(20)) //added until sleeping is fixed --Blaank
+ if(affected_mob.body_position == LYING_DOWN && prob(20)) //added until sleeping is fixed --Blaank
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
stage--
return
@@ -46,7 +46,7 @@
stage--
return
*/
- if(affected_mob.lying && prob(15)) //added until sleeping is fixed
+ if(affected_mob.body_position == LYING_DOWN && prob(15)) //added until sleeping is fixed
to_chat(affected_mob, SPAN_NOTICE(" You feel better."))
stage--
return
diff --git a/code/datums/effects/tether.dm b/code/datums/effects/tether.dm
index ddaafff46489..1667d901a08a 100644
--- a/code/datums/effects/tether.dm
+++ b/code/datums/effects/tether.dm
@@ -52,7 +52,7 @@
var/turf/T
var/dir_away = get_dir(affected_atom, A)
- for (var/dir in alldirs)
+ for (var/dir in GLOB.alldirs)
if (dir & dir_away)
continue
T = get_step(A, dir)
diff --git a/code/datums/effects/xeno_strains/boiler_trap.dm b/code/datums/effects/xeno_strains/boiler_trap.dm
index 1833b9641a9a..199505379b27 100644
--- a/code/datums/effects/xeno_strains/boiler_trap.dm
+++ b/code/datums/effects/xeno_strains/boiler_trap.dm
@@ -5,16 +5,16 @@
duration = null
flags = INF_DURATION
-/datum/effects/boiler_trap/New(atom/A, mob/from, last_dmg_source, zone)
+/datum/effects/boiler_trap/New(atom/A, mob/living/from, last_dmg_source, zone)
. = ..()
if(!QDELETED(src))
- var/mob/M = affected_atom
- ADD_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
+ var/mob/living/affected_living = affected_atom
+ ADD_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
/datum/effects/boiler_trap/Destroy(force)
if(ismob(affected_atom))
- var/mob/M = affected_atom
- REMOVE_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
+ var/mob/living/affected_living = affected_atom
+ REMOVE_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
return ..()
/datum/effects/boiler_trap/validate_atom(atom/A)
@@ -26,6 +26,6 @@
/datum/effects/boiler_trap/process_mob()
. = ..()
if(!.) return FALSE
- var/mob/M = affected_atom
- ADD_TRAIT(M, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
+ var/mob/living/affected_living = affected_atom
+ ADD_TRAIT(affected_living, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY(effect_name))
return TRUE
diff --git a/code/datums/elements/bullet_trait/incendiary.dm b/code/datums/elements/bullet_trait/incendiary.dm
index 2d5d0a15f368..861e67651a53 100644
--- a/code/datums/elements/bullet_trait/incendiary.dm
+++ b/code/datums/elements/bullet_trait/incendiary.dm
@@ -13,7 +13,7 @@
if(ispath(reagent))
var/datum/reagent/R = reagent
- burn_reagent = chemical_reagents_list[initial(R.id)]
+ burn_reagent = GLOB.chemical_reagents_list[initial(R.id)]
else
burn_reagent = reagent
burn_stacks = stacks
diff --git a/code/datums/elements/mouth_drop_item.dm b/code/datums/elements/mouth_drop_item.dm
index 42c61bd275cc..7a546c6b3933 100644
--- a/code/datums/elements/mouth_drop_item.dm
+++ b/code/datums/elements/mouth_drop_item.dm
@@ -19,9 +19,9 @@
SIGNAL_HANDLER
if(slot == WEAR_FACE)
- I.RegisterSignal(user, COMSIG_MOB_KNOCKED_DOWN, TYPE_PROC_REF(/obj/item, drop_to_floor))
+ I.RegisterSignal(user, COMSIG_LIVING_SET_BODY_POSITION, TYPE_PROC_REF(/obj/item, drop_to_floor))
/datum/element/mouth_drop_item/proc/item_dropped(obj/item/I, mob/living/carbon/human/user)
SIGNAL_HANDLER
- I.UnregisterSignal(user, COMSIG_MOB_KNOCKED_DOWN)
+ I.UnregisterSignal(user, COMSIG_LIVING_SET_BODY_POSITION)
diff --git a/code/datums/emergency_calls/cbrn.dm b/code/datums/emergency_calls/cbrn.dm
index 3a6b1c640632..cee96e10137e 100644
--- a/code/datums/emergency_calls/cbrn.dm
+++ b/code/datums/emergency_calls/cbrn.dm
@@ -55,7 +55,7 @@
max_medics = 0
/datum/emergency_call/cbrn/specialists/New()
- var/cbrn_ship_name = "Unit [pick(nato_phonetic_alphabet)]-[rand(1, 99)]"
+ var/cbrn_ship_name = "Unit [pick(GLOB.nato_phonetic_alphabet)]-[rand(1, 99)]"
arrival_message = "[MAIN_SHIP_NAME], CBRN [cbrn_ship_name] has been dispatched. Follow all orders provided by [cbrn_ship_name]."
objectives = "You are a specialist team in [cbrn_ship_name] dispatched to quell a threat to [MAIN_SHIP_NAME]. Further orders may be provided."
diff --git a/code/datums/emergency_calls/clf.dm b/code/datums/emergency_calls/clf.dm
index 0a5f09e2a2f2..837ecb340dda 100644
--- a/code/datums/emergency_calls/clf.dm
+++ b/code/datums/emergency_calls/clf.dm
@@ -28,7 +28,7 @@
to_chat(H, SPAN_BOLD("The Dust Raiders responded with deadly force, scattering many of the colonists who attempted to fight their occupation."))
to_chat(H, SPAN_BOLD("The Dust Raiders and their flagship, the USS Alistoun eventually withdrew from the sector by the end of the year."))
to_chat(H, SPAN_BOLD("With the Neroid Sector existing in relative isolation from United America oversight for the last five years, many colonists have considered themselves free from governmental rule."))
- to_chat(H, SPAN_BOLD("The year is now [game_year]."))
+ to_chat(H, SPAN_BOLD("The year is now [GLOB.game_year]."))
to_chat(H, SPAN_BOLD("The arrival of the USCM Battalion, the Falling Falcons, and their flagship, the [MAIN_SHIP_NAME], have reaffirmed that the United Americas considers the Neroid Sector part of their holdings."))
to_chat(H, SPAN_BOLD("It is up to you and your fellow colonists to make them realize their trespasses. This sector is no longer theirs."))
@@ -45,7 +45,7 @@
leader = H
to_chat(H, SPAN_ROLE_HEADER("You are a Cell Leader of the local resistance group, the Colonial Liberation Front!"))
arm_equipment(H, /datum/equipment_preset/clf/leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(H, SPAN_ROLE_HEADER("You are a Multi-Purpose Synthetic for the local resistance group, the Colonial Liberation Front!"))
arm_equipment(H, /datum/equipment_preset/clf/synth, TRUE, TRUE)
diff --git a/code/datums/emergency_calls/cmb.dm b/code/datums/emergency_calls/cmb.dm
index a49c0a4ce273..5dba3ee8fc7d 100644
--- a/code/datums/emergency_calls/cmb.dm
+++ b/code/datums/emergency_calls/cmb.dm
@@ -35,7 +35,7 @@
leader = mob
to_chat(mob, SPAN_ROLE_HEADER("You are the Colonial Marshal!"))
arm_equipment(mob, /datum/equipment_preset/cmb/leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(mob?.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(mob?.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(mob, SPAN_ROLE_HEADER("You are a CMB Investigative Synthetic!"))
arm_equipment(mob, /datum/equipment_preset/cmb/synth, TRUE, TRUE)
diff --git a/code/datums/emergency_calls/contractor.dm b/code/datums/emergency_calls/contractor.dm
index a5d6c2d7e80f..0e0c975f0d13 100644
--- a/code/datums/emergency_calls/contractor.dm
+++ b/code/datums/emergency_calls/contractor.dm
@@ -29,7 +29,7 @@
leader = mob
to_chat(mob, SPAN_ROLE_HEADER("You are a Contractor Team Leader of Vanguard's Arrow Incorporated!"))
arm_equipment(mob, /datum/equipment_preset/contractor/duty/leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(mob, SPAN_ROLE_HEADER("You are a Contractor Support Synthetic of Vanguard's Arrow Incorporated!"))
arm_equipment(mob, /datum/equipment_preset/contractor/duty/synth, TRUE, TRUE)
@@ -117,13 +117,13 @@
var/mob/living/carbon/human/H = new(spawn_loc)
H.key = M.key
if(H.client)
- H.client.change_view(world_view_size)
+ H.client.change_view(GLOB.world_view_size)
if(!leader && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job)) //First one spawned is always the leader.
leader = H
to_chat(H, SPAN_ROLE_HEADER("You are a Covert Contractor Team Leader of Vanguard's Arrow Incorporated!"))
arm_equipment(H, /datum/equipment_preset/contractor/covert/leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(H, SPAN_ROLE_HEADER("You are a Contractor Support Synthetic of Vanguard's Arrow Incorporated!"))
arm_equipment(H, /datum/equipment_preset/contractor/covert/synth, TRUE, TRUE)
diff --git a/code/datums/emergency_calls/cryo_marines.dm b/code/datums/emergency_calls/cryo_marines.dm
index 19f73a9843ce..4e997292f74d 100644
--- a/code/datums/emergency_calls/cryo_marines.dm
+++ b/code/datums/emergency_calls/cryo_marines.dm
@@ -14,7 +14,7 @@
spawn_max_amount = TRUE
/datum/emergency_call/cryo_squad/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc)
- var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
+ var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
leaders = cryo_squad.num_leaders
. = ..()
shipwide_ai_announcement("Successfully deployed [mob_max] Foxtrot marines, of which [length(members)] are ready for duty.")
@@ -43,7 +43,7 @@
break
sleep(5)
- var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
+ var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
if(leaders < cryo_squad.max_leaders && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(human.client, JOB_SQUAD_LEADER, time_required_for_job))))
leader = human
leaders++
diff --git a/code/datums/emergency_calls/cryo_marines_heavy.dm b/code/datums/emergency_calls/cryo_marines_heavy.dm
index f4fe3c9f2a57..2081d9564c50 100644
--- a/code/datums/emergency_calls/cryo_marines_heavy.dm
+++ b/code/datums/emergency_calls/cryo_marines_heavy.dm
@@ -17,7 +17,7 @@
var/leaders = 0
/datum/emergency_call/cryo_squad_equipped/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc)
- var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
+ var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
leaders = cryo_squad.num_leaders
. = ..()
if(length(members))
@@ -35,7 +35,7 @@
M.transfer_to(H, TRUE)
sleep(5)
- var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
+ var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
if(leaders < cryo_squad.max_leaders && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = H
leaders++
diff --git a/code/datums/emergency_calls/inspection.dm b/code/datums/emergency_calls/inspection.dm
index ad0200339952..2cd121093ea4 100644
--- a/code/datums/emergency_calls/inspection.dm
+++ b/code/datums/emergency_calls/inspection.dm
@@ -202,7 +202,7 @@
leader = mob
to_chat(mob, SPAN_ROLE_HEADER("You are the Colonial Marshal!"))
arm_equipment(mob, /datum/equipment_preset/cmb/leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(mob?.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(mob?.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(mob, SPAN_ROLE_HEADER("You are a CMB Investigative Synthetic!"))
arm_equipment(mob, /datum/equipment_preset/cmb/synth, TRUE, TRUE)
diff --git a/code/datums/emergency_calls/mercs.dm b/code/datums/emergency_calls/mercs.dm
index 40210c845c6f..67e09e8992f0 100644
--- a/code/datums/emergency_calls/mercs.dm
+++ b/code/datums/emergency_calls/mercs.dm
@@ -11,7 +11,7 @@
/datum/emergency_call/mercs/New()
. = ..()
hostility = pick(75;FALSE,25;TRUE)
- arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(alphabet_lowercase)][pick(alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
+ arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
if(hostility)
objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Captain says. Ensure your survival at all costs."
else
@@ -25,7 +25,7 @@
/datum/emergency_call/mercs/friendly/New()
. = ..()
hostility = FALSE
- arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(alphabet_lowercase)][pick(alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
+ arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
objectives = "Help the crew of the [MAIN_SHIP_NAME] in exchange for payment, and choose your payment well. Do what your Captain says. Ensure your survival at all costs."
/datum/emergency_call/mercs/hostile //ditto
@@ -36,7 +36,7 @@
/datum/emergency_call/mercs/hostile/New()
. = ..()
hostility = TRUE
- arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(alphabet_lowercase)][pick(alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
+ arrival_message = "[MAIN_SHIP_NAME], this is Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Captain says. Ensure your survival at all costs."
/datum/emergency_call/mercs/print_backstory(mob/living/carbon/human/H)
@@ -96,7 +96,7 @@
/datum/emergency_call/heavy_mercs/New()
. = ..()
hostility = pick(75;FALSE,25;TRUE)
- arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(alphabet_lowercase)][pick(alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
+ arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
if(hostility)
objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Captain says. Ensure your survival at all costs."
else
@@ -108,7 +108,7 @@
/datum/emergency_call/heavy_mercs/hostile/New()
. = ..()
hostility = TRUE
- arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(alphabet_lowercase)][pick(alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
+ arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
objectives = "Ransack the [MAIN_SHIP_NAME] and kill anyone who gets in your way. Do what your Captain says. Ensure your survival at all costs."
/datum/emergency_call/heavy_mercs/friendly
@@ -117,7 +117,7 @@
/datum/emergency_call/heavy_mercs/friendly/New()
. = ..()
hostility = FALSE
- arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(alphabet_lowercase)][pick(alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
+ arrival_message = "[MAIN_SHIP_NAME], this is Elite Freelancer shuttle [pick(GLOB.alphabet_lowercase)][pick(GLOB.alphabet_lowercase)]-[rand(1, 99)] responding to your distress call. Prepare for boarding."
objectives = "Help the crew of the [MAIN_SHIP_NAME] in exchange for payment, and choose your payment well. Do what your Captain says. Ensure your survival at all costs."
/datum/emergency_call/heavy_mercs/print_backstory(mob/living/carbon/human/H)
diff --git a/code/datums/emergency_calls/pmc.dm b/code/datums/emergency_calls/pmc.dm
index a06b0cc0c02e..2d21dc768f4a 100644
--- a/code/datums/emergency_calls/pmc.dm
+++ b/code/datums/emergency_calls/pmc.dm
@@ -34,7 +34,7 @@
leader = mob
to_chat(mob, SPAN_ROLE_HEADER("You are a Weyland-Yutani PMC Squad Leader!"))
arm_equipment(mob, /datum/equipment_preset/pmc/pmc_leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[mob.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(mob, SPAN_ROLE_HEADER("You are a Weyland-Yutani PMC Support Synthetic!"))
arm_equipment(mob, /datum/equipment_preset/pmc/synth, TRUE, TRUE)
@@ -120,7 +120,7 @@
var/mob/living/carbon/human/H = new(spawn_loc)
H.key = M.key
if(H.client)
- H.client.change_view(world_view_size)
+ H.client.change_view(GLOB.world_view_size)
if(!leader && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job)) //First one spawned is always the leader.
leader = H
diff --git a/code/datums/emergency_calls/upp.dm b/code/datums/emergency_calls/upp.dm
index 562dac3fe154..80ef111be3e4 100644
--- a/code/datums/emergency_calls/upp.dm
+++ b/code/datums/emergency_calls/upp.dm
@@ -61,7 +61,7 @@
leader = H
arm_equipment(H, /datum/equipment_preset/upp/leader, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are an Officer of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
- else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(H, SPAN_ROLE_HEADER("You are a Combat Synthetic of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
arm_equipment(H, /datum/equipment_preset/upp/synth, TRUE, TRUE)
diff --git a/code/datums/emergency_calls/whiskey_outpost.dm b/code/datums/emergency_calls/whiskey_outpost.dm
index 436e02007c6c..5c46ace04d6c 100644
--- a/code/datums/emergency_calls/whiskey_outpost.dm
+++ b/code/datums/emergency_calls/whiskey_outpost.dm
@@ -51,7 +51,7 @@
sleep(10)
to_chat(mob, "Objectives: [objectives]")
- RoleAuthority.randomize_squad(mob)
+ GLOB.RoleAuthority.randomize_squad(mob)
mob.sec_hud_set_ID()
mob.hud_set_squad()
diff --git a/code/datums/emergency_calls/xeno_cultists.dm b/code/datums/emergency_calls/xeno_cultists.dm
index e5ebf089a9c2..5da5c9c17e59 100644
--- a/code/datums/emergency_calls/xeno_cultists.dm
+++ b/code/datums/emergency_calls/xeno_cultists.dm
@@ -25,7 +25,7 @@
leader = H
to_chat(H, SPAN_ROLE_HEADER("You are the leader of this xeno cult! Bring glory to Queen Mother!"))
arm_equipment(H, /datum/equipment_preset/other/xeno_cultist/leader, TRUE, TRUE)
- else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
+ else if(synths < max_synths && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SYNTH) && GLOB.RoleAuthority.roles_whitelist[H.ckey] & WHITELIST_SYNTHETIC)
synths++
to_chat(H, SPAN_ROLE_HEADER("You are the xeno cult's synthetic! Tend to the Hive and the captured hosts, make sure the Hive grows!"))
arm_equipment(H, /datum/equipment_preset/synth/survivor/cultist_synth, TRUE, TRUE)
diff --git a/code/datums/entities/clans.dm b/code/datums/entities/clans.dm
index 8caa538e0e31..916afd18c178 100644
--- a/code/datums/entities/clans.dm
+++ b/code/datums/entities/clans.dm
@@ -45,8 +45,8 @@ BSQL_PROTECT_DATUM(/datum/entity/clan)
/datum/entity_meta/clan_player/on_insert(datum/entity/clan_player/player)
player.honor = 0
- player.clan_rank = clan_ranks_ordered[CLAN_RANK_UNBLOODED]
- player.permissions = clan_ranks[CLAN_RANK_UNBLOODED].permissions
+ player.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_UNBLOODED]
+ player.permissions = GLOB.clan_ranks[CLAN_RANK_UNBLOODED].permissions
player.save()
diff --git a/code/datums/entities/player.dm b/code/datums/entities/player.dm
index febeb1fc73a9..e5fa811002a2 100644
--- a/code/datums/entities/player.dm
+++ b/code/datums/entities/player.dm
@@ -93,7 +93,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
notes_add(ckey, note_text, admin.mob)
else
// notes_add already sends a message
- message_admins("[key_name_admin(admin.mob)] has edited [ckey]'s [note_categories[note_category]] notes: [sanitize(note_text)]")
+ message_admins("[key_name_admin(admin.mob)] has edited [ckey]'s [GLOB.note_categories[note_category]] notes: [sanitize(note_text)]")
if(!is_confidential && note_category == NOTE_ADMIN && owning_client)
to_chat_immediate(owning_client, SPAN_WARNING(FONT_SIZE_LARGE("You have been noted by [key_name_admin(admin.mob, FALSE)].")))
to_chat_immediate(owning_client, SPAN_WARNING(FONT_SIZE_BIG("The note is : [sanitize(note_text)]")))
@@ -235,7 +235,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
if(job_bans[safe_rank])
continue
var/old_rank = check_jobban_path(safe_rank)
- jobban_keylist[old_rank][ckey] = ban_text
+ GLOB.jobban_keylist[old_rank][ckey] = ban_text
jobban_savebanfile()
add_note("Banned from [total_rank] - [ban_text]", FALSE, NOTE_ADMIN, TRUE, duration) // it is ban related note
@@ -570,33 +570,33 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
save()
/datum/entity/player/proc/migrate_bans()
- if(!Banlist) // if Banlist cannot be located for some reason
+ if(!GLOB.Banlist) // if GLOB.Banlist cannot be located for some reason
LoadBans() // try to load the bans
- if(!Banlist) // uh oh, can't find bans!
+ if(!GLOB.Banlist) // uh oh, can't find bans!
return
var/reason
var/expiration
var/banned_by
- Banlist.cd = "/base"
+ GLOB.Banlist.cd = "/base"
- for (var/A in Banlist.dir)
- Banlist.cd = "/base/[A]"
+ for (var/A in GLOB.Banlist.dir)
+ GLOB.Banlist.cd = "/base/[A]"
- if(ckey != Banlist["key"])
+ if(ckey != GLOB.Banlist["key"])
continue
- if(Banlist["temp"])
- if (!GetExp(Banlist["minutes"]))
+ if(GLOB.Banlist["temp"])
+ if (!GetExp(GLOB.Banlist["minutes"]))
return
- if(expiration > Banlist["minutes"])
+ if(expiration > GLOB.Banlist["minutes"])
return // found longer ban
- reason = Banlist["reason"]
- banned_by = Banlist["bannedby"]
- expiration = Banlist["minutes"]
+ reason = GLOB.Banlist["reason"]
+ banned_by = GLOB.Banlist["bannedby"]
+ expiration = GLOB.Banlist["minutes"]
migrated_bans = TRUE
save()
@@ -619,13 +619,13 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
/datum/entity/player/proc/migrate_jobbans()
if(!job_bans)
job_bans = list()
- for(var/name in RoleAuthority.roles_for_mode)
+ for(var/name in GLOB.RoleAuthority.roles_for_mode)
var/safe_job_name = ckey(name)
- if(!jobban_keylist[safe_job_name])
+ if(!GLOB.jobban_keylist[safe_job_name])
continue
if(!safe_job_name)
continue
- var/reason = jobban_keylist[safe_job_name][ckey]
+ var/reason = GLOB.jobban_keylist[safe_job_name][ckey]
if(!reason)
continue
diff --git a/code/datums/entities/player_times.dm b/code/datums/entities/player_times.dm
index a6304bd5d874..2bbd4a3bc39e 100644
--- a/code/datums/entities/player_times.dm
+++ b/code/datums/entities/player_times.dm
@@ -84,7 +84,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_time)
return GLOB.always_state
/datum/entity/player/proc/load_timestat_data()
- if(!playtime_loaded || !RoleAuthority || LAZYACCESS(playtime_data, "loading")) // Need roleauthority to be up to see which job is xeno-related
+ if(!playtime_loaded || !GLOB.RoleAuthority || LAZYACCESS(playtime_data, "loading")) // Need roleauthority to be up to see which job is xeno-related
return
LAZYSET(playtime_data, "loading", TRUE)
@@ -118,13 +118,13 @@ BSQL_PROTECT_DATUM(/datum/entity/player_time)
LAZYADD(marine_playtimes, list(marine_playtime))
for(var/datum/view_record/playtime/PT in PTs)
- var/isxeno = (PT.role_id in RoleAuthority.castes_by_name)
+ var/isxeno = (PT.role_id in GLOB.RoleAuthority.castes_by_name)
var/isOther = (PT.role_id == JOB_OBSERVER) // more maybe eventually
if(PT.role_id == JOB_XENOMORPH)
continue // Snowflake check, will need to be removed in the future
- if(!(PT.role_id in RoleAuthority.roles_by_name) && !isxeno && !isOther)
+ if(!(PT.role_id in GLOB.RoleAuthority.roles_by_name) && !isxeno && !isOther)
continue
if(isxeno)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 9e8279a843a4..205032f46a97 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -48,7 +48,7 @@
if(current)
current.mind = null //remove ourself from our old body's mind variable
- nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
+ SSnano.nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
if(key)
if(new_character.key != key)
@@ -68,7 +68,7 @@
SSround_recording.recorder.update_key(new_character)
if(new_character.client)
new_character.client.init_verbs()
- new_character.client.change_view(world_view_size) //reset view range to default.
+ new_character.client.change_view(GLOB.world_view_size) //reset view range to default.
new_character.client.pixel_x = 0
new_character.client.pixel_y = 0
if(usr && usr.open_uis)
diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm
index ff1263510761..e4ec3acc1410 100644
--- a/code/datums/mob_hud.dm
+++ b/code/datums/mob_hud.dm
@@ -1,7 +1,7 @@
/* HUD DATUMS */
//GLOBAL HUD LIST
-var/list/datum/mob_hud/huds = list(
+GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
MOB_HUD_SECURITY_BASIC = new /datum/mob_hud/security/basic(),
MOB_HUD_SECURITY_ADVANCED = new /datum/mob_hud/security/advanced(),
MOB_HUD_MEDICAL_BASIC = new /datum/mob_hud/medical/basic(),
@@ -19,7 +19,7 @@ var/list/datum/mob_hud/huds = list(
MOB_HUD_FACTION_PMC = new /datum/mob_hud/faction/pmc(),
MOB_HUD_HUNTER = new /datum/mob_hud/hunter_hud(),
MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan()
- )
+ ))
/datum/mob_hud
var/list/mob/hudmobs = list() //list of all mobs which display this hud
@@ -220,17 +220,17 @@ var/list/datum/mob_hud/huds = list(
return
/mob/hologram/queen/add_to_all_mob_huds()
- var/datum/mob_hud/hud = huds[MOB_HUD_XENO_STATUS]
+ var/datum/mob_hud/hud = GLOB.huds[MOB_HUD_XENO_STATUS]
hud.add_to_hud(src)
/mob/living/carbon/human/add_to_all_mob_huds()
- for(var/datum/mob_hud/hud in huds)
+ for(var/datum/mob_hud/hud in GLOB.huds)
if(istype(hud, /datum/mob_hud/xeno)) //this one is xeno only
continue
hud.add_to_hud(src)
/mob/living/carbon/xenomorph/add_to_all_mob_huds()
- for(var/datum/mob_hud/hud in huds)
+ for(var/datum/mob_hud/hud in GLOB.huds)
if(!istype(hud, /datum/mob_hud/xeno))
continue
hud.add_to_hud(src)
@@ -240,17 +240,17 @@ var/list/datum/mob_hud/huds = list(
return
/mob/hologram/queen/remove_from_all_mob_huds()
- var/datum/mob_hud/hud = huds[MOB_HUD_XENO_STATUS]
+ var/datum/mob_hud/hud = GLOB.huds[MOB_HUD_XENO_STATUS]
hud.remove_from_hud(src)
/mob/living/carbon/human/remove_from_all_mob_huds()
- for(var/datum/mob_hud/hud in huds)
+ for(var/datum/mob_hud/hud in GLOB.huds)
if(istype(hud, /datum/mob_hud/xeno))
continue
hud.remove_from_hud(src)
/mob/living/carbon/xenomorph/remove_from_all_mob_huds()
- for(var/datum/mob_hud/hud in huds)
+ for(var/datum/mob_hud/hud in GLOB.huds)
if(istype(hud, /datum/mob_hud/xeno))
hud.remove_from_hud(src)
hud.remove_hud_from(src, src)
@@ -258,14 +258,14 @@ var/list/datum/mob_hud/huds = list(
hud.remove_hud_from(src, src)
if (xeno_hostile_hud)
xeno_hostile_hud = FALSE
- var/datum/mob_hud/hostile_hud = huds[MOB_HUD_XENO_HOSTILE]
+ var/datum/mob_hud/hostile_hud = GLOB.huds[MOB_HUD_XENO_HOSTILE]
hostile_hud.remove_hud_from(src, src)
/mob/proc/refresh_huds(mob/source_mob)
var/mob/M = source_mob ? source_mob : src
- for(var/datum/mob_hud/hud in huds)
+ for(var/datum/mob_hud/hud in GLOB.huds)
if(M in hud.hudusers)
hud.refresh_hud(src, hud.hudusers[M])
@@ -273,7 +273,7 @@ var/list/datum/mob_hud/huds = list(
//called when a human changes suit sensors
/mob/living/carbon/human/proc/update_suit_sensors()
- var/datum/mob_hud/medical/basic/B = huds[MOB_HUD_MEDICAL_BASIC]
+ var/datum/mob_hud/medical/basic/B = GLOB.huds[MOB_HUD_MEDICAL_BASIC]
B.update_suit_sensors(src)
//called when a human changes health
@@ -672,11 +672,11 @@ var/list/datum/mob_hud/huds = list(
/mob/proc/hud_set_hunter()
return
-var/global/image/hud_icon_hunter_gear
-var/global/image/hud_icon_hunter_hunted
-var/global/image/hud_icon_hunter_dishonored
-var/global/image/hud_icon_hunter_honored
-var/global/image/hud_icon_hunter_thralled
+GLOBAL_DATUM(hud_icon_hunter_gear, /image)
+GLOBAL_DATUM(hud_icon_hunter_hunted, /image)
+GLOBAL_DATUM(hud_icon_hunter_dishonored, /image)
+GLOBAL_DATUM(hud_icon_hunter_honored, /image)
+GLOBAL_DATUM(hud_icon_hunter_thralled, /image)
/mob/living/carbon/hud_set_hunter()
@@ -684,27 +684,27 @@ var/global/image/hud_icon_hunter_thralled
holder.icon_state = "hudblank"
holder.overlays.Cut()
if(hunter_data.hunted)
- if(!hud_icon_hunter_hunted)
- hud_icon_hunter_hunted = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_hunted")
- holder.overlays += hud_icon_hunter_hunted
+ if(!GLOB.hud_icon_hunter_hunted)
+ GLOB.hud_icon_hunter_hunted = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_hunted")
+ holder.overlays += GLOB.hud_icon_hunter_hunted
if(hunter_data.dishonored)
- if(!hud_icon_hunter_dishonored)
- hud_icon_hunter_dishonored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_dishonored")
- holder.overlays += hud_icon_hunter_dishonored
+ if(!GLOB.hud_icon_hunter_dishonored)
+ GLOB.hud_icon_hunter_dishonored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_dishonored")
+ holder.overlays += GLOB.hud_icon_hunter_dishonored
else if(hunter_data.honored)
- if(!hud_icon_hunter_honored)
- hud_icon_hunter_honored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_honored")
- holder.overlays += hud_icon_hunter_honored
+ if(!GLOB.hud_icon_hunter_honored)
+ GLOB.hud_icon_hunter_honored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_honored")
+ holder.overlays += GLOB.hud_icon_hunter_honored
if(hunter_data.thralled)
- if(!hud_icon_hunter_thralled)
- hud_icon_hunter_thralled = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_thralled")
- holder.overlays += hud_icon_hunter_thralled
+ if(!GLOB.hud_icon_hunter_thralled)
+ GLOB.hud_icon_hunter_thralled = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_thralled")
+ holder.overlays += GLOB.hud_icon_hunter_thralled
else if(hunter_data.gear)
- if(!hud_icon_hunter_gear)
- hud_icon_hunter_gear = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_gear")
- holder.overlays += hud_icon_hunter_gear
+ if(!GLOB.hud_icon_hunter_gear)
+ GLOB.hud_icon_hunter_gear = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_gear")
+ holder.overlays += GLOB.hud_icon_hunter_gear
hud_list[HUNTER_HUD] = holder
@@ -714,18 +714,18 @@ var/global/image/hud_icon_hunter_thralled
holder.overlays.Cut()
holder.pixel_x = -18
if(hunter_data.hunted)
- if(!hud_icon_hunter_hunted)
- hud_icon_hunter_hunted = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_hunted")
- holder.overlays += hud_icon_hunter_hunted
+ if(!GLOB.hud_icon_hunter_hunted)
+ GLOB.hud_icon_hunter_hunted = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_hunted")
+ holder.overlays += GLOB.hud_icon_hunter_hunted
if(hunter_data.dishonored)
- if(!hud_icon_hunter_dishonored)
- hud_icon_hunter_dishonored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_dishonored")
- holder.overlays += hud_icon_hunter_dishonored
+ if(!GLOB.hud_icon_hunter_dishonored)
+ GLOB.hud_icon_hunter_dishonored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_dishonored")
+ holder.overlays += GLOB.hud_icon_hunter_dishonored
else if(hunter_data.honored)
- if(!hud_icon_hunter_honored)
- hud_icon_hunter_honored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_honored")
- holder.overlays += hud_icon_hunter_honored
+ if(!GLOB.hud_icon_hunter_honored)
+ GLOB.hud_icon_hunter_honored = image('icons/mob/hud/hud_yautja.dmi', src, "hunter_honored")
+ holder.overlays += GLOB.hud_icon_hunter_honored
hud_list[HUNTER_HUD] = holder
@@ -733,26 +733,26 @@ var/global/image/hud_icon_hunter_thralled
/mob/proc/hud_set_order()
return
-var/global/image/hud_icon_hudmove
-var/global/image/hud_icon_hudhold
-var/global/image/hud_icon_hudfocus
+GLOBAL_DATUM(hud_icon_hudmove, /image)
+GLOBAL_DATUM(hud_icon_hudhold, /image)
+GLOBAL_DATUM(hud_icon_hudfocus, /image)
// ORDER HUD
/mob/living/carbon/human/hud_set_order()
var/image/holder = hud_list[ORDER_HUD]
holder.icon_state = "hudblank"
holder.overlays.Cut()
if(mobility_aura)
- if(!hud_icon_hudmove)
- hud_icon_hudmove = image('icons/mob/hud/marine_hud.dmi', src, "hudmove")
- holder.overlays += hud_icon_hudmove
+ if(!GLOB.hud_icon_hudmove)
+ GLOB.hud_icon_hudmove = image('icons/mob/hud/marine_hud.dmi', src, "hudmove")
+ holder.overlays += GLOB.hud_icon_hudmove
if(protection_aura)
- if(!hud_icon_hudhold)
- hud_icon_hudhold = image('icons/mob/hud/marine_hud.dmi', src, "hudhold")
- holder.overlays += hud_icon_hudhold
+ if(!GLOB.hud_icon_hudhold)
+ GLOB.hud_icon_hudhold = image('icons/mob/hud/marine_hud.dmi', src, "hudhold")
+ holder.overlays += GLOB.hud_icon_hudhold
if(marksman_aura)
- if(!hud_icon_hudfocus)
- hud_icon_hudfocus = image('icons/mob/hud/marine_hud.dmi', src, "hudfocus")
- holder.overlays += hud_icon_hudfocus
+ if(!GLOB.hud_icon_hudfocus)
+ GLOB.hud_icon_hudfocus = image('icons/mob/hud/marine_hud.dmi', src, "hudfocus")
+ holder.overlays += GLOB.hud_icon_hudfocus
hud_list[ORDER_HUD] = holder
@@ -803,8 +803,6 @@ var/global/image/hud_icon_hudfocus
if (tag_found)
tag_holder.overlays += image('icons/mob/hud/hud.dmi', src, "prae_tag")
- // Hacky, but works. Currently effects are hard to make with precise timings
- var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && !buckled && !lying
-
+ var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && body_position == STANDING_UP && !buckled // Eligible targets are unable to move but can stand and aren't buckled (eg nested) - This is to convey that they are temporarily unable to move
if (freeze_found)
freeze_holder.overlays += image('icons/mob/hud/hud.dmi', src, "xeno_freeze")
diff --git a/code/datums/modules.dm b/code/datums/modules.dm
deleted file mode 100644
index 4dd47497ffcc..000000000000
--- a/code/datums/modules.dm
+++ /dev/null
@@ -1,62 +0,0 @@
-// module datum.
-// this is per-object instance, and shows the condition of the modules in the object
-// actual modules needed is referenced through modulestypes and the object type
-
-/datum/module
- var/status // bits set if working, 0 if broken
- var/installed // bits set if installed, 0 if missing
-
-// moduletypes datum
-// this is per-object type, and shows the modules needed for a type of object
-
-/datum/moduletypes
- var/list/modcount = list() // assoc list of the count of modules for a type
-
-
-var/list/modules = list( // global associative list
- /obj/structure/machinery/power/apc = "card_reader,power_control,id_auth,cell_power,cell_charge")
-
-
-/datum/module/New(obj/O)
-
- var/type = O.type // the type of the creating object
-
- var/mneed = mods.inmodlist(type) // find if this type has modules defined
-
- if(!mneed) // not found in module list?
- qdel(src) // delete self, thus ending proc
-
- var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object
- status = needed
- installed = needed
-
-/datum/moduletypes/proc/addmod(type, modtextlist)
- modules += type // index by type text
- modules[type] = modtextlist
-
-/datum/moduletypes/proc/inmodlist(type)
- return type in modules
-
-/datum/moduletypes/proc/getbitmask(type)
- var/count = modcount[type]
- if(count)
- return 2**count-1
-
- var/modtext = modules[type]
- var/num = 1
- var/pos = 1
-
- while(1)
- pos = findtext(modtext, ",", pos, 0)
- if(!pos)
- break
- else
- pos++
- num++
-
- modcount += type
- modcount[type] = num
-
- return 2**num-1
-
-
diff --git a/code/datums/origin/origin.dm b/code/datums/origin/origin.dm
index 4bbd8b6505b5..46027a49941a 100644
--- a/code/datums/origin/origin.dm
+++ b/code/datums/origin/origin.dm
@@ -3,7 +3,7 @@
var/desc = "You were born somewhere, someplace. The area is known for doing things, you think."
/datum/origin/proc/generate_human_name(gender = MALE)
- return pick(gender == MALE ? first_names_male : first_names_female) + " " + pick(last_names)
+ return pick(gender == MALE ? GLOB.first_names_male : GLOB.first_names_female) + " " + pick(GLOB.last_names)
/// Return null if the name is correct, otherwise return a string containing the error message
/datum/origin/proc/validate_name(name_to_check)
diff --git a/code/datums/origin/upp.dm b/code/datums/origin/upp.dm
index f684410d59bf..8346657c5020 100644
--- a/code/datums/origin/upp.dm
+++ b/code/datums/origin/upp.dm
@@ -10,16 +10,16 @@
if(prob(40))
first_name = "[capitalize(randomly_generate_chinese_word(1))]"
else
- first_name = "[pick(first_names_male_upp)]"
+ first_name = "[pick(GLOB.first_names_male_upp)]"
else
if(prob(40))
first_name = "[capitalize(randomly_generate_chinese_word(1))]"
else
- first_name = "[pick(first_names_female_upp)]"
+ first_name = "[pick(GLOB.first_names_female_upp)]"
if(prob(35))
last_name = "[capitalize(randomly_generate_chinese_word(pick(20;1, 80;2)))]"
else
- last_name = "[pick(last_names_upp)]"
+ last_name = "[pick(GLOB.last_names_upp)]"
return first_name + " " + last_name
diff --git a/code/datums/origin/uscm.dm b/code/datums/origin/uscm.dm
index 8021ed3fd3a8..9608537bdf3f 100644
--- a/code/datums/origin/uscm.dm
+++ b/code/datums/origin/uscm.dm
@@ -28,7 +28,7 @@
desc = "You were a product of an experimental military programme that sought to breed the perfect supersoldier. In some aspects, they've succeeded."
/datum/origin/uscm/aw/generate_human_name(gender = MALE)
- return pick(gender == MALE ? first_names_male : first_names_female) + " A.W. " + pick(weapon_surnames)
+ return pick(gender == MALE ? GLOB.first_names_male : GLOB.first_names_female) + " A.W. " + pick(GLOB.weapon_surnames)
/datum/origin/uscm/aw/validate_name(name_to_check)
if(!findtext(name_to_check, "A.W. "))
diff --git a/code/datums/soundOutput.dm b/code/datums/soundOutput.dm
index bc5ffd8efcfb..1f4512b28d59 100644
--- a/code/datums/soundOutput.dm
+++ b/code/datums/soundOutput.dm
@@ -152,11 +152,6 @@
adjust_volume_prefs(VOLUME_AMB, "Set the volume for ambience and soundscapes", 0)
soundOutput.update_ambience(null, null, TRUE)
-/client/verb/adjust_volume_admin_music()
- set name = "Adjust Volume Admin MIDIs"
- set category = "Preferences.Sound"
- adjust_volume_prefs(VOLUME_ADM, "Set the volume for admin MIDIs", SOUND_CHANNEL_ADMIN_MIDI)
-
/client/verb/adjust_volume_lobby_music()
set name = "Adjust Volume LobbyMusic"
set category = "Preferences.Sound"
diff --git a/code/datums/statistics/entities/death_stats.dm b/code/datums/statistics/entities/death_stats.dm
index 35ff1769b925..76e3605c157f 100644
--- a/code/datums/statistics/entities/death_stats.dm
+++ b/code/datums/statistics/entities/death_stats.dm
@@ -133,8 +133,8 @@
new_death.total_damage_taken = life_damage_taken_total
new_death.total_revives_done = life_revives_total
- if(round_statistics)
- round_statistics.track_death(new_death)
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.track_death(new_death)
new_death.save()
new_death.detach()
diff --git a/code/datums/statistics/entities/human_stats.dm b/code/datums/statistics/entities/human_stats.dm
index 1e15aa1d161b..20d5a284becd 100644
--- a/code/datums/statistics/entities/human_stats.dm
+++ b/code/datums/statistics/entities/human_stats.dm
@@ -22,7 +22,7 @@
return ..()
if(type == "Squad Roles")
var/total_squad_time = 0
- for(var/squad_type in job_squad_roles)
+ for(var/squad_type in GLOB.job_squad_roles)
var/datum/entity/player_stats/job/squad_stat = job_stats_list["[squad_type]"]
if(!squad_stat) // Have not played the squad role yet
continue
@@ -30,7 +30,7 @@
return total_squad_time
else if(type == "CIC Roles")
var/total_command_time = 0
- for(var/command_type in job_command_roles)
+ for(var/command_type in GLOB.job_command_roles)
var/datum/entity/player_stats/job/command_stat = job_stats_list["[command_type]"]
if(!command_stat) // Have not played the command role yet
continue
@@ -122,15 +122,15 @@
S.total_rounds_played++
S.round_played = TRUE
S.total_playtime += time
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_playtime += time
/datum/entity/player_stats/human/count_personal_death(job)
var/datum/entity/player_stats/job/S = setup_job_stats(job)
S.total_deaths++
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_deaths++
//******************
@@ -140,27 +140,27 @@
/datum/entity/player_stats/human/count_personal_human_kill(job_name, cause, job)
var/datum/entity/player_stats/job/S = setup_job_stats(job)
S.count_human_kill(job_name, cause)
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.count_human_kill(job_name, cause)
if(cause)
var/datum/entity/weapon_stats/W = setup_weapon_stats(cause)
W.count_human_kill(job_name)
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(cause)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(cause)
R.count_human_kill(job_name)
/datum/entity/player_stats/human/count_personal_xeno_kill(caste_type, cause, job)
var/datum/entity/player_stats/job/S = setup_job_stats(job)
S.count_xeno_kill(caste_type, cause)
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.count_xeno_kill(caste_type, cause)
if(cause)
var/datum/entity/weapon_stats/W = setup_weapon_stats(cause)
W.count_xeno_kill(caste_type)
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(cause)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(cause)
R.count_xeno_kill(caste_type)
/datum/entity/player_stats/human/count_human_kill(job_name, cause, job)
@@ -169,8 +169,8 @@
if(cause)
var/datum/entity/weapon_stats/W = setup_weapon_stats(cause)
W.total_kills++
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(cause)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(cause)
R.total_kills++
recalculate_top_weapon()
..()
@@ -181,8 +181,8 @@
if(cause)
var/datum/entity/weapon_stats/W = setup_weapon_stats(cause)
W.total_kills++
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(cause)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(cause)
R.total_kills++
recalculate_top_weapon()
..()
@@ -194,8 +194,8 @@
/datum/entity/player_stats/human/count_personal_niche_stat(niche_name, amount = 1, job)
var/datum/entity/player_stats/job/S = setup_job_stats(job)
S.count_niche_stat(niche_name, amount)
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.count_niche_stat(niche_name, amount)
/datum/entity/player_stats/human/count_niche_stat(niche_name, amount = 1, job, weapon)
@@ -204,8 +204,8 @@
if(weapon)
var/datum/entity/weapon_stats/W = setup_weapon_stats(weapon)
W.count_niche_stat(niche_name, amount)
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(weapon)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(weapon)
R.count_niche_stat(niche_name, amount)
recalculate_top_weapon()
..()
@@ -215,8 +215,8 @@
return
var/datum/entity/player_stats/job/S = setup_job_stats(job, FALSE)
S.steps_walked += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job, FALSE)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job, FALSE)
R.steps_walked += amount
/mob/living/carbon/human/track_steps_walked(amount = 1)
@@ -237,8 +237,8 @@
if(isnull(S.total_hits))
S.total_hits = 0
S.total_hits += amount
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(weapon)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(weapon)
R.total_hits +=amount
/mob/proc/track_hit(weapon, amount = 1)
@@ -256,8 +256,8 @@
if(isnull(S.total_shots))
S.total_shots = 0
S.total_shots += amount
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(weapon)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(weapon)
R.total_shots +=amount
/datum/entity/player_stats/human/proc/count_personal_shot(job, amount = 1)
@@ -267,8 +267,8 @@
if(isnull(S.total_shots))
S.total_shots = 0
S.total_shots += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_shots += amount
/mob/proc/track_shot(weapon, amount = 1)
@@ -288,8 +288,8 @@
if(isnull(S.total_shots_hit))
S.total_shots_hit = 0
S.total_shots_hit += amount
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(weapon)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(weapon)
R.total_shots_hit += amount
/datum/entity/player_stats/human/proc/count_personal_shot_hit(job, amount = 1)
@@ -299,8 +299,8 @@
if(isnull(S.total_shots_hit))
S.total_shots_hit = 0
S.total_shots_hit += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_shots_hit += amount
/mob/proc/track_shot_hit(weapon, shot_mob, amount = 1)
@@ -312,13 +312,13 @@
human_stats.total_shots_hit += amount
human_stats.count_weapon_shot_hit(weapon, amount)
human_stats.count_personal_shot_hit(job, amount)
- if(round_statistics)
- round_statistics.total_projectiles_hit += amount
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.total_projectiles_hit += amount
if(shot_mob)
if(ishuman(shot_mob))
- round_statistics.total_projectiles_hit_human += amount
+ GLOB.round_statistics.total_projectiles_hit_human += amount
else if(isxeno(shot_mob))
- round_statistics.total_projectiles_hit_xeno += amount
+ GLOB.round_statistics.total_projectiles_hit_xeno += amount
/datum/entity/player_stats/human/proc/count_weapon_friendly_fire(weapon, amount = 1)
if(!weapon)
@@ -327,8 +327,8 @@
if(isnull(S.total_friendly_fire))
S.total_friendly_fire = 0
S.total_friendly_fire += amount
- if(round_statistics)
- var/datum/entity/weapon_stats/R = round_statistics.setup_weapon_stats(weapon)
+ if(GLOB.round_statistics)
+ var/datum/entity/weapon_stats/R = GLOB.round_statistics.setup_weapon_stats(weapon)
R.total_friendly_fire += amount
/datum/entity/player_stats/human/proc/count_personal_friendly_fire(job, amount = 1)
@@ -338,8 +338,8 @@
if(isnull(S.total_friendly_fire))
S.total_friendly_fire = 0
S.total_friendly_fire += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_friendly_fire += amount
/mob/proc/track_friendly_fire(weapon, amount = 1)
@@ -359,8 +359,8 @@
if(isnull(S.total_revives))
S.total_revives = 0
S.total_revives += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_revives += amount
/mob/proc/track_revive(job, amount = 1)
@@ -379,8 +379,8 @@
if(isnull(S.total_lives_saved))
S.total_lives_saved = 0
S.total_lives_saved += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_lives_saved += amount
/mob/proc/track_life_saved(job, amount = 1)
@@ -399,8 +399,8 @@
if(isnull(S.total_screams))
S.total_screams = 0
S.total_screams += amount
- if(round_statistics)
- var/datum/entity/player_stats/job/R = round_statistics.setup_job_stats(job)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/job/R = GLOB.round_statistics.setup_job_stats(job)
R.total_screams += amount
/mob/proc/track_scream(job, amount = 1)
diff --git a/code/datums/statistics/entities/panel_stats.dm b/code/datums/statistics/entities/panel_stats.dm
index e507d5d81a8b..5cfb888b8ea1 100644
--- a/code/datums/statistics/entities/panel_stats.dm
+++ b/code/datums/statistics/entities/panel_stats.dm
@@ -3,9 +3,9 @@
//*******************************************************
-/datum/entity/player_entity/proc/show_statistics(mob/user, datum/entity/statistic/round/viewing_round = round_statistics, update_data = FALSE)
+/datum/entity/player_entity/proc/show_statistics(mob/user, datum/entity/statistic/round/viewing_round = GLOB.round_statistics, update_data = FALSE)
if(update_data)
- update_panel_data(round_statistics)
+ update_panel_data(GLOB.round_statistics)
ui_interact(user)
/datum/entity/player_entity/proc/ui_interact(mob/user, ui_key = "statistics", datum/nanoui/ui, force_open = 1)
@@ -13,7 +13,7 @@
data["subMenu"] = subMenu
data["dataMenu"] = dataMenu
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ ui = SSnano.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "cm_stat_panel.tmpl", "Statistics", 450, 700, null, -1)
@@ -31,7 +31,7 @@
if(href_list["dataMenu"])
dataMenu = href_list["dataMenu"]
- nanomanager.update_uis(src)
+ SSnano.nanomanager.update_uis(src)
/datum/entity/player_entity/proc/check_eye()
return
@@ -68,7 +68,7 @@
//*******************PLAYER DATA*************************
//*******************************************************
-/datum/entity/player_entity/proc/update_panel_data(datum/entity/statistic/round/viewing_round = round_statistics)
+/datum/entity/player_entity/proc/update_panel_data(datum/entity/statistic/round/viewing_round = GLOB.round_statistics)
data["current_time"] = worldtime2text()
if(viewing_round)
diff --git a/code/datums/statistics/entities/player_stats.dm b/code/datums/statistics/entities/player_stats.dm
index d9fbd3b11e03..a8444c1a5894 100644
--- a/code/datums/statistics/entities/player_stats.dm
+++ b/code/datums/statistics/entities/player_stats.dm
@@ -81,10 +81,10 @@
/mob/proc/track_death_calculations()
if(statistic_exempt || statistic_tracked)
return
- if(round_statistics)
- round_statistics.recalculate_nemesis()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.recalculate_nemesis()
if(mind && mind.player_entity)
- mind.player_entity.update_panel_data(round_statistics)
+ mind.player_entity.update_panel_data(GLOB.round_statistics)
statistic_tracked = TRUE
//*****************
diff --git a/code/datums/statistics/entities/round_stats.dm b/code/datums/statistics/entities/round_stats.dm
index baed6befa912..25543dff22b1 100644
--- a/code/datums/statistics/entities/round_stats.dm
+++ b/code/datums/statistics/entities/round_stats.dm
@@ -84,9 +84,9 @@
if(!round_stats)
var/datum/entity/mc_round/mc_round = SSentity_manager.select(/datum/entity/mc_round)
var/operation_name
- operation_name = "[pick(operation_titles)]"
- operation_name += " [pick(operation_prefixes)]"
- operation_name += "-[pick(operation_postfixes)]"
+ operation_name = "[pick(GLOB.operation_titles)]"
+ operation_name += " [pick(GLOB.operation_prefixes)]"
+ operation_name += "-[pick(GLOB.operation_postfixes)]"
// Round stats
round_stats = DB_ENTITY(/datum/entity/statistic/round)
@@ -98,7 +98,7 @@
round_stats.save()
// Setup the global reference
- round_statistics = round_stats
+ GLOB.round_statistics = round_stats
// Map stats
var/datum/entity/statistic/map/new_map = DB_EKEY(/datum/entity/statistic/map, SSmapping.configs[GROUND_MAP].map_name)
@@ -376,7 +376,7 @@
stats += "Xenos remaining: [end_of_round_xenos]\n"
stats += "Hijack time: [duration2text(round_hijack_time)]\n"
- stats += "[log_end]"
+ stats += "[GLOB.log_end]"
WRITE_LOG(GLOB.round_stats, stats)
@@ -396,4 +396,4 @@
if(!can_use_action())
return
- owner.client.player_entity.show_statistics(owner, round_statistics, TRUE)
+ owner.client.player_entity.show_statistics(owner, GLOB.round_statistics, TRUE)
diff --git a/code/datums/statistics/entities/xeno_stats.dm b/code/datums/statistics/entities/xeno_stats.dm
index 8fff4a2e5dd3..9703c8c5e397 100644
--- a/code/datums/statistics/entities/xeno_stats.dm
+++ b/code/datums/statistics/entities/xeno_stats.dm
@@ -78,15 +78,15 @@
S.total_rounds_played++
S.round_played = TRUE
S.total_playtime += time
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.total_playtime += time
/datum/entity/player_stats/xeno/count_personal_death(caste)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.total_deaths++
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.total_deaths++
//******************
@@ -96,16 +96,16 @@
/datum/entity/player_stats/xeno/count_personal_human_kill(job_name, cause, caste)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.count_human_kill(job_name, cause)
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.count_human_kill(job_name, cause)
recalculate_top_caste()
/datum/entity/player_stats/xeno/count_personal_xeno_kill(caste_type, cause, caste)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.count_xeno_kill(caste_type, cause)
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.count_xeno_kill(caste_type, cause)
recalculate_top_caste()
@@ -116,15 +116,15 @@
/datum/entity/player_stats/xeno/count_personal_niche_stat(niche_name, amount = 1, caste)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.count_niche_stat(niche_name, amount)
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.count_niche_stat(niche_name, amount)
/datum/entity/player_stats/xeno/proc/track_personal_abilities_used(caste, ability, amount = 1)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.track_personal_abilities_used(ability, amount)
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.track_personal_abilities_used(ability, amount)
/mob/living/carbon/xenomorph/proc/track_ability_usage(ability, caste, amount = 1)
@@ -137,8 +137,8 @@
/datum/entity/player_stats/xeno/count_personal_steps_walked(caste, amount = 1)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.steps_walked += amount
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.steps_walked += amount
/mob/living/carbon/xenomorph/track_steps_walked(amount = 1)
@@ -154,8 +154,8 @@
/datum/entity/player_stats/xeno/proc/count_personal_slashes(caste, amount = 1)
var/datum/entity/player_stats/caste/S = setup_caste_stats(caste)
S.total_hits += amount
- if(round_statistics)
- var/datum/entity/player_stats/caste/R = round_statistics.setup_caste_stats(caste)
+ if(GLOB.round_statistics)
+ var/datum/entity/player_stats/caste/R = GLOB.round_statistics.setup_caste_stats(caste)
R.total_hits += amount
/mob/living/carbon/xenomorph/proc/track_slashes(caste, amount = 1)
@@ -167,5 +167,5 @@
xeno_stats.total_hits += amount
if(caste_type)
xeno_stats.count_personal_slashes(caste_type, amount)
- if(round_statistics)
- round_statistics.total_slashes += amount
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.total_slashes += amount
diff --git a/code/datums/statistics/random_facts/random_fact.dm b/code/datums/statistics/random_facts/random_fact.dm
index 76c6e82f776d..d327bd36f4f6 100644
--- a/code/datums/statistics/random_facts/random_fact.dm
+++ b/code/datums/statistics/random_facts/random_fact.dm
@@ -24,8 +24,8 @@
var/datum/entity/statistic/death/death_to_report = null
var/mob/mob_to_report = null
- if(round_statistics && length(round_statistics.death_stats_list))
- for(var/datum/entity/statistic/death/death in round_statistics.death_stats_list)
+ if(GLOB.round_statistics && length(GLOB.round_statistics.death_stats_list))
+ for(var/datum/entity/statistic/death/death in GLOB.round_statistics.death_stats_list)
if(!check_human && !death.is_xeno)
continue
if(!check_xeno && death.is_xeno)
diff --git a/code/datums/supply_packs/black_market.dm b/code/datums/supply_packs/black_market.dm
index 1af965898548..36d890e2b3d5 100644
--- a/code/datums/supply_packs/black_market.dm
+++ b/code/datums/supply_packs/black_market.dm
@@ -749,8 +749,8 @@ This is where the RO can reclaim their lost honor and purchase the M44 custom, t
dollar_cost = 10
containertype = /obj/structure/largecrate/black_market
-/datum/supply_packs/contraband/deep_storage/xm42b_pipe
- name = "10x99mm XM42B casing"
+/datum/supply_packs/contraband/deep_storage/xm43e1_pipe
+ name = "10x99mm XM43E1 casing"
contains = list(/obj/item/prop/helmetgarb/bullet_pipe)
dollar_cost = 10
containertype = /obj/structure/largecrate/black_market
diff --git a/code/datums/supply_packs/food.dm b/code/datums/supply_packs/food.dm
index 9e0527aed6cf..f74567c78a89 100644
--- a/code/datums/supply_packs/food.dm
+++ b/code/datums/supply_packs/food.dm
@@ -1,144 +1,47 @@
//Food.Regrouping all the ASRS crate related to food here.
-
-//All the ingredients that you can grown.
-
-/datum/supply_packs/potato
- name = "Potatoes(x20)"
- contains = list(
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- )
- cost = 10
- containertype = /obj/structure/closet/crate/freezer
- containername = "\improper Potato crate"
- group = "Food"
-
-/datum/supply_packs/tomato
- name = "tomato (x20)"
- contains = list(
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- )
- cost = 10
- containertype = /obj/structure/closet/crate/freezer
- containername = "\improper Tomato crate"
- group = "Food"
-
-/datum/supply_packs/wheat
- name = "wheat (x20)"
- contains = list(
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- /obj/item/reagent_container/food/snacks/grown/wheat,
- )
- cost = 10
- containertype = /obj/structure/closet/crate/freezer
- containername = "\improper Wheat crate"
- group = "Food"
-
-//All the meats
-
-/datum/supply_packs/meat
- name = "meat(x5)"
- contains = list(
- /obj/item/reagent_container/food/snacks/meat,
- /obj/item/reagent_container/food/snacks/meat,
- /obj/item/reagent_container/food/snacks/meat,
- /obj/item/reagent_container/food/snacks/meat,
- /obj/item/reagent_container/food/snacks/meat,
- )
- cost = 10
- containertype = /obj/structure/closet/crate/freezer
- containername = "\improper meat crate"
- group = "Food"
-
-/datum/supply_packs/carp_fillet
- name = "carp fillet (x5)"
- contains = list(
- /obj/item/reagent_container/food/snacks/carpmeat,
- /obj/item/reagent_container/food/snacks/carpmeat,
- /obj/item/reagent_container/food/snacks/carpmeat,
- /obj/item/reagent_container/food/snacks/carpmeat,
- /obj/item/reagent_container/food/snacks/carpmeat,
- )
- cost = 10
- containertype = /obj/structure/closet/crate/freezer
- containername = "\improper carp filet crate"
- group = "Food"
-
-//all the condiment type items
-
-/datum/supply_packs/condiment
- name = "crate of condiments"
+// crate of random ingredient that you can buy in vendor in kitchen
+/datum/supply_packs/ingredient
+ name = "surplus boxes of ingredients(x6 boxes)"
+ randomised_num_contained = 6
contains = list(
- /obj/item/reagent_container/food/condiment/enzyme,
- /obj/item/reagent_container/food/condiment/sugar,
- /obj/item/reagent_container/food/condiment/saltshaker,
- /obj/item/reagent_container/food/condiment/peppermill,
+ /obj/item/storage/fancy/egg_box,
+ /obj/item/storage/box/fish,
+ /obj/item/storage/box/meat,
+ /obj/item/storage/box/milk,
+ /obj/item/storage/box/soymilk,
+ /obj/item/storage/box/enzyme,
+ /obj/item/storage/box/flour,
+ /obj/item/storage/box/sugar,
+ /obj/item/storage/box/apple,
+ /obj/item/storage/box/banana,
+ /obj/item/storage/box/chanterelle,
+ /obj/item/storage/box/cherries,
+ /obj/item/storage/box/chili,
+ /obj/item/storage/box/cabbage,
+ /obj/item/storage/box/carrot,
+ /obj/item/storage/box/corn,
+ /obj/item/storage/box/eggplant,
+ /obj/item/storage/box/lemon,
+ /obj/item/storage/box/lime,
+ /obj/item/storage/box/orange,
+ /obj/item/storage/box/potato,
+ /obj/item/storage/box/tomato,
+ /obj/item/storage/box/whitebeet,
/obj/item/reagent_container/food/condiment/hotsauce/cholula,
/obj/item/reagent_container/food/condiment/hotsauce/franks,
/obj/item/reagent_container/food/condiment/hotsauce/sriracha,
/obj/item/reagent_container/food/condiment/hotsauce/tabasco,
+ /obj/item/reagent_container/food/drinks/bottle/whiskey,
+ /obj/item/reagent_container/food/drinks/bottle/tequila,
+ /obj/item/reagent_container/food/drinks/bottle/rum,
+ /obj/item/reagent_container/food/drinks/bottle/wine,
)
cost = 10
containertype = /obj/structure/closet/crate/freezer
- containername = "\improper crate of condiment"
+ containername = "\improper surplus of ingredients crate"
group = "Food"
- //all the finish snacks.
+//all the finish snacks.
/datum/supply_packs/donuts
name = "box of donuts (x5)"
@@ -165,47 +68,6 @@
containername = "\improper USCM MRE crate(x2)"
group = "Food"
-/datum/supply_packs/funfood
- name = "special ingredients crate (x6)"
- randomised_num_contained = 6
- contains = list(
- /obj/item/reagent_container/food/condiment/enzyme,
- /obj/item/reagent_container/food/condiment/saltshaker,
- /obj/item/reagent_container/food/condiment/saltshaker,
- /obj/item/reagent_container/food/condiment/saltshaker,
- /obj/item/reagent_container/food/condiment/peppermill,
- /obj/item/reagent_container/food/condiment/peppermill,
- /obj/item/reagent_container/food/condiment/peppermill,
- /obj/item/reagent_container/food/condiment/sugar,
- /obj/item/reagent_container/food/condiment/sugar,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/grown/potato,
- /obj/item/reagent_container/food/snacks/mint,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/tomato,
- /obj/item/reagent_container/food/snacks/grown/carrot,
- /obj/item/reagent_container/food/snacks/grown/carrot,
- /obj/item/reagent_container/food/snacks/grown/lemon,
- /obj/item/reagent_container/food/snacks/grown/lemon,
- /obj/item/reagent_container/food/snacks/grown/orange,
- /obj/item/reagent_container/food/snacks/grown/orange,
- /obj/item/reagent_container/food/snacks/grown/lime,
- /obj/item/reagent_container/food/snacks/grown/lime,
- /obj/item/reagent_container/food/drinks/bottle/whiskey,
- /obj/item/reagent_container/food/drinks/bottle/tequila,
- /obj/item/reagent_container/food/drinks/bottle/rum,
- /obj/item/reagent_container/food/drinks/bottle/wine,
- /obj/item/reagent_container/food/drinks/bottle/wine,
- /obj/item/reagent_container/food/drinks/bottle/wine,
- )
- cost = 10
- containertype = /obj/structure/closet/crate/freezer
- containername = "\improper Special ingredients crate"
- group = "Food"
-
/datum/supply_packs/pizzas
name = "pizza ready-to-eat (x3)"
contains = list(
diff --git a/code/datums/supply_packs/spec_ammo.dm b/code/datums/supply_packs/spec_ammo.dm
index 7931a4d40204..e20a5de865a3 100644
--- a/code/datums/supply_packs/spec_ammo.dm
+++ b/code/datums/supply_packs/spec_ammo.dm
@@ -109,10 +109,10 @@
containername = "M42A Incendiary Magazine Crate"
group = "Weapons Specialist Ammo"
-//XM42B - Disabled during testing per request.
+//XM43E1 - Disabled during testing per request.
/*
/datum/supply_packs/ammo_amr_marksman
- name = "XM42B anti-materiel rifle marksman magazines crate (x5)"
+ name = "XM43E1 anti-materiel rifle marksman magazines crate (x5)"
contains = list(
/obj/item/ammo_magazine/sniper/anti_materiel,
/obj/item/ammo_magazine/sniper/anti_materiel,
@@ -122,7 +122,7 @@
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
- containername = "XM42B Anti-Materiel Magazine Crate"
+ containername = "XM43E1 Anti-Materiel Magazine Crate"
group = "Specialist Ammo"
*/
//M4RA
diff --git a/code/datums/weather/weather_map_holders/new_varadero.dm b/code/datums/weather/weather_map_holders/new_varadero.dm
index 8222001f4739..6dae09711e47 100644
--- a/code/datums/weather/weather_map_holders/new_varadero.dm
+++ b/code/datums/weather/weather_map_holders/new_varadero.dm
@@ -16,5 +16,5 @@
return prob(PROB_WEATHER_NEW_VARADERO)
/datum/weather_ss_map_holder/new_varadero/weather_warning()
- for (var/obj/structure/machinery/storm_siren/WS in weather_notify_objects)
+ for (var/obj/structure/machinery/storm_siren/WS in GLOB.weather_notify_objects)
WS.weather_warning()
diff --git a/code/datums/weather/weather_map_holders/sorokyne.dm b/code/datums/weather/weather_map_holders/sorokyne.dm
index db55d12cdfbe..3c27a43ce1b3 100644
--- a/code/datums/weather/weather_map_holders/sorokyne.dm
+++ b/code/datums/weather/weather_map_holders/sorokyne.dm
@@ -21,5 +21,5 @@
return FALSE
/datum/weather_ss_map_holder/sorokyne/weather_warning()
- for (var/obj/structure/machinery/weather_siren/WS in weather_notify_objects)
+ for (var/obj/structure/machinery/weather_siren/WS in GLOB.weather_notify_objects)
WS.weather_warning()
diff --git a/code/defines/procs/announcement.dm b/code/defines/procs/announcement.dm
index 8e42fd1e76a8..3dd918abbc6b 100644
--- a/code/defines/procs/announcement.dm
+++ b/code/defines/procs/announcement.dm
@@ -93,7 +93,7 @@
if(isobserver(M) || ishuman(M) && is_mainship_level(M.z))
playsound_client(M.client, sound_to_play, M, vol = 45)
- for(var/mob/living/silicon/decoy/ship_ai/AI in ai_mob_list)
+ for(var/mob/living/silicon/decoy/ship_ai/AI in GLOB.ai_mob_list)
INVOKE_ASYNC(AI, TYPE_PROC_REF(/mob/living/silicon/decoy/ship_ai, say), message)
switch(logging)
@@ -106,7 +106,7 @@
if(!message)
return
- for(var/mob/living/silicon/decoy/ship_ai/AI in ai_mob_list)
+ for(var/mob/living/silicon/decoy/ship_ai/AI in GLOB.ai_mob_list)
if(channel_prefix)
message = "[channel_prefix][message]"
INVOKE_ASYNC(AI, TYPE_PROC_REF(/mob/living/silicon/decoy/ship_ai, say), message)
diff --git a/code/defines/procs/radio.dm b/code/defines/procs/radio.dm
index b4914d049fc9..d99d99b24726 100644
--- a/code/defines/procs/radio.dm
+++ b/code/defines/procs/radio.dm
@@ -2,8 +2,8 @@
var/freq_text
// the name of the channel
- for(var/channel in radiochannels)
- if(radiochannels[channel] == display_freq)
+ for(var/channel in GLOB.radiochannels)
+ if(GLOB.radiochannels[channel] == display_freq)
freq_text = channel
break
diff --git a/code/game/area/almayer.dm b/code/game/area/almayer.dm
index 742ae7a1addb..d9ff42f4f55c 100644
--- a/code/game/area/almayer.dm
+++ b/code/game/area/almayer.dm
@@ -29,12 +29,12 @@
SShijack.progress_areas[src] = power_equip
/area/shuttle/almayer/elevator_maintenance/upperdeck
- name = "\improper Maintenance Elevator"
+ name = "\improper Upper Deck Maintenance Elevator"
icon_state = "shuttle"
fake_zlevel = 1
/area/shuttle/almayer/elevator_maintenance/lowerdeck
- name = "\improper Maintenance Elevator"
+ name = "\improper Lower Deck Maintenance Elevator"
icon_state = "shuttle"
fake_zlevel = 2
@@ -98,23 +98,23 @@
resin_construction_allowed = FALSE
/area/almayer/command/securestorage
- name = "\improper Secure Storage"
+ name = "\improper Upper Deck Secure Storage"
icon_state = "corporatespace"
- fake_zlevel = 2 // lowerdeck
+ fake_zlevel = 1 // upperdeck
/area/almayer/command/computerlab
- name = "\improper Computer Lab"
+ name = "\improper Upper Deck Computer Lab"
icon_state = "ceroom"
- fake_zlevel = 2 // lowerdeck
+ fake_zlevel = 1 // upperdeck
/area/almayer/command/telecomms
- name = "\improper Telecommunications"
+ name = "\improper Upper Deck Telecommunications"
icon_state = "tcomms"
fake_zlevel = 1 // upperdeck
flags_area = AREA_NOTUNNEL
/area/almayer/command/self_destruct
- name = "\improper Self-Destruct Core Room"
+ name = "\improper Upper Deck Self-Destruct Core Room"
icon_state = "selfdestruct"
fake_zlevel = 1 // upperdeck
flags_area = AREA_NOTUNNEL
@@ -125,7 +125,7 @@
fake_zlevel = 1 // upperdeck
/area/almayer/command/combat_correspondent
- name = "\improper Combat Correspondent Office"
+ name = "\improper Upper Deck Combat Correspondent Office"
icon_state = "selfdestruct"
fake_zlevel = 1 // upperdeck
@@ -133,36 +133,36 @@
minimap_color = MINIMAP_AREA_ENGI
/area/almayer/engineering/upper_engineering
- name = "\improper Upper Engineering"
+ name = "\improper Upper Deck Engineering"
icon_state = "upperengineering"
fake_zlevel = 1 // upperdeck
/area/almayer/engineering/upper_engineering/starboard
- name = "\improper Starboard Upper Engineering"
+ name = "\improper Upper Deck Starboard Engineering"
/area/almayer/engineering/upper_engineering/port
- name = "\improper Port Upper Engineering"
+ name = "\improper Upper Deck Port Engineering"
/area/almayer/engineering/upper_engineering/notunnel
flags_area = AREA_NOTUNNEL
/area/almayer/engineering/ce_room
- name = "\improper Chief Engineer Office"
+ name = "\improper Upper Deck Chief Engineer Office"
icon_state = "ceroom"
fake_zlevel = 1 // upperdeck
/area/almayer/engineering/lower_engine_monitoring
- name = "\improper Engine Reactor Monitoring"
+ name = "\improper Lower Deck Engine Reactor Monitoring"
icon_state = "lowermonitoring"
fake_zlevel = 2 // lowerdeck
/area/almayer/engineering/lower_engineering
- name = "\improper Engineering Lower"
+ name = "\improper Lower Deck Engineering"
icon_state = "lowerengineering"
fake_zlevel = 2 // lowerdeck
/area/almayer/engineering/engineering_workshop
- name = "\improper Engineering Workshop"
+ name = "\improper Lower Deck Engineering Workshop"
icon_state = "workshop"
fake_zlevel = 2 // lowerdeck
@@ -180,17 +180,17 @@
hijack_evacuation_type = EVACUATION_TYPE_ADDITIVE
/area/almayer/engineering/starboard_atmos
- name = "\improper Atmospherics Starboard"
+ name = "\improper Upper Deck Starboard Atmospherics"
icon_state = "starboardatmos"
fake_zlevel = 1 // upperdeck
/area/almayer/engineering/port_atmos
- name = "\improper Atmospherics Port"
+ name = "\improper Upper Deck Port Atmospherics"
icon_state = "portatmos"
fake_zlevel = 1 // upperdeck
/area/almayer/engineering/laundry
- name = "\improper Laundry Room"
+ name = "\improper Upper Deck Laundry Room"
icon_state = "laundry"
fake_zlevel = 1 // upperdeck
@@ -211,17 +211,17 @@
fake_zlevel = 2 // lowerdeck
/area/almayer/shipboard/starboard_missiles
- name = "\improper Missile Tubes Starboard"
+ name = "\improper Upper Deck Starboard Missile Tubes"
icon_state = "starboardmissile"
fake_zlevel = 1 // upperdeck
/area/almayer/shipboard/port_missiles
- name = "\improper Missile Tubes Port"
+ name = "\improper Upper Deck Port Missile Tubes"
icon_state = "portmissile"
fake_zlevel = 1 // upperdeck
/area/almayer/shipboard/weapon_room
- name = "\improper Weapon Control Room"
+ name = "\improper Lower Deck Weapon Control"
icon_state = "weaponroom"
fake_zlevel = 2 // lowerdeck
@@ -229,12 +229,12 @@
flags_area = AREA_NOTUNNEL
/area/almayer/shipboard/starboard_point_defense
- name = "\improper Point Defense Starboard"
+ name = "\improper Lower Deck Starboard Point Defense"
icon_state = "starboardpd"
fake_zlevel = 2 // lowerdeck
/area/almayer/shipboard/port_point_defense
- name = "\improper Point Defense Port"
+ name = "\improper Lower Deck Port Point Defense"
icon_state = "portpd"
fake_zlevel = 2 // lowerdeck
@@ -300,7 +300,7 @@
icon_state = "chiefmpoffice"
/area/almayer/shipboard/sea_office
- name = "\improper Senior Enlisted Advisor Office"
+ name = "\improper Lower Deck Senior Enlisted Advisor Office"
icon_state = "chiefmpoffice"
fake_zlevel = 2 // lowerdeck
@@ -326,7 +326,7 @@
soundscape_interval = 50
/area/almayer/hallways/vehiclehangar
- name = "\improper Vehicle Storage"
+ name = "\improper Lower Deck Vehicle Storage"
icon_state = "exoarmor"
fake_zlevel = 2
@@ -334,135 +334,136 @@
minimap_color = MINIMAP_AREA_COLONY
/area/almayer/living/tankerbunks
- name = "\improper Vehicle Crew Bunks"
+ name = "\improper Lower Deck Vehicle Crew Bunks"
icon_state = "livingspace"
fake_zlevel = 2
/area/almayer/living/auxiliary_officer_office
- name = "\improper Auxiliary Support Officer office"
+ name = "\improper Lower Deck Auxiliary Support Officer office"
icon_state = "livingspace"
fake_zlevel = 2
/area/almayer/squads/tankdeliveries
- name = "\improper Vehicle ASRS"
+ name = "\improper Lower Deck Vehicle ASRS"
icon_state = "req"
fake_zlevel = 2
/area/almayer/hallways/exoarmor
- name = "\improper Vehicle Armor Storage"
+ name = "\improper Lower Deck Vehicle Armor Storage"
icon_state = "exoarmor"
fake_zlevel = 2 // lowerdeck
/area/almayer/hallways/repair_bay
- name = "\improper Deployment Workshop"
+ name = "\improper Lower Deck Deployment Workshop"
icon_state = "dropshiprepair"
fake_zlevel = 2 // lowerdeck
/area/almayer/hallways/mission_planner
- name = "\improper Dropship Central Computer Room"
+ name = "\improper Lower Deck Dropship Central Computer Room"
icon_state = "missionplanner"
fake_zlevel = 2 // lowerdeck
/area/almayer/hallways/starboard_umbilical
- name = "\improper Umbilical Starboard"
+ name = "\improper Lower Deck Starboard Umbilical Hallway"
icon_state = "starboardumbilical"
fake_zlevel = 2 // lowerdeck
/area/almayer/hallways/port_umbilical
- name = "\improper Umbilical Port"
+ name = "\improper Lower Deck Port Umbilical Hallway"
icon_state = "portumbilical"
fake_zlevel = 2 // lowerdeck
/area/almayer/hallways/aft_hallway
- name = "\improper Hallway Aft"
+ name = "\improper Upper Deck Aft Hallway"
icon_state = "aft"
fake_zlevel = 1 // upperdeck
/area/almayer/hallways/stern_hallway
- name = "\improper Hallway Stern"
+ name = "\improper Upper Deck Stern Hallway"
icon_state = "stern"
fake_zlevel = 1 // upperdeck
/area/almayer/hallways/port_hallway
- name = "\improper Hallway Port"
+ name = "\improper Lower Deck Port Hallway"
icon_state = "port"
fake_zlevel = 2 // lowerdeck
/area/almayer/hallways/starboard_hallway
- name = "\improper Hallway Starboard"
+ name = "\improper Lower Deck Starboard Hallway"
icon_state = "starboard"
fake_zlevel = 2 // lowerdeck
/area/almayer/stair_clone
- name = "\improper Stairs"
+ name = "\improper Lower Deck Stairs"
icon_state = "stairs_lowerdeck"
fake_zlevel = 2 // lowerdeck
resin_construction_allowed = FALSE
/area/almayer/stair_clone/upper
+ name = "\improper Upper Deck Stairs"
icon_state = "stairs_upperdeck"
fake_zlevel = 1 // upperdeck
/area/almayer/hull/lower_hull
- name = "\improper Hull Lower"
+ name = "\improper Lower Deck Hull"
icon_state = "lowerhull"
fake_zlevel = 2 // lowerdeck
/area/almayer/hull/upper_hull
- name = "\improper Hull Upper"
+ name = "\improper Upper Deck Hull"
icon_state = "upperhull"
fake_zlevel = 1 // upperdeck
/area/almayer/hull/upper_hull/u_f_s
- name = "\improper Upper Fore-Starboard Hull"
+ name = "\improper Upper Deck Fore-Starboard Hull"
icon_state = "upperhull"
/area/almayer/hull/upper_hull/u_m_s
- name = "\improper Upper Midship-Starboard Hull"
+ name = "\improper Upper Deck Starboard-Midship Hull"
icon_state = "upperhull"
/area/almayer/hull/upper_hull/u_a_s
- name = "\improper Upper Aft-Starboard Hull"
+ name = "\improper Upper Deck Starboard-Aft Hull"
icon_state = "upperhull"
/area/almayer/hull/upper_hull/u_f_p
- name = "\improper Upper Fore-Port Hull"
+ name = "\improper Upper Deck Port-Fore Hull"
icon_state = "upperhull"
/area/almayer/hull/upper_hull/u_m_p
- name = "\improper Upper Midship-Port Hull"
+ name = "\improper Upper Deck Port-Midship Hull"
icon_state = "upperhull"
/area/almayer/hull/upper_hull/u_a_p
- name = "\improper Upper Aft-Port Hull"
+ name = "\improper Upper Deck Port-Aft Hull"
icon_state = "upperhull"
/area/almayer/hull/lower_hull/l_f_s
- name = "\improper Lower Fore-Starboard Hull"
+ name = "\improper Lower Deck Starboard-Fore Hull"
icon_state = "upperhull"
/area/almayer/hull/lower_hull/l_m_s
- name = "\improper Lower Midship-Starboard Hull"
+ name = "\improper Lower Deck Starboard-Midship Hull"
icon_state = "upperhull"
/area/almayer/hull/lower_hull/l_a_s
- name = "\improper Lower Aft-Starboard Hull"
+ name = "\improper Lower Deck Starboard Hull"
icon_state = "upperhull"
/area/almayer/hull/lower_hull/l_f_p
- name = "\improper Lower Fore-Port Hull"
+ name = "\improper Lower Deck Port-Fore Hull"
icon_state = "upperhull"
/area/almayer/hull/lower_hull/l_m_p
- name = "\improper Lower Midship-Port Hull"
+ name = "\improper Lower Deck Port-Midship Hull"
icon_state = "upperhull"
/area/almayer/hull/lower_hull/l_a_p
- name = "\improper Lower Aft-Port Hull"
+ name = "\improper Lower Deck Port-Aft Hull"
icon_state = "upperhull"
/area/almayer/living/cryo_cells
- name = "\improper Cryo Cells"
+ name = "\improper Lower Deck Cryo Cells"
icon_state = "cryo"
fake_zlevel = 2 // lowerdeck
@@ -472,22 +473,22 @@
fake_zlevel = 2 // lowerdeck
/area/almayer/living/port_emb
- name = "\improper Extended Mission Bunks"
+ name = "\improper Lower Deck Port Extended Mission Bunks"
icon_state = "portemb"
fake_zlevel = 2 // lowerdeck
/area/almayer/living/starboard_emb
- name = "\improper Extended Mission Bunks"
+ name = "\improper Lower Deck Starboard Extended Mission Bunks"
icon_state = "starboardemb"
fake_zlevel = 2 // lowerdeck
/area/almayer/living/port_garden
- name = "\improper Garden"
+ name = "\improper Port Garden"
icon_state = "portemb"
fake_zlevel = 1 // upperdeck
/area/almayer/living/starboard_garden
- name = "\improper Garden"
+ name = "\improper Starboard Garden"
icon_state = "starboardemb"
fake_zlevel = 1 // upperdeck
@@ -502,12 +503,12 @@
fake_zlevel = 2 // lowerdeck
/area/almayer/living/officer_rnr
- name = "\improper Officer's Lounge"
+ name = "\improper Upper Deck Officer's Lounge"
icon_state = "officerrnr"
fake_zlevel = 1 // upperdeck
/area/almayer/living/officer_study
- name = "\improper Officer's Study"
+ name = "\improper Upper Deck Officer's Study"
icon_state = "officerstudy"
fake_zlevel = 1 // upperdeck
@@ -522,17 +523,17 @@
fake_zlevel = 2 // lowerdeck
/area/almayer/living/gym
- name = "\improper Gym"
+ name = "\improper Lower Deck Gym"
icon_state = "officerrnr"
fake_zlevel = 2 // lowerdeck
/area/almayer/living/cafeteria_officer
- name = "\improper Officer Cafeteria"
+ name = "\improper Upper Deck Officer Cafeteria"
icon_state = "food"
fake_zlevel = 1 // upperdeck
/area/almayer/living/offices
- name = "\improper Conference Office"
+ name = "\improper Lower Deck Conference Office"
icon_state = "briefing"
fake_zlevel = 2 // lowerdeck
@@ -560,7 +561,7 @@
fake_zlevel = 1 // upperdeck
/area/almayer/living/synthcloset
- name = "\improper Synthetic Storage Closet"
+ name = "\improper Upper Deck Synthetic Storage Closet"
icon_state = "livingspace"
fake_zlevel = 1 // upperdeck
@@ -738,16 +739,16 @@
hijack_evacuation_type = EVACUATION_TYPE_ADDITIVE
/area/almayer/lifeboat_pumps/north1
- name = "North West Lifeboat Fuel Pump"
+ name = "Starboard Fore Lifeboat Fuel Pump"
/area/almayer/lifeboat_pumps/north2
- name = "North East Lifeboat Fuel Pump"
+ name = "Starboard Aft Lifeboat Fuel Pump"
/area/almayer/lifeboat_pumps/south1
- name = "South West Lifeboat Fuel Pump"
+ name = "Port Fore Lifeboat Fuel Pump"
/area/almayer/lifeboat_pumps/south2
- name = "South East Lifeboat Fuel Pump"
+ name = "Port Aft Lifeboat Fuel Pump"
/area/almayer/command/lifeboat
name = "\improper Lifeboat Docking Port"
@@ -760,7 +761,7 @@
flags_area = AREA_NOTUNNEL
/area/space/almayer/lifeboat_dock
- name = "\improper Lifeboat Docking Port"
+ name = "\improper Port Lifeboat Docking"
icon_state = "lifeboat"
fake_zlevel = 1 // upperdeck
flags_area = AREA_NOTUNNEL
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index c81da5556e24..536e29599597 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -94,8 +94,8 @@
layer = AREAS_LAYER
uid = ++global_uid
. = ..()
- active_areas += src
- all_areas += src
+ GLOB.active_areas += src
+ GLOB.all_areas += src
reg_in_areas_in_z()
if(is_mainship_level(z))
GLOB.ship_areas += src
@@ -138,13 +138,13 @@
C.network.Remove(CAMERA_NET_POWER_ALARMS)
else
C.network.Add(CAMERA_NET_POWER_ALARMS)
- for (var/mob/living/silicon/aiPlayer in ai_mob_list)
+ for (var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list)
if(aiPlayer.z == source.z)
if (state == 1)
aiPlayer.cancelAlarm("Power", src, source)
else
aiPlayer.triggerAlarm("Power", src, cameras, source)
- for(var/obj/structure/machinery/computer/station_alert/a in machines)
+ for(var/obj/structure/machinery/computer/station_alert/a in GLOB.machines)
if(a.z == source.z)
if(state == 1)
a.cancelAlarm("Power", src, source)
@@ -169,9 +169,9 @@
if (danger_level < 2 && atmosalm >= 2)
for(var/obj/structure/machinery/camera/C in src)
C.network.Remove(CAMERA_NET_ATMOSPHERE_ALARMS)
- for(var/mob/living/silicon/aiPlayer in ai_mob_list)
+ for(var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list)
aiPlayer.cancelAlarm("Atmosphere", src, src)
- for(var/obj/structure/machinery/computer/station_alert/a in machines)
+ for(var/obj/structure/machinery/computer/station_alert/a in GLOB.machines)
a.cancelAlarm("Atmosphere", src, src)
if (danger_level >= 2 && atmosalm < 2)
@@ -180,9 +180,9 @@
for(var/obj/structure/machinery/camera/C in src)
cameras += C
C.network.Add(CAMERA_NET_ATMOSPHERE_ALARMS)
- for(var/mob/living/silicon/aiPlayer in ai_mob_list)
+ for(var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list)
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
- for(var/obj/structure/machinery/computer/station_alert/a in machines)
+ for(var/obj/structure/machinery/computer/station_alert/a in GLOB.machines)
a.triggerAlarm("Atmosphere", src, cameras, src)
air_doors_close()
@@ -231,9 +231,9 @@
for (var/obj/structure/machinery/camera/C in src)
cameras.Add(C)
C.network.Add(CAMERA_NET_FIRE_ALARMS)
- for (var/mob/living/silicon/ai/aiPlayer in ai_mob_list)
+ for (var/mob/living/silicon/ai/aiPlayer in GLOB.ai_mob_list)
aiPlayer.triggerAlarm("Fire", src, cameras, src)
- for (var/obj/structure/machinery/computer/station_alert/a in machines)
+ for (var/obj/structure/machinery/computer/station_alert/a in GLOB.machines)
a.triggerAlarm("Fire", src, cameras, src)
/area/proc/firereset()
@@ -249,9 +249,9 @@
INVOKE_ASYNC(D, TYPE_PROC_REF(/obj/structure/machinery/door, open))
for (var/obj/structure/machinery/camera/C in src)
C.network.Remove(CAMERA_NET_FIRE_ALARMS)
- for (var/mob/living/silicon/ai/aiPlayer in ai_mob_list)
+ for (var/mob/living/silicon/ai/aiPlayer in GLOB.ai_mob_list)
aiPlayer.cancelAlarm("Fire", src, src)
- for (var/obj/structure/machinery/computer/station_alert/a in machines)
+ for (var/obj/structure/machinery/computer/station_alert/a in GLOB.machines)
a.cancelAlarm("Fire", src, src)
/area/proc/readyalert()
diff --git a/code/game/area/kutjevo.dm b/code/game/area/kutjevo.dm
index 422017c0a46b..a5a12cd5b999 100644
--- a/code/game/area/kutjevo.dm
+++ b/code/game/area/kutjevo.dm
@@ -67,6 +67,10 @@
name = "Kutjevo - Power Station River"
icon_state = "lz_river"
+/area/kutjevo/exterior/spring
+ name = "Kutjevo - Southern Spring"
+ icon_state = "lz_river"
+
/area/kutjevo/exterior/scrubland
name = "Kutjevo - Scrubland"
icon_state = "scrubland"
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index e0590265840c..5f36b3b8b390 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -166,7 +166,7 @@ directive is properly returned.
if(!time)
transform = complete
return
- animate(src, transform = complete, time = time, easing = easing)
+ animate(src, transform = complete, time = time, easing = easing, flags = ANIMATION_PARALLEL)
/// Upates the base_transform which will be compounded with other transforms
/atom/proc/update_base_transform(matrix/new_transform, time = 0)
@@ -387,11 +387,11 @@ Parameters are passed from New.
var/turf/opaque_turf = loc
opaque_turf.directional_opacity = ALL_CARDINALS // No need to recalculate it in this case, it's guaranteed to be on afterwards anyways.
- pass_flags = pass_flags_cache[type]
+ pass_flags = GLOB.pass_flags_cache[type]
if (isnull(pass_flags))
pass_flags = new()
initialize_pass_flags(pass_flags)
- pass_flags_cache[type] = pass_flags
+ GLOB.pass_flags_cache[type] = pass_flags
else
initialize_pass_flags()
Decorate(mapload)
@@ -418,7 +418,7 @@ Parameters are passed from New.
T.appearance = src.appearance
T.setDir(src.dir)
- clones_t.Add(src)
+ GLOB.clones_t.Add(src)
src.clone = T
// EFFECTS
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index b8a901ccf321..21f7b6b0a9be 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -281,7 +281,7 @@
C.proj_x = shift_x
C.proj_y = shift_y
- clones.Add(C)
+ GLOB.clones.Add(C)
C.mstr = src //Link clone and master
src.clone = C
@@ -313,7 +313,7 @@
clone.set_light(0) //Kill clone light
/atom/movable/proc/destroy_clone()
- clones.Remove(src.clone)
+ GLOB.clones.Remove(src.clone)
qdel(src.clone)
src.clone = null
diff --git a/code/game/cas_manager/datums/cas_fire_mission.dm b/code/game/cas_manager/datums/cas_fire_mission.dm
index 0a04876414e7..cb43caec30bb 100644
--- a/code/game/cas_manager/datums/cas_fire_mission.dm
+++ b/code/game/cas_manager/datums/cas_fire_mission.dm
@@ -114,7 +114,7 @@
if(get_turf(M) == initial_turf)
relative_dir = 0
else
- relative_dir = get_dir(M, initial_turf)
+ relative_dir = Get_Compass_Dir(M, initial_turf)
var/ds_identifier = "LARGE BIRD"
if (M.mob_flags & KNOWS_TECHNOLOGY)
@@ -132,7 +132,7 @@
if(get_turf(M) == initial_turf)
relative_dir = 0
else
- relative_dir = get_dir(M, initial_turf)
+ relative_dir = Get_Compass_Dir(M, initial_turf)
var/ds_identifier = "LARGE BIRD"
if (M.mob_flags & KNOWS_TECHNOLOGY)
diff --git a/code/game/cas_manager/datums/cas_iff_group.dm b/code/game/cas_manager/datums/cas_iff_group.dm
index f384115d7756..dc39b462c9f1 100644
--- a/code/game/cas_manager/datums/cas_iff_group.dm
+++ b/code/game/cas_manager/datums/cas_iff_group.dm
@@ -8,8 +8,7 @@
/datum/cas_iff_group/proc/remove_signal(datum/cas_signal/signal)
cas_signals -= signal
-var/global/datum/cas_iff_group/uscm_cas_group = new /datum/cas_iff_group()
+GLOBAL_DATUM_INIT(uscm_cas_group, /datum/cas_iff_group, new())
+GLOBAL_DATUM_INIT(upp_cas_group, /datum/cas_iff_group, new())
-var/global/datum/cas_iff_group/upp_cas_group = new /datum/cas_iff_group()
-
-var/global/list/datum/cas_iff_group/cas_groups = list(FACTION_MARINE = uscm_cas_group, FACTION_UPP = upp_cas_group, FACTION_NEUTRAL = uscm_cas_group)
+GLOBAL_LIST_INIT_TYPED(cas_groups, /datum/cas_iff_group, list(FACTION_MARINE = GLOB.uscm_cas_group, FACTION_UPP = GLOB.upp_cas_group, FACTION_NEUTRAL = GLOB.uscm_cas_group))
diff --git a/code/game/gamemodes/cm_initialize.dm b/code/game/gamemodes/cm_initialize.dm
index 17a255009089..ffcfd37489af 100644
--- a/code/game/gamemodes/cm_initialize.dm
+++ b/code/game/gamemodes/cm_initialize.dm
@@ -100,7 +100,7 @@ Additional game mode variables.
/datum/game_mode/proc/get_roles_list()
- return ROLES_USCM
+ return GLOB.ROLES_USCM
//===================================================\\
@@ -109,16 +109,16 @@ Additional game mode variables.
//===================================================\\
/datum/game_mode/proc/initialize_special_clamps()
- xeno_starting_num = clamp((readied_players/CONFIG_GET(number/xeno_number_divider)), xeno_required_num, INFINITY) //(n, minimum, maximum)
- surv_starting_num = clamp((readied_players/CONFIG_GET(number/surv_number_divider)), 2, 8) //this doesnt run
+ xeno_starting_num = clamp((GLOB.readied_players/CONFIG_GET(number/xeno_number_divider)), xeno_required_num, INFINITY) //(n, minimum, maximum)
+ surv_starting_num = clamp((GLOB.readied_players/CONFIG_GET(number/surv_number_divider)), 2, 8) //this doesnt run
marine_starting_num = GLOB.player_list.len - xeno_starting_num - surv_starting_num
- for(var/datum/squad/sq in RoleAuthority.squads)
+ for(var/datum/squad/sq in GLOB.RoleAuthority.squads)
if(sq)
sq.max_engineers = engi_slot_formula(marine_starting_num)
sq.max_medics = medic_slot_formula(marine_starting_num)
- for(var/i in RoleAuthority.roles_by_name)
- var/datum/job/J = RoleAuthority.roles_by_name[i]
+ for(var/i in GLOB.RoleAuthority.roles_by_name)
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[i]
if(J.scaled)
J.set_spawn_positions(marine_starting_num)
@@ -149,7 +149,7 @@ Additional game mode variables.
else
if(!istype(player,/mob/dead)) continue //Otherwise we just want to grab the ghosts.
- if(RoleAuthority.roles_whitelist[player.ckey] & WHITELIST_PREDATOR) //Are they whitelisted?
+ if(GLOB.RoleAuthority.roles_whitelist[player.ckey] & WHITELIST_PREDATOR) //Are they whitelisted?
if(!player.client.prefs)
player.client.prefs = new /datum/preferences(player.client) //Somehow they don't have one.
@@ -176,13 +176,13 @@ Additional game mode variables.
if(!pred_candidate.client)
return
- var/datum/job/J = RoleAuthority.roles_by_name[JOB_PREDATOR]
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[JOB_PREDATOR]
if(!J)
if(show_warning) to_chat(pred_candidate, SPAN_WARNING("Something went wrong!"))
return
- if(!(RoleAuthority.roles_whitelist[pred_candidate.ckey] & WHITELIST_PREDATOR))
+ if(!(GLOB.RoleAuthority.roles_whitelist[pred_candidate.ckey] & WHITELIST_PREDATOR))
if(show_warning) to_chat(pred_candidate, SPAN_WARNING("You are not whitelisted! You may apply on the forums to be whitelisted as a predator."))
return
@@ -195,9 +195,9 @@ Additional game mode variables.
to_chat(pred_candidate, SPAN_WARNING("You already were a Yautja! Give someone else a chance."))
return
- if(show_warning && tgui_alert(pred_candidate, "Confirm joining the hunt. You will join as \a [lowertext(J.get_whitelist_status(RoleAuthority.roles_whitelist, pred_candidate.client))] predator", "Confirmation", list("Yes", "No"), 10 SECONDS) != "Yes")
+ if(show_warning && tgui_alert(pred_candidate, "Confirm joining the hunt. You will join as \a [lowertext(J.get_whitelist_status(GLOB.RoleAuthority.roles_whitelist, pred_candidate.client))] predator", "Confirmation", list("Yes", "No"), 10 SECONDS) != "Yes")
return
- if(J.get_whitelist_status(RoleAuthority.roles_whitelist, pred_candidate.client) == WHITELIST_NORMAL)
+ if(J.get_whitelist_status(GLOB.RoleAuthority.roles_whitelist, pred_candidate.client) == WHITELIST_NORMAL)
var/pred_max = calculate_pred_max
if(pred_current_num >= pred_max)
if(show_warning) to_chat(pred_candidate, SPAN_WARNING("Only [pred_max] predators may spawn this round, but Councillors and Ancients do not count."))
@@ -234,13 +234,13 @@ Additional game mode variables.
pred_candidate.mind.transfer_to(new_predator, TRUE)
new_predator.client = pred_candidate.client
- var/datum/job/J = RoleAuthority.roles_by_name[JOB_PREDATOR]
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[JOB_PREDATOR]
if(!J)
qdel(new_predator)
return
- RoleAuthority.equip_role(new_predator, J, new_predator.loc)
+ GLOB.RoleAuthority.equip_role(new_predator, J, new_predator.loc)
return new_predator
@@ -356,21 +356,27 @@ Additional game mode variables.
else
available_xenos_non_ssd += cur_xeno
- // Only offer buried larva if there is no queue:
- // This basically means this block of code will almost never execute, because we are instead relying on the hive cores/larva pops to handle their larva
- // Technically this should be after a get_alien_candidates() call to be accurate, but we are intentionally trying to not call that proc as much as possible
- if(GLOB.xeno_queue_candidate_count < 1)
- var/datum/hive_status/hive
- for(var/hivenumber in GLOB.hive_datum)
- hive = GLOB.hive_datum[hivenumber]
- if(!hive.hardcore && hive.stored_larva && (hive.hive_location || (world.time < XENO_BURIED_LARVA_TIME_LIMIT + SSticker.round_start_time)))
- if(SSticker.mode && (SSticker.mode.flags_round_type & MODE_RANDOM_HIVE))
- available_xenos |= "any buried larva"
- LAZYADD(available_xenos["any buried larva"], hive)
- else
- var/larva_option = "buried larva ([hive])"
- available_xenos += larva_option
- available_xenos[larva_option] = list(hive)
+ var/datum/hive_status/hive
+ for(var/hivenumber in GLOB.hive_datum)
+ hive = GLOB.hive_datum[hivenumber]
+ if(hive.hardcore)
+ continue
+ if(!hive.stored_larva)
+ continue
+ // Only offer buried larva if there is no queue because we are instead relying on the hive cores/larva pops to handle their larva:
+ // Technically this should be after a get_alien_candidates() call to be accurate, but we are intentionally trying to not call that proc as much as possible
+ if(hive.hive_location && GLOB.xeno_queue_candidate_count > 0)
+ continue
+ if(!hive.hive_location && (world.time > XENO_BURIED_LARVA_TIME_LIMIT + SSticker.round_start_time))
+ continue
+
+ if(SSticker.mode && (SSticker.mode.flags_round_type & MODE_RANDOM_HIVE))
+ available_xenos |= "any buried larva"
+ LAZYADD(available_xenos["any buried larva"], hive)
+ else
+ var/larva_option = "buried larva ([hive])"
+ available_xenos += larva_option
+ available_xenos[larva_option] = list(hive)
if(!available_xenos.len || (instant_join && !available_xenos_non_ssd.len))
if(!xeno_candidate.client || !xeno_candidate.client.prefs || !(xeno_candidate.client.prefs.be_special & BE_ALIEN_AFTER_DEATH))
@@ -591,7 +597,14 @@ Additional game mode variables.
for(var/obj/effect/alien/resin/special/pylon/cycled_pylon as anything in hive.hive_structures[XENO_STRUCTURE_PYLON])
if(cycled_pylon.lesser_drone_spawns >= 1)
- selection_list += "[cycled_pylon.name] at [get_area(cycled_pylon)]"
+ var/pylon_number = 1
+ var/pylon_name = "[cycled_pylon.name] at [get_area(cycled_pylon)]"
+ //For renaming the pylon if we have duplicates
+ var/pylon_selection_name = pylon_name
+ while(pylon_selection_name in selection_list)
+ pylon_selection_name = "[pylon_name] ([pylon_number])"
+ pylon_number ++
+ selection_list += pylon_selection_name
selection_list_structure += cycled_pylon
if(!length(selection_list))
@@ -642,7 +655,7 @@ Additional game mode variables.
// Let the round recorder know that the key has changed
SSround_recording.recorder.update_key(new_xeno)
if(new_xeno.client)
- new_xeno.client.change_view(world_view_size)
+ new_xeno.client.change_view(GLOB.world_view_size)
msg_admin_niche("[new_xeno.key] has joined as [new_xeno].")
if(isxeno(new_xeno)) //Dear lord
@@ -909,7 +922,7 @@ Additional game mode variables.
CVS.populate_product_list_and_boxes(scale)
//Scale the amount of cargo points through a direct multiplier
- supply_controller.points = round(supply_controller.points * scale)
+ GLOB.supply_controller.points = round(GLOB.supply_controller.points * scale)
/datum/game_mode/proc/get_scaling_value()
//We take the number of marine players, deduced from other lists, and then get a scale multiplier from it, to be used in arbitrary manners to distribute equipment
@@ -951,14 +964,14 @@ Additional game mode variables.
if(!joe_candidate.client)
return
- var/datum/job/joe_job = RoleAuthority.roles_by_name[JOB_WORKING_JOE]
+ var/datum/job/joe_job = GLOB.RoleAuthority.roles_by_name[JOB_WORKING_JOE]
if(!joe_job)
if(show_warning)
to_chat(joe_candidate, SPAN_WARNING("Something went wrong!"))
return
- if(!(RoleAuthority.roles_whitelist[joe_candidate.ckey] & WHITELIST_JOE))
+ if(!(GLOB.RoleAuthority.roles_whitelist[joe_candidate.ckey] & WHITELIST_JOE))
if(show_warning)
to_chat(joe_candidate, SPAN_WARNING("You are not whitelisted! You may apply on the forums to be whitelisted as a synth."))
return
@@ -969,14 +982,14 @@ Additional game mode variables.
return
// council doesn't count towards this conditional.
- if(joe_job.get_whitelist_status(RoleAuthority.roles_whitelist, joe_candidate.client) == WHITELIST_NORMAL)
+ if(joe_job.get_whitelist_status(GLOB.RoleAuthority.roles_whitelist, joe_candidate.client) == WHITELIST_NORMAL)
var/joe_max = joe_job.total_positions
if((joe_job.current_positions >= joe_max) && !MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE))
if(show_warning)
to_chat(joe_candidate, SPAN_WARNING("Only [joe_max] Working Joes may spawn per round."))
return
- if(!enter_allowed && !MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE))
+ if(!GLOB.enter_allowed && !MODE_HAS_TOGGLEABLE_FLAG(MODE_BYPASS_JOE))
if(show_warning)
to_chat(joe_candidate, SPAN_WARNING("There is an administrative lock from entering the game."))
return
@@ -996,14 +1009,14 @@ Additional game mode variables.
var/turf/spawn_point = get_turf(pick(GLOB.latejoin_by_job[JOB_WORKING_JOE]))
var/mob/living/carbon/human/synthetic/new_joe = new(spawn_point)
joe_candidate.mind.transfer_to(new_joe, TRUE)
- var/datum/job/joe_job = RoleAuthority.roles_by_name[JOB_WORKING_JOE]
+ var/datum/job/joe_job = GLOB.RoleAuthority.roles_by_name[JOB_WORKING_JOE]
if(!joe_job)
qdel(new_joe)
return
// This is usually done in assign_role, a proc which is not executed in this case, since check_joe_late_join is running its own checks.
joe_job.current_positions++
- RoleAuthority.equip_role(new_joe, joe_job, new_joe.loc)
+ GLOB.RoleAuthority.equip_role(new_joe, joe_job, new_joe.loc)
GLOB.data_core.manifest_inject(new_joe)
SSticker.minds += new_joe.mind
return new_joe
diff --git a/code/game/gamemodes/cm_process.dm b/code/game/gamemodes/cm_process.dm
index 33377f7dc6fd..462f82e99cec 100644
--- a/code/game/gamemodes/cm_process.dm
+++ b/code/game/gamemodes/cm_process.dm
@@ -39,16 +39,16 @@ of predators), but can be added to include variant game modes (like humans vs. h
/datum/game_mode/proc/declare_completion_announce_fallen_soldiers()
set waitfor = 0
sleep(2 SECONDS)
- fallen_list += fallen_list_cross
- if(fallen_list.len)
+ GLOB.fallen_list += GLOB.fallen_list_cross
+ if(GLOB.fallen_list.len)
var/dat = " "
dat += SPAN_ROUNDBODY("In Flanders fields... ")
dat += SPAN_CENTERBOLD("In memoriam of our fallen soldiers: ")
- for(var/i = 1 to fallen_list.len)
- if(i != fallen_list.len)
- dat += "[fallen_list[i]], "
+ for(var/i = 1 to GLOB.fallen_list.len)
+ if(i != GLOB.fallen_list.len)
+ dat += "[GLOB.fallen_list[i]], "
else
- dat += "[fallen_list[i]]. "
+ dat += "[GLOB.fallen_list[i]]. "
to_world("[dat]")
@@ -134,7 +134,7 @@ of predators), but can be added to include variant game modes (like humans vs. h
// Open podlocks with the given ID if they aren't already opened.
// DO NOT USE THIS WITH ID's CORRESPONDING TO SHUTTLES OR THEY WILL BREAK!
/datum/game_mode/proc/open_podlocks(podlock_id)
- for(var/obj/structure/machinery/door/poddoor/M in machines)
+ for(var/obj/structure/machinery/door/poddoor/M in GLOB.machines)
if(M.id == podlock_id && M.density)
M.open()
diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm
index 7b1c695ade2b..bc5d6b69228c 100644
--- a/code/game/gamemodes/colonialmarines/colonialmarines.dm
+++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm
@@ -29,7 +29,7 @@
to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDHEADER("The current map is - [SSmapping.configs[GROUND_MAP].map_name]!"))
/datum/game_mode/colonialmarines/get_roles_list()
- return ROLES_DISTRESS_SIGNAL
+ return GLOB.ROLES_DISTRESS_SIGNAL
////////////////////////////////////////////////////////////////////////////////////////
//Temporary, until we sort this out properly.
@@ -126,7 +126,7 @@
#define MONKEYS_TO_TOTAL_RATIO 1/32
/datum/game_mode/colonialmarines/proc/spawn_smallhosts()
- if(!players_preassigned)
+ if(!GLOB.players_preassigned)
return
monkey_types = SSmapping.configs[GROUND_MAP].monkey_types
@@ -134,7 +134,7 @@
if(!length(monkey_types))
return
- var/amount_to_spawn = round(players_preassigned * MONKEYS_TO_TOTAL_RATIO)
+ var/amount_to_spawn = round(GLOB.players_preassigned * MONKEYS_TO_TOTAL_RATIO)
for(var/i in 0 to min(amount_to_spawn, length(GLOB.monkey_spawns)))
var/turf/T = get_turf(pick_n_take(GLOB.monkey_spawns))
@@ -167,7 +167,7 @@
check_ground_humans()
if(next_research_allocation < world.time)
- chemical_data.update_credits(chemical_data.research_allocation_amount)
+ GLOB.chemical_data.update_credits(GLOB.chemical_data.research_allocation_amount)
next_research_allocation = world.time + research_allocation_interval
if(!round_finished)
@@ -205,7 +205,7 @@
to_chat(M, SPAN_XENOANNOUNCE("To my children and their Queen. I sense the large doors that trap us will open in 30 seconds."))
addtimer(CALLBACK(src, PROC_REF(open_podlocks), "map_lockdown"), 300)
- if(round_should_check_for_win)
+ if(GLOB.round_should_check_for_win)
check_win()
round_checkwin = 0
@@ -353,15 +353,15 @@
if(MODE_INFESTATION_X_MAJOR)
musical_track = pick('sound/theme/sad_loss1.ogg','sound/theme/sad_loss2.ogg')
end_icon = "xeno_major"
- if(round_statistics && round_statistics.current_map)
- round_statistics.current_map.total_xeno_victories++
- round_statistics.current_map.total_xeno_majors++
+ if(GLOB.round_statistics && GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_xeno_victories++
+ GLOB.round_statistics.current_map.total_xeno_majors++
if(MODE_INFESTATION_M_MAJOR)
musical_track = pick('sound/theme/winning_triumph1.ogg','sound/theme/winning_triumph2.ogg')
end_icon = "marine_major"
- if(round_statistics && round_statistics.current_map)
- round_statistics.current_map.total_marine_victories++
- round_statistics.current_map.total_marine_majors++
+ if(GLOB.round_statistics && GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_marine_victories++
+ GLOB.round_statistics.current_map.total_marine_majors++
if(MODE_INFESTATION_X_MINOR)
var/list/living_player_list = count_humans_and_xenos(get_affected_zlevels())
if(living_player_list[1] && !living_player_list[2]) // If Xeno Minor but Xenos are dead and Humans are alive, see which faction is the last standing
@@ -378,28 +378,28 @@
else
musical_track = pick('sound/theme/neutral_melancholy1.ogg')
end_icon = "xeno_minor"
- if(round_statistics && round_statistics.current_map)
- round_statistics.current_map.total_xeno_victories++
+ if(GLOB.round_statistics && GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_xeno_victories++
if(MODE_INFESTATION_M_MINOR)
musical_track = pick('sound/theme/neutral_hopeful1.ogg','sound/theme/neutral_hopeful2.ogg')
end_icon = "marine_minor"
- if(round_statistics && round_statistics.current_map)
- round_statistics.current_map.total_marine_victories++
+ if(GLOB.round_statistics && GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_marine_victories++
if(MODE_INFESTATION_DRAW_DEATH)
end_icon = "draw"
musical_track = 'sound/theme/neutral_hopeful2.ogg'
- if(round_statistics && round_statistics.current_map)
- round_statistics.current_map.total_draws++
+ if(GLOB.round_statistics && GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_draws++
var/sound/S = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
S.status = SOUND_STREAM
sound_to(world, S)
- if(round_statistics)
- round_statistics.game_mode = name
- round_statistics.round_length = world.time
- round_statistics.round_result = round_finished
- round_statistics.end_round_player_population = GLOB.clients.len
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.game_mode = name
+ GLOB.round_statistics.round_length = world.time
+ GLOB.round_statistics.round_result = round_finished
+ GLOB.round_statistics.end_round_player_population = GLOB.clients.len
- round_statistics.log_round_statistics()
+ GLOB.round_statistics.log_round_statistics()
calculate_end_statistics()
show_end_statistics(end_icon)
@@ -440,11 +440,11 @@
)
//organize our jobs in a readable and standard way
- for(var/job in ROLES_MARINES)
+ for(var/job in GLOB.ROLES_MARINES)
counted_humans["Squad Marines"][job] = 0
- for(var/job in ROLES_USCM - ROLES_MARINES)
+ for(var/job in GLOB.ROLES_USCM - GLOB.ROLES_MARINES)
counted_humans["Auxiliary Marines"][job] = 0
- for(var/job in ROLES_SPECIAL)
+ for(var/job in GLOB.ROLES_SPECIAL)
counted_humans["Non-Standard Humans"][job] = 0
var/list/counted_xenos = list()
@@ -463,7 +463,7 @@
if(player_client.mob && player_client.mob.stat != DEAD)
if(ishuman(player_client.mob))
if(player_client.mob.faction == FACTION_MARINE)
- if(player_client.mob.job in (ROLES_MARINES))
+ if(player_client.mob.job in (GLOB.ROLES_MARINES))
counted_humans["Squad Marines"][player_client.mob.job]++
else
counted_humans["Auxiliary Marines"][player_client.mob.job]++
diff --git a/code/game/gamemodes/colonialmarines/huntergames.dm b/code/game/gamemodes/colonialmarines/huntergames.dm
index bd5302bf7ec0..aad0f9ba5787 100644
--- a/code/game/gamemodes/colonialmarines/huntergames.dm
+++ b/code/game/gamemodes/colonialmarines/huntergames.dm
@@ -83,8 +83,6 @@
100; /obj/item/clothing/suit/storage/CMB \
)
-var/waiting_for_drop_votes = 0
-
//Digging through this is a pain. I'm leaving it mostly alone until a full rework takes place.
/datum/game_mode/huntergames
@@ -105,6 +103,8 @@ var/waiting_for_drop_votes = 0
var/ticks_passed = 0
var/drops_disabled = 0
+ var/waiting_for_drop_votes = FALSE
+
votable = FALSE // borkeds
taskbar_icon = 'icons/taskbar/gml_hgames.png'
@@ -234,7 +234,7 @@ var/waiting_for_drop_votes = 0
H = new(picked)
H.key = M.key
- if(H.client) H.client.change_view(world_view_size)
+ if(H.client) H.client.change_view(GLOB.world_view_size)
if(!H.mind)
H.mind = new(H.key)
@@ -393,8 +393,8 @@ var/waiting_for_drop_votes = 0
//Announces the end of the game with all relevant information stated//
//////////////////////////////////////////////////////////////////////
/datum/game_mode/huntergames/declare_completion()
- if(round_statistics)
- round_statistics.track_round_end()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.track_round_end()
var/mob/living/carbon/winner = null
for(var/mob/living/carbon/human/Q in GLOB.alive_mob_list)
@@ -415,12 +415,12 @@ var/waiting_for_drop_votes = 0
to_world("There was a winner, but they died before they could receive the prize!! Bummer.")
world << 'sound/misc/sadtrombone.ogg'
- if(round_statistics)
- round_statistics.game_mode = name
- round_statistics.round_length = world.time
- round_statistics.end_round_player_population = count_humans()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.game_mode = name
+ GLOB.round_statistics.round_length = world.time
+ GLOB.round_statistics.end_round_player_population = count_humans()
- round_statistics.log_round_statistics()
+ GLOB.round_statistics.log_round_statistics()
return 1
diff --git a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm
index 9b3ef1df4c15..3bc56728a7b9 100644
--- a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm
+++ b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm
@@ -2,7 +2,7 @@
//Global proc for checking if the game is whiskey outpost so I dont need to type if(gamemode == whiskey outpost) 50000 times
/proc/Check_WO()
- if(SSticker.mode == GAMEMODE_WHISKEY_OUTPOST || master_mode == GAMEMODE_WHISKEY_OUTPOST)
+ if(SSticker.mode == GAMEMODE_WHISKEY_OUTPOST || GLOB.master_mode == GAMEMODE_WHISKEY_OUTPOST)
return 1
return 0
@@ -81,7 +81,7 @@
taskbar_icon = 'icons/taskbar/gml_wo.png'
/datum/game_mode/whiskey_outpost/get_roles_list()
- return ROLES_WO
+ return GLOB.ROLES_WO
/datum/game_mode/whiskey_outpost/announce()
return 1
@@ -178,7 +178,7 @@
if(checkwin_counter >= 10) //Only check win conditions every 10 ticks.
if(xeno_wave == WO_MAX_WAVE && last_wave_time == 0)
last_wave_time = world.time
- if(!finished && round_should_check_for_win && last_wave_time != 0)
+ if(!finished && GLOB.round_should_check_for_win && last_wave_time != 0)
check_win()
checkwin_counter = 0
return 0
@@ -212,8 +212,8 @@
finished = 2 //Marine win
/datum/game_mode/whiskey_outpost/proc/disablejoining()
- for(var/i in RoleAuthority.roles_by_name)
- var/datum/job/J = RoleAuthority.roles_by_name[i]
+ for(var/i in GLOB.RoleAuthority.roles_by_name)
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[i]
// If the job has unlimited job slots, We set the amount of slots to the amount it has at the moment this is called
if (J.spawn_positions < 0)
@@ -254,8 +254,8 @@
//Announces the end of the game with all relevant information stated//
//////////////////////////////////////////////////////////////////////
/datum/game_mode/whiskey_outpost/declare_completion()
- if(round_statistics)
- round_statistics.track_round_end()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.track_round_end()
if(finished == 1)
log_game("Round end result - xenos won")
to_world(SPAN_ROUND_HEADER("The Xenos have succesfully defended their hive from colonization."))
@@ -263,11 +263,11 @@
to_world(SPAN_ROUNDBODY("It will be another five years before the USCM returns to the Neroid Sector, with the arrival of the 2nd 'Falling Falcons' Battalion and the USS Almayer."))
to_world(SPAN_ROUNDBODY("The xenomorph hive on LV-624 remains unthreatened until then..."))
world << sound('sound/misc/Game_Over_Man.ogg')
- if(round_statistics)
- round_statistics.round_result = MODE_INFESTATION_X_MAJOR
- if(round_statistics.current_map)
- round_statistics.current_map.total_xeno_victories++
- round_statistics.current_map.total_xeno_majors++
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.round_result = MODE_INFESTATION_X_MAJOR
+ if(GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_xeno_victories++
+ GLOB.round_statistics.current_map.total_xeno_majors++
else if(finished == 2)
log_game("Round end result - marines won")
@@ -276,26 +276,26 @@
to_world(SPAN_ROUNDBODY("Eventually, the Dust Raiders secure LV-624 and the entire Neroid Sector in 2182, pacifiying it and establishing peace in the sector for decades to come."))
to_world(SPAN_ROUNDBODY("The USS Almayer and the 2nd 'Falling Falcons' Battalion are never sent to the sector and are spared their fate in 2186."))
world << sound('sound/misc/hell_march.ogg')
- if(round_statistics)
- round_statistics.round_result = MODE_INFESTATION_M_MAJOR
- if(round_statistics.current_map)
- round_statistics.current_map.total_marine_victories++
- round_statistics.current_map.total_marine_majors++
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.round_result = MODE_INFESTATION_M_MAJOR
+ if(GLOB.round_statistics.current_map)
+ GLOB.round_statistics.current_map.total_marine_victories++
+ GLOB.round_statistics.current_map.total_marine_majors++
else
log_game("Round end result - no winners")
to_world(SPAN_ROUND_HEADER("NOBODY WON!"))
to_world(SPAN_ROUNDBODY("How? Don't ask me..."))
world << 'sound/misc/sadtrombone.ogg'
- if(round_statistics)
- round_statistics.round_result = MODE_INFESTATION_DRAW_DEATH
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.round_result = MODE_INFESTATION_DRAW_DEATH
- if(round_statistics)
- round_statistics.game_mode = name
- round_statistics.round_length = world.time
- round_statistics.end_round_player_population = GLOB.clients.len
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.game_mode = name
+ GLOB.round_statistics.round_length = world.time
+ GLOB.round_statistics.end_round_player_population = GLOB.clients.len
- round_statistics.log_round_statistics()
+ GLOB.round_statistics.log_round_statistics()
round_finished = 1
@@ -511,10 +511,10 @@
unacidable = TRUE
var/working = 0
-/obj/structure/machinery/wo_recycler/attack_hand(mob/user)
+/obj/structure/machinery/wo_recycler/attack_hand(mob/living/user)
if(inoperable(MAINT))
return
- if(user.lying || user.stat)
+ if(user.is_mob_incapacitated())
return
if(ismaintdrone(usr) || \
istype(usr, /mob/living/carbon/xenomorph))
diff --git a/code/game/gamemodes/colonialmarines/whiskey_outpost/whiskey_output_waves.dm b/code/game/gamemodes/colonialmarines/whiskey_outpost/whiskey_output_waves.dm
index ae272da88690..6e2738a83788 100644
--- a/code/game/gamemodes/colonialmarines/whiskey_outpost/whiskey_output_waves.dm
+++ b/code/game/gamemodes/colonialmarines/whiskey_outpost/whiskey_output_waves.dm
@@ -52,12 +52,12 @@
if(!xeno_candidate)
return FALSE
- if(RoleAuthority.castes_by_name[userInput])
+ if(GLOB.RoleAuthority.castes_by_name[userInput])
if(!(userInput in xeno_pool))
to_chat(xeno_candidate, SPAN_WARNING("The caste type you chose was occupied by someone else."))
return FALSE
var/spawn_loc = pick(xeno_spawns)
- var/xeno_type = RoleAuthority.get_caste_by_text(userInput)
+ var/xeno_type = GLOB.RoleAuthority.get_caste_by_text(userInput)
var/mob/living/carbon/xenomorph/new_xeno = new xeno_type(spawn_loc)
if(new_xeno.hive.construction_allowed == NORMAL_XENO)
new_xeno.hive.construction_allowed = XENO_QUEEN
diff --git a/code/game/gamemodes/colonialmarines/xenovsxeno.dm b/code/game/gamemodes/colonialmarines/xenovsxeno.dm
index a19c3e3582c1..a9ad48196257 100644
--- a/code/game/gamemodes/colonialmarines/xenovsxeno.dm
+++ b/code/game/gamemodes/colonialmarines/xenovsxeno.dm
@@ -26,9 +26,9 @@
/* Pre-pre-startup */
/datum/game_mode/xenovs/can_start()
for(var/hivename in SSmapping.configs[GROUND_MAP].xvx_hives)
- if(readied_players > SSmapping.configs[GROUND_MAP].xvx_hives[hivename])
+ if(GLOB.readied_players > SSmapping.configs[GROUND_MAP].xvx_hives[hivename])
hives += hivename
- xeno_starting_num = readied_players
+ xeno_starting_num = GLOB.readied_players
if(!initialize_starting_xenomorph_list(hives, TRUE))
hives.Cut()
return
@@ -38,7 +38,7 @@
to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDHEADER("The current map is - [SSmapping.configs[GROUND_MAP].map_name]!"))
/datum/game_mode/xenovs/get_roles_list()
- return ROLES_XENO
+ return GLOB.ROLES_XENO
/* Pre-setup */
/datum/game_mode/xenovs/pre_setup()
@@ -91,7 +91,7 @@
initialize_post_xenomorph_list(GLOB.xeno_hive_spawns)
round_time_lobby = world.time
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(!(A.is_resin_allowed))
A.is_resin_allowed = TRUE
@@ -141,7 +141,6 @@
original.statistic_exempt = TRUE
original.buckled = start_nest
original.setDir(start_nest.dir)
- original.update_canmove()
start_nest.buckled_mob = original
start_nest.afterbuckle(original)
@@ -193,7 +192,7 @@
qdel(C)
hive_cores = list()
- if(round_should_check_for_win)
+ if(GLOB.round_should_check_for_win)
check_win()
round_checkwin = 0
@@ -263,12 +262,12 @@
var/sound/S = sound(musical_track, channel = SOUND_CHANNEL_LOBBY)
S.status = SOUND_STREAM
sound_to(world, S)
- if(round_statistics)
- round_statistics.game_mode = name
- round_statistics.round_length = world.time
- round_statistics.end_round_player_population = GLOB.clients.len
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.game_mode = name
+ GLOB.round_statistics.round_length = world.time
+ GLOB.round_statistics.end_round_player_population = GLOB.clients.len
- round_statistics.log_round_statistics()
+ GLOB.round_statistics.log_round_statistics()
declare_completion_announce_xenomorphs()
calculate_end_statistics()
@@ -278,11 +277,11 @@
return TRUE
/datum/game_mode/xenovs/announce_ending()
- if(round_statistics)
- round_statistics.track_round_end()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.track_round_end()
log_game("Round end result: [round_finished]")
to_chat_spaced(world, margin_top = 2, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDHEADER("|Round Complete|"))
- to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDBODY("Thus ends the story of the battling hives on [SSmapping.configs[GROUND_MAP].map_name]. [round_finished]\nThe game-mode was: [master_mode]!\n[CONFIG_GET(string/endofroundblurb)]"))
+ to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDBODY("Thus ends the story of the battling hives on [SSmapping.configs[GROUND_MAP].map_name]. [round_finished]\nThe game-mode was: [GLOB.master_mode]!\n[CONFIG_GET(string/endofroundblurb)]"))
// for the toolbox
/datum/game_mode/xenovs/end_round_message()
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index db8f84d53f24..1039d495396b 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -3,7 +3,7 @@
/proc/carp_migration() // -- Darem
//sleep(100)
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
- marine_announcement("Unknown biological entities have been detected near [station_name], please stand-by.", "Lifesign Alert", 'sound/AI/commandreport.ogg')
+ marine_announcement("Unknown biological entities have been detected near [MAIN_SHIP_NAME], please stand-by.", "Lifesign Alert", 'sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
@@ -13,7 +13,7 @@
return
else
- for(var/obj/structure/machinery/power/apc/apc in machines)
+ for(var/obj/structure/machinery/power/apc/apc in GLOB.machines)
apc.overload_lighting()
return
diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm
index 7905c19fac41..5ebedd8fd26d 100644
--- a/code/game/gamemodes/events/power_failure.dm
+++ b/code/game/gamemodes/events/power_failure.dm
@@ -2,7 +2,7 @@
/proc/power_failure(announce = 1)
var/ship_zlevels = SSmapping.levels_by_trait(ZTRAIT_MARINE_MAIN_SHIP)
- for(var/obj/structure/machinery/power/smes/S in machines)
+ for(var/obj/structure/machinery/power/smes/S in GLOB.machines)
if(!is_mainship_level(S.z))
continue
S.last_charge = S.charge
@@ -14,7 +14,7 @@
S.updateicon()
S.power_change()
- for(var/obj/structure/machinery/power/apc/C in machines)
+ for(var/obj/structure/machinery/power/apc/C in GLOB.machines)
if(!is_mainship_level(C.z) && C.cell)
C.cell.charge = 0
@@ -25,7 +25,7 @@
marine_announcement("Abnormal activity detected in the ship power system. As a precaution, power must be shut down for an indefinite duration.", "Critical Power Failure", 'sound/AI/poweroff.ogg')
/proc/power_restore(announce = 1)
- for(var/obj/structure/machinery/power/smes/S in machines)
+ for(var/obj/structure/machinery/power/smes/S in GLOB.machines)
if(!is_mainship_level(S.z))
continue
S.charge = S.capacity
@@ -34,7 +34,7 @@
S.updateicon()
S.power_change()
- for(var/obj/structure/machinery/power/apc/C in machines)
+ for(var/obj/structure/machinery/power/apc/C in GLOB.machines)
if(C.cell && is_mainship_level(C.z))
C.cell.charge = C.cell.maxcharge
@@ -44,7 +44,7 @@
/proc/power_restore_quick(announce = 1)
- for(var/obj/structure/machinery/power/smes/S in machines)
+ for(var/obj/structure/machinery/power/smes/S in GLOB.machines)
if(!is_mainship_level(S.z)) // Ship only
continue
S.charge = S.capacity
@@ -59,14 +59,14 @@
/proc/power_restore_everything(announce = 1)
- for(var/obj/structure/machinery/power/smes/S in machines)
+ for(var/obj/structure/machinery/power/smes/S in GLOB.machines)
S.charge = S.capacity
S.output_level = S.output_level_max
S.outputting = 1
S.updateicon()
S.power_change()
- for(var/obj/structure/machinery/power/apc/C in machines)
+ for(var/obj/structure/machinery/power/apc/C in GLOB.machines)
if(C.cell)
C.cell.charge = C.cell.maxcharge
@@ -75,7 +75,7 @@
marine_announcement("Power has been restored. Reason: Unknown.", "Power Systems Nominal", 'sound/AI/poweron.ogg')
/proc/power_restore_ship_reactors(announce = 1)
- for(var/obj/structure/machinery/power/fusion_engine/FE in machines)
+ for(var/obj/structure/machinery/power/fusion_engine/FE in GLOB.machines)
FE.buildstate = 0
FE.is_on = 1
FE.fusion_cell = new
diff --git a/code/game/gamemodes/extended/extended.dm b/code/game/gamemodes/extended/extended.dm
index f00125cc8f0f..72512a7e77ff 100644
--- a/code/game/gamemodes/extended/extended.dm
+++ b/code/game/gamemodes/extended/extended.dm
@@ -12,7 +12,7 @@
to_world("The current game mode is - Extended!")
/datum/game_mode/extended/get_roles_list()
- return ROLES_USCM
+ return GLOB.ROLES_USCM
/datum/game_mode/extended/post_setup()
initialize_post_marine_gear_list()
@@ -24,7 +24,7 @@
/datum/game_mode/extended/process()
. = ..()
if(next_research_allocation < world.time)
- chemical_data.update_credits(chemical_data.research_allocation_amount)
+ GLOB.chemical_data.update_credits(GLOB.chemical_data.research_allocation_amount)
next_research_allocation = world.time + research_allocation_interval
/datum/game_mode/extended/check_finished()
@@ -39,11 +39,11 @@
var/musical_track = pick('sound/theme/neutral_hopeful1.ogg','sound/theme/neutral_hopeful2.ogg')
world << musical_track
- if(round_statistics)
- round_statistics.game_mode = name
- round_statistics.round_length = world.time
- round_statistics.end_round_player_population = GLOB.clients.len
- round_statistics.log_round_statistics()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.game_mode = name
+ GLOB.round_statistics.round_length = world.time
+ GLOB.round_statistics.end_round_player_population = GLOB.clients.len
+ GLOB.round_statistics.log_round_statistics()
calculate_end_statistics()
declare_completion_announce_predators()
diff --git a/code/game/gamemodes/extended/extended_clash.dm b/code/game/gamemodes/extended/extended_clash.dm
index 04077de2775c..e0e526d91afa 100644
--- a/code/game/gamemodes/extended/extended_clash.dm
+++ b/code/game/gamemodes/extended/extended_clash.dm
@@ -6,7 +6,7 @@
taskbar_icon = 'icons/taskbar/gml_hvh.png'
/datum/game_mode/extended/faction_clash/get_roles_list()
- return ROLES_FACTION_CLASH
+ return GLOB.ROLES_FACTION_CLASH
/datum/game_mode/extended/faction_clash/post_setup()
. = ..()
diff --git a/code/game/gamemodes/extended/infection.dm b/code/game/gamemodes/extended/infection.dm
index a6b909022aef..1e0032a8e6fa 100644
--- a/code/game/gamemodes/extended/infection.dm
+++ b/code/game/gamemodes/extended/infection.dm
@@ -15,7 +15,7 @@
to_world("Don't ahelp asking for specific details, you won't get them.")
/datum/game_mode/infection/get_roles_list()
- return ROLES_USCM
+ return GLOB.ROLES_USCM
/datum/game_mode/infection/pre_setup()
return ..()
@@ -61,7 +61,7 @@
possible_synth_survivors -= A
continue
- if(RoleAuthority.roles_whitelist[ckey(A.key)] & WHITELIST_SYNTHETIC)
+ if(GLOB.RoleAuthority.roles_whitelist[ckey(A.key)] & WHITELIST_SYNTHETIC)
if(A in possible_survivors)
continue //they are already applying to be a survivor
else
@@ -120,11 +120,11 @@
var/musical_track = pick('sound/theme/sad_loss1.ogg','sound/theme/sad_loss2.ogg')
world << musical_track
- if(round_statistics)
- round_statistics.game_mode = name
- round_statistics.round_length = world.time
- round_statistics.end_round_player_population = GLOB.clients.len
- round_statistics.log_round_statistics()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.game_mode = name
+ GLOB.round_statistics.round_length = world.time
+ GLOB.round_statistics.end_round_player_population = GLOB.clients.len
+ GLOB.round_statistics.log_round_statistics()
declare_completion_announce_xenomorphs()
declare_completion_announce_predators()
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index e467631c915e..3bb8c2d80123 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -11,9 +11,9 @@
*
*/
-var/global/datum/entity/statistic/round/round_statistics
-var/global/list/datum/entity/player_entity/player_entities = list()
-var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracking_ids to tacbinos and signal flares
+GLOBAL_DATUM(round_statistics, /datum/entity/statistic/round)
+GLOBAL_LIST_INIT_TYPED(player_entities, /datum/entity/player_entity, list())
+GLOBAL_VAR_INIT(cas_tracking_id_increment, 0) //this var used to assign unique tracking_ids to tacbinos and signal flares
/datum/game_mode
var/name = "invalid"
var/config_tag = null
@@ -56,7 +56,7 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
if((player.client)&&(player.ready))
playerC++
- if(master_mode=="secret")
+ if(GLOB.master_mode=="secret")
if(playerC >= required_players_secret)
return 1
else
@@ -129,15 +129,15 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
return
/datum/game_mode/proc/announce_ending()
- if(round_statistics)
- round_statistics.track_round_end()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.track_round_end()
log_game("Round end result: [round_finished]")
to_chat_spaced(world, margin_top = 2, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDHEADER("|Round Complete|"))
- to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDBODY("Thus ends the story of the brave men and women of the [MAIN_SHIP_NAME] and their struggle on [SSmapping.configs[GROUND_MAP].map_name].\nThe game-mode was: [master_mode]!\n[CONFIG_GET(string/endofroundblurb)]"))
+ to_chat_spaced(world, type = MESSAGE_TYPE_SYSTEM, html = SPAN_ROUNDBODY("Thus ends the story of the brave men and women of the [MAIN_SHIP_NAME] and their struggle on [SSmapping.configs[GROUND_MAP].map_name].\nThe game-mode was: [GLOB.master_mode]!\n[CONFIG_GET(string/endofroundblurb)]"))
/datum/game_mode/proc/declare_completion()
- if(round_statistics)
- round_statistics.track_round_end()
+ if(GLOB.round_statistics)
+ GLOB.round_statistics.track_round_end()
var/clients = 0
var/surviving_humans = 0
var/surviving_total = 0
@@ -181,7 +181,7 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
record_playtime(M.client.player_data, M.job, type)
/datum/game_mode/proc/show_end_statistics(icon_state)
- round_statistics.update_panel_data()
+ GLOB.round_statistics.update_panel_data()
for(var/mob/M in GLOB.player_list)
if(M.client)
give_action(M, /datum/action/show_round_statistics, null, icon_state)
@@ -226,7 +226,7 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
var/list/heads = list()
for(var/i in GLOB.alive_human_list)
var/mob/living/carbon/human/player = i
- if(player.stat!=2 && player.mind && (player.job in ROLES_COMMAND ))
+ if(player.stat!=2 && player.mind && (player.job in GLOB.ROLES_COMMAND ))
heads += player.mind
return heads
@@ -237,7 +237,7 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
/datum/game_mode/proc/get_all_heads()
var/list/heads = list()
for(var/mob/player in GLOB.mob_list)
- if(player.mind && (player.job in ROLES_COMMAND ))
+ if(player.mind && (player.job in GLOB.ROLES_COMMAND ))
heads += player.mind
return heads
diff --git a/code/game/jobs/job/antag/other/pred.dm b/code/game/jobs/job/antag/other/pred.dm
index a8bcec788c44..77439276d04a 100644
--- a/code/game/jobs/job/antag/other/pred.dm
+++ b/code/game/jobs/job/antag/other/pred.dm
@@ -41,7 +41,7 @@
player.clan_info.sync() // pause here might be problematic, we'll see. If DB dies, then we're fucked
- var/rank = clan_ranks[player.clan_info.clan_rank]
+ var/rank = GLOB.clan_ranks[player.clan_info.clan_rank]
if(!rank)
return CLAN_RANK_BLOODED
diff --git a/code/game/jobs/job/antag/xeno/xenomorph.dm b/code/game/jobs/job/antag/xeno/xenomorph.dm
index 53b06147e28c..78b6ab7e3ab2 100644
--- a/code/game/jobs/job/antag/xeno/xenomorph.dm
+++ b/code/game/jobs/job/antag/xeno/xenomorph.dm
@@ -88,9 +88,8 @@
break
human_to_transform.statistic_exempt = TRUE
- human_to_transform.buckled = start_nest
+ human_to_transform.set_buckled(start_nest)
human_to_transform.setDir(start_nest.dir)
- human_to_transform.update_canmove()
start_nest.buckled_mob = human_to_transform
start_nest.afterbuckle(human_to_transform)
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 48ad372e1f33..56decd8f0c02 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -274,7 +274,7 @@
var/mob/living/carbon/human/human = M
var/job_whitelist = title
- var/whitelist_status = get_whitelist_status(RoleAuthority.roles_whitelist, human.client)
+ var/whitelist_status = get_whitelist_status(GLOB.RoleAuthority.roles_whitelist, human.client)
if(whitelist_status)
job_whitelist = "[title][whitelist_status]"
@@ -293,9 +293,9 @@
generate_entry_conditions(human) //Do any other thing that relates to their spawn.
if(flags_startup_parameters & ROLE_ADD_TO_SQUAD) //Are we a muhreen? Randomize our squad. This should go AFTER IDs. //TODO Robust this later.
- RoleAuthority.randomize_squad(human)
+ GLOB.RoleAuthority.randomize_squad(human)
- if(Check_WO() && job_squad_roles.Find(GET_DEFAULT_ROLE(human.job))) //activates self setting proc for marine headsets for WO
+ if(Check_WO() && GLOB.job_squad_roles.Find(GET_DEFAULT_ROLE(human.job))) //activates self setting proc for marine headsets for WO
var/datum/game_mode/whiskey_outpost/WO = SSticker.mode
WO.self_set_headset(human)
diff --git a/code/game/jobs/job/marine/squad/engineer.dm b/code/game/jobs/job/marine/squad/engineer.dm
index 1910248a61a2..a4422572f218 100644
--- a/code/game/jobs/job/marine/squad/engineer.dm
+++ b/code/game/jobs/job/marine/squad/engineer.dm
@@ -8,7 +8,7 @@
entry_message_body = "You have the equipment and skill to build fortifications, reroute power lines, and bunker down. Your squaddies will look to you when it comes to construction in the field of battle."
/datum/job/marine/engineer/set_spawn_positions(count)
- for(var/datum/squad/sq in RoleAuthority.squads)
+ for(var/datum/squad/sq in GLOB.RoleAuthority.squads)
if(sq)
sq.max_engineers = engi_slot_formula(count)
@@ -21,7 +21,7 @@
total_positions_so_far = slots
if(latejoin)
- for(var/datum/squad/sq in RoleAuthority.squads)
+ for(var/datum/squad/sq in GLOB.RoleAuthority.squads)
if(sq)
sq.max_engineers = slots
diff --git a/code/game/jobs/job/marine/squad/medic.dm b/code/game/jobs/job/marine/squad/medic.dm
index 3df0a3793ca5..450d1176658f 100644
--- a/code/game/jobs/job/marine/squad/medic.dm
+++ b/code/game/jobs/job/marine/squad/medic.dm
@@ -8,7 +8,7 @@
entry_message_body = "You tend the wounds of your squad mates and make sure they are healthy and active. You may not be a fully-fledged doctor, but you stand between life and death when it matters."
/datum/job/marine/medic/set_spawn_positions(count)
- for(var/datum/squad/sq in RoleAuthority.squads)
+ for(var/datum/squad/sq in GLOB.RoleAuthority.squads)
if(sq)
sq.max_medics = medic_slot_formula(count)
@@ -21,7 +21,7 @@
total_positions_so_far = slots
if(latejoin)
- for(var/datum/squad/sq in RoleAuthority.squads)
+ for(var/datum/squad/sq in GLOB.RoleAuthority.squads)
if(sq)
sq.max_medics = slots
diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm
index d1c2640a81aa..5eac0586eb34 100644
--- a/code/game/jobs/job/marine/squads.dm
+++ b/code/game/jobs/job/marine/squads.dm
@@ -649,10 +649,10 @@
//Not a safe proc. Returns null if squads or jobs aren't set up.
//Mostly used in the marine squad console in marine_consoles.dm.
/proc/get_squad_by_name(text)
- if(!RoleAuthority || RoleAuthority.squads.len == 0)
+ if(!GLOB.RoleAuthority || GLOB.RoleAuthority.squads.len == 0)
return null
var/datum/squad/S
- for(S in RoleAuthority.squads)
+ for(S in GLOB.RoleAuthority.squads)
if(S.name == text)
return S
return null
@@ -760,7 +760,7 @@
//moved the main proc for ft management from human.dm here to make it support both examine and squad info way to edit fts
/datum/squad/proc/manage_fireteams(mob/living/carbon/human/target)
var/obj/item/card/id/ID = target.get_idcard()
- if(!ID || !(ID.rank in ROLES_MARINES))
+ if(!ID || !(ID.rank in GLOB.ROLES_MARINES))
return
if(ID.rank == JOB_SQUAD_LEADER || squad_leader == target) //if SL/aSL are chosen
var/choice = tgui_input_list(squad_leader, "Manage Fireteams and Team leaders.", "Fireteams Management", list("Cancel", "Unassign Fireteam 1 Leader", "Unassign Fireteam 2 Leader", "Unassign Fireteam 3 Leader", "Unassign all Team Leaders"))
diff --git a/code/game/jobs/role_authority.dm b/code/game/jobs/role_authority.dm
index dc9865f8d6e6..8deadbeba32e 100644
--- a/code/game/jobs/role_authority.dm
+++ b/code/game/jobs/role_authority.dm
@@ -11,7 +11,7 @@ When a round starts, the roles are assigned based on the round, from another lis
by name can be kept for things like job bans, while the round may add or remove roles as needed.If you need to equip a mob for a job, always
use roles_by_path as it is an accurate account of every specific role path (with specific equipment).
*/
-var/global/datum/authority/branch/role/RoleAuthority
+GLOBAL_DATUM(RoleAuthority, /datum/authority/branch/role)
#define GET_RANDOM_JOB 0
#define BE_MARINE 1
@@ -25,11 +25,10 @@ var/global/datum/authority/branch/role/RoleAuthority
#define SHIPSIDE_ROLE_WEIGHT 0.25
-var/global/players_preassigned = 0
-
+GLOBAL_VAR_INIT(players_preassigned, 0)
/proc/guest_jobbans(job)
- return (job in ROLES_COMMAND)
+ return (job in GLOB.ROLES_COMMAND)
/datum/authority/branch/role
var/name = "Role Authority"
@@ -236,7 +235,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
// Get balancing weight for the readied players.
// Squad marine roles have a weight of 1, and shipside roles have a lower weight of SHIPSIDE_ROLE_WEIGHT.
- players_preassigned = assign_roles(temp_roles_for_mode.Copy(), unassigned_players.Copy(), TRUE)
+ GLOB.players_preassigned = assign_roles(temp_roles_for_mode.Copy(), unassigned_players.Copy(), TRUE)
// Even though we pass a copy of temp_roles_for_mode, job counters still change, so we reset them here.
for(var/title in temp_roles_for_mode)
@@ -247,28 +246,28 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
// Set the xeno starting amount based on marines assigned
var/datum/job/antag/xenos/XJ = temp_roles_for_mode[JOB_XENOMORPH]
if(istype(XJ))
- XJ.set_spawn_positions(players_preassigned)
+ XJ.set_spawn_positions(GLOB.players_preassigned)
// Limit the number of SQUAD MARINE roles players can roll initially
var/datum/job/SMJ = GET_MAPPED_ROLE(JOB_SQUAD_MARINE)
if(istype(SMJ))
- SMJ.set_spawn_positions(players_preassigned)
+ SMJ.set_spawn_positions(GLOB.players_preassigned)
// Set survivor starting amount based on marines assigned
var/datum/job/SJ = temp_roles_for_mode[JOB_SURVIVOR]
if(istype(SJ))
- SJ.set_spawn_positions(players_preassigned)
+ SJ.set_spawn_positions(GLOB.players_preassigned)
var/datum/job/CO_surv_job = temp_roles_for_mode[JOB_CO_SURVIVOR]
if(istype(CO_surv_job))
- CO_surv_job.set_spawn_positions(players_preassigned)
+ CO_surv_job.set_spawn_positions(GLOB.players_preassigned)
- if(SSnightmare.get_scenario_value("predator_round"))
+ if(SSnightmare.get_scenario_value("predator_round") && !Check_WO())
SSticker.mode.flags_round_type |= MODE_PREDATOR
// Set predators starting amount based on marines assigned
var/datum/job/PJ = temp_roles_for_mode[JOB_PREDATOR]
if(istype(PJ))
- PJ.set_spawn_positions(players_preassigned)
+ PJ.set_spawn_positions(GLOB.players_preassigned)
// Assign the roles, this time for real, respecting limits we have established.
var/list/roles_left = assign_roles(temp_roles_for_mode, unassigned_players)
@@ -312,13 +311,13 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
var/assigned = 0
for(var/priority in HIGH_PRIORITY to LOW_PRIORITY)
// Assigning xenos first.
- assigned += assign_initial_roles(priority, roles_for_mode & ROLES_XENO, unassigned_players)
+ assigned += assign_initial_roles(priority, roles_for_mode & GLOB.ROLES_XENO, unassigned_players)
// Assigning special roles second. (survivor, predator)
- assigned += assign_initial_roles(priority, roles_for_mode & (ROLES_WHITELISTED|ROLES_SPECIAL), unassigned_players)
+ assigned += assign_initial_roles(priority, roles_for_mode & (GLOB.ROLES_WHITELISTED|GLOB.ROLES_SPECIAL), unassigned_players)
// Assigning command third.
- assigned += assign_initial_roles(priority, roles_for_mode & ROLES_COMMAND, unassigned_players)
+ assigned += assign_initial_roles(priority, roles_for_mode & GLOB.ROLES_COMMAND, unassigned_players)
// Assigning the rest
- var/rest_roles_for_mode = roles_for_mode - (roles_for_mode & ROLES_XENO) - (roles_for_mode & ROLES_COMMAND) - (roles_for_mode & (ROLES_WHITELISTED|ROLES_SPECIAL))
+ var/rest_roles_for_mode = roles_for_mode - (roles_for_mode & GLOB.ROLES_XENO) - (roles_for_mode & GLOB.ROLES_COMMAND) - (roles_for_mode & (GLOB.ROLES_WHITELISTED|GLOB.ROLES_SPECIAL))
if(count)
assigned += assign_initial_roles(priority, rest_roles_for_mode, unassigned_players)
else
@@ -367,9 +366,9 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
* survivors and the number of roundstart Squad Rifleman slots.
*/
/datum/authority/branch/role/proc/calculate_role_weight(datum/job/J)
- if(ROLES_MARINES.Find(J.title))
+ if(GLOB.ROLES_MARINES.Find(J.title))
return 1
- if(ROLES_XENO.Find(J.title))
+ if(GLOB.ROLES_XENO.Find(J.title))
return 1
if(J.title == JOB_SURVIVOR)
return 1
@@ -436,9 +435,9 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
//here is the main reason this proc exists - to remove freed squad jobs from squad,
//so latejoining person ends in the squad which's job was freed and not random one
var/datum/squad/sq = null
- if(job_squad_roles.Find(J.title))
+ if(GLOB.job_squad_roles.Find(J.title))
var/list/squad_list = list()
- for(sq in RoleAuthority.squads)
+ for(sq in GLOB.RoleAuthority.squads)
if(sq.usable)
squad_list += sq
sq = null
@@ -537,7 +536,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
if(new_job.flags_startup_parameters & ROLE_ADD_TO_SQUAD) //Are we a muhreen? Randomize our squad. This should go AFTER IDs. //TODO Robust this later.
randomize_squad(new_human)
- if(Check_WO() && job_squad_roles.Find(GET_DEFAULT_ROLE(new_human.job))) //activates self setting proc for marine headsets for WO
+ if(Check_WO() && GLOB.job_squad_roles.Find(GET_DEFAULT_ROLE(new_human.job))) //activates self setting proc for marine headsets for WO
var/datum/game_mode/whiskey_outpost/WO = SSticker.mode
WO.self_set_headset(new_human)
@@ -817,7 +816,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
var/found_desired = FALSE
var/found_limit = FALSE
- for(var/status in whitelist_hierarchy)
+ for(var/status in GLOB.whitelist_hierarchy)
if(status == desired_status)
found_desired = TRUE
break
diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm
index 05f530348029..3a4b94145ca1 100644
--- a/code/game/jobs/whitelist.dm
+++ b/code/game/jobs/whitelist.dm
@@ -11,10 +11,10 @@ GLOBAL_LIST_FILE_LOAD(whitelist, WHITELISTFILE)
if(client.admin_holder && (client.admin_holder.rights & R_ADMIN))
return TRUE
if(job == XENO_CASTE_QUEEN)
- var/datum/caste_datum/C = RoleAuthority.castes_by_name[XENO_CASTE_QUEEN]
+ var/datum/caste_datum/C = GLOB.RoleAuthority.castes_by_name[XENO_CASTE_QUEEN]
return C.can_play_caste(client)
if(job == JOB_SURVIVOR)
- var/datum/job/J = RoleAuthority.roles_by_path[/datum/job/civilian/survivor]
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_path[/datum/job/civilian/survivor]
return J.can_play_role(client)
return TRUE
@@ -42,11 +42,11 @@ GLOBAL_LIST_FILE_LOAD(alien_whitelist, "config/alienwhitelist.txt")
/// returns a list of strings containing the whitelists held by a specific ckey
/proc/get_whitelisted_roles(ckey)
- if(RoleAuthority.roles_whitelist[ckey] & WHITELIST_PREDATOR)
+ if(GLOB.RoleAuthority.roles_whitelist[ckey] & WHITELIST_PREDATOR)
LAZYADD(., "predator")
- if(RoleAuthority.roles_whitelist[ckey] & WHITELIST_COMMANDER)
+ if(GLOB.RoleAuthority.roles_whitelist[ckey] & WHITELIST_COMMANDER)
LAZYADD(., "commander")
- if(RoleAuthority.roles_whitelist[ckey] & WHITELIST_SYNTHETIC)
+ if(GLOB.RoleAuthority.roles_whitelist[ckey] & WHITELIST_SYNTHETIC)
LAZYADD(., "synthetic")
#undef WHITELISTFILE
diff --git a/code/game/machinery/ARES/ARES_interface.dm b/code/game/machinery/ARES/ARES_interface.dm
index 857294c5fbb7..89f12d3949a9 100644
--- a/code/game/machinery/ARES/ARES_interface.dm
+++ b/code/game/machinery/ARES/ARES_interface.dm
@@ -78,7 +78,7 @@
data["access_text"] = "[sudo_holder ? "(SUDO)," : ""] access level [authentication], [ares_auth_to_text(authentication)]."
data["access_level"] = authentication
- data["alert_level"] = security_level
+ data["alert_level"] = GLOB.security_level
data["evac_status"] = SShijack.evac_status
data["worldtime"] = world.time
@@ -398,7 +398,7 @@
to_chat(usr, SPAN_WARNING("It has not been long enough since the last General Quarters call!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
- if(security_level < SEC_LEVEL_RED)
+ if(GLOB.security_level < SEC_LEVEL_RED)
set_security_level(SEC_LEVEL_RED, no_sound = TRUE, announce = FALSE)
shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
log_game("[key_name(usr)] has called for general quarters via ARES.")
@@ -408,7 +408,7 @@
. = TRUE
if("evacuation_start")
- if(security_level < SEC_LEVEL_RED)
+ if(GLOB.security_level < SEC_LEVEL_RED)
to_chat(usr, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
@@ -439,11 +439,11 @@
to_chat(usr, SPAN_WARNING("The distress launcher is cooling down!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
- if(security_level == SEC_LEVEL_DELTA)
+ if(GLOB.security_level == SEC_LEVEL_DELTA)
to_chat(usr, SPAN_WARNING("The ship is already undergoing self destruct procedures!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
- else if(security_level < SEC_LEVEL_RED)
+ if(GLOB.security_level < SEC_LEVEL_RED)
to_chat(usr, SPAN_WARNING("The ship must be under red alert to launch a distress beacon!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
@@ -467,7 +467,7 @@
to_chat(usr, SPAN_WARNING("The ordnance request frequency is garbled, wait for reset!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
- if(security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
+ if(GLOB.security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
diff --git a/code/game/machinery/ARES/ARES_interface_apollo.dm b/code/game/machinery/ARES/ARES_interface_apollo.dm
index 3bbc6065a88a..56283417ae05 100644
--- a/code/game/machinery/ARES/ARES_interface_apollo.dm
+++ b/code/game/machinery/ARES/ARES_interface_apollo.dm
@@ -70,7 +70,7 @@
data["access_text"] = "access level [authentication], [ares_auth_to_text(authentication)]."
data["access_level"] = authentication
- data["alert_level"] = security_level
+ data["alert_level"] = GLOB.security_level
data["worldtime"] = world.time
data["access_log"] = list()
diff --git a/code/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm
index ffcad9755403..afe5efd518cd 100644
--- a/code/game/machinery/ARES/ARES_procs.dm
+++ b/code/game/machinery/ARES/ARES_procs.dm
@@ -81,7 +81,7 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
// ------ ARES Logging Procs ------ //
/proc/ares_apollo_talk(broadcast_message)
var/datum/language/apollo/apollo = GLOB.all_languages[LANGUAGE_APOLLO]
- for(var/mob/living/silicon/decoy/ship_ai/ai in ai_mob_list)
+ for(var/mob/living/silicon/decoy/ship_ai/ai in GLOB.ai_mob_list)
if(ai.stat == DEAD)
return FALSE
apollo.broadcast(ai, broadcast_message)
diff --git a/code/game/machinery/ARES/apollo_pda.dm b/code/game/machinery/ARES/apollo_pda.dm
index 26ec9d5120bd..8df3faf79260 100644
--- a/code/game/machinery/ARES/apollo_pda.dm
+++ b/code/game/machinery/ARES/apollo_pda.dm
@@ -94,7 +94,7 @@
data["access_text"] = "access level [authentication], [ares_auth_to_text(authentication)]."
data["access_level"] = authentication
- data["alert_level"] = security_level
+ data["alert_level"] = GLOB.security_level
data["worldtime"] = world.time
data["access_log"] = list()
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index c9092a750f73..03c013703b07 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -19,7 +19,7 @@
active_power_usage = 5
var/strapped = 0
can_buckle = TRUE
- buckle_lying = TRUE
+ buckle_lying = 90
var/buckling_y = -4
surgery_duration_multiplier = SURGERY_SURFACE_MULT_IDEAL //Ideal surface for surgery.
var/patient_exam = 0
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index e6fc0c8de76e..88b4ab899112 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -5,9 +5,9 @@
/proc/RandomAAlarmWires()
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
var/list/AAlarmwires = list(0, 0, 0, 0, 0)
- AAlarmIndexToFlag = list(0, 0, 0, 0, 0)
- AAlarmIndexToWireColor = list(0, 0, 0, 0, 0)
- AAlarmWireColorToIndex = list(0, 0, 0, 0, 0)
+ GLOB.AAlarmIndexToFlag = list(0, 0, 0, 0, 0)
+ GLOB.AAlarmIndexToWireColor = list(0, 0, 0, 0, 0)
+ GLOB.AAlarmWireColorToIndex = list(0, 0, 0, 0, 0)
var/flagIndex = 1
for (var/flag=1, flag<32, flag+=flag)
var/valid = 0
@@ -16,9 +16,9 @@
if (AAlarmwires[colorIndex]==0)
valid = 1
AAlarmwires[colorIndex] = flag
- AAlarmIndexToFlag[flagIndex] = flag
- AAlarmIndexToWireColor[flagIndex] = colorIndex
- AAlarmWireColorToIndex[colorIndex] = flagIndex
+ GLOB.AAlarmIndexToFlag[flagIndex] = flag
+ GLOB.AAlarmIndexToWireColor[flagIndex] = colorIndex
+ GLOB.AAlarmWireColorToIndex[colorIndex] = flagIndex
flagIndex+=1
return AAlarmwires
@@ -379,24 +379,24 @@
//HACKING//
///////////
/obj/structure/machinery/alarm/proc/isWireColorCut(wireColor)
- var/wireFlag = AAlarmWireColorToFlag[wireColor]
+ var/wireFlag = GLOB.AAlarmWireColorToFlag[wireColor]
return ((AAlarmwires & wireFlag) == 0)
/obj/structure/machinery/alarm/proc/isWireCut(wireIndex)
- var/wireFlag = AAlarmIndexToFlag[wireIndex]
+ var/wireFlag = GLOB.AAlarmIndexToFlag[wireIndex]
return ((AAlarmwires & wireFlag) == 0)
/obj/structure/machinery/alarm/proc/allWiresCut()
var/i = 1
while(i<=5)
- if(AAlarmwires & AAlarmIndexToFlag[i])
+ if(AAlarmwires & GLOB.AAlarmIndexToFlag[i])
return 0
i++
return 1
/obj/structure/machinery/alarm/proc/cut(wireColor)
- var/wireFlag = AAlarmWireColorToFlag[wireColor]
- var/wireIndex = AAlarmWireColorToIndex[wireColor]
+ var/wireFlag = GLOB.AAlarmWireColorToFlag[wireColor]
+ var/wireIndex = GLOB.AAlarmWireColorToIndex[wireColor]
AAlarmwires &= ~wireFlag
switch(wireIndex)
if(AALARM_WIRE_IDSCAN)
@@ -427,8 +427,8 @@
return
/obj/structure/machinery/alarm/proc/mend(wireColor)
- var/wireFlag = AAlarmWireColorToFlag[wireColor]
- var/wireIndex = AAlarmWireColorToIndex[wireColor] //not used in this function
+ var/wireFlag = GLOB.AAlarmWireColorToFlag[wireColor]
+ var/wireIndex = GLOB.AAlarmWireColorToIndex[wireColor] //not used in this function
AAlarmwires |= wireFlag
switch(wireIndex)
if(AALARM_WIRE_POWER)
@@ -445,7 +445,7 @@
/obj/structure/machinery/alarm/proc/pulse(wireColor)
//var/wireFlag = AAlarmWireColorToFlag[wireColor] //not used in this function
- var/wireIndex = AAlarmWireColorToIndex[wireColor]
+ var/wireIndex = GLOB.AAlarmWireColorToIndex[wireColor]
switch(wireIndex)
if(AALARM_WIRE_IDSCAN) //unlocks for 30 seconds, if you have a better way to hack I'm all ears
locked = 0
@@ -527,7 +527,7 @@
"Black" = 5,
)
for(var/wiredesc in wirecolors)
- var/is_uncut = AAlarmwires & AAlarmWireColorToFlag[wirecolors[wiredesc]]
+ var/is_uncut = AAlarmwires & GLOB.AAlarmWireColorToFlag[wirecolors[wiredesc]]
t1 += "[wiredesc] wire: "
if(!is_uncut)
t1 += "Mend"
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 3c2c81ff0ce7..32cb026a0b25 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -103,7 +103,7 @@ update_flag
src.add_fingerprint(user)
..()
- nanomanager.update_uis(src) // Update all NanoUIs attached to src
+ SSnano.nanomanager.update_uis(src) // Update all NanoUIs attached to src
/obj/structure/machinery/portable_atmospherics/canister/attack_remote(mob/user as mob)
return src.attack_hand(user)
diff --git a/code/game/machinery/bio-dome_floodlights.dm b/code/game/machinery/bio-dome_floodlights.dm
index a1f028a79f30..e23dbcc023f4 100644
--- a/code/game/machinery/bio-dome_floodlights.dm
+++ b/code/game/machinery/bio-dome_floodlights.dm
@@ -14,7 +14,7 @@
/obj/structure/machinery/hydro_floodlight_switch/Initialize(mapload, ...)
. = ..()
- for(var/obj/structure/machinery/hydro_floodlight/F in machines)
+ for(var/obj/structure/machinery/hydro_floodlight/F in GLOB.machines)
floodlist += F
F.fswitch = src
start_processing()
diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm
index 912a6070328a..46050d2705b3 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -151,7 +151,7 @@
/turf/proc/CardinalTurfsWithAccess(obj/item/card/id/ID)
var/L[] = new()
- for(var/d in cardinal)
+ for(var/d in GLOB.cardinals)
var/turf/T = get_step(src, d)
if(istype(T) && !T.density)
if(!LinkBlockedWithAccess(src, T, ID))
diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm
index e2dcf7ffb1db..c21a7a854bc3 100644
--- a/code/game/machinery/bots/cleanbot.dm
+++ b/code/game/machinery/bots/cleanbot.dm
@@ -37,8 +37,8 @@
should_patrol = 1
src.botcard = new(src)
- if(RoleAuthority)
- var/datum/job/ctequiv = RoleAuthority.roles_by_name[JOB_CARGO_TECH]
+ if(GLOB.RoleAuthority)
+ var/datum/job/ctequiv = GLOB.RoleAuthority.roles_by_name[JOB_CARGO_TECH]
if(ctequiv) botcard.access = ctequiv.get_access()
src.locked = 0 // Start unlocked so roboticist can set them to patrol.
diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm
index f28a15ea1893..77e890d88d34 100644
--- a/code/game/machinery/bots/medbot.dm
+++ b/code/game/machinery/bots/medbot.dm
@@ -63,7 +63,7 @@
src.botcard = new /obj/item/card/id(src)
if(isnull(src.botcard_access) || (src.botcard_access.len < 1))
- var/datum/job/J = RoleAuthority ? RoleAuthority.roles_by_path[/datum/job/civilian/doctor] : new /datum/job/civilian/doctor
+ var/datum/job/J = GLOB.RoleAuthority ? GLOB.RoleAuthority.roles_by_path[/datum/job/civilian/doctor] : new /datum/job/civilian/doctor
botcard.access = J.get_access()
else
src.botcard.access = src.botcard_access
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index b88f8249566b..08437d35a8e3 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -70,8 +70,8 @@
/obj/structure/machinery/bot/mulebot/Initialize(mapload, ...)
. = ..()
botcard = new(src)
- if(RoleAuthority)
- var/datum/job/ctequiv = RoleAuthority.roles_by_name[JOB_CARGO_TECH]
+ if(GLOB.RoleAuthority)
+ var/datum/job/ctequiv = GLOB.RoleAuthority.roles_by_name[JOB_CARGO_TECH]
if(ctequiv) botcard.access = ctequiv.get_access()
cell = new(src)
@@ -83,7 +83,7 @@
SSradio.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
var/count = 0
- for(var/obj/structure/machinery/bot/mulebot/other in machines)
+ for(var/obj/structure/machinery/bot/mulebot/other in GLOB.machines)
count++
if(!suffix)
suffix = "#[count]"
@@ -763,7 +763,6 @@
M.stop_pulling()
M.apply_effect(8, STUN)
M.apply_effect(5, WEAKEN)
- M.lying = 1
..()
/obj/structure/machinery/bot/mulebot/alter_health()
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 3b2a91eea314..acb6d26bf0d5 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -81,7 +81,7 @@
icon_state = "[initial(icon_state)]emp"
var/list/previous_network = network
network = list()
- cameranet.removeCamera(src)
+ GLOB.cameranet.removeCamera(src)
stat |= EMPED
set_light(0)
triggerCameraAlarm()
@@ -91,7 +91,7 @@
stat &= ~EMPED
cancelCameraAlarm()
if(can_use())
- cameranet.addCamera(src)
+ GLOB.cameranet.addCamera(src)
kick_viewers()
@@ -104,7 +104,7 @@
/obj/structure/machinery/camera/proc/setViewRange(num = 7)
src.view_range = num
- cameranet.updateVisibility(src, 0)
+ GLOB.cameranet.updateVisibility(src, 0)
/obj/structure/machinery/camera/attack_hand(mob/living/carbon/human/user as mob)
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index 41aa7fa32707..5a0a41fdc9bf 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -40,7 +40,7 @@
if (!status || (stat & NOPOWER))
return 0
if (detectTime == -1)
- for (var/mob/living/silicon/aiPlayer in ai_mob_list)
+ for (var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list)
aiPlayer.cancelAlarm("Motion", get_area(src), src)
detectTime = 0
return 1
@@ -49,7 +49,7 @@
if (!status || (stat & NOPOWER))
return 0
if (!detectTime) return 0
- for (var/mob/living/silicon/aiPlayer in ai_mob_list)
+ for (var/mob/living/silicon/aiPlayer in GLOB.ai_mob_list)
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
detectTime = -1
return 1
diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm
index 17215fa5ae86..2cc6b2f472a6 100644
--- a/code/game/machinery/camera/presets.dm
+++ b/code/game/machinery/camera/presets.dm
@@ -78,7 +78,7 @@
number = 1
var/area/A = get_area(src)
if(A)
- for(var/obj/structure/machinery/camera/autoname/C in machines)
+ for(var/obj/structure/machinery/camera/autoname/C in GLOB.machines)
if(C == src) continue
var/area/CA = get_area(C)
if(CA.type == A.type)
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index 806664e012de..b9ea018ba98f 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -16,7 +16,7 @@
return
var/list/L = list()
- for (var/obj/structure/machinery/camera/C in cameranet.cameras)
+ for (var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras)
L.Add(C)
camera_sort(L)
@@ -213,9 +213,9 @@
return 0
if(isrobot(M))
var/mob/living/silicon/robot/R = M
- if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
+ if(!(R.camera && R.camera.can_use()) && !GLOB.cameranet.checkCameraVis(M))
return 0
- else if(!cameranet.checkCameraVis(M))
+ else if(!GLOB.cameranet.checkCameraVis(M))
return 0
return 1
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 08de86581518..715e9c2a86e5 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -22,7 +22,7 @@
. = ..()
icon_state = "grass[pick("1","2","3","4")]"
update_icon()
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
if(istype(get_step(src, direction), /turf/open/floor))
var/turf/open/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
@@ -148,7 +148,7 @@
return
M.forceMove(loc)
M.apply_effect(5, WEAKEN)
- for(var/obj/structure/machinery/scoreboard/X in machines)
+ for(var/obj/structure/machinery/scoreboard/X in GLOB.machines)
if(X.id == id)
X.score(side, 3)// 3 points for dunking a mob
// no break, to update multiple scoreboards
@@ -156,7 +156,7 @@
return
else if (istype(W, /obj/item) && get_dist(src,user)<2)
user.drop_inv_item_to_loc(W, loc)
- for(var/obj/structure/machinery/scoreboard/X in machines)
+ for(var/obj/structure/machinery/scoreboard/X in GLOB.machines)
if(X.id == id)
X.score(side)
// no break, to update multiple scoreboards
@@ -170,7 +170,7 @@
return BLOCKED_MOVEMENT
if(prob(50))
I.forceMove(src.loc)
- for(var/obj/structure/machinery/scoreboard/X in machines)
+ for(var/obj/structure/machinery/scoreboard/X in GLOB.machines)
if(X.id == id)
X.score(side)
// no break, to update multiple scoreboards
diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm
index 67e4e8ed35ab..3a809620d7e6 100644
--- a/code/game/machinery/computer/aifixer.dm
+++ b/code/game/machinery/computer/aifixer.dm
@@ -68,7 +68,6 @@
src.occupant.updatehealth()
if (src.occupant.health >= 0 && src.occupant.stat == DEAD)
src.occupant.set_stat(CONSCIOUS)
- src.occupant.lying = 0
GLOB.dead_mob_list -= src.occupant
GLOB.alive_mob_list += src.occupant
occupant.reload_fullscreens()
diff --git a/code/game/machinery/computer/almayer_control.dm b/code/game/machinery/computer/almayer_control.dm
index fb9f7a0375d9..2b54d2e1df5b 100644
--- a/code/game/machinery/computer/almayer_control.dm
+++ b/code/game/machinery/computer/almayer_control.dm
@@ -72,7 +72,7 @@
var/list/data = list()
var/list/messages = list()
- data["alert_level"] = security_level
+ data["alert_level"] = GLOB.security_level
data["time_request"] = cooldown_request
data["time_destruct"] = cooldown_destruct
@@ -116,7 +116,7 @@
// evac stuff start \\
if("evacuation_start")
- if(security_level < SEC_LEVEL_RED)
+ if(GLOB.security_level < SEC_LEVEL_RED)
to_chat(usr, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures."))
return FALSE
@@ -147,7 +147,7 @@
if("change_sec_level")
var/list/alert_list = list(num2seclevel(SEC_LEVEL_GREEN), num2seclevel(SEC_LEVEL_BLUE))
- switch(security_level)
+ switch(GLOB.security_level)
if(SEC_LEVEL_GREEN)
alert_list -= num2seclevel(SEC_LEVEL_GREEN)
if(SEC_LEVEL_BLUE)
@@ -217,7 +217,7 @@
to_chat(usr, SPAN_WARNING("The distress beacon has recently broadcast a message. Please wait."))
return FALSE
- if(security_level == SEC_LEVEL_DELTA)
+ if(GLOB.security_level == SEC_LEVEL_DELTA)
to_chat(usr, SPAN_WARNING("The ship is already undergoing self-destruct procedures!"))
return FALSE
diff --git a/code/game/machinery/computer/area_air_control.dm b/code/game/machinery/computer/area_air_control.dm
index 22f4211aa8ee..cd9870f175c4 100644
--- a/code/game/machinery/computer/area_air_control.dm
+++ b/code/game/machinery/computer/area_air_control.dm
@@ -156,7 +156,7 @@
var/turf/T = get_turf(src)
if(!T.loc) return
- for(var/obj/structure/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in machines )
+ for(var/obj/structure/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in GLOB.machines )
var/turf/T2 = get_turf(scrubber)
if(T2 && T2.loc)
var/area/A = T2.loc
diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm
index 0fd487e2ef7c..ca8c8b2f1a34 100644
--- a/code/game/machinery/computer/camera_console.dm
+++ b/code/game/machinery/computer/camera_console.dm
@@ -40,6 +40,8 @@
instance.del_on_map_removal = FALSE
if(instance.blend_mode_override)
instance.blend_mode = instance.blend_mode_override
+ if(istype(instance, /atom/movable/screen/plane_master/lighting))
+ instance.add_filter("awooga", 1, color_matrix_filter(color_matrix_from_string("#90ee90")))
instance.screen_loc = "[map_name]:CENTER"
cam_plane_masters += instance
@@ -226,7 +228,7 @@
// Returns the list of cameras accessible from this computer
/obj/structure/machinery/computer/cameras/proc/get_available_cameras()
var/list/D = list()
- for(var/obj/structure/machinery/camera/C in cameranet.cameras)
+ for(var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras)
if(!C.network)
stack_trace("Camera in a cameranet has no camera network")
continue
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index b39f59530adc..7a51539b8888 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -98,9 +98,9 @@
if(-INFINITY to SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN //Cannot go below green.
if(SEC_LEVEL_BLUE to INFINITY) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot go above blue.
- var/old_level = security_level
+ var/old_level = GLOB.security_level
set_security_level(tmp_alertlevel)
- if(security_level != old_level)
+ if(GLOB.security_level != old_level)
//Only notify the admins if an actual change happened
log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
@@ -134,7 +134,7 @@
if("evacuation_start")
if(state == STATE_EVACUATION)
- if(security_level < SEC_LEVEL_DELTA)
+ if(GLOB.security_level < SEC_LEVEL_DELTA)
to_chat(usr, SPAN_WARNING("The ship must be under delta alert in order to enact evacuation procedures."))
return FALSE
@@ -185,7 +185,7 @@
to_chat(usr, SPAN_WARNING("The distress beacon has recently broadcast a message. Please wait."))
return FALSE
- if(security_level == SEC_LEVEL_DELTA)
+ if(GLOB.security_level == SEC_LEVEL_DELTA)
to_chat(usr, SPAN_WARNING("The ship is already undergoing self-destruct procedures!"))
return FALSE
diff --git a/code/game/machinery/computer/dropship_weapons.dm b/code/game/machinery/computer/dropship_weapons.dm
index 6218bf0cdedb..fdab92ee4c13 100644
--- a/code/game/machinery/computer/dropship_weapons.dm
+++ b/code/game/machinery/computer/dropship_weapons.dm
@@ -97,7 +97,7 @@
if(!faction)
return //no faction, no weapons
- var/datum/cas_iff_group/cas_group = cas_groups[faction]
+ var/datum/cas_iff_group/cas_group = GLOB.cas_groups[faction]
if(!cas_group)
return //broken group. No fighting
@@ -237,7 +237,7 @@
"firemission_step" = firemission_stat,
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ ui = SSnano.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "dropship_weapons_console.tmpl", "Weapons Control", 800, 600)
@@ -280,7 +280,7 @@
if(!faction)
return //no faction, no weapons
- var/datum/cas_iff_group/cas_group = cas_groups[faction]
+ var/datum/cas_iff_group/cas_group = GLOB.cas_groups[faction]
if(!cas_group)
return //broken group. No fighting
@@ -490,7 +490,7 @@
if(dropship.mode != SHUTTLE_CALL)
to_chat(usr, SPAN_WARNING("Shuttle has to be in orbit."))
return
- var/datum/cas_iff_group/cas_group = cas_groups[faction]
+ var/datum/cas_iff_group/cas_group = GLOB.cas_groups[faction]
var/datum/cas_signal/cas_sig
for(var/X in cas_group.cas_signals)
var/datum/cas_signal/LT = X
@@ -588,7 +588,7 @@
to_chat(usr, SPAN_DANGER("Bug encountered, this console doesn't have a faction set, report this to a coder!"))
return
- var/datum/cas_iff_group/cas_group = cas_groups[faction]
+ var/datum/cas_iff_group/cas_group = GLOB.cas_groups[faction]
if(!cas_group)
to_chat(usr, SPAN_DANGER("Bug encountered, no CAS group exists for this console, report this to a coder!"))
return
diff --git a/code/game/machinery/computer/groundside_operations.dm b/code/game/machinery/computer/groundside_operations.dm
index f2b36276c8eb..7b4c2d5df771 100644
--- a/code/game/machinery/computer/groundside_operations.dm
+++ b/code/game/machinery/computer/groundside_operations.dm
@@ -59,7 +59,7 @@
dat += " [is_announcement_active ? "Make An Announcement" : "*Unavailable*"]"
dat += " Tactical Map"
dat += " "
- var/datum/squad/marine/echo/echo_squad = locate() in RoleAuthority.squads
+ var/datum/squad/marine/echo/echo_squad = locate() in GLOB.RoleAuthority.squads
if(!echo_squad.active && faction == FACTION_MARINE)
dat += " Designate Echo Squad"
dat += " "
@@ -251,7 +251,7 @@
if("pick_squad")
var/list/squad_list = list()
- for(var/datum/squad/S in RoleAuthority.squads)
+ for(var/datum/squad/S in GLOB.RoleAuthority.squads)
if(S.active && S.faction == faction)
squad_list += S.name
@@ -280,7 +280,7 @@
usr.UnregisterSignal(cam, COMSIG_PARENT_QDELETING)
cam = null
usr.reset_view(null)
- else if(usr.client.view != world_view_size)
+ else if(usr.client.view != GLOB.world_view_size)
to_chat(usr, SPAN_WARNING("You're too busy peering through binoculars."))
else
if(cam)
@@ -294,7 +294,7 @@
if(!reason)
return
if(alert(usr, "Confirm activation of Echo Squad for [reason]", "Confirm Activation", "Yes", "No") != "Yes") return
- var/datum/squad/marine/echo/echo_squad = locate() in RoleAuthority.squads
+ var/datum/squad/marine/echo/echo_squad = locate() in GLOB.RoleAuthority.squads
if(!echo_squad)
visible_message(SPAN_BOLDNOTICE("ERROR: Unable to locate Echo Squad database."))
return
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 53efad3da877..20aa6925d0b4 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -24,7 +24,7 @@
set name = "Eject ID Card"
set src in oview(1)
- if(!usr || usr.stat || usr.lying) return
+ if(!usr || usr.is_mob_incapacitated()) return
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
@@ -108,7 +108,7 @@
dat += "Back"
dat += " Medical Robots:"
var/bdat = null
- for(var/obj/structure/machinery/bot/medbot/M in machines)
+ for(var/obj/structure/machinery/bot/medbot/M in GLOB.machines)
if(M.z != src.z) continue //only find medibots on the same z-level as the computer
var/turf/bl = get_turf(M)
@@ -398,7 +398,7 @@
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
counter++
- src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year] [t1]")
+ src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year] [t1]")
if (href_list["del_c"])
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
@@ -450,7 +450,7 @@
else
P.info += "Medical Record Lost! "
P.info += ""
- P.info += text(" This report was printed by [] []. The [MAIN_SHIP_NAME],[]/[], [] \n",last_user_rank,last_user_name,time2text(world.timeofday, "MM/DD"),game_year,worldtime2text())
+ P.info += text(" This report was printed by [] []. The [MAIN_SHIP_NAME],[]/[], [] \n",last_user_rank,last_user_name,time2text(world.timeofday, "MM/DD"),GLOB.game_year,worldtime2text())
src.printing = null
if(href_list["print_bs"])//Prints latest body scan
@@ -473,7 +473,7 @@
break
else
P.info += "No scan on record."
- P.info += text(" This report was printed by [] []. The [MAIN_SHIP_NAME], []/[], [] \n",last_user_rank,last_user_name,time2text(world.timeofday, "MM/DD"),game_year,worldtime2text())
+ P.info += text(" This report was printed by [] []. The [MAIN_SHIP_NAME], []/[], [] \n",last_user_rank,last_user_name,time2text(world.timeofday, "MM/DD"),GLOB.game_year,worldtime2text())
src.printing = null
@@ -491,7 +491,7 @@
if(prob(10/severity))
switch(rand(1,6))
if(1)
- R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
+ R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
diff --git a/code/game/machinery/computer/research.dm b/code/game/machinery/computer/research.dm
index 2f37d9b2598a..2c8a5689b495 100644
--- a/code/game/machinery/computer/research.dm
+++ b/code/game/machinery/computer/research.dm
@@ -28,7 +28,7 @@
if(N.note_type == "grant")
if(!N.grant)
return
- chemical_data.update_credits(N.grant)
+ GLOB.chemical_data.update_credits(N.grant)
visible_message(SPAN_NOTICE("[user] scans the [N.name] on the [src], collecting the [N.grant] research credits."))
N.grant = 0
qdel(N)
@@ -42,7 +42,7 @@
response = alert(usr,"Use existing or new category?","[src]","Existing","New")
if(response == "Existing")
var/list/pool = list()
- for(var/category in chemical_data.research_documents)
+ for(var/category in GLOB.chemical_data.research_documents)
pool += category
pool = sortAssoc(pool)
response = tgui_input_list(usr,"Select a category:", "Categories", pool)
@@ -51,7 +51,7 @@
if(!response)
response = "Misc."
var/obj/item/paper/research_report/CR = P.convert_to_chem_report()
- chemical_data.save_document(CR, response, CR.name)
+ GLOB.chemical_data.save_document(CR, response, CR.name)
return
//Clearance Updating
if(!istype(B, /obj/item/card/id))
@@ -60,7 +60,7 @@
if(!istype(card))
visible_message(SPAN_NOTICE("[user] swipes their ID card on \the [src], but it is refused."))
return
- if(card.clearance_access <= chemical_data.clearance_level || (card.clearance_access == 6 && chemical_data.clearance_level >= 5 && chemical_data.clearance_x_access))
+ if(card.clearance_access <= GLOB.chemical_data.clearance_level || (card.clearance_access == 6 && GLOB.chemical_data.clearance_level >= 5 && GLOB.chemical_data.clearance_x_access))
visible_message(SPAN_NOTICE("[user] swipes the clearance card on the [src], but nothing happens."))
return
if(user.real_name != card.registered_name)
@@ -76,10 +76,10 @@
else
give_level = card.clearance_access
- chemical_data.clearance_level = give_level
+ GLOB.chemical_data.clearance_level = give_level
if(give_x)
- chemical_data.clearance_x_access = TRUE
- chemical_data.reached_x_access = TRUE
+ GLOB.chemical_data.clearance_x_access = TRUE
+ GLOB.chemical_data.reached_x_access = TRUE
visible_message(SPAN_NOTICE("[user] swipes their ID card on \the [src], updating the clearance to level [give_level][give_x ? "X" : ""]."))
msg_admin_niche("[key_name(user)] has updated the research clearance to level [give_level][give_x ? "X" : ""].")
@@ -103,12 +103,12 @@
/obj/structure/machinery/computer/research/ui_data(mob/user)
var/list/data = list(
- "rsc_credits" = chemical_data.rsc_credits,
- "clearance_level" = chemical_data.clearance_level,
- "broker_cost" = max(RESEARCH_LEVEL_INCREASE_MULTIPLIER*(chemical_data.clearance_level + 1), 1),
- "research_documents" = chemical_data.research_documents,
- "published_documents" = chemical_data.research_publications,
- "clearance_x_access" = chemical_data.clearance_x_access,
+ "rsc_credits" = GLOB.chemical_data.rsc_credits,
+ "clearance_level" = GLOB.chemical_data.clearance_level,
+ "broker_cost" = max(RESEARCH_LEVEL_INCREASE_MULTIPLIER*(GLOB.chemical_data.clearance_level + 1), 1),
+ "research_documents" = GLOB.chemical_data.research_documents,
+ "published_documents" = GLOB.chemical_data.research_publications,
+ "clearance_x_access" = GLOB.chemical_data.clearance_x_access,
"photocopier_error" = !photocopier,
"printer_toner" = photocopier?.toner
)
@@ -133,7 +133,7 @@
if ("read_document")
var/print_type = params["print_type"]
var/print_title = params["print_title"]
- var/obj/item/paper/research_report/report = chemical_data.get_report(print_type, print_title)
+ var/obj/item/paper/research_report/report = GLOB.chemical_data.get_report(print_type, print_title)
if(report)
report.read_paper(user)
return
@@ -145,7 +145,7 @@
var/print_title = params["print_title"]
photocopier.toner = max(0, photocopier.toner - 1)
var/obj/item/paper/research_report/printing = new /obj/item/paper/research_report/(photocopier.loc)
- var/obj/item/paper/research_report/report = chemical_data.get_report(print_type, print_title)
+ var/obj/item/paper/research_report/report = GLOB.chemical_data.get_report(print_type, print_title)
if(report)
printing.name = report.name
printing.info = report.info
@@ -154,16 +154,16 @@
if("broker_clearance")
if(!photocopier)
return
- if(chemical_data.clearance_level < 5)
- var/cost = max(RESEARCH_LEVEL_INCREASE_MULTIPLIER*(chemical_data.clearance_level + 1), 1)
- if(cost <= chemical_data.rsc_credits)
- chemical_data.update_credits(cost * -1)
- chemical_data.clearance_level++
- visible_message(SPAN_NOTICE("Clearance access increased to level [chemical_data.clearance_level] for [cost] credits."))
- msg_admin_niche("[key_name(user)] traded research credits to upgrade the clearance to level [chemical_data.clearance_level].")
- if(max_clearance < chemical_data.clearance_level)
- chemical_data.update_income(1) //Bonus income and a paper for buying clearance instead of swiping it up
- switch(chemical_data.clearance_level)
+ if(GLOB.chemical_data.clearance_level < 5)
+ var/cost = max(RESEARCH_LEVEL_INCREASE_MULTIPLIER*(GLOB.chemical_data.clearance_level + 1), 1)
+ if(cost <= GLOB.chemical_data.rsc_credits)
+ GLOB.chemical_data.update_credits(cost * -1)
+ GLOB.chemical_data.clearance_level++
+ visible_message(SPAN_NOTICE("Clearance access increased to level [GLOB.chemical_data.clearance_level] for [cost] credits."))
+ msg_admin_niche("[key_name(user)] traded research credits to upgrade the clearance to level [GLOB.chemical_data.clearance_level].")
+ if(max_clearance < GLOB.chemical_data.clearance_level)
+ GLOB.chemical_data.update_income(1) //Bonus income and a paper for buying clearance instead of swiping it up
+ switch(GLOB.chemical_data.clearance_level)
if(2)
new /obj/item/paper/research_notes/unique/tier_two/(photocopier.loc)
max_clearance = 2
@@ -182,11 +182,11 @@
var/purchase_tier = FLOOR(text2num(params["purchase_document"]), 1)
if(purchase_tier <= 0 || purchase_tier > 5)
return
- if(purchase_tier > chemical_data.clearance_level)
+ if(purchase_tier > GLOB.chemical_data.clearance_level)
return
var/purchase_cost = base_purchase_cost + purchase_tier * 2
- if(purchase_cost <= chemical_data.rsc_credits)
- chemical_data.update_credits(purchase_cost * -1)
+ if(purchase_cost <= GLOB.chemical_data.rsc_credits)
+ GLOB.chemical_data.update_credits(purchase_cost * -1)
var/obj/item/paper/research_notes/unique/N
switch(purchase_tier)
if(1)
@@ -203,21 +203,21 @@
if("publish_document")
var/print_type = params["print_type"]
var/print_title = params["print_title"]
- var/obj/item/paper/research_report/report = chemical_data.get_report(print_type, print_title)
+ var/obj/item/paper/research_report/report = GLOB.chemical_data.get_report(print_type, print_title)
if(!report)
to_chat(usr, SPAN_WARNING("Report data corrupted. Unable to transmit."))
return
- chemical_data.publish_document(report, print_type, print_title)
+ GLOB.chemical_data.publish_document(report, print_type, print_title)
if("unpublish_document")
var/print_title = params["print_title"]
var/print_type = params["print_type"]
- chemical_data.unpublish_document(print_type, print_title)
+ GLOB.chemical_data.unpublish_document(print_type, print_title)
if("request_clearance_x_access")
var/purchase_cost = 5
- if(purchase_cost <= chemical_data.rsc_credits)
- chemical_data.clearance_x_access = TRUE
- chemical_data.reached_x_access = TRUE
- chemical_data.update_credits(purchase_cost * -1)
+ if(purchase_cost <= GLOB.chemical_data.rsc_credits)
+ GLOB.chemical_data.clearance_x_access = TRUE
+ GLOB.chemical_data.reached_x_access = TRUE
+ GLOB.chemical_data.update_credits(purchase_cost * -1)
visible_message(SPAN_NOTICE("Clearance Level X Acquired."))
playsound(loc, pick('sound/machines/computer_typing1.ogg','sound/machines/computer_typing2.ogg','sound/machines/computer_typing3.ogg'), 5, 1)
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index c5a13e2c3e74..19e3ac900af6 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -51,11 +51,11 @@
dat += "[R.name] |"
if(R.stat)
dat += " Not Responding |"
- else if (!R.canmove)
+ else if (HAS_TRAIT_FROM(R, TRAIT_IMMOBILIZED, HACKED_TRAIT))
dat += " Locked Down |"
else
dat += " Operating Normally |"
- if(R.canmove && R.cell)
+ if(R.cell)
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
else
dat += " No Cell Installed |"
@@ -70,7 +70,8 @@
if (isRemoteControlling(user))
if((user.mind.original == user))
dat += "(Hack) "
- dat += "([R.canmove ? "Lockdown" : "Release"]) "
+ var/canmove = HAS_TRAIT_FROM(src, TRAIT_IMMOBILIZED, HACKED_TRAIT)
+ dat += "([canmove ? "Lockdown" : "Release"]) "
dat += "(Destroy)"
dat += " "
dat += "(Return to Main Menu) "
@@ -161,20 +162,22 @@
else if (href_list["stopbot"])
if(src.allowed(usr))
var/mob/living/silicon/robot/R = locate(href_list["stopbot"])
+ var/canmove = HAS_TRAIT_FROM(src, TRAIT_IMMOBILIZED, HACKED_TRAIT)
if(R && istype(R)) // Extra sancheck because of input var references
- var/choice = tgui_input_list(usr, "Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?", "Hack machine", list("Confirm", "Abort"))
+ var/choice = tgui_input_list(usr, "Are you certain you wish to [canmove ? "lock down" : "release"] [R.name]?", "Hack machine", list("Confirm", "Abort"))
if(choice == "Confirm")
if(R && istype(R))
- message_admins("[key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
- log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
- R.canmove = !R.canmove
+ message_admins("[key_name_admin(usr)] [canmove ? "locked down" : "released"] [R.name]!")
+ log_game("[key_name(usr)] [canmove ? "locked down" : "released"] [R.name]!")
+ if(canmove)
+ ADD_TRAIT(src, TRAIT_IMMOBILIZED, HACKED_TRAIT)
+ else
+ REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, HACKED_TRAIT)
if (R.lockcharge)
- // R.cell.charge = R.lockcharge
R.lockcharge = !R.lockcharge
to_chat(R, "Your lockdown has been lifted!")
else
R.lockcharge = !R.lockcharge
- // R.cell.charge = 0
to_chat(R, "You have been locked down!")
else
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 2d9a4a1dbea4..8090f802b1d0 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -363,7 +363,7 @@ What a mess.*/
var/t1 = copytext(trim(strip_html(input("Your name and time will be added to this new comment.", "Add a comment", null, null) as message)),1,MAX_MESSAGE_LEN)
if((!t1 || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!ishighersilicon(usr))) || active2 != a2))
return
- var/created_at = text("[] [] []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), game_year)
+ var/created_at = text("[] [] []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), GLOB.game_year)
var/new_comment = list("entry" = t1, "created_by" = list("name" = "", "rank" = ""), "deleted_by" = null, "deleted_at" = null, "created_at" = created_at)
if(istype(usr,/mob/living/carbon/human))
var/mob/living/carbon/human/U = usr
@@ -391,7 +391,7 @@ What a mess.*/
var/mob/living/silicon/robot/U = usr
deleter = "[U.name] ([U.modtype] [U.braintype])"
updated_comments[href_list["del_c"]]["deleted_by"] = deleter
- updated_comments[href_list["del_c"]]["deleted_at"] = text("[] [] []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), game_year)
+ updated_comments[href_list["del_c"]]["deleted_at"] = text("[] [] []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), GLOB.game_year)
active2.fields["comments"] = updated_comments
to_chat(usr, text("You have deleted a comment from the Security Record of [].", active2.fields["name"]))
//RECORD CREATE
@@ -532,7 +532,7 @@ What a mess.*/
if(prob(10/severity))
switch(rand(1,6))
if(1)
- R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
+ R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index 60b5aa232940..6e35d147ff38 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -355,7 +355,7 @@ What a mess.*/
if(prob(10/severity))
switch(rand(1,6))
if(1)
- R.fields["name"] = "[pick(pick(first_names_male), pick(first_names_female))] [pick(last_names)]"
+ R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
if(2)
R.fields["sex"] = pick("Male", "Female")
if(3)
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 86bb5f79a035..58935702cb7b 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -343,13 +343,13 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li
if(SKILL_SPEC_SNIPER)
set_name = "Sniper Set"
- if(set_name && !available_specialist_sets.Find(set_name))
- available_specialist_sets += set_name
+ if(set_name && !GLOB.available_specialist_sets.Find(set_name))
+ GLOB.available_specialist_sets += set_name
SSticker.mode.latejoin_tally-- //Cryoing someone out removes someone from the Marines, blocking further larva spawns until accounted for
//Handle job slot/tater cleanup.
- RoleAuthority.free_role(GET_MAPPED_ROLE(occupant.job), TRUE)
+ GLOB.RoleAuthority.free_role(GET_MAPPED_ROLE(occupant.job), TRUE)
var/occupant_ref = WEAKREF(occupant)
//Delete them from datacore.
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index 8b73588f1d0b..030e732ea75f 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -64,7 +64,7 @@
if(is_mainship_level(z)) // on the almayer
return
- shuttle.control_doors("lock", "all", force=FALSE)
+ shuttle.control_doors("force-lock", "all", force=FALSE)
/obj/structure/machinery/door_control/proc/handle_door()
for(var/obj/structure/machinery/door/airlock/D in range(range))
@@ -95,7 +95,7 @@
D.safe = 1
/obj/structure/machinery/door_control/proc/handle_pod()
- for(var/obj/structure/machinery/door/poddoor/M in machines)
+ for(var/obj/structure/machinery/door/poddoor/M in GLOB.machines)
if(M.id == id)
if(M.density)
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/structure/machinery/door, open))
@@ -187,7 +187,7 @@
add_fingerprint(user)
var/effective = 0
- for(var/obj/structure/machinery/door/poddoor/M in machines)
+ for(var/obj/structure/machinery/door/poddoor/M in GLOB.machines)
if(M.id == id)
effective = 1
spawn()
diff --git a/code/game/machinery/door_display/door_display.dm b/code/game/machinery/door_display/door_display.dm
index 7462b1f1b74d..3f0c53ada18e 100644
--- a/code/game/machinery/door_display/door_display.dm
+++ b/code/game/machinery/door_display/door_display.dm
@@ -31,7 +31,7 @@
get_targets()
/obj/structure/machinery/door_display/proc/get_targets()
- for(var/obj/structure/machinery/door/D in machines)
+ for(var/obj/structure/machinery/door/D in GLOB.machines)
if (D.id == id)
targets += D
@@ -199,7 +199,7 @@
/obj/structure/machinery/door_display/research_cell/get_targets()
..()
- for(var/obj/structure/machinery/flasher/F in machines)
+ for(var/obj/structure/machinery/flasher/F in GLOB.machines)
if(F.id == id)
targets += F
if(has_wall_divider)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index c6d9ddf3efbd..4e362ef12fac 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -91,7 +91,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
else if(user.hallucination > 50 && prob(10) && operating == 0)
to_chat(user, SPAN_DANGER("You feel a powerful shock course through your body!"))
user.halloss += 10
- user.stunned += 10
+ user.apply_effect(10, STUN)
return
..(user)
@@ -817,7 +817,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
/obj/structure/machinery/door/airlock/LateInitialize()
. = ..()
if(closeOtherId != null)
- for(var/obj/structure/machinery/door/airlock/A in machines)
+ for(var/obj/structure/machinery/door/airlock/A in GLOB.machines)
if(A.closeOtherId == closeOtherId && A != src)
closeOther = A
break
@@ -833,7 +833,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
return
/obj/structure/machinery/door/airlock/allowed(mob/M)
- if(isWireCut(AIRLOCK_WIRE_IDSCAN) || (maint_all_access && check_access_list(list(ACCESS_MARINE_MAINT))))
+ if(isWireCut(AIRLOCK_WIRE_IDSCAN) || (GLOB.maint_all_access && check_access_list(list(ACCESS_MARINE_MAINT))))
return TRUE
return ..(M)
diff --git a/code/game/machinery/doors/brig_system.dm b/code/game/machinery/doors/brig_system.dm
index 58c3282abed4..56cc55828171 100644
--- a/code/game/machinery/doors/brig_system.dm
+++ b/code/game/machinery/doors/brig_system.dm
@@ -290,15 +290,15 @@
addtimer(CALLBACK(src, PROC_REF(search_for_components)), 20)
/obj/structure/machinery/brig_cell/proc/search_for_components()
- for(var/obj/structure/machinery/door/window/brigdoor/M in machines)
+ for(var/obj/structure/machinery/door/window/brigdoor/M in GLOB.machines)
if(M.id == id)
targets += M
- for(var/obj/structure/machinery/flasher/F in machines)
+ for(var/obj/structure/machinery/flasher/F in GLOB.machines)
if(F.id == id)
targets += F
- for(var/obj/structure/machinery/door/poddoor/almayer/locked/P in machines)
+ for(var/obj/structure/machinery/door/poddoor/almayer/locked/P in GLOB.machines)
if(P.id == id)
targets += P
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 065816567ca1..cddd67c7e2b2 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -1,7 +1,4 @@
// Door open and close constants
-/var/const
- CLOSED = 2
-
#define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa
#define FIREDOOR_MAX_TEMP 50 // °C
#define FIREDOOR_MIN_TEMP 0
@@ -57,7 +54,7 @@
A.all_doors.Add(src)
areas_added = list(A)
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
A = get_area(get_step(src,direction))
if(istype(A) && !(A in areas_added))
A.all_doors.Add(src)
@@ -135,7 +132,7 @@
"Would you like to [density ? "open" : "close"] this [src.name]?[ alarmed && density ? "\nNote that by doing so, you acknowledge any damages from opening this\n[src.name] as being your own fault, and you will be held accountable under the law." : ""]",\
"\The [src]", list("Yes", "No")) != "Yes")
return
- if(user.is_mob_incapacitated() || (!user.canmove && !isRemoteControlling(user)) || (get_dist(src, user) > 1 && !isRemoteControlling(user)))
+ if(user.is_mob_incapacitated() || (get_dist(src, user) > 1 && !isRemoteControlling(user)))
to_chat(user, "Sorry, you must remain able bodied and close to \the [src] in order to use it.")
return
if(density && (inoperable())) //can still close without power
@@ -277,7 +274,7 @@
overlays += "palert"
if(dir_alerts)
for(var/d=1;d<=4;d++)
- var/cdir = cardinal[d]
+ var/cdir = GLOB.cardinals[d]
for(var/i=1;i<=ALERT_STATES.len;i++)
if(dir_alerts[d] & (1<<(i-1)))
overlays += new/icon(icon,"alert_[ALERT_STATES[i]]", dir=cdir)
diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm
index ca218128160d..0a179af27803 100644
--- a/code/game/machinery/doors/multi_tile.dm
+++ b/code/game/machinery/doors/multi_tile.dm
@@ -275,6 +275,17 @@
name = "\improper Normandy cargo door"
icon = 'icons/obj/structures/doors/dropship2_cargo.dmi'
+/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside
+ width = 2
+
+/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside/ds1
+ name = "\improper Alamo crew hatch"
+ icon = 'icons/obj/structures/doors/dropship1_side2.dmi'
+
+/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside/ds2
+ name = "\improper Normandy crew hatch"
+ icon = 'icons/obj/structures/doors/dropship2_side2.dmi'
+
/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/blastdoor
name = "bulkhead blast door"
icon = 'icons/obj/structures/doors/almayerblastdoor.dmi'
diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm
index b2d836ee476f..0a3b873ce385 100644
--- a/code/game/machinery/doors/poddoor.dm
+++ b/code/game/machinery/doors/poddoor.dm
@@ -240,6 +240,7 @@
/obj/structure/machinery/door/poddoor/filler_object
name = ""
+ icon = null
icon_state = ""
unslashable = TRUE
unacidable = TRUE
diff --git a/code/game/machinery/fax_machine.dm b/code/game/machinery/fax_machine.dm
index ff21671ed758..4a5c62b1f9a0 100644
--- a/code/game/machinery/fax_machine.dm
+++ b/code/game/machinery/fax_machine.dm
@@ -1,5 +1,5 @@
-var/list/obj/structure/machinery/faxmachine/allfaxes = list()
-var/list/alldepartments = list()
+GLOBAL_LIST_INIT_TYPED(allfaxes, /obj/structure/machinery/faxmachine, list())
+GLOBAL_LIST_EMPTY(alldepartments)
#define DEPARTMENT_WY "Weyland-Yutani"
#define DEPARTMENT_HC "USCM High Command"
@@ -45,11 +45,11 @@ var/list/alldepartments = list()
/obj/structure/machinery/faxmachine/Initialize(mapload, ...)
. = ..()
- allfaxes += src
+ GLOB.allfaxes += src
update_departments()
/obj/structure/machinery/faxmachine/Destroy()
- allfaxes -= src
+ GLOB.allfaxes -= src
. = ..()
/obj/structure/machinery/faxmachine/initialize_pass_flags(datum/pass_flags_container/PF)
@@ -110,7 +110,8 @@ var/list/alldepartments = list()
set category = "Object"
set name = "Eject ID Card"
set src in view(1)
- if(!usr || usr.stat || usr.lying) return
+ if(usr.is_mob_incapacitated())
+ return
if(ishuman(usr) && scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
@@ -125,18 +126,18 @@ var/list/alldepartments = list()
return
/obj/structure/machinery/faxmachine/proc/update_departments()
- if( !("[department]" in alldepartments) ) //Initialize departments. This will work with multiple fax machines.
- alldepartments += department
- if(!(DEPARTMENT_WY in alldepartments))
- alldepartments += DEPARTMENT_WY
- if(!(DEPARTMENT_HC in alldepartments))
- alldepartments += DEPARTMENT_HC
- if(!(DEPARTMENT_PROVOST in alldepartments))
- alldepartments += DEPARTMENT_PROVOST
- if(!(DEPARTMENT_CMB in alldepartments))
- alldepartments += DEPARTMENT_CMB
- if(!(DEPARTMENT_PRESS in alldepartments))
- alldepartments += DEPARTMENT_PRESS
+ if( !("[department]" in GLOB.alldepartments) ) //Initialize departments. This will work with multiple fax machines.
+ GLOB.alldepartments += department
+ if(!(DEPARTMENT_WY in GLOB.alldepartments))
+ GLOB.alldepartments += DEPARTMENT_WY
+ if(!(DEPARTMENT_HC in GLOB.alldepartments))
+ GLOB.alldepartments += DEPARTMENT_HC
+ if(!(DEPARTMENT_PROVOST in GLOB.alldepartments))
+ GLOB.alldepartments += DEPARTMENT_PROVOST
+ if(!(DEPARTMENT_CMB in GLOB.alldepartments))
+ GLOB.alldepartments += DEPARTMENT_CMB
+ if(!(DEPARTMENT_PRESS in GLOB.alldepartments))
+ GLOB.alldepartments += DEPARTMENT_PRESS
// TGUI SHIT \\
/obj/structure/machinery/faxmachine/tgui_interact(mob/user, datum/tgui/ui)
@@ -255,7 +256,7 @@ var/list/alldepartments = list()
if("select")
var/last_target_department = target_department
- target_department = tgui_input_list(ui.user, "Which department?", "Choose a department", alldepartments)
+ target_department = tgui_input_list(ui.user, "Which department?", "Choose a department", GLOB.alldepartments)
if(!target_department) target_department = last_target_department
. = TRUE
@@ -379,7 +380,7 @@ var/list/alldepartments = list()
/obj/structure/machinery/faxmachine/proc/send_fax(datum/fax/faxcontents)
- for(var/obj/structure/machinery/faxmachine/F in allfaxes)
+ for(var/obj/structure/machinery/faxmachine/F in GLOB.allfaxes)
if(F != src && F.department == target_department)
if(!faxcontents)
return
diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm
index dd7e0ee70150..55aef1323c4d 100644
--- a/code/game/machinery/fire_alarm.dm
+++ b/code/game/machinery/fire_alarm.dm
@@ -47,7 +47,7 @@ FIRE ALARM
if(stat & BROKEN)
icon_state = "firex"
- else if(stat & NOPOWER & (security_level != SEC_LEVEL_RED))
+ else if(stat & NOPOWER & (GLOB.security_level != SEC_LEVEL_RED))
icon_state = "firep"
/obj/structure/machinery/firealarm/fire_act(temperature, volume)
@@ -183,7 +183,7 @@ FIRE ALARM
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
if(!is_mainship_level(z))
- if(security_level)
+ if(GLOB.security_level)
src.overlays += image('icons/obj/structures/machinery/monitors.dmi', "overlay_[get_security_level()]")
else
src.overlays += image('icons/obj/structures/machinery/monitors.dmi', "overlay_green")
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index cd59862a2e13..fc2cf5a6320c 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -133,7 +133,7 @@
active = 1
icon_state = "launcheract"
- for(var/obj/structure/machinery/flasher/M in machines)
+ for(var/obj/structure/machinery/flasher/M in GLOB.machines)
if(M.id == src.id)
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/structure/machinery/flasher, flash))
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 516cdad380b1..580fea644eec 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -36,12 +36,12 @@
update_icon()
-/obj/structure/machinery/floodlight/attack_hand(mob/user)
+/obj/structure/machinery/floodlight/attack_hand(mob/living/user)
if(!toggleable)
to_chat(user, SPAN_NOTICE("[src] doesn't seem to have a switch to toggle the light."))
return
- if(user.lying || user.stat)
+ if(user.is_mob_incapacitated())
return
if(!is_valid_user(user))
diff --git a/code/game/machinery/groundmap_geothermal.dm b/code/game/machinery/groundmap_geothermal.dm
index 808c717e8891..087facdbf5ee 100644
--- a/code/game/machinery/groundmap_geothermal.dm
+++ b/code/game/machinery/groundmap_geothermal.dm
@@ -223,7 +223,7 @@
/obj/structure/machinery/colony_floodlight_switch/LateInitialize()
. = ..()
- for(var/obj/structure/machinery/colony_floodlight/F in machines)
+ for(var/obj/structure/machinery/colony_floodlight/F in GLOB.machines)
floodlist += F
F.fswitch = src
start_processing()
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index 2f8f113ddd23..9ce3cb89bf79 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -59,12 +59,6 @@ Possible to do for anyone motivated enough:
Itegrate EMP effect to disable the unit.
*/
-
-// HOLOPAD MODE
-// 0 = RANGE BASED
-// 1 = AREA BASED
-var/const/HOLOPAD_MODE = 0
-
/obj/structure/machinery/hologram/holopad
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
@@ -167,17 +161,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
if(hologram)//If there is a hologram.
if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if(!(stat & NOPOWER))//If the machine has power.
- if((HOLOPAD_MODE == 0 && (get_dist(master.eyeobj, src) <= holo_range)))
+ if(get_dist(master.eyeobj, src) <= holo_range)
return 1
- else if (HOLOPAD_MODE == 1)
-
- var/area/holo_area = get_area(src)
- var/area/eye_area = get_area(master.eyeobj)
-
- if(eye_area == holo_area)
- return 1
-
clear_holo()//If not, we want to get rid of the hologram.
return 1
diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm
index 2d4182772cf3..41c63d465918 100644
--- a/code/game/machinery/holosign.dm
+++ b/code/game/machinery/holosign.dm
@@ -63,7 +63,7 @@
else
icon_state = "light0"
- for(var/obj/structure/machinery/holosign/M in machines)
+ for(var/obj/structure/machinery/holosign/M in GLOB.machines)
if (M.id == src.id)
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/structure/machinery/holosign, toggle))
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index d5a0505fca17..6109833004d6 100644
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -124,11 +124,11 @@
active = 1
icon_state = "launcheract"
- for(var/obj/structure/machinery/sparker/M in machines)
+ for(var/obj/structure/machinery/sparker/M in GLOB.machines)
if (M.id == src.id)
INVOKE_ASYNC(M, TYPE_PROC_REF(/obj/structure/machinery/sparker, ignite))
- for(var/obj/structure/machinery/igniter/M in machines)
+ for(var/obj/structure/machinery/igniter/M in GLOB.machines)
if(M.id == src.id)
use_power(50)
M.on = !( M.on )
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index ef6c74a052cd..4b863bec043d 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -57,7 +57,7 @@
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
- if(user.stat || get_dist(user, src) > 1 || user.blinded || user.lying)
+ if(user.is_mob_incapacitated() || get_dist(user, src) > 1 || user.blinded)
return
if(!skillcheck(user, SKILL_SURGERY, SKILL_SURGERY_NOVICE))
@@ -179,7 +179,7 @@
if(!istype(usr, /mob/living))
return
- if(usr.stat || usr.lying)
+ if(usr.stat || usr.is_mob_incapacitated())
return
mode = !mode
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index 08a3d5c4dfee..3fa96ca0bc3a 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -27,7 +27,7 @@
/obj/structure/machinery/gibber/autogibber/New()
..()
spawn(5)
- for(var/i in cardinal)
+ for(var/i in GLOB.cardinals)
var/obj/structure/machinery/mineral/input/input_obj = locate( /obj/structure/machinery/mineral/input, get_step(loc, i) )
if(input_obj)
if(isturf(input_obj.loc))
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index 903cd06c3119..6d3e18933457 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -54,8 +54,8 @@
contents -= item
if(item_quants[item.name])
item_quants[item.name] -= item
- if(is_in_network() && chemical_data.shared_item_storage[item.name])
- chemical_data.shared_item_storage[item.name] -= item
+ if(is_in_network() && GLOB.chemical_data.shared_item_storage[item.name])
+ GLOB.chemical_data.shared_item_storage[item.name] -= item
qdel(item)
/obj/structure/machinery/smartfridge/proc/accept_check(obj/item/O as obj)
@@ -94,7 +94,7 @@
overlays.Cut()
if(panel_open)
overlays += image(icon, icon_panel)
- nanomanager.update_uis(src)
+ SSnano.nanomanager.update_uis(src)
return
if(HAS_TRAIT(O, TRAIT_TOOL_MULTITOOL)||HAS_TRAIT(O, TRAIT_TOOL_WIRECUTTERS))
@@ -157,7 +157,7 @@
/obj/structure/machinery/smartfridge/proc/add_network_item(obj/item/O)
if(is_in_network())
- add_item(chemical_data.shared_item_storage, O)
+ add_item(GLOB.chemical_data.shared_item_storage, O)
return TRUE
return FALSE
@@ -232,9 +232,9 @@
var/list/networked_items = list()
if(is_in_network())
- for (var/i=1 to length(chemical_data.shared_item_storage))
- var/item_index = chemical_data.shared_item_storage[i]
- var/list/item_list = chemical_data.shared_item_storage[item_index]
+ for (var/i=1 to length(GLOB.chemical_data.shared_item_storage))
+ var/item_index = GLOB.chemical_data.shared_item_storage[i]
+ var/list/item_list = GLOB.chemical_data.shared_item_storage[item_index]
var/count = length(item_list)
if(count < 1)
continue
@@ -295,7 +295,7 @@
var/list/target_list = item_quants
if(params["isLocal"] == 0)
- target_list = chemical_data.shared_item_storage
+ target_list = GLOB.chemical_data.shared_item_storage
var/item_index = target_list[index]
var/list/item_list = target_list[item_index]
@@ -328,9 +328,9 @@
var/amount=params["amount"]
var/source = item_quants
- var/target = chemical_data.shared_item_storage
+ var/target = GLOB.chemical_data.shared_item_storage
if(params["isLocal"] == 0)
- source = chemical_data.shared_item_storage
+ source = GLOB.chemical_data.shared_item_storage
target = item_quants
var/item_index = source[index]
diff --git a/code/game/machinery/line_nexter.dm b/code/game/machinery/line_nexter.dm
index d736df44664a..ae1896ad8138 100644
--- a/code/game/machinery/line_nexter.dm
+++ b/code/game/machinery/line_nexter.dm
@@ -62,7 +62,7 @@
icon_state = "doorctrl1"
add_fingerprint(user)
- for(var/obj/structure/machinery/line_nexter/L in machines)
+ for(var/obj/structure/machinery/line_nexter/L in GLOB.machines)
if(id == L.id)
L.next()
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 66bf08afba8e..c5eaa14e05b5 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -128,15 +128,15 @@ Class Procs:
/obj/structure/machinery/Initialize(mapload, ...)
. = ..()
- machines += src
+ GLOB.machines += src
var/area/A = get_area(src)
if(A)
A.add_machine(src) //takes care of adding machine's power usage
/obj/structure/machinery/Destroy()
- machines -= src
- processing_machines -= src
- power_machines -= src
+ GLOB.machines -= src
+ GLOB.processing_machines -= src
+ GLOB.power_machines -= src
var/area/A = get_area(src)
if(A)
A.remove_machine(src) //takes care of removing machine from power usage
@@ -151,15 +151,15 @@ Class Procs:
if(!machine_processing)
machine_processing = 1
if(power_machine)
- addToListNoDupe(power_machines, src)
+ addToListNoDupe(GLOB.power_machines, src)
else
- addToListNoDupe(processing_machines, src)
+ addToListNoDupe(GLOB.processing_machines, src)
/obj/structure/machinery/proc/stop_processing()
if(machine_processing)
machine_processing = 0
- processing_machines -= src
- power_machines -= src
+ GLOB.processing_machines -= src
+ GLOB.power_machines -= src
/obj/structure/machinery/process()//If you dont use process or power why are you here
return PROCESS_KILL
@@ -229,7 +229,11 @@ Class Procs:
return TRUE
if(inoperable())
return 1
- if(usr.is_mob_restrained() || usr.lying || usr.stat)
+ if(isliving(usr))
+ var/mob/living/living = usr
+ if(living.body_position == LYING_DOWN) // legacy. if you too find it doesn't make sense, consider removing it
+ return TRUE
+ if(usr.is_mob_restrained())
return 1
if(!is_valid_user(usr))
to_chat(usr, SPAN_DANGER("You don't have the dexterity to do this!"))
@@ -251,10 +255,10 @@ Class Procs:
else
return src.attack_hand(user)
-/obj/structure/machinery/attack_hand(mob/user as mob)
+/obj/structure/machinery/attack_hand(mob/living/user as mob)
if(inoperable(MAINT))
return TRUE
- if(user.lying || user.stat)
+ if(user.is_mob_incapacitated())
return TRUE
if(!is_valid_user(user))
to_chat(usr, SPAN_DANGER("You don't have the dexterity to do this!"))
diff --git a/code/game/machinery/medical_pod/bodyscanner.dm b/code/game/machinery/medical_pod/bodyscanner.dm
index fdcd0ceb62e6..bbc3be7d5aae 100644
--- a/code/game/machinery/medical_pod/bodyscanner.dm
+++ b/code/game/machinery/medical_pod/bodyscanner.dm
@@ -204,7 +204,7 @@
"toxloss" = H.getToxLoss(),
"cloneloss" = H.getCloneLoss(),
"brainloss" = H.getBrainLoss(),
- "knocked_out" = H.knocked_out,
+ "knocked_out" = H.GetKnockOutValueNotADurationDoNotUse(),
"bodytemp" = H.bodytemperature,
"inaprovaline_amount" = H.reagents.get_reagent_amount("inaprovaline"),
"dexalin_amount" = H.reagents.get_reagent_amount("dexalin"),
@@ -263,7 +263,7 @@
s_class = occ["brainloss"] < 1 ? INTERFACE_GOOD : INTERFACE_BAD
dat += "[SET_CLASS("  Approx. Brain Damage:", INTERFACE_PINK)] [SET_CLASS("[occ["brainloss"]]%", s_class)]
"
- dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% ([round(occ["knocked_out"] / 4)] seconds left!) "
+ dat += "[SET_CLASS("Knocked Out Summary:", "#40628a")] [occ["knocked_out"]]% (approximately [round(occ["knocked_out"] / 5)] seconds left!) "
dat += "[SET_CLASS("Body Temperature:", "#40628a")] [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F) "
s_class = occ["blood_amount"] > 448 ? INTERFACE_OKAY : INTERFACE_BAD
diff --git a/code/game/machinery/medical_pod/medical_pod.dm b/code/game/machinery/medical_pod/medical_pod.dm
index b284d71ad4a7..62c8eef1f72c 100644
--- a/code/game/machinery/medical_pod/medical_pod.dm
+++ b/code/game/machinery/medical_pod/medical_pod.dm
@@ -155,7 +155,6 @@
if(exit_stun)
occupant.apply_effect(exit_stun, STUN) //Action delay when going out
- occupant.update_canmove() //Force the delay to go in action immediately
occupant.visible_message(SPAN_WARNING("[occupant] pops out of \the [src]!"),
SPAN_WARNING("You get out of \the [src] and get your bearings!"))
diff --git a/code/game/machinery/medical_pod/sleeper.dm b/code/game/machinery/medical_pod/sleeper.dm
index bf2abe246c35..fe2b698caed0 100644
--- a/code/game/machinery/medical_pod/sleeper.dm
+++ b/code/game/machinery/medical_pod/sleeper.dm
@@ -164,7 +164,7 @@
var/chemicals[0]
for(var/re in connected.available_chemicals)
- var/datum/reagent/temp = chemical_reagents_list[re]
+ var/datum/reagent/temp = GLOB.chemical_reagents_list[re]
if(temp)
var/reagent_amount = 0
var/pretty_amount
@@ -365,7 +365,7 @@
if(occupant && occupant.reagents)
if(occupant.reagents.get_reagent_amount(chemical) + amount <= max_chem)
occupant.reagents.add_reagent(chemical, amount, , , user)
- var/datum/reagent/temp = chemical_reagents_list[chemical]
+ var/datum/reagent/temp = GLOB.chemical_reagents_list[chemical]
to_chat(user, SPAN_NOTICE("[occupant] now has [occupant.reagents.get_reagent_amount(chemical)] units of [temp.name] in \his bloodstream."))
return
to_chat(user, SPAN_WARNING("There's no occupant in the sleeper or the subject has too many chemicals!"))
@@ -390,8 +390,8 @@
to_chat(user, "[]\t -Respiratory Damage %: []", (occupant.getOxyLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getOxyLoss())
to_chat(user, "[]\t -Toxin Content %: []", (occupant.getToxLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getToxLoss())
to_chat(user, "[]\t -Burn Severity %: []", (occupant.getFireLoss() < 60 ? SPAN_NOTICE("") : SPAN_DANGER("")), occupant.getFireLoss())
- to_chat(user, SPAN_NOTICE(" Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"))
- to_chat(user, SPAN_NOTICE(" \t [occupant.knocked_out / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)"))
+ to_chat(user, SPAN_NOTICE(" Expected time till occupant can safely awake: (note: These times are always inaccurate)"))
+ to_chat(user, SPAN_NOTICE(" \t [occupant.GetKnockOutValueNotADurationDoNotUse() / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)"))
else
to_chat(user, SPAN_NOTICE(" There is no one inside!"))
return
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 89c9e9277f4c..9bd7e5f5e965 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -45,10 +45,9 @@
var/list/datum/feed_channel/network_channels = list()
var/datum/feed_message/wanted_issue
-var/datum/feed_network/news_network = new /datum/feed_network //The global news-network, which is coincidentally a global list.
-
-var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list that will contain reference to all newscasters in existence.
+GLOBAL_DATUM_INIT(news_network, /datum/feed_network, new()) //The global news-network, which is coincidentally a global list.
+GLOBAL_LIST_INIT_TYPED(allCasters, /obj/structure/machinery/newscaster, list()) //Global list that will contain reference to all newscasters in existence.
/obj/structure/machinery/newscaster
name = "newscaster"
@@ -101,15 +100,15 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
securityCaster = 1
/obj/structure/machinery/newscaster/security_unit/New() //Constructor, ho~
- allCasters += src
+ GLOB.allCasters += src
src.paper_remaining = 15 // Will probably change this to something better
- for(var/obj/structure/machinery/newscaster/NEWSCASTER in allCasters) // Let's give it an appropriate unit number
+ for(var/obj/structure/machinery/newscaster/NEWSCASTER in GLOB.allCasters) // Let's give it an appropriate unit number
src.unit_no++
src.update_icon() //for any custom ones on the map...
..() //I just realised the newscasters weren't in the global machines list. The superconstructor call will tend to that
/obj/structure/machinery/newscaster/security_unit/Destroy()
- allCasters -= src
+ GLOB.allCasters -= src
return ..()
/obj/structure/machinery/newscaster/update_icon()
@@ -122,7 +121,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
src.overlays.Cut() //reset overlays
- if(news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message
+ if(GLOB.news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message
icon_state = "newscaster_wanted"
return
@@ -184,7 +183,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
if(0)
dat += "Welcome to Newscasting Unit #[src.unit_no]. Interface & News networks Operational."
dat += " Property of Weyland-Yutani"
- if(news_network.wanted_issue)
+ if(GLOB.news_network.wanted_issue)
dat+= "Read Wanted Issue"
dat+= " Create Feed Channel"
dat+= " View Feed Channels"
@@ -194,7 +193,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+= "
Exit"
if(src.securityCaster)
var/wanted_already = 0
- if(news_network.wanted_issue)
+ if(GLOB.news_network.wanted_issue)
wanted_already = 1
dat+="Feed Security functions: "
@@ -204,10 +203,10 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+=" The newscaster recognises you as: [src.scanned_user]"
if(1)
dat+= "Station Feed Channels"
- if(!length(news_network.network_channels) )
+ if(!length(GLOB.news_network.network_channels) )
dat+="No active channels found..."
else
- for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
+ for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels)
if(CHANNEL.is_admin_channel)
dat+="[CHANNEL.channel_name] "
else
@@ -255,7 +254,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="ERROR: Could not submit Feed Channel to Network. "
//var/list/existing_channels = list() //Let's get dem existing channels - OBSOLETE
var/list/existing_authors = list()
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
//existing_channels += FC.channel_name //OBSOLETE
if(FC.author == "\[REDACTED\]")
existing_authors += FC.backup_author
@@ -266,7 +265,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
if(src.channel_name=="" || src.channel_name == "\[REDACTED\]")
dat+="�Invalid channel name. "
var/check = 0
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == src.channel_name)
check = 1
break
@@ -276,10 +275,10 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="�Channel author unverified. "
dat+=" Return "
if(8)
- var/total_num=length(news_network.network_channels)
+ var/total_num=length(GLOB.news_network.network_channels)
var/active_num=total_num
var/message_num=0
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
if(!FC.censored)
message_num += length(FC.messages) //Dont forget, datum/feed_channel's var messages is a list of datum/feed_message
else
@@ -312,10 +311,10 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible. "
dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it."
dat+="Select Feed channel to get Stories from: "
- if(!length(news_network.network_channels))
+ if(!length(GLOB.news_network.network_channels))
dat+="No feed channels found active... "
else
- for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
+ for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels)
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null] "
dat+=" Cancel"
if(11)
@@ -323,10 +322,10 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's"
dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed"
dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time."
- if(!length(news_network.network_channels))
+ if(!length(GLOB.news_network.network_channels))
dat+="No feed channels found active... "
else
- for(var/datum/feed_channel/CHANNEL in news_network.network_channels)
+ for(var/datum/feed_channel/CHANNEL in GLOB.news_network.network_channels)
dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : null] "
dat+=" Back"
@@ -360,7 +359,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="Wanted Issue Handler:"
var/wanted_already = 0
var/end_param = 1
- if(news_network.wanted_issue)
+ if(GLOB.news_network.wanted_issue)
wanted_already = 1
end_param = 2
@@ -371,7 +370,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="Description: [src.msg] "
dat+="Attach Photo: [(src.photo ? "Photo Attached" : "No Photo")]"
if(wanted_already)
- dat+="Wanted Issue created by: [news_network.wanted_issue.backup_author] "
+ dat+="Wanted Issue created by: [GLOB.news_network.wanted_issue.backup_author] "
else
dat+="Wanted Issue will be created under prosecutor: [src.scanned_user] "
dat+=" [(wanted_already) ? ("Edit Issue") : ("Submit")]"
@@ -394,12 +393,12 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
dat+="Wanted Issue successfully deleted from Circulation "
dat+=" Return "
if(18)
- dat+="-- STATIONWIDE WANTED ISSUE -- \[Submitted by: [news_network.wanted_issue.backup_author]\]"
- dat+="Criminal: [news_network.wanted_issue.author] "
- dat+="Description: [news_network.wanted_issue.body] "
+ dat+="-- STATIONWIDE WANTED ISSUE -- \[Submitted by: [GLOB.news_network.wanted_issue.backup_author]\]"
+ dat+="Criminal: [GLOB.news_network.wanted_issue.author] "
+ dat+="Description: [GLOB.news_network.wanted_issue.body] "
dat+="Photo:: "
- if(news_network.wanted_issue.img)
- usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
+ if(GLOB.news_network.wanted_issue.img)
+ usr << browse_rsc(GLOB.news_network.wanted_issue.img, "tmp_photow.png")
dat+=" "
else
dat+="None"
@@ -448,14 +447,14 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
else if(href_list["submit_new_channel"])
//var/list/existing_channels = list() //OBSOLETE
var/list/existing_authors = list()
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
//existing_channels += FC.channel_name
if(FC.author == "\[REDACTED\]")
existing_authors += FC.backup_author
else
existing_authors +=FC.author
var/check = 0
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == src.channel_name)
check = 1
break
@@ -468,7 +467,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
newChannel.channel_name = src.channel_name
newChannel.author = src.scanned_user
newChannel.locked = c_locked
- news_network.network_channels += newChannel //Adding channel to the global network
+ GLOB.news_network.network_channels += newChannel //Adding channel to the global network
src.screen=5
src.updateUsrDialog()
//src.update_icon()
@@ -476,7 +475,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
else if(href_list["set_channel_receiving"])
//var/list/datum/feed_channel/available_channels = list()
var/list/available_channels = list()
- for(var/datum/feed_channel/F in news_network.network_channels)
+ for(var/datum/feed_channel/F in GLOB.news_network.network_channels)
if( (!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
src.channel_name = strip_html(tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels ))
@@ -501,12 +500,12 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
newMsg.body = src.msg
if(photo)
newMsg.img = photo.img
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == src.channel_name)
FC.messages += newMsg //Adding message to the network's appropriate feed_channel
break
src.screen=4
- for(var/obj/structure/machinery/newscaster/NEWSCASTER in allCasters)
+ for(var/obj/structure/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.newsAlert(src.channel_name)
src.updateUsrDialog()
@@ -540,12 +539,12 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
else if(href_list["menu_wanted"])
var/already_wanted = 0
- if(news_network.wanted_issue)
+ if(GLOB.news_network.wanted_issue)
already_wanted = 1
if(already_wanted)
- src.channel_name = news_network.wanted_issue.author
- src.msg = news_network.wanted_issue.body
+ src.channel_name = GLOB.news_network.wanted_issue.author
+ src.msg = GLOB.news_network.wanted_issue.body
src.screen = 14
src.updateUsrDialog()
@@ -575,32 +574,32 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
WANTED.backup_author = src.scanned_user //I know, a bit wacky
if(photo)
WANTED.img = photo.img
- news_network.wanted_issue = WANTED
- for(var/obj/structure/machinery/newscaster/NEWSCASTER in allCasters)
+ GLOB.news_network.wanted_issue = WANTED
+ for(var/obj/structure/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.newsAlert()
NEWSCASTER.update_icon()
src.screen = 15
else
- if(news_network.wanted_issue.is_admin_message)
+ if(GLOB.news_network.wanted_issue.is_admin_message)
alert("The wanted issue has been distributed by a Weyland-Yutani higherup. You cannot edit it.","Ok")
return
- news_network.wanted_issue.author = src.channel_name
- news_network.wanted_issue.body = src.msg
- news_network.wanted_issue.backup_author = src.scanned_user
+ GLOB.news_network.wanted_issue.author = src.channel_name
+ GLOB.news_network.wanted_issue.body = src.msg
+ GLOB.news_network.wanted_issue.backup_author = src.scanned_user
if(photo)
- news_network.wanted_issue.img = photo.img
+ GLOB.news_network.wanted_issue.img = photo.img
src.screen = 19
src.updateUsrDialog()
else if(href_list["cancel_wanted"])
- if(news_network.wanted_issue.is_admin_message)
+ if(GLOB.news_network.wanted_issue.is_admin_message)
alert("The wanted issue has been distributed by a Weyland-Yutani higherup. You cannot take it down.","Ok")
return
var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
if(choice=="Confirm")
- news_network.wanted_issue = null
- for(var/obj/structure/machinery/newscaster/NEWSCASTER in allCasters)
+ GLOB.news_network.wanted_issue = null
+ for(var/obj/structure/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
NEWSCASTER.update_icon()
src.screen=17
src.updateUsrDialog()
@@ -915,10 +914,10 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
/obj/structure/machinery/newscaster/proc/print_paper()
var/obj/item/newspaper/NEWSPAPER = new /obj/item/newspaper
- for(var/datum/feed_channel/FC in news_network.network_channels)
+ for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
NEWSPAPER.news_content += FC
- if(news_network.wanted_issue)
- NEWSPAPER.important_message = news_network.wanted_issue
+ if(GLOB.news_network.wanted_issue)
+ NEWSPAPER.important_message = GLOB.news_network.wanted_issue
NEWSPAPER.forceMove(get_turf(src))
src.paper_remaining--
return
@@ -930,7 +929,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
/obj/structure/machinery/newscaster/proc/newsAlert(channel) //This isn't Agouri's work, for it is ugly and vile.
var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ
if(channel)
- for(var/mob/O in hearers(world_view_size-1, T))
+ for(var/mob/O in hearers(GLOB.world_view_size-1, T))
O.show_message(SPAN_NEWSCASTER("[src.name] beeps, \"Breaking news from [channel]!\""), SHOW_MESSAGE_AUDIBLE)
src.alert = 1
src.update_icon()
@@ -939,7 +938,7 @@ var/list/obj/structure/machinery/newscaster/allCasters = list() //Global list th
src.update_icon()
playsound(src.loc, 'sound/machines/twobeep.ogg', 25, 1)
else
- for(var/mob/O in hearers(world_view_size-1, T))
+ for(var/mob/O in hearers(GLOB.world_view_size-1, T))
O.show_message(SPAN_NEWSCASTER("[src.name] beeps, \"Attention! Wanted issue distributed!\""), SHOW_MESSAGE_AUDIBLE)
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 25, 1)
return
diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm
index 28ebbecc7552..369953788ae1 100644
--- a/code/game/machinery/nuclearbomb.dm
+++ b/code/game/machinery/nuclearbomb.dm
@@ -1,5 +1,4 @@
-var/bomb_set = FALSE
-
+GLOBAL_VAR_INIT(bomb_set, FALSE)
/obj/structure/machinery/nuclearbomb
name = "\improper Nuclear Fission Explosive"
desc = "Nuke the entire site from orbit, it's the only way to be sure. Too bad we don't have any orbital nukes."
@@ -59,7 +58,7 @@ var/bomb_set = FALSE
update_minimap_icon()
return PROCESS_KILL
- bomb_set = TRUE //So long as there is one nuke timing, it means one nuke is armed.
+ GLOB.bomb_set = TRUE //So long as there is one nuke timing, it means one nuke is armed.
timeleft = explosion_time - world.time
if(world.time >= explosion_time)
explode()
@@ -90,7 +89,7 @@ var/bomb_set = FALSE
return XENO_ATTACK_ACTION
/obj/structure/machinery/nuclearbomb/attackby(obj/item/O as obj, mob/user as mob)
- if(anchored && timing && bomb_set && HAS_TRAIT(O, TRAIT_TOOL_WIRECUTTERS))
+ if(anchored && timing && GLOB.bomb_set && HAS_TRAIT(O, TRAIT_TOOL_WIRECUTTERS))
user.visible_message(SPAN_INFO("[user] begins to defuse \the [src]."), SPAN_INFO("You begin to defuse \the [src]. This will take some time..."))
if(do_after(user, 150 * user.get_skill_duration_multiplier(SKILL_ENGINEER), INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE))
disable()
@@ -99,7 +98,7 @@ var/bomb_set = FALSE
..()
/obj/structure/machinery/nuclearbomb/attack_hand(mob/user as mob)
- if(user.is_mob_incapacitated() || !user.canmove || get_dist(src, user) > 1 || isRemoteControlling(user))
+ if(user.is_mob_incapacitated() || get_dist(src, user) > 1 || isRemoteControlling(user))
return
if(isyautja(user))
@@ -111,7 +110,7 @@ var/bomb_set = FALSE
return
if(isqueen(user))
- if(timing && bomb_set)
+ if(timing && GLOB.bomb_set)
user.visible_message(SPAN_INFO("[user] begins to defuse \the [src]."), SPAN_INFO("You begin to defuse \the [src]. This will take some time..."))
if(do_after(user, 5 SECONDS, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE))
disable()
@@ -196,14 +195,14 @@ var/bomb_set = FALSE
timing = !timing
if(timing)
if(!safety)
- bomb_set = TRUE
+ GLOB.bomb_set = TRUE
explosion_time = world.time + timeleft
update_minimap_icon()
start_processing()
announce_to_players()
message_admins("\The [src] has been activated by [key_name(ui.user, 1)] [ADMIN_JMP_USER(ui.user)]")
else
- bomb_set = FALSE
+ GLOB.bomb_set = FALSE
else
disable()
message_admins("\The [src] has been deactivated by [key_name(ui.user, 1)] [ADMIN_JMP_USER(ui.user)]")
@@ -232,7 +231,7 @@ var/bomb_set = FALSE
being_used = FALSE
if(safety)
timing = FALSE
- bomb_set = FALSE
+ GLOB.bomb_set = FALSE
. = TRUE
if("toggleCommandLockout")
@@ -291,7 +290,7 @@ var/bomb_set = FALSE
set name = "Make Deployable"
set src in oview(1)
- if(!usr.canmove || usr.stat || usr.is_mob_restrained() || being_used || timing)
+ if(usr.is_mob_incapacitated() || being_used || timing)
return
if(!ishuman(usr))
@@ -378,7 +377,7 @@ var/bomb_set = FALSE
/obj/structure/machinery/nuclearbomb/proc/disable()
timing = FALSE
- bomb_set = FALSE
+ GLOB.bomb_set = FALSE
timeleft = initial(timeleft)
explosion_time = null
announce_to_players()
@@ -436,7 +435,7 @@ var/bomb_set = FALSE
if(timing != -1)
message_admins("\The [src] has been unexpectedly deleted at ([x],[y],[x]). [ADMIN_JMP(src)]")
log_game("\The [src] has been unexpectedly deleted at ([x],[y],[x]).")
- bomb_set = FALSE
+ GLOB.bomb_set = FALSE
SSminimaps.remove_marker(src)
return ..()
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index b21f73af76d6..33e6e9749e48 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -296,7 +296,7 @@ Buildable meters
/obj/item/pipe/Move()
. = ..()
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
- && (src.dir in cardinal))
+ && (src.dir in GLOB.cardinals))
setDir(src.dir|turn(src.dir, 90))
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index fc8815b0511f..e007ada79a0e 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -75,7 +75,7 @@
/obj/structure/machinery/pipedispenser/Topic(href, href_list)
if(..())
return
- if(unwrenched || !usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr))
+ if(unwrenched || usr.is_mob_incapacitated() || !in_range(loc, usr))
close_browser(usr, "pipedispenser")
return
usr.set_interaction(src)
@@ -150,7 +150,7 @@ Nah
//Allow you to drag-drop disposal pipes into it
/obj/structure/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/disposalconstruct/pipe as obj, mob/usr as mob)
- if(!usr.canmove || usr.stat || usr.is_mob_restrained())
+ if(usr.is_mob_incapacitated())
return
if (!istype(pipe) || get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 )
@@ -192,7 +192,7 @@ Nah
usr.set_interaction(src)
src.add_fingerprint(usr)
if(href_list["dmake"])
- if(unwrenched || !usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr))
+ if(unwrenched || usr.is_mob_incapacitated() || !in_range(loc, usr))
close_browser(usr, "pipedispenser")
return
if(!wait)
diff --git a/code/game/machinery/scoreboard.dm b/code/game/machinery/scoreboard.dm
index 9b8d6402ca96..8740bed6dcfb 100644
--- a/code/game/machinery/scoreboard.dm
+++ b/code/game/machinery/scoreboard.dm
@@ -68,7 +68,7 @@
active = 1
icon_state = "launcheract"
- for(var/obj/structure/machinery/scoreboard/X in machines)
+ for(var/obj/structure/machinery/scoreboard/X in GLOB.machines)
if(X.id == id)
X.reset_scores()
diff --git a/code/game/machinery/seed_extractor.dm b/code/game/machinery/seed_extractor.dm
index e07b13f64f97..0b4574cc9fb4 100644
--- a/code/game/machinery/seed_extractor.dm
+++ b/code/game/machinery/seed_extractor.dm
@@ -14,10 +14,10 @@
var/datum/seed/new_seed_type
if(istype(O, /obj/item/grown))
var/obj/item/grown/F = O
- new_seed_type = seed_types[F.plantname]
+ new_seed_type = GLOB.seed_types[F.plantname]
else
var/obj/item/reagent_container/food/snacks/grown/F = O
- new_seed_type = seed_types[F.plantname]
+ new_seed_type = GLOB.seed_types[F.plantname]
if(new_seed_type)
to_chat(user, SPAN_NOTICE("You extract some seeds from [O]."))
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 79ead6321502..547dbba68e4f 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -146,7 +146,7 @@
maptext = new_text
/obj/structure/machinery/status_display/proc/get_supply_shuttle_timer()
- var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
+ var/datum/shuttle/ferry/supply/shuttle = GLOB.supply_controller.shuttle
if (!shuttle)
return "Error"
@@ -164,7 +164,7 @@
maptext = ""
/obj/structure/machinery/status_display/proc/set_sec_level_picture()
- switch(security_level)
+ switch(GLOB.security_level)
if(SEC_LEVEL_GREEN)
set_picture("default")
if(SEC_LEVEL_BLUE)
diff --git a/code/game/machinery/storm_siren.dm b/code/game/machinery/storm_siren.dm
index e78414cb7e5b..335115715488 100644
--- a/code/game/machinery/storm_siren.dm
+++ b/code/game/machinery/storm_siren.dm
@@ -11,11 +11,11 @@
health = 0
/obj/structure/machinery/storm_siren/Initialize()
- weather_notify_objects += src
+ GLOB.weather_notify_objects += src
return ..()
/obj/structure/machinery/storm_siren/Destroy()
- weather_notify_objects -= src
+ GLOB.weather_notify_objects -= src
. = ..()
/obj/structure/machinery/storm_siren/power_change()
diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm
index 26117474f0fe..7317ed6435f2 100644
--- a/code/game/machinery/supply_display.dm
+++ b/code/game/machinery/supply_display.dm
@@ -6,7 +6,7 @@
message1 = "SUPPLY"
message2 = ""
- var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
+ var/datum/shuttle/ferry/supply/shuttle = GLOB.supply_controller.shuttle
if (!shuttle)
message2 = "Error"
else if(shuttle.has_arrive_time())
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index a370356ad60b..942d70f80705 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -128,7 +128,7 @@
dat += " Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
if(hide) dat += " Shadow Link: ACTIVE"
- //Show additional options for certain machines.
+ //Show additional options for certain GLOB.machines.
dat += Options_Menu()
dat += " Linked Network Entities: "
@@ -200,7 +200,7 @@
P = user.get_active_hand()
return P
-// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
+// Additional Options for certain GLOB.machines. Use this when you want to add an option to a specific machine.
// Example of how to use below.
/obj/structure/machinery/telecomms/proc/Options_Menu()
diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm
index a9c7c61bc00d..7621d55e3645 100644
--- a/code/game/machinery/telecomms/presets.dm
+++ b/code/game/machinery/telecomms/presets.dm
@@ -1,8 +1,5 @@
// ### Preset machines ###
-
-//var/list/freq_listening = list() USE THIS FOR NEW RELAY STUFF WHEN I GET THIS - APOPHIS
-
//Relay
/obj/structure/machinery/telecomms/relay/preset
network = "tcommsat"
diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm
index f2eff1c23e56..6205f24c8e05 100644
--- a/code/game/machinery/vending/cm_vending.dm
+++ b/code/game/machinery/vending/cm_vending.dm
@@ -84,7 +84,7 @@ IN_USE used for vending/denying
if(stat & NOPOWER || stat & TIPPED_OVER) //tipping off without breaking uses "_off" sprite
overlays += image(icon, "[icon_state]_off")
if(stat & MAINT) //if we require maintenance, then it is completely "_broken"
- icon_state = "[initial(icon_state)]_broken"
+ overlays += image(icon, "[initial(icon_state)]_broken")
if(stat & IN_REPAIR) //if someone started repairs, they unscrewed "_panel"
overlays += image(icon, "[icon_state]_panel")
@@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(vending_products)
vend_fail()
return FALSE
var/p_name = itemspec[1]
- if(!available_specialist_sets.Find(p_name))
+ if(!GLOB.available_specialist_sets.Find(p_name))
to_chat(user, SPAN_WARNING("That set is already taken."))
vend_fail()
return FALSE
@@ -560,7 +560,7 @@ GLOBAL_LIST_EMPTY(vending_products)
return FALSE
ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + JOB_SQUAD_SPECIALIST + " ([specialist_assignment])")
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), ID.assignment)
- available_specialist_sets -= p_name
+ GLOB.available_specialist_sets -= p_name
else if(vendor_role.Find(JOB_SYNTH))
if(user.job != JOB_SYNTH)
to_chat(user, SPAN_WARNING("Only USCM Synthetics may vend experimental tool tokens."))
@@ -899,7 +899,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(inoperable())
return
- if(user.stat || user.is_mob_restrained() || user.lying)
+ if(user.stat || user.is_mob_restrained())
return
if(get_dist(user, src) > 1 || get_dist(src, A) > 1)
diff --git a/code/game/machinery/vending/vending.dm b/code/game/machinery/vending/vending.dm
index 414ab4a562e1..b6c4da03640c 100644
--- a/code/game/machinery/vending/vending.dm
+++ b/code/game/machinery/vending/vending.dm
@@ -343,7 +343,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
if (CH) // Only proceed if card contains proper account number.
if(!CH.suspended)
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- if(vendor_account)
+ if(GLOB.vendor_account)
var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction")
var/datum/money_account/D = attempt_account_access(card.associated_account_number, attempt_pin, 2)
transfer_and_vend(D)
@@ -364,18 +364,18 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
//transfer the money
acc.money -= transaction_amount
- vendor_account.money += transaction_amount
+ GLOB.vendor_account.money += transaction_amount
//create entries in the two account transaction logs
var/datum/transaction/T = new()
- T.target_name = "[vendor_account.owner_name] (via [name])"
+ T.target_name = "[GLOB.vendor_account.owner_name] (via [name])"
T.purpose = "Purchase of [currently_vending.product_name]"
if(transaction_amount > 0)
T.amount = "([transaction_amount])"
else
T.amount = "[transaction_amount]"
T.source_terminal = name
- T.date = current_date_string
+ T.date = GLOB.current_date_string
T.time = worldtime2text()
acc.transaction_log.Add(T)
//
@@ -384,9 +384,9 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
T.purpose = "Purchase of [currently_vending.product_name]"
T.amount = "[transaction_amount]"
T.source_terminal = name
- T.date = current_date_string
+ T.date = GLOB.current_date_string
T.time = worldtime2text()
- vendor_account.transaction_log.Add(T)
+ GLOB.vendor_account.transaction_log.Add(T)
// Vend the item
vend(currently_vending, usr)
@@ -622,18 +622,18 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
//transfer the money
user_account.money -= transaction_amount
- vendor_account.money += transaction_amount
+ GLOB.vendor_account.money += transaction_amount
//create entries in the two account transaction logs
var/datum/transaction/new_transaction = new()
- new_transaction.target_name = "[vendor_account.owner_name] (via [name])"
+ new_transaction.target_name = "[GLOB.vendor_account.owner_name] (via [name])"
new_transaction.purpose = "Purchase of [currently_vending.product_name]"
if(transaction_amount > 0)
new_transaction.amount = "([transaction_amount])"
else
new_transaction.amount = "[transaction_amount]"
new_transaction.source_terminal = name
- new_transaction.date = current_date_string
+ new_transaction.date = GLOB.current_date_string
new_transaction.time = worldtime2text()
user_account.transaction_log.Add(new_transaction)
@@ -642,9 +642,9 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
new_transaction.purpose = "Purchase of [currently_vending.product_name]"
new_transaction.amount = "[transaction_amount]"
new_transaction.source_terminal = name
- new_transaction.date = current_date_string
+ new_transaction.date = GLOB.current_date_string
new_transaction.time = worldtime2text()
- vendor_account.transaction_log.Add(new_transaction)
+ GLOB.vendor_account.transaction_log.Add(new_transaction)
return TRUE
@@ -655,7 +655,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
//transfer the money
cash.worth -= transaction_amount
- vendor_account.money += transaction_amount
+ GLOB.vendor_account.money += transaction_amount
//consume the cash if needed
if(!cash.worth)
@@ -667,9 +667,9 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
new_transaction.purpose = "Purchase of [currently_vending.product_name]"
new_transaction.amount = "[transaction_amount]"
new_transaction.source_terminal = name
- new_transaction.date = current_date_string
+ new_transaction.date = GLOB.current_date_string
new_transaction.time = worldtime2text()
- vendor_account.transaction_log.Add(new_transaction)
+ GLOB.vendor_account.transaction_log.Add(new_transaction)
return TRUE
@@ -820,7 +820,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
if(inoperable())
return
- if(user.stat || user.is_mob_restrained() || user.lying)
+ if(user.stat || user.is_mob_restrained())
return
if(get_dist(user, src) > 1 || get_dist(src, A) > 1)
diff --git a/code/game/machinery/vending/vending_types.dm b/code/game/machinery/vending/vending_types.dm
index a57bbfe7d29f..36b0b6e44df6 100644
--- a/code/game/machinery/vending/vending_types.dm
+++ b/code/game/machinery/vending/vending_types.dm
@@ -447,3 +447,69 @@
/obj/item/tool/pen/fountain = 30,
)
product_type = VENDOR_PRODUCT_TYPE_RECREATIONAL
+
+//vendor of ingredients for kitchen
+/obj/structure/machinery/vending/ingredients
+ name = "\improper Galley Auxiliary Storage Requisition System"
+ desc = "A vending machine meant to be use for cooks."
+ product_ads = "If your out of ingredients i am here for you;all my organic produce are fresh;don't let my potatoes go stale time for you to cook some fries"
+ icon_state = "snack"
+ hacking_safety = TRUE
+ products = list(
+ /obj/item/storage/fancy/egg_box = 12,
+ /obj/item/storage/box/fish = 12,
+ /obj/item/storage/box/meat = 12,
+ /obj/item/storage/box/milk = 12,
+ /obj/item/storage/box/soymilk = 12,
+ /obj/item/storage/box/enzyme = 12,
+ /obj/item/storage/box/flour = 12,
+ /obj/item/storage/box/sugar = 12,
+ /obj/item/storage/box/saltshaker = 12,
+ /obj/item/storage/box/peppermill = 12,
+ /obj/item/storage/box/mint = 12,
+ /obj/item/storage/box/apple = 12,
+ /obj/item/storage/box/banana = 12,
+ /obj/item/storage/box/chanterelle = 12,
+ /obj/item/storage/box/cherries = 12,
+ /obj/item/storage/box/chili = 12,
+ /obj/item/storage/box/cabbage = 12,
+ /obj/item/storage/box/carrot = 12,
+ /obj/item/storage/box/corn = 12,
+ /obj/item/storage/box/eggplant = 12,
+ /obj/item/storage/box/lemon = 12,
+ /obj/item/storage/box/lime = 12,
+ /obj/item/storage/box/orange = 12,
+ /obj/item/storage/box/potato = 12,
+ /obj/item/storage/box/tomato = 12,
+ /obj/item/storage/box/whitebeet = 12,
+ )
+
+ prices = list(
+ /obj/item/storage/fancy/egg_box = 1,
+ /obj/item/storage/box/fish = 1,
+ /obj/item/storage/box/meat = 1,
+ /obj/item/storage/box/milk =1,
+ /obj/item/storage/box/soymilk = 1,
+ /obj/item/storage/box/enzyme = 1,
+ /obj/item/storage/box/flour = 1,
+ /obj/item/storage/box/sugar = 1,
+ /obj/item/storage/box/saltshaker = 1,
+ /obj/item/storage/box/peppermill = 1,
+ /obj/item/storage/box/mint = 1,
+ /obj/item/storage/box/apple = 1,
+ /obj/item/storage/box/banana = 2,
+ /obj/item/storage/box/chanterelle = 2,
+ /obj/item/storage/box/cherries = 2,
+ /obj/item/storage/box/chili = 2,
+ /obj/item/storage/box/cabbage = 2,
+ /obj/item/storage/box/carrot = 2,
+ /obj/item/storage/box/corn = 2,
+ /obj/item/storage/box/eggplant = 2,
+ /obj/item/storage/box/lemon = 2,
+ /obj/item/storage/box/lime = 2,
+ /obj/item/storage/box/orange = 2,
+ /obj/item/storage/box/potato = 2,
+ /obj/item/storage/box/tomato = 2,
+ /obj/item/storage/box/whitebeet = 2,
+ )
+ product_type = VENDOR_PRODUCT_TYPE_FOOD
diff --git a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm
index d352936b5434..6877c2b4b5b3 100644
--- a/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm
+++ b/code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm
@@ -26,12 +26,12 @@
/obj/structure/machinery/cm_vending/gear/vehicle_crew/Initialize(mapload, ...)
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_VEHICLE_ORDERED, PROC_REF(populate_products))
- if(!VehicleGearConsole)
- VehicleGearConsole = src
+ if(!GLOB.VehicleGearConsole)
+ GLOB.VehicleGearConsole = src
/obj/structure/machinery/cm_vending/gear/vehicle_crew/Destroy()
UnregisterSignal(SSdcs, COMSIG_GLOB_VEHICLE_ORDERED)
- VehicleGearConsole = null
+ GLOB.VehicleGearConsole = null
return ..()
/obj/structure/machinery/cm_vending/gear/vehicle_crew/get_appropriate_vend_turf(mob/living/carbon/human/H)
@@ -87,9 +87,9 @@
. = list()
. += ui_static_data(user)
- if(supply_controller.tank_points) //we steal points from supply_controller, meh-he-he. Solely to be able to modify amount of points in vendor if needed by just changing one var.
- available_points_to_display = supply_controller.tank_points
- supply_controller.tank_points = 0
+ if(GLOB.supply_controller.tank_points) //we steal points from GLOB.supply_controller, meh-he-he. Solely to be able to modify amount of points in vendor if needed by just changing one var.
+ available_points_to_display = GLOB.supply_controller.tank_points
+ GLOB.supply_controller.tank_points = 0
.["current_m_points"] = available_points_to_display
var/list/ui_listed_products = get_listed_products(user)
diff --git a/code/game/machinery/vending/vendor_types/dress.dm b/code/game/machinery/vending/vendor_types/dress.dm
index aff221260d03..d49361d912a0 100644
--- a/code/game/machinery/vending/vendor_types/dress.dm
+++ b/code/game/machinery/vending/vendor_types/dress.dm
@@ -6,11 +6,11 @@
/obj/structure/machinery/cm_vending/clothing/dress/proc/get_listed_products_for_role(list/role_specific_uniforms)
. = list()
- for(var/category_type in uniform_categories)
+ for(var/category_type in GLOB.uniform_categories)
var/display_category = FALSE
- if(!uniform_categories[category_type])
+ if(!GLOB.uniform_categories[category_type])
continue
- for(var/category in uniform_categories[category_type])
+ for(var/category in GLOB.uniform_categories[category_type])
if((category in role_specific_uniforms) && role_specific_uniforms[category])
display_category = TRUE
break
@@ -19,7 +19,7 @@
. += list(
list(category_type, 0, null, null, null)
)
- for(var/object_type in uniform_categories[category_type])
+ for(var/object_type in GLOB.uniform_categories[category_type])
if(!role_specific_uniforms[object_type])
continue
for(var/uniform_path in role_specific_uniforms[object_type])
@@ -52,11 +52,11 @@
if(istype(id_card))
role_specific_uniforms = id_card.uniform_sets
vended_items = id_card.vended_items
- for(var/category_type in uniform_categories)
+ for(var/category_type in GLOB.uniform_categories)
var/display_category = FALSE
- if(!uniform_categories[category_type])
+ if(!GLOB.uniform_categories[category_type])
continue
- for(var/category in uniform_categories[category_type])
+ for(var/category in GLOB.uniform_categories[category_type])
if((category in role_specific_uniforms) && role_specific_uniforms[category])
display_category = TRUE
break
@@ -65,7 +65,7 @@
display_list += list(
list(category_type, 0, null, null, null)
)
- for(var/object_type in uniform_categories[category_type])
+ for(var/object_type in GLOB.uniform_categories[category_type])
if(!role_specific_uniforms[object_type])
continue
for(var/uniform_path in role_specific_uniforms[object_type])
@@ -134,10 +134,10 @@
to_chat(H, SPAN_WARNING("This machine isn't for you."))
return
- for(var/category in uniform_categories) // Very Hacky fix
+ for(var/category in GLOB.uniform_categories) // Very Hacky fix
if(!exploiting)
break
- for(var/specific_category in uniform_categories[category])
+ for(var/specific_category in GLOB.uniform_categories[category])
if(!exploiting)
break
if(!(specific_category in id_card.uniform_sets))
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm
index 65397570511c..f11d1fd48b87 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm
@@ -20,8 +20,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list(
list("Plasteel x10", 7, /obj/item/stack/sheet/plasteel/small_stack, null, VENDOR_ITEM_RECOMMENDED),
list("Plastic Explosive", 3, /obj/item/explosive/plastic, null, VENDOR_ITEM_REGULAR),
list("Breaching Charge", 5, /obj/item/explosive/plastic/breaching_charge, null, VENDOR_ITEM_RECOMMENDED),
- list("Range Finder", 10, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
- list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Sandbags x25", 10, /obj/item/stack/sandbags_empty/half, null, VENDOR_ITEM_RECOMMENDED),
list("Super-Capacity Power Cell", 10, /obj/item/cell/super, null, VENDOR_ITEM_REGULAR),
list("ES-11 Mobile Fuel Canister", 4, /obj/item/tool/weldpack/minitank, null, VENDOR_ITEM_REGULAR),
@@ -72,6 +70,10 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list(
list("Motion Detector", 8, /obj/item/device/motiondetector, null, VENDOR_ITEM_REGULAR),
list("Whistle", 3, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
+ list("BINOCULARS", 0, null, null, null),
+ list("Range Finder", 10, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
+ list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
+
list("HELMET OPTICS", 0, null, null, null),
list("Medical Helmet Optic", 12, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_REGULAR),
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm
index 81c1941c3423..fc9813f9b172 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_leader.dm
@@ -23,18 +23,21 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list(
list("Machete Pouch (Full)", 4, /obj/item/storage/pouch/machete/full, null, VENDOR_ITEM_REGULAR),
list("USCM Radio Telephone Pack", 5, /obj/item/storage/backpack/marine/satchel/rto, null, VENDOR_ITEM_REGULAR),
list("M276 Pattern Combat Toolbelt Rig", 15, /obj/item/storage/belt/gun/utility, null, VENDOR_ITEM_REGULAR),
- list("Night Vision Optic", 20, /obj/item/device/helmet_visor/night_vision, null, VENDOR_ITEM_RECOMMENDED),
list("UTILITIES", 0, null, null, null),
list("Whistle", 3, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
- list("Range Finder", 3, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
- list("Laser Designator", 5, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Fire Extinguisher (Portable)", 3, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
list("Motion Detector", 5, /obj/item/device/motiondetector, null, VENDOR_ITEM_REGULAR),
list("Fulton Device Stack", 5, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR),
+ list("BINOCULARS", 0, null, null, null),
+ list("Range Finder", 3, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
+ list("Laser Designator", 5, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
+
list("HELMET OPTICS", 0, null, null, null),
list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR),
+ list("Medical Helmet Optic", 4, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_RECOMMENDED),
+ list("Night Vision Optic", 20, /obj/item/device/helmet_visor/night_vision, null, VENDOR_ITEM_RECOMMENDED),
list("ENGINEERING SUPPLIES", 0, null, null, null),
list("Insulated Gloves", 3, /obj/item/clothing/gloves/yellow, null, VENDOR_ITEM_REGULAR),
@@ -74,7 +77,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_leader, list(
list("Injector (Tricord)", 1, /obj/item/reagent_container/hypospray/autoinjector/tricord, null, VENDOR_ITEM_REGULAR),
list("Health Analyzer", 4, /obj/item/device/healthanalyzer, null, VENDOR_ITEM_REGULAR),
- list("Medical Helmet Optic", 4, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_RECOMMENDED),
list("Roller Bed", 2, /obj/item/roller, null, VENDOR_ITEM_REGULAR),
list("SPECIAL AMMUNITION", 0, null, null, null),
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm
index f6b99887bbbb..21485f10c50f 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm
@@ -81,12 +81,14 @@ GLOBAL_LIST_INIT(cm_vending_gear_medic, list(
list("Welding Goggles", 3, /obj/item/clothing/glasses/welding, null, VENDOR_ITEM_REGULAR),
list("UTILITIES", 0, null, null, null),
- list("Range Finder", 6, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
- list("Laser Designator", 8, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Fire Extinguisher (Portable)", 3, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
list("Motion Detector", 8, /obj/item/device/motiondetector, null, VENDOR_ITEM_REGULAR),
list("Whistle", 3, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
+ list("BINOCULARS", 0, null, null, null),
+ list("Range Finder", 6, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
+ list("Laser Designator", 8, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
+
list("HELMET OPTICS", 0, null, null, null),
list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR),
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm
index 94325b09e9eb..52418fb8940c 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm
@@ -307,6 +307,7 @@
req_access = list(ACCESS_MARINE_ALPHA)
req_one_access = list(ACCESS_MARINE_LEADER, ACCESS_MARINE_SPECPREP, ACCESS_MARINE_RO)
hackable = TRUE
+ vend_flags = VEND_CLUTTER_PROTECTION | VEND_LIMITED_INVENTORY | VEND_TO_HAND
vend_y_offset = 1
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm
index 6a569638984b..2e6f78f068f5 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_rifleman.dm
@@ -92,13 +92,15 @@ GLOBAL_LIST_INIT(cm_vending_clothing_marine, list(
list("Sandbags", 20, /obj/item/stack/sandbags_empty/half, null, VENDOR_ITEM_REGULAR),
list("Roller Bed", 5, /obj/item/roller, null, VENDOR_ITEM_REGULAR),
list("Fulton Device Stack", 5, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR),
- list("Range Finder", 10, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
- list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Fire Extinguisher (Portable)", 5, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
list("Motion Detector", 15, /obj/item/device/motiondetector, null, VENDOR_ITEM_REGULAR),
list("Data Detector", 15, /obj/item/device/motiondetector/intel, null, VENDOR_ITEM_REGULAR),
list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
+ list("BINOCULARS", 0, null, null, null),
+ list("Range Finder", 10, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
+ list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
+
list("HELMET OPTICS", 0, null, null, null),
list("Medical Helmet Optic", 15, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_REGULAR),
list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR),
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm
index 41710b477769..b67d11b3f487 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm
@@ -29,13 +29,15 @@ GLOBAL_LIST_INIT(cm_vending_gear_smartgun, list(
list("Large General Pouch", 6, /obj/item/storage/pouch/general/large, null, VENDOR_ITEM_REGULAR),
list("UTILITIES", 0, null, null, null),
- list("Range Finder", 10, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
- list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Fire Extinguisher (Portable)", 5, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
list("Roller Bed", 5, /obj/item/roller, null, VENDOR_ITEM_REGULAR),
list("Fulton Device Stack", 5, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR),
+ list("BINOCULARS", 0, null, null, null),
+ list("Range Finder", 10, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR),
+ list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
+
list("HELMET OPTICS", 0, null, null, null),
list("Medical Helmet Optic", 15, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_REGULAR),
list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR),
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm
index 7bd45cb46a60..1c86a293772e 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_tl.dm
@@ -43,7 +43,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list(
list("Night Vision Optic", 30, /obj/item/device/helmet_visor/night_vision, null, VENDOR_ITEM_RECOMMENDED),
list("UTILITIES", 0, null, null, null),
- list("Binoculars", 5, /obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR),
list("Motion Detector", 15, /obj/item/device/motiondetector, null, VENDOR_ITEM_RECOMMENDED),
list("Plastic Explosive", 10, /obj/item/explosive/plastic, null, VENDOR_ITEM_REGULAR),
list("Breaching Charge", 10, /obj/item/explosive/plastic/breaching_charge, null, VENDOR_ITEM_REGULAR),
@@ -52,6 +51,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_tl, list(
list("Fire Extinguisher (Portable)", 5, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR),
+ list("BINOCULARS", 0, null, null, null),
+ list("Binoculars", 5, /obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR),
+
list("HELMET OPTICS", 0, null, null, null),
list("Medical Helmet Optic", 15, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_REGULAR),
list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR),
diff --git a/code/game/machinery/weather_siren.dm b/code/game/machinery/weather_siren.dm
index c7752a3dccf1..7816a33391e3 100644
--- a/code/game/machinery/weather_siren.dm
+++ b/code/game/machinery/weather_siren.dm
@@ -11,11 +11,11 @@
health = 0
/obj/structure/machinery/weather_siren/Initialize()
- weather_notify_objects += src
+ GLOB.weather_notify_objects += src
return ..()
/obj/structure/machinery/weather_siren/Destroy()
- weather_notify_objects -= src
+ GLOB.weather_notify_objects -= src
. = ..()
/obj/structure/machinery/weather_siren/power_change()
diff --git a/code/game/objects/effects/acid_hole.dm b/code/game/objects/effects/acid_hole.dm
index 415df0e7e5a7..a4db9ef5c0e0 100644
--- a/code/game/objects/effects/acid_hole.dm
+++ b/code/game/objects/effects/acid_hole.dm
@@ -50,18 +50,18 @@
return XENO_NO_DELAY_ACTION
/obj/effect/acid_hole/proc/expand_hole(mob/living/carbon/xenomorph/user)
- if(user.action_busy || user.lying)
+ if(user.action_busy || user.is_mob_incapacitated())
return
playsound(src, "pry", 25, 1)
xeno_attack_delay(user)
- if(do_after(user, 60, INTERRUPT_ALL, BUSY_ICON_GENERIC) && !QDELETED(src) && holed_wall && !user.lying && istype(holed_wall))
+ if(do_after(user, 60, INTERRUPT_ALL, BUSY_ICON_GENERIC) && !QDELETED(src) && holed_wall && istype(holed_wall))
holed_wall.take_damage(rand(2000,3500))
user.emote("roar")
-/obj/effect/acid_hole/proc/use_wall_hole(mob/user)
+/obj/effect/acid_hole/proc/use_wall_hole(mob/living/user)
- if(user.mob_size >= MOB_SIZE_BIG || user.is_mob_incapacitated() || user.lying || user.buckled || user.anchored)
+ if(user.mob_size >= MOB_SIZE_BIG || user.is_mob_incapacitated() || user.buckled || user.anchored)
return FALSE
var/mob_dir = get_dir(user, src)
@@ -95,7 +95,7 @@
to_chat(user, SPAN_NOTICE("You start crawling through the hole."))
if(do_after(user, 15, INTERRUPT_NO_NEEDHAND, BUSY_ICON_GENERIC))
- if(!user.is_mob_incapacitated() && !user.lying && !user.buckled)
+ if(!user.is_mob_incapacitated() && !user.buckled)
if (T.density)
return
for(var/obj/O in T)
diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index 867c6924b39d..0b44c0bb4443 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -160,7 +160,7 @@
//damages human that comes in contact
/obj/effect/xenomorph/spray/proc/apply_spray(mob/living/carbon/H, should_stun = TRUE)
- if(!H.lying)
+ if(H.body_position == STANDING_UP)
to_chat(H, SPAN_DANGER("Your feet scald and burn! Argh!"))
if(ishuman(H))
H.emote("pain")
@@ -264,7 +264,7 @@
else
PAS.increment_stack_count(2)
- if(!H.lying)
+ if(H.body_position == STANDING_UP)
to_chat(H, SPAN_DANGER("Your feet scald and burn! Argh!"))
H.emote("pain")
H.last_damage_data = cause_data
diff --git a/code/game/objects/effects/decals/cleanable/fuel.dm b/code/game/objects/effects/decals/cleanable/fuel.dm
index 3e245f760e21..a3f5f2d4e1a7 100644
--- a/code/game/objects/effects/decals/cleanable/fuel.dm
+++ b/code/game/objects/effects/decals/cleanable/fuel.dm
@@ -24,7 +24,7 @@
if(amount < 5.0) return
var/turf/S = loc
if(!istype(S)) return
- for(var/d in cardinal)
+ for(var/d in GLOB.cardinals)
if(rand(25))
var/turf/target = get_step(src, d)
var/turf/origin = get_turf(src)
diff --git a/code/game/objects/effects/effect_system/chemsmoke.dm b/code/game/objects/effects/effect_system/chemsmoke.dm
index eeb17f7c98d0..0c74912ceb25 100644
--- a/code/game/objects/effects/effect_system/chemsmoke.dm
+++ b/code/game/objects/effects/effect_system/chemsmoke.dm
@@ -195,7 +195,7 @@
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
smoke.icon = I
smoke.layer = FLY_LAYER
- smoke.setDir(pick(cardinal))
+ smoke.setDir(pick(GLOB.cardinals))
smoke.pixel_x = -32 + rand(-8,8)
smoke.pixel_y = -32 + rand(-8,8)
walk_to(smoke, T)
@@ -229,7 +229,7 @@
while(pending.len)
for(var/turf/current in pending)
- for(var/D in cardinal)
+ for(var/D in GLOB.cardinals)
var/turf/target = get_step(current, D)
if(wallList)
if(istype(target, /turf/closed/wall))
diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm
index 49342af8514f..2e2203682798 100644
--- a/code/game/objects/effects/effect_system/effect_system.dm
+++ b/code/game/objects/effects/effect_system/effect_system.dm
@@ -41,10 +41,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/particle_effect/steam
@@ -71,9 +71,9 @@ steam.start() -- spawns the effect
var/obj/effect/particle_effect/steam/steam = new /obj/effect/particle_effect/steam(location)
var/direction
if(cardinals)
- direction = pick(cardinal)
+ direction = pick(GLOB.cardinals)
else
- direction = pick(alldirs)
+ direction = pick(GLOB.alldirs)
for(i=0, i0)
S.spread_smoke()
@@ -548,7 +548,7 @@
if(QDELETED(src)) return
var/turf/U = get_turf(src)
if(!U) return
- for(var/i in cardinal)
+ for(var/i in GLOB.cardinals)
if(direction && i != direction)
continue
var/turf/T = get_step(U, i)
@@ -569,7 +569,7 @@
if(istype(A, /obj/flamer_fire))
qdel(A)
- S.setDir(pick(cardinal))
+ S.setDir(pick(GLOB.cardinals))
S.time_to_live = time_to_live
if(S.amount>0)
S.spread_smoke()
diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm
index 56c6ae45cda7..aa5e2ec400e2 100644
--- a/code/game/objects/effects/glowshroom.dm
+++ b/code/game/objects/effects/glowshroom.dm
@@ -46,7 +46,7 @@
set background = 1
var/direction = 16
- for(var/wallDir in cardinal)
+ for(var/wallDir in GLOB.cardinals)
var/turf/newTurf = get_step(location,wallDir)
if(istype(newTurf, /turf/closed/wall))
direction |= wallDir
diff --git a/code/game/objects/effects/landmarks/corpsespawner.dm b/code/game/objects/effects/landmarks/corpsespawner.dm
index fe338bceabfe..27a717f58ba8 100644
--- a/code/game/objects/effects/landmarks/corpsespawner.dm
+++ b/code/game/objects/effects/landmarks/corpsespawner.dm
@@ -135,7 +135,7 @@
/obj/effect/landmark/corpsespawner/wy/manager/burst
name = "Burst Corporate Supervisor"
- equip_path = /datum/equipment_preset/corpse/ua_riot/burst
+ equip_path = /datum/equipment_preset/corpse/wy/manager/burst
///////////Faction Specific Corpses//////////////////////
diff --git a/code/game/objects/effects/landmarks/item_pool.dm b/code/game/objects/effects/landmarks/item_pool.dm
index e01a6bbc3fd0..a5e628cd656b 100644
--- a/code/game/objects/effects/landmarks/item_pool.dm
+++ b/code/game/objects/effects/landmarks/item_pool.dm
@@ -13,10 +13,10 @@
/obj/effect/landmark/item_pool_spawner/Initialize(mapload, ...)
. = ..()
- item_pool_landmarks += src
+ GLOB.item_pool_landmarks += src
/obj/effect/landmark/item_pool_spawner/Destroy()
- item_pool_landmarks -= src
+ GLOB.item_pool_landmarks -= src
. = ..()
/obj/effect/landmark/item_pool_spawner/corsat_bio_lock
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 16f30eaf0fd2..ce0fd5506cd7 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -176,17 +176,17 @@
user = _user
if(squad_name)
name = "[squad_name] laser"
- if(user && user.faction && cas_groups[user.faction])
+ if(user && user.faction && GLOB.cas_groups[user.faction])
signal = new(src)
signal.name = name
signal.target_id = tracking_id
signal.linked_cam = new(loc, name)
- cas_groups[user.faction].add_signal(signal)
+ GLOB.cas_groups[user.faction].add_signal(signal)
/obj/effect/overlay/temp/laser_target/Destroy()
if(signal)
- cas_groups[user.faction].remove_signal(signal)
+ GLOB.cas_groups[user.faction].remove_signal(signal)
if(signal.linked_cam)
qdel(signal.linked_cam)
signal.linked_cam = null
@@ -225,7 +225,7 @@
effect_duration = 10
/obj/effect/overlay/temp/emp_sparks/New(loc)
- setDir(pick(cardinal))
+ setDir(pick(GLOB.cardinals))
..()
/obj/effect/overlay/temp/emp_pulse
diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm
index 382b92489baa..77b69f79e86f 100644
--- a/code/game/objects/effects/spawners/gibspawner.dm
+++ b/code/game/objects/effects/spawners/gibspawner.dm
@@ -99,7 +99,7 @@
gibamounts = list(1,1,1)
/obj/effect/spawner/gibspawner/human/Initialize(mapload, list/viruses, mob/living/ml, fleshcolor, bloodcolor)
- gibdirections = list(alldirs, alldirs, list())
+ gibdirections = list(GLOB.alldirs, GLOB.alldirs, list())
. = ..()
/obj/effect/spawner/gibspawner/xeno
@@ -107,7 +107,7 @@
gibamounts = list(1,1,1)
/obj/effect/spawner/gibspawner/xeno/Initialize(mapload, list/viruses, mob/living/ml, fleshcolor, bloodcolor)
- gibdirections = list(alldirs, alldirs, list())
+ gibdirections = list(GLOB.alldirs, GLOB.alldirs, list())
. = ..()
/obj/effect/spawner/gibspawner/robot
@@ -116,6 +116,6 @@
gibamounts = list(1,1,1,1,1,1)
/obj/effect/spawner/gibspawner/robot/Initialize(mapload, list/viruses, mob/living/ml, fleshcolor, bloodcolor)
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
gibamounts[6] = pick(0,1,2)
. = ..()
diff --git a/code/game/objects/effects/spawners/random.dm b/code/game/objects/effects/spawners/random.dm
index d302e7794f8b..388e9f289cd7 100644
--- a/code/game/objects/effects/spawners/random.dm
+++ b/code/game/objects/effects/spawners/random.dm
@@ -342,9 +342,9 @@
var/gunpath = pick(guns)
var/ammopath
if(istype(gunpath, /obj/item/weapon/gun/shotgun))
- ammopath = pick(shotgun_boxes_12g)
+ ammopath = pick(GLOB.shotgun_boxes_12g)
else if(istype(gunpath, /obj/item/weapon/gun/launcher/grenade))
- ammopath = pick(grenade_packets)
+ ammopath = pick(GLOB.grenade_packets)
else
ammopath = guns[gunpath]
spawn_weapon_on_floor(gunpath, ammopath, rand(mags_min, mags_max))
@@ -358,7 +358,7 @@
if(gunpath)
gun = new gunpath(spawnloc)
if(scatter)
- var/direction = pick(alldirs)
+ var/direction = pick(GLOB.alldirs)
var/turf/turf = get_step(gun, direction)
if(!turf || turf.density)
return
@@ -368,7 +368,7 @@
ammo = new ammopath(spawnloc)
if(scatter)
for(i=0, iTake a closer look.", SHOW_MESSAGE_VISIBLE)
@@ -850,7 +850,7 @@ cases. Override_icon_state should be a list.*/
UnregisterSignal(user, COMSIG_MOB_MOVE_OR_LOOK)
//General reset in case anything goes wrong, the view will always reset to default unless zooming in.
if(user.client)
- user.client.change_view(world_view_size, src)
+ user.client.change_view(GLOB.world_view_size, src)
user.client.pixel_x = 0
user.client.pixel_y = 0
@@ -920,9 +920,10 @@ cases. Override_icon_state should be a list.*/
mob_state += GLOB.slot_to_contained_sprite_shorthand[slot]
return mob_state
-/obj/item/proc/drop_to_floor(mob/wearer)
+/obj/item/proc/drop_to_floor(mob/wearer, body_position)
SIGNAL_HANDLER
- wearer.drop_inv_item_on_ground(src)
+ if(body_position == LYING_DOWN)
+ wearer.drop_inv_item_on_ground(src)
// item animatzionen
diff --git a/code/game/objects/items/books/manuals.dm b/code/game/objects/items/books/manuals.dm
index ba2a30c35c7d..0854d2ec1b06 100644
--- a/code/game/objects/items/books/manuals.dm
+++ b/code/game/objects/items/books/manuals.dm
@@ -1302,9 +1302,9 @@
/obj/item/book/manual/orbital_cannon_manual/New()
. = ..()
- LAZYADD(objects_of_interest, src)
+ LAZYADD(GLOB.objects_of_interest, src)
/obj/item/book/manual/orbital_cannon_manual/Destroy()
. = ..()
- LAZYREMOVE(objects_of_interest, src)
+ LAZYREMOVE(GLOB.objects_of_interest, src)
diff --git a/code/game/objects/items/circuitboards/computer.dm b/code/game/objects/items/circuitboards/computer.dm
index 122136f6f2fa..40c66bc0fa6a 100644
--- a/code/game/objects/items/circuitboards/computer.dm
+++ b/code/game/objects/items/circuitboards/computer.dm
@@ -278,7 +278,7 @@
to_chat(usr, "No input found please hang up and try your call again.")
return
var/list/tempnetwork = splittext(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
diff --git a/code/game/objects/items/devices/autopsy_scanner.dm b/code/game/objects/items/devices/autopsy_scanner.dm
index c4c7ec665e23..6703ead88147 100644
--- a/code/game/objects/items/devices/autopsy_scanner.dm
+++ b/code/game/objects/items/devices/autopsy_scanner.dm
@@ -17,12 +17,12 @@
/obj/item/device/autopsy_scanner/Initialize()
. = ..()
- LAZYADD(objects_of_interest, src)
+ LAZYADD(GLOB.objects_of_interest, src)
/obj/item/device/autopsy_scanner/Destroy()
. = ..()
- LAZYREMOVE(objects_of_interest, src)
+ LAZYREMOVE(GLOB.objects_of_interest, src)
/datum/autopsy_data_scanner
var/weapon = null // this is the DEFINITE weapon type that was used
@@ -90,7 +90,7 @@
var/scan_data = ""
if(timeofdeath)
- scan_data += "Time of death: [worldtime2text("hh:mm", timeofdeath)] [time2text(timeofdeath, "DDD MMM DD [game_year]")]
Unauthorized Access Removed. This console is currently under CMB investigation. Thank you for your cooperation.
"
return
temp += "KHZKNHZH#0-"
- if(!supply_controller.mendoza_status) // he's daed
+ if(!GLOB.supply_controller.mendoza_status) // he's daed
temp += "........."
return
handle_mendoza_dialogue() //mendoza has been in there for a while. he gets lonely sometimes
temp += "[last_viewed_group]
"
- for(var/supply_group_name in supply_controller.contraband_supply_groups)
+ for(var/supply_group_name in GLOB.supply_controller.contraband_supply_groups)
temp += "[supply_group_name] "
/obj/structure/machinery/computer/supplycomp/proc/handle_black_market_groups()
- temp = "W-Y Dollars: $[supply_controller.black_market_points] "
+ temp = "W-Y Dollars: $[GLOB.supply_controller.black_market_points] "
temp += "Back to black market categories
"
temp += "Purchase from: [last_viewed_group]
"
- for(var/supply_name in supply_controller.supply_packs )
- var/datum/supply_packs/supply_pack = supply_controller.supply_packs[supply_name]
+ for(var/supply_name in GLOB.supply_controller.supply_packs )
+ var/datum/supply_packs/supply_pack = GLOB.supply_controller.supply_packs[supply_name]
if(!is_buyable(supply_pack))
continue
temp += "[supply_name] Cost: $[round(supply_pack.dollar_cost)] "
@@ -1185,7 +1185,7 @@ var/datum/controller/supply/supply_controller = new()
return_value = movable_atom.black_market_value
// so they cant sell the same thing over and over and over
- return_value = POSITIVE(return_value - supply_controller.black_market_sold_items[movable_atom.type] * 0.5)
+ return_value = POSITIVE(return_value - GLOB.supply_controller.black_market_sold_items[movable_atom.type] * 0.5)
return return_value
/datum/controller/supply/proc/kill_mendoza()
@@ -1348,11 +1348,11 @@ var/datum/controller/supply/supply_controller = new()
new /datum/vehicle_order/apc/cmd(),
)
- if(!VehicleElevatorConsole)
- VehicleElevatorConsole = src
+ if(!GLOB.VehicleElevatorConsole)
+ GLOB.VehicleElevatorConsole = src
/obj/structure/machinery/computer/supplycomp/vehicle/Destroy()
- VehicleElevatorConsole = null
+ GLOB.VehicleElevatorConsole = null
return ..()
/obj/structure/machinery/computer/supplycomp/vehicle/attack_hand(mob/living/carbon/human/H as mob)
@@ -1408,8 +1408,8 @@ var/datum/controller/supply/supply_controller = new()
return
if(spent)
return
- if(!supply_controller)
- world.log << "## ERROR: Eek. The supply_controller controller datum is missing somehow."
+ if(!GLOB.supply_controller)
+ world.log << "## ERROR: Eek. The GLOB.supply_controller controller datum is missing somehow."
return
if (!SSshuttle.vehicle_elevator)
diff --git a/code/game/turfs/auto_turf.dm b/code/game/turfs/auto_turf.dm
index 45756c30bb9c..75501a1a7ecd 100644
--- a/code/game/turfs/auto_turf.dm
+++ b/code/game/turfs/auto_turf.dm
@@ -53,7 +53,7 @@
return
bleed_layer = max(0, new_layer)
- for(var/direction in alldirs)
+ for(var/direction in GLOB.alldirs)
var/turf/open/T = get_step(src, direction)
if(istype(T))
T.update_icon()
diff --git a/code/game/turfs/floor.dm b/code/game/turfs/floor.dm
index 5f99aba26c09..1be6235cd2ac 100644
--- a/code/game/turfs/floor.dm
+++ b/code/game/turfs/floor.dm
@@ -69,7 +69,7 @@
..()
if(is_grass_floor())
var/dir_sum = 0
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
var/turf/T = get_step(src,direction)
if(!(T.is_grass_floor()))
dir_sum += direction
diff --git a/code/game/turfs/floor_types.dm b/code/game/turfs/floor_types.dm
index 4e47fd004f74..f957686fac22 100644
--- a/code/game/turfs/floor_types.dm
+++ b/code/game/turfs/floor_types.dm
@@ -203,6 +203,13 @@
icon_state = "default"
plating_type = /turf/open/floor/plating/almayer
+/// Admin level thunderdome floor. Doesn't get damaged by explosions and such for pristine testing
+/turf/open/floor/tdome
+ icon = 'icons/turf/almayer.dmi'
+ icon_state = "plating"
+ plating_type = /turf/open/floor/tdome
+ hull_floor = TRUE
+
//Cargo elevator
/turf/open/floor/almayer/empty
name = "empty space"
@@ -242,10 +249,10 @@
qdel(AM)
return
var/mob/living/carbon/human/thrown_human = AM
- for(var/atom/computer as anything in supply_controller.bound_supply_computer_list)
+ for(var/atom/computer as anything in GLOB.supply_controller.bound_supply_computer_list)
computer.balloon_alert_to_viewers("you hear horrifying noises coming from the elevator!")
- var/area/area_shuttle = supply_controller.shuttle?.get_location_area()
+ var/area/area_shuttle = GLOB.supply_controller.shuttle?.get_location_area()
if(!area_shuttle)
return
var/list/turflist = list()
@@ -452,7 +459,7 @@
/turf/open/floor/grass/LateInitialize()
. = ..()
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
if(istype(get_step(src,direction),/turf/open/floor))
var/turf/open/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
@@ -497,7 +504,7 @@
if(!broken && !burnt)
if(icon_state != "carpetsymbol")
var/connectdir = 0
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
if(istype(get_step(src, direction), /turf/open/floor))
var/turf/open/floor/FF = get_step(src, direction)
if(FF.is_carpet_floor())
@@ -538,7 +545,7 @@
icon_state = "carpet[connectdir]-[diagonalconnect]"
/turf/open/floor/carpet/make_plating()
- for(var/direction in alldirs)
+ for(var/direction in GLOB.alldirs)
if(istype(get_step(src, direction), /turf/open/floor))
var/turf/open/floor/FF = get_step(src,direction)
FF.update_icon() // So siding get updated properly
diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm
index 93eb45c3b79c..72624aff99c8 100644
--- a/code/game/turfs/open.dm
+++ b/code/game/turfs/open.dm
@@ -24,7 +24,7 @@
add_cleanable_overlays()
var/list/turf/open/auto_turf/auto_turf_dirs = list()
- for(var/direction in alldirs)
+ for(var/direction in GLOB.alldirs)
var/turf/open/auto_turf/T = get_step(src, direction)
if(!istype(T))
continue
@@ -36,7 +36,7 @@
var/list/handled_dirs = list()
var/list/unhandled_dirs = list()
- for(var/direction in diagonals)
+ for(var/direction in GLOB.diagonals)
var/x_dir = direction & (direction-1)
var/y_dir = direction - x_dir
@@ -90,7 +90,7 @@
if(!T.icon_state_before_scorching)
T.icon_state_before_scorching = T.icon_state
var/direction_from_neighbor_towards_src = get_dir(T, src)
- var/icon/culling_mask = icon(T.icon, "[T.scorchable]_mask[turf_edgeinfo_cache[T.icon_state_before_scorching][dir2indexnum(T.dir)][dir2indexnum(direction_from_neighbor_towards_src)]]", direction_from_neighbor_towards_src)
+ var/icon/culling_mask = icon(T.icon, "[T.scorchable]_mask[GLOB.turf_edgeinfo_cache[T.icon_state_before_scorching][dir2indexnum(T.dir)][dir2indexnum(direction_from_neighbor_towards_src)]]", direction_from_neighbor_towards_src)
edge_overlay.Blend(culling_mask, ICON_OVERLAY)
edge_overlay.SwapColor(rgb(255, 0, 255, 255), rgb(0, 0, 0, 0))
overlays += edge_overlay
@@ -370,16 +370,16 @@
/turf/open/gm/grass/Initialize(mapload, ...)
. = ..()
- if(!locate(icon_state) in turf_edgeinfo_cache)
+ if(!locate(icon_state) in GLOB.turf_edgeinfo_cache)
switch(icon_state)
if("grass1")
- turf_edgeinfo_cache["grass1"] = GLOB.edgeinfo_full
+ GLOB.turf_edgeinfo_cache["grass1"] = GLOB.edgeinfo_full
if("grass2")
- turf_edgeinfo_cache["grass2"] = GLOB.edgeinfo_full
+ GLOB.turf_edgeinfo_cache["grass2"] = GLOB.edgeinfo_full
if("grassbeach")
- turf_edgeinfo_cache["grassbeach"] = GLOB.edgeinfo_edge
+ GLOB.turf_edgeinfo_cache["grassbeach"] = GLOB.edgeinfo_edge
if("gbcorner")
- turf_edgeinfo_cache["gbcorner"] = GLOB.edgeinfo_corner
+ GLOB.turf_edgeinfo_cache["gbcorner"] = GLOB.edgeinfo_corner
/turf/open/gm/dirt2
name = "dirt"
@@ -435,14 +435,14 @@
/turf/open/gm/dirtgrassborder/Initialize(mapload, ...)
. = ..()
- if(!locate(icon_state) in turf_edgeinfo_cache)
+ if(!locate(icon_state) in GLOB.turf_edgeinfo_cache)
switch(icon_state)
if("grassdirt_edge")
- turf_edgeinfo_cache["grassdirt_edge"] = GLOB.edgeinfo_edge
+ GLOB.turf_edgeinfo_cache["grassdirt_edge"] = GLOB.edgeinfo_edge
if("grassdirt_corner")
- turf_edgeinfo_cache["grassdirt_corner"] = GLOB.edgeinfo_corner
+ GLOB.turf_edgeinfo_cache["grassdirt_corner"] = GLOB.edgeinfo_corner
if("grassdirt_corner2")
- turf_edgeinfo_cache["grassdirt_corner2"] = GLOB.edgeinfo_corner2
+ GLOB.turf_edgeinfo_cache["grassdirt_corner2"] = GLOB.edgeinfo_corner2
/turf/open/gm/dirtgrassborder2
name = "grass"
diff --git a/code/game/turfs/snow.dm b/code/game/turfs/snow.dm
index 72b1f35d0aff..42cc9bd544c5 100644
--- a/code/game/turfs/snow.dm
+++ b/code/game/turfs/snow.dm
@@ -77,7 +77,7 @@
if(update_full)
var/turf/open/T
if(!skip_sides)
- for(var/dirn in alldirs)
+ for(var/dirn in GLOB.alldirs)
var/turf/open/snow/D = get_step(src,dirn)
if(istype(D))
//Update turfs that are near us, but only once
@@ -85,7 +85,7 @@
overlays.Cut()
- for(var/dirn in alldirs)
+ for(var/dirn in GLOB.alldirs)
T = get_step(src, dirn)
if(istype(T))
if(bleed_layer > T.bleed_layer && T.bleed_layer < 1)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 837610d5d7fe..22fe85bdde65 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -72,9 +72,8 @@
// by default, vis_contents is inherited from the turf that was here before
vis_contents.Cut()
- turfs += src
- if(is_ground_level(z))
- z1turfs += src
+ GLOB.turfs += src
+
assemble_baseturfs()
@@ -82,11 +81,11 @@
visibilityChanged()
- pass_flags = pass_flags_cache[type]
+ pass_flags = GLOB.pass_flags_cache[type]
if (isnull(pass_flags))
pass_flags = new()
initialize_pass_flags(pass_flags)
- pass_flags_cache[type] = pass_flags
+ GLOB.pass_flags_cache[type] = pass_flags
else
initialize_pass_flags()
diff --git a/code/game/turfs/walls/wall_icon.dm b/code/game/turfs/walls/wall_icon.dm
index 9e47612964c4..2b414ca46af8 100644
--- a/code/game/turfs/walls/wall_icon.dm
+++ b/code/game/turfs/walls/wall_icon.dm
@@ -86,7 +86,7 @@
break
if(success)
- if(get_dir(src, T) in cardinal)
+ if(get_dir(src, T) in GLOB.cardinals)
wall_dirs += get_dir(src, T)
for(var/neighbor in wall_dirs)
diff --git a/code/game/turfs/walls/wall_types.dm b/code/game/turfs/walls/wall_types.dm
index f976da220b29..3093f8c7771a 100644
--- a/code/game/turfs/walls/wall_types.dm
+++ b/code/game/turfs/walls/wall_types.dm
@@ -263,15 +263,15 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
tag = "LOBBYART"
/proc/force_lobby_art(art_id)
- displayed_lobby_art = art_id
+ GLOB.displayed_lobby_art = art_id
var/turf/closed/wall/indestructible/splashscreen/SS = locate("LOBBYART")
var/list/lobby_arts = CONFIG_GET(str_list/lobby_art_images)
var/list/lobby_authors = CONFIG_GET(str_list/lobby_art_authors)
- SS.icon_state = lobby_arts[displayed_lobby_art]
- SS.desc = "Artwork by [lobby_authors[displayed_lobby_art]]"
+ SS.icon_state = lobby_arts[GLOB.displayed_lobby_art]
+ SS.desc = "Artwork by [lobby_authors[GLOB.displayed_lobby_art]]"
for(var/client/C in GLOB.clients)
- if(displayed_lobby_art != -1)
- var/author = lobby_authors[displayed_lobby_art]
+ if(GLOB.displayed_lobby_art != -1)
+ var/author = lobby_authors[GLOB.displayed_lobby_art]
if(author != "Unknown")
to_chat_forced(C, SPAN_ROUNDBODY("This round's lobby art is brought to you by [author]"))
@@ -822,7 +822,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
var/datum/movable_wall_group/MWG = new()
MWG.add_structure(current)
- for(var/dir in cardinal)
+ for(var/dir in GLOB.cardinals)
connected = locate() in get_step(current, dir)
if(connected in current_walls)
if(connected.group == src)
@@ -957,7 +957,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
/obj/structure/alien/movable_wall/proc/update_connections(propagate = FALSE)
var/list/wall_dirs = list()
- for(var/dir in alldirs)
+ for(var/dir in GLOB.alldirs)
var/obj/structure/alien/movable_wall/MW = locate() in get_step(src, dir)
if(!(MW in group.walls))
continue
@@ -1011,7 +1011,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
/obj/structure/alien/movable_wall/proc/recalculate_structure()
var/list/found_structures = list()
var/current_walls = 0
- for(var/i in cardinal)
+ for(var/i in GLOB.cardinals)
var/turf/T = get_step(src, i)
var/obj/structure/alien/movable_wall/MW = locate() in T
if(!MW)
@@ -1068,7 +1068,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
return COMPONENT_TURF_ALLOW_MOVEMENT
/obj/structure/alien/movable_wall/Move(NewLoc, direct)
- if(!(direct in cardinal))
+ if(!(direct in GLOB.cardinals))
return
group.try_move_in_direction(direct)
@@ -1242,7 +1242,7 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
. = ..()
if(.)
var/turf/T
- for(var/i in cardinal)
+ for(var/i in GLOB.cardinals)
T = get_step(src, i)
if(!istype(T)) continue
for(var/obj/structure/mineral_door/resin/R in T)
diff --git a/code/game/turfs/walls/walls.dm b/code/game/turfs/walls/walls.dm
index 2387a2086192..437f203c5fbb 100644
--- a/code/game/turfs/walls/walls.dm
+++ b/code/game/turfs/walls/walls.dm
@@ -73,7 +73,7 @@
. = ..()
if(.) //successful turf change
var/turf/T
- for(var/i in cardinal)
+ for(var/i in GLOB.cardinals)
T = get_step(src, i)
//nearby glowshrooms updated
diff --git a/code/game/verbs/discord.dm b/code/game/verbs/discord.dm
index 210038084caa..2446c89aafe5 100644
--- a/code/game/verbs/discord.dm
+++ b/code/game/verbs/discord.dm
@@ -29,7 +29,7 @@
var/datum/entity/discord_identifier/new_identifier = DB_ENTITY(/datum/entity/discord_identifier)
var/not_unique = TRUE
- var/long_list = operation_postfixes + operation_prefixes + operation_titles
+ var/long_list = GLOB.operation_postfixes + GLOB.operation_prefixes + GLOB.operation_titles
var/token
while(not_unique)
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index 3c964cf4011b..2fe22ef3d4da 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -15,10 +15,10 @@
return
if(!admin_holder || !(admin_holder.rights & R_MOD))
- if(!ooc_allowed) //Send to LOOC instead
+ if(!GLOB.ooc_allowed) //Send to LOOC instead
looc(msg)
return
- if(!dooc_allowed && (mob.stat == DEAD || isobserver(mob)))
+ if(!GLOB.dooc_allowed && (mob.stat == DEAD || isobserver(mob)))
to_chat(usr, SPAN_DANGER("OOC for dead mobs has been turned off."))
return
if(prefs.muted & MUTE_OOC)
@@ -108,10 +108,10 @@
return
if(!admin_holder || !(admin_holder.rights & R_MOD))
- if(!looc_allowed)
+ if(!GLOB.looc_allowed)
to_chat(src, SPAN_DANGER("LOOC is globally muted"))
return
- if(!dlooc_allowed && (mob.stat != CONSCIOUS || isobserver(mob)))
+ if(!GLOB.dlooc_allowed && (mob.stat != CONSCIOUS || isobserver(mob)))
to_chat(usr, SPAN_DANGER("Sorry, you cannot utilize LOOC while dead or incapacitated."))
return
if(prefs.muted & MUTE_OOC)
@@ -150,7 +150,7 @@
if(C.prefs.toggles_chat & CHAT_LOOC)
to_chat(C, "LOOC:[display_name]:[msg]")
- if(mob.looc_overhead || ooc_allowed)
+ if(mob.looc_overhead || GLOB.ooc_allowed)
var/transmit_language = isxeno(mob) ? LANGUAGE_XENOMORPH : LANGUAGE_ENGLISH
mob.langchat_speech(msg, heard, GLOB.all_languages[transmit_language], "#ff47d7")
diff --git a/code/game/verbs/records.dm b/code/game/verbs/records.dm
index 18ed35ee6321..db420a45bc76 100644
--- a/code/game/verbs/records.dm
+++ b/code/game/verbs/records.dm
@@ -84,7 +84,7 @@
var/list/options = list()
if(CLIENT_IS_STAFF(src))
- options = note_categories.Copy()
+ options = GLOB.note_categories.Copy()
if(admin_holder.rights & R_PERMISSIONS)
MA = TRUE
else if(!isCouncil(src))
@@ -97,13 +97,13 @@
return
target = ckey(target)
- if(RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_COMMANDER_COUNCIL)
+ if(GLOB.RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_COMMANDER_COUNCIL)
options |= "Commanding Officer"
edit_C = TRUE
- if(RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_SYNTHETIC_COUNCIL)
+ if(GLOB.RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_SYNTHETIC_COUNCIL)
options |= "Synthetic"
edit_S = TRUE
- if(RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_YAUTJA_COUNCIL)
+ if(GLOB.RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_YAUTJA_COUNCIL)
options |= "Yautja"
edit_Y = TRUE
@@ -116,17 +116,17 @@
if("Merit")
show_other_record(NOTE_MERIT, choice, target, TRUE)
if("Commanding Officer")
- if(MA || (RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_COMMANDER_LEADER))
+ if(MA || (GLOB.RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_COMMANDER_LEADER))
show_other_record(NOTE_COMMANDER, choice, target, TRUE, TRUE)
else
show_other_record(NOTE_COMMANDER, choice, target, edit_C)
if("Synthetic")
- if(MA || (RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_SYNTHETIC_LEADER))
+ if(MA || (GLOB.RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_SYNTHETIC_LEADER))
show_other_record(NOTE_SYNTHETIC, choice, target, TRUE, TRUE)
else
show_other_record(NOTE_SYNTHETIC, choice, target, edit_S)
if("Yautja")
- if(MA || (RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_YAUTJA_LEADER))
+ if(MA || (GLOB.RoleAuthority.roles_whitelist[src.ckey] & WHITELIST_YAUTJA_LEADER))
show_other_record(NOTE_YAUTJA, choice, target, TRUE, TRUE)
else
show_other_record(NOTE_YAUTJA, choice, target, edit_Y)
diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm
index 8a249d297cbe..45590c3fa006 100644
--- a/code/game/verbs/who.dm
+++ b/code/game/verbs/who.dm
@@ -83,7 +83,7 @@
counted_humanoids["Infected humans"]++
if(C.mob.faction == FACTION_MARINE)
counted_humanoids[FACTION_MARINE]++
- if(C.mob.job in (ROLES_MARINES))
+ if(C.mob.job in (GLOB.ROLES_MARINES))
counted_humanoids["USCM Marines"]++
else
counted_humanoids[C.mob.faction]++
@@ -160,7 +160,7 @@
if(CONFIG_GET(flag/show_manager))
LAZYSET(mappings, "Management", R_PERMISSIONS)
if(CONFIG_GET(flag/show_devs))
- LAZYSET(mappings, "Maintainers", R_PROFILER)
+ LAZYSET(mappings, "Maintainers", R_PROFILER)
LAZYSET(mappings, "Admins", R_ADMIN)
if(CONFIG_GET(flag/show_mods))
LAZYSET(mappings, "Moderators", R_MOD)
diff --git a/code/game/world.dm b/code/game/world.dm
index f5388ed6fd52..d8156547ef76 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -1,10 +1,8 @@
-var/world_view_size = 7
-var/lobby_view_size = 16
+GLOBAL_VAR_INIT(world_view_size, 7)
+GLOBAL_VAR_INIT(lobby_view_size, 16)
-var/internal_tick_usage = 0
-
-var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
+GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt"))
/world
mob = /mob/new_player
turf = /turf/open/space/basic
@@ -18,7 +16,6 @@ var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
if (debug_server)
LIBCALL(debug_server, "auxtools_init")()
enable_debugging()
- internal_tick_usage = 0.2 * world.tick_lag
hub_password = "kMZy3U5jJHSiBQjr"
#ifdef BYOND_TRACY
@@ -49,8 +46,6 @@ var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
LoadBans()
load_motd()
load_tm_message()
- load_mode()
- loadShuttleInfoDatums()
populate_gear_list()
initialize_global_regex()
@@ -67,8 +62,8 @@ var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
// Only do offline sleeping when the server isn't running unit tests or hosting a local dev test
sleep_offline = (!running_tests && !testing_locally)
- if(!RoleAuthority)
- RoleAuthority = new /datum/authority/branch/role()
+ if(!GLOB.RoleAuthority)
+ GLOB.RoleAuthority = new /datum/authority/branch/role()
to_world(SPAN_DANGER("\b Job setup complete"))
initiate_minimap_icons()
@@ -99,7 +94,7 @@ var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
// If the server's configured for local testing, get everything set up ASAP.
// Shamelessly stolen from the test manager's host_tests() proc
if(testing_locally)
- master_mode = "Extended"
+ GLOB.master_mode = "Extended"
// Wait for the game ticker to initialize
while(!SSticker.initialized)
@@ -109,9 +104,6 @@ var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
SSticker.request_start()
return
-var/world_topic_spam_protect_ip = "0.0.0.0"
-var/world_topic_spam_protect_time = world.timeofday
-
/proc/start_logging()
GLOB.round_id = SSentity_manager.round.id
@@ -256,8 +248,8 @@ var/world_topic_spam_protect_time = world.timeofday
/world/proc/send_tgs_restart()
if(CONFIG_GET(string/new_round_alert_channel) && CONFIG_GET(string/new_round_alert_role_id))
- if(round_statistics)
- send2chat("[round_statistics.round_name][GLOB.round_id ? " (Round [GLOB.round_id])" : ""] completed!", CONFIG_GET(string/new_round_alert_channel))
+ if(GLOB.round_statistics)
+ send2chat("[GLOB.round_statistics.round_name][GLOB.round_id ? " (Round [GLOB.round_id])" : ""] completed!", CONFIG_GET(string/new_round_alert_channel))
if(SSmapping.next_map_configs)
var/datum/map_config/next_map = SSmapping.next_map_configs[GROUND_MAP]
if(next_map)
@@ -267,32 +259,20 @@ var/world_topic_spam_protect_time = world.timeofday
return
/world/proc/send_reboot_sound()
- var/reboot_sound = SAFEPICK(reboot_sfx)
+ var/reboot_sound = SAFEPICK(GLOB.reboot_sfx)
if(reboot_sound)
var/sound/reboot_sound_ref = sound(reboot_sound)
for(var/client/client as anything in GLOB.clients)
if(client?.prefs.toggles_sound & SOUND_REBOOT)
SEND_SOUND(client, reboot_sound_ref)
-/world/proc/load_mode()
- var/list/Lines = file2list("data/mode.txt")
- if(Lines.len)
- if(Lines[1])
- master_mode = Lines[1]
- log_misc("Saved mode is '[master_mode]'")
-
-/world/proc/save_mode(the_mode)
- var/F = file("data/mode.txt")
- fdel(F)
- F << the_mode
-
/world/proc/load_motd()
- join_motd = file2text("config/motd.txt")
+ GLOB.join_motd = file2text("config/motd.txt")
/world/proc/load_tm_message()
var/datum/getrev/revdata = GLOB.revdata
if(revdata.testmerge.len)
- current_tms = revdata.GetTestMergeInfo()
+ GLOB.current_tms = revdata.GetTestMergeInfo()
/world/proc/update_status()
//Note: Hub content is limited to 254 characters, including limited HTML/CSS.
@@ -310,32 +290,10 @@ var/world_topic_spam_protect_time = world.timeofday
world.status = s
-#define FAILED_DB_CONNECTION_CUTOFF 1
-var/failed_db_connections = 0
-var/failed_old_db_connections = 0
-
-// /hook/startup/proc/connectDB()
-// if(!setup_database_connection())
-// world.log << "Your server failed to establish a connection with the feedback database."
-// else
-// world.log << "Feedback database connection established."
-// return 1
-
-var/datum/BSQL_Connection/connection
-/proc/setup_database_connection()
-
- if(failed_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
- return 0
-
-
- return .
-
/proc/set_global_view(view_size)
- world_view_size = view_size
+ GLOB.world_view_size = view_size
for(var/client/c in GLOB.clients)
- c.view = world_view_size
-
-#undef FAILED_DB_CONNECTION_CUTOFF
+ c.view = GLOB.world_view_size
/proc/give_image_to_client(obj/O, icon_text)
var/image/I = image(null, O)
diff --git a/code/global.dm b/code/global.dm
index e329cbdd00d5..6847fbd2b7fe 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -38,135 +38,3 @@
#define AHOLD_IS_ADMIN(ahold) (ahold && (ahold.rights & R_ADMIN))
//items that ask to be called every cycle
-
-//////////////
-var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
- "big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \
- "table","td","th","tr")
-
-///////////////
-
-var/command_name = "Central Command"
-var/station_name = "[MAIN_SHIP_NAME]"
-var/game_version = "Colonial Marines"
-var/game_year = 2182
-
-var/going = 1
-var/master_mode = "Distress Signal"
-
-/// If this is anything but "secret", the secret rotation will forceably choose this mode.
-var/secret_force_mode = "secret"
-
-var/host = null
-var/ooc_allowed = 1
-var/looc_allowed = 1
-var/dsay_allowed = 1
-var/dooc_allowed = 1
-var/dlooc_allowed = 0
-var/abandon_allowed = 1
-var/enter_allowed = 1
-var/shuttle_frozen = 0
-var/shuttle_left = 0
-var/midi_playing = 0
-var/heard_midi = 0
-var/total_silenced = 0
-
-var/list/admin_log = list()
-var/list/asset_log = list()
-
-var/CELLRATE = 0.006 // multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
- //It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
-var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
-
-var/VehicleElevatorConsole
-var/VehicleGearConsole
-
-//Spawnpoints.
-var/list/fallen_list = list()
-/// This is for dogtags placed on crosses- they will show up at the end-round memorial.
-var/list/fallen_list_cross = list()
-var/list/cardinal = list(NORTH, SOUTH, EAST, WEST)
-var/list/diagonals = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
-var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
-var/list/reverse_dir = list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63)
-
-var/list/combatlog = list()
-var/list/IClog = list()
-var/list/OOClog = list()
-var/list/adminlog = list()
-
-var/Debug = 0 // global debug switch
-
-var/datum/moduletypes/mods = new()
-
-var/join_motd = null
-var/current_tms
-
-// nanomanager, the manager for Nano UIs
-var/datum/nanomanager/nanomanager = new()
-
-var/list/BorgWireColorToFlag = RandomBorgWires()
-var/list/BorgIndexToFlag
-var/list/BorgIndexToWireColor
-var/list/BorgWireColorToIndex
-var/list/AAlarmWireColorToFlag = RandomAAlarmWires()
-var/list/AAlarmIndexToFlag
-var/list/AAlarmIndexToWireColor
-var/list/AAlarmWireColorToIndex
-
-//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
-#define MAX_MESSAGE_LEN 1024
-#define MAX_EMOTE_LEN 256
-#define MAX_PAPER_MESSAGE_LEN 3072
-#define MAX_BOOK_MESSAGE_LEN 9216
-#define MAX_NAME_LEN 26
-
-/// 3 minutes in the station.
-#define shuttle_time_in_station 3 MINUTES
-/// 10 minutes to arrive.
-#define shuttle_time_to_arrive 10 MINUTES
-
- // MySQL configuration
-
-var/sqladdress = "localhost"
-var/sqlport = "3306"
-var/sqldb = "cmdb"
-var/sqllogin = "root"
-var/sqlpass = ""
-
-
- // For FTP requests. (i.e. downloading runtime logs.)
- // However it'd be ok to use for accessing attack logs and such too, which are even laggier.
-var/fileaccess_timer = 0
-
-// Reference list for disposal sort junctions. Filled up by sorting junction's New()
-/var/list/tagger_locations = list()
-
-//added for Xenoarchaeology, might be useful for other stuff
-var/list/alphabet_uppercase = list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
-var/list/alphabet_lowercase = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
-
-var/list/greek_letters = list("Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omnicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega")
-var/list/nato_phonetic_alphabet = list("Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliett", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-Ray", "Yankee", "Zulu")
-
-//Used for autocall procs on ERT
-var/distress_cancel = 0
-var/destroy_cancel = 0
-
-// Which lobby art is on display
-// This is updated by the lobby art turf when it initializes
-var/displayed_lobby_art = -1
-
-// Last global ID that was assigned to a mob (for round recording purposes)
-var/last_mob_gid = 0
-
-// be careful messing with this. the section names are hardcoded here, while defines are used everywhere else
-// see the big commented block for an explanation
-var/list/almayer_ship_sections = list(
- "Upper deck Foreship",
- "Upper deck Midship",
- "Upper deck Aftship",
- "Lower deck Foreship",
- "Lower deck Midship",
- "Lower deck Aftship"
-)
diff --git a/code/js/byjax.dm b/code/js/byjax.dm
deleted file mode 100644
index 8e196ef013f4..000000000000
--- a/code/js/byjax.dm
+++ /dev/null
@@ -1,50 +0,0 @@
-//this function places received data into element with specified id.
-var/const/js_byjax = {"
-
-function replaceContent() {
- var args = Array.prototype.slice.call(arguments);
- var id = args\[0\];
- var content = args\[1\];
- var callback = null;
- if(args\[2\]){
- callback = args\[2\];
- if(args\[3\]){
- args = args.slice(3);
- }
- }
- var parent = document.getElementById(id);
- if(typeof(parent)!=='undefined' && parent!=null){
- parent.innerHTML = content?content:'';
- }
- if(callback && window\[callback\]){
- window\[callback\].apply(null,args);
- }
-}
-"}
-
-/*
-sends data to control_id:replaceContent
-
-receiver - mob
-control_id - window id (for windows opened with browse(), it'll be "windowname.browser")
-target_element - HTML element id
-new_content - HTML content
-callback - js function that will be called after the data is sent
-callback_args - arguments for callback function
-
-Be sure to include required js functions in your page, or it'll raise an exception.
-*/
-/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
- if(receiver && target_element && control_id) // && winexists(receiver, control_id))
- var/list/argums = list(target_element, new_content)
- if(callback)
- argums += callback
- if(callback_args)
- argums += callback_args
- argums = list2params(argums)
-/* if(callback_args)
- argums += "&[list2params(callback_args)]"
-*/
- receiver << output(argums,"[control_id]:replaceContent")
- return
-
diff --git a/code/js/menus.dm b/code/js/menus.dm
deleted file mode 100644
index 0064522c2f81..000000000000
--- a/code/js/menus.dm
+++ /dev/null
@@ -1,37 +0,0 @@
-var/const/js_dropdowns = {"
-function dropdowns() {
- var divs = document.getElementsByTagName('div');
- var headers = new Array();
- var links = new Array();
- for(var i=0;i=0) {
- elem.className = elem.className.replace('visible','hidden');
- this.className = this.className.replace('open','closed');
- this.innerHTML = this.innerHTML.replace('-','+');
- }
- else {
- elem.className = elem.className.replace('hidden','visible');
- this.className = this.className.replace('closed','open');
- this.innerHTML = this.innerHTML.replace('+','-');
- }
- return false;
- }
- })(links\[i\]);
- }
- }
-}
-"}
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index bf6d8e261ab3..94f40629fc6a 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -18,7 +18,7 @@
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
WAIT_DB_READY
- if(admin_datums[ckey] && (admin_datums[ckey].rights & R_MOD))
+ if(GLOB.admin_datums[ckey] && (GLOB.admin_datums[ckey].rights & R_MOD))
return ..()
if(CONFIG_GET(number/limit_players) && CONFIG_GET(number/limit_players) < GLOB.clients.len)
diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm
index b64b1e4682fd..7dca354129ff 100644
--- a/code/modules/admin/NewBan.dm
+++ b/code/modules/admin/NewBan.dm
@@ -1,75 +1,75 @@
-var/CMinutes = null
-var/savefile/Banlist
+GLOBAL_VAR(CMinutes)
+GLOBAL_DATUM(Banlist, /savefile)
/proc/CheckBan(ckey, id, address)
- if(!Banlist) // if Banlist cannot be located for some reason
+ if(!GLOB.Banlist) // if GLOB.Banlist cannot be located for some reason
LoadBans() // try to load the bans
- if(!Banlist) // uh oh, can't find bans!
+ if(!GLOB.Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT
. = list()
var/appeal
if(CONFIG_GET(string/banappeals))
appeal = "\nFor more information on your ban, or to appeal, head to [CONFIG_GET(string/banappeals)]"
- Banlist.cd = "/base"
- if( "[ckey][id]" in Banlist.dir )
- Banlist.cd = "[ckey][id]"
- if (Banlist["temp"])
- if (!GetExp(Banlist["minutes"]))
+ GLOB.Banlist.cd = "/base"
+ if( "[ckey][id]" in GLOB.Banlist.dir )
+ GLOB.Banlist.cd = "[ckey][id]"
+ if (GLOB.Banlist["temp"])
+ if (!GetExp(GLOB.Banlist["minutes"]))
ClearTempbans()
return 0
else
- .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
+ .["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
else
- Banlist.cd = "/base/[ckey][id]"
- .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: PERMENANT\nBy: [Banlist["bannedby"]][appeal]"
+ GLOB.Banlist.cd = "/base/[ckey][id]"
+ .["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: PERMENANT\nBy: [GLOB.Banlist["bannedby"]][appeal]"
.["reason"] = "ckey/id"
return .
else
- for (var/A in Banlist.dir)
- Banlist.cd = "/base/[A]"
+ for (var/A in GLOB.Banlist.dir)
+ GLOB.Banlist.cd = "/base/[A]"
var/matches
- if( ckey == Banlist["key"] )
+ if( ckey == GLOB.Banlist["key"] )
matches += "ckey"
- if( id == Banlist["id"] )
+ if( id == GLOB.Banlist["id"] )
if(matches)
matches += "/"
matches += "id"
- if( address == Banlist["ip"] )
+ if( address == GLOB.Banlist["ip"] )
if(matches)
matches += "/"
matches += "ip"
if(matches)
- if(Banlist["temp"])
- if (!GetExp(Banlist["minutes"]))
+ if(GLOB.Banlist["temp"])
+ if (!GetExp(GLOB.Banlist["minutes"]))
ClearTempbans()
return 0
else
- .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
+ .["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
else
- .["desc"] = "\nReason: [Banlist["reason"]]\nExpires: PERMENANT\nBy: [Banlist["bannedby"]][appeal]"
+ .["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: PERMENANT\nBy: [GLOB.Banlist["bannedby"]][appeal]"
.["reason"] = matches
return .
return 0
/proc/UpdateTime() //No idea why i made this a proc.
- CMinutes = (world.realtime / 10) / 60
+ GLOB.CMinutes = (world.realtime / 10) / 60
return 1
/proc/LoadBans()
- Banlist = new("data/banlist.bdb")
- log_admin("Loading Banlist")
+ GLOB.Banlist = new("data/banlist.bdb")
+ log_admin("Loading GLOB.Banlist")
- if (!length(Banlist.dir)) log_admin("Banlist is empty.")
+ if (!length(GLOB.Banlist.dir)) log_admin("GLOB.Banlist is empty.")
- if (!Banlist.dir.Find("base"))
- log_admin("Banlist missing base dir.")
- Banlist.dir.Add("base")
- Banlist.cd = "/base"
- else if (Banlist.dir.Find("base"))
- Banlist.cd = "/base"
+ if (!GLOB.Banlist.dir.Find("base"))
+ log_admin("GLOB.Banlist missing base dir.")
+ GLOB.Banlist.dir.Add("base")
+ GLOB.Banlist.cd = "/base"
+ else if (GLOB.Banlist.dir.Find("base"))
+ GLOB.Banlist.cd = "/base"
ClearTempbans()
return 1
@@ -77,64 +77,64 @@ var/savefile/Banlist
/proc/ClearTempbans()
UpdateTime()
- Banlist.cd = "/base"
- for (var/A in Banlist.dir)
- Banlist.cd = "/base/[A]"
- if (!Banlist["key"] || !Banlist["id"])
+ GLOB.Banlist.cd = "/base"
+ for (var/A in GLOB.Banlist.dir)
+ GLOB.Banlist.cd = "/base/[A]"
+ if (!GLOB.Banlist["key"] || !GLOB.Banlist["id"])
RemoveBan(A)
log_admin("Invalid Ban.")
message_admins("Invalid Ban.")
continue
- if (!Banlist["temp"]) continue
- if (CMinutes >= Banlist["minutes"]) RemoveBan(A)
+ if (!GLOB.Banlist["temp"]) continue
+ if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
return 1
/proc/AddBan(ckey, computerid, reason, bannedby, temp, minutes, address)
- if(!Banlist) // if Banlist cannot be located for some reason
+ if(!GLOB.Banlist) // if GLOB.Banlist cannot be located for some reason
LoadBans() // try to load the bans
- if(!Banlist) // uh oh, can't find bans!
+ if(!GLOB.Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT
var/bantimestamp
if (temp)
UpdateTime()
- bantimestamp = CMinutes + minutes
+ bantimestamp = GLOB.CMinutes + minutes
- Banlist.cd = "/base"
- if ( Banlist.dir.Find("[ckey][computerid]"))
+ GLOB.Banlist.cd = "/base"
+ if ( GLOB.Banlist.dir.Find("[ckey][computerid]"))
RemoveBan("[ckey][computerid]") //have to remove dirs before processing
- Banlist.dir.Add("[ckey][computerid]")
- Banlist.cd = "/base/[ckey][computerid]"
- Banlist["key"] << ckey
- Banlist["id"] << computerid
- Banlist["ip"] << address
- Banlist["reason"] << reason
- Banlist["bannedby"] << bannedby
- Banlist["temp"] << temp
+ GLOB.Banlist.dir.Add("[ckey][computerid]")
+ GLOB.Banlist.cd = "/base/[ckey][computerid]"
+ GLOB.Banlist["key"] << ckey
+ GLOB.Banlist["id"] << computerid
+ GLOB.Banlist["ip"] << address
+ GLOB.Banlist["reason"] << reason
+ GLOB.Banlist["bannedby"] << bannedby
+ GLOB.Banlist["temp"] << temp
if (temp)
- Banlist["minutes"] << bantimestamp
+ GLOB.Banlist["minutes"] << bantimestamp
return 1
/proc/RemoveBan(foldername)
- if(!Banlist) // if Banlist cannot be located for some reason
+ if(!GLOB.Banlist) // if GLOB.Banlist cannot be located for some reason
LoadBans() // try to load the bans
- if(!Banlist) // uh oh, can't find bans!
+ if(!GLOB.Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT
var/key
var/id
- Banlist.cd = "/base/[foldername]"
- Banlist["key"] >> key
- Banlist["id"] >> id
- Banlist.cd = "/base"
+ GLOB.Banlist.cd = "/base/[foldername]"
+ GLOB.Banlist["key"] >> key
+ GLOB.Banlist["id"] >> id
+ GLOB.Banlist.cd = "/base"
- if (!Banlist.dir.Remove(foldername)) return 0
+ if (!GLOB.Banlist.dir.Remove(foldername)) return 0
if(!usr)
log_admin("Ban Expired: [key]")
@@ -143,18 +143,18 @@ var/savefile/Banlist
ban_unban_log_save("[key_name_admin(usr)] unbanned [key]")
log_admin("[key_name_admin(usr)] unbanned [key]")
message_admins("[key_name_admin(usr)] unbanned: [key]")
- for (var/A in Banlist.dir)
- Banlist.cd = "/base/[A]"
- if (key == Banlist["key"] /*|| id == Banlist["id"]*/)
- Banlist.cd = "/base"
- Banlist.dir.Remove(A)
+ for (var/A in GLOB.Banlist.dir)
+ GLOB.Banlist.cd = "/base/[A]"
+ if (key == GLOB.Banlist["key"] /*|| id == GLOB.Banlist["id"]*/)
+ GLOB.Banlist.cd = "/base"
+ GLOB.Banlist.dir.Remove(A)
continue
return 1
/proc/GetExp(minutes as num)
UpdateTime()
- var/exp = minutes - CMinutes
+ var/exp = minutes - GLOB.CMinutes
if (exp <= 0)
return 0
else
@@ -202,27 +202,27 @@ var/savefile/Banlist
var/a = pick(1,0)
var/b = pick(1,0)
if(b)
- Banlist.cd = "/base"
- Banlist.dir.Add("trash[i]trashid[i]")
- Banlist.cd = "/base/trash[i]trashid[i]"
- Banlist["key"] << "trash[i]"
+ GLOB.Banlist.cd = "/base"
+ GLOB.Banlist.dir.Add("trash[i]trashid[i]")
+ GLOB.Banlist.cd = "/base/trash[i]trashid[i]"
+ GLOB.Banlist["key"] << "trash[i]"
else
- Banlist.cd = "/base"
- Banlist.dir.Add("[last]trashid[i]")
- Banlist.cd = "/base/[last]trashid[i]"
- Banlist["key"] << last
- Banlist["id"] << "trashid[i]"
- Banlist["reason"] << "Trashban[i]."
- Banlist["temp"] << a
- Banlist["minutes"] << CMinutes + rand(1,2000)
- Banlist["bannedby"] << "trashmin"
+ GLOB.Banlist.cd = "/base"
+ GLOB.Banlist.dir.Add("[last]trashid[i]")
+ GLOB.Banlist.cd = "/base/[last]trashid[i]"
+ GLOB.Banlist["key"] << last
+ GLOB.Banlist["id"] << "trashid[i]"
+ GLOB.Banlist["reason"] << "Trashban[i]."
+ GLOB.Banlist["temp"] << a
+ GLOB.Banlist["minutes"] << GLOB.CMinutes + rand(1,2000)
+ GLOB.Banlist["bannedby"] << "trashmin"
last = "trash[i]"
- Banlist.cd = "/base"
+ GLOB.Banlist.cd = "/base"
/proc/ClearAllBans()
- Banlist.cd = "/base"
- for (var/A in Banlist.dir)
+ GLOB.Banlist.cd = "/base"
+ for (var/A in GLOB.Banlist.dir)
RemoveBan(A)
/client/proc/cmd_admin_do_ban(mob/M)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 38b63b94570c..fe95affaffd2 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -121,10 +121,10 @@
var/t //text to show in the window
var/u //unban button href arg
var/dat = "
"
- for(r in jobban_keylist)
- L = jobban_keylist[r]
+ for(r in GLOB.jobban_keylist)
+ L = GLOB.jobban_keylist[r]
for(c in L)
- i = jobban_keylist[r][c] //These are already strings, as you're iterating through them. Anyway, establish jobban.
+ i = GLOB.jobban_keylist[r][c] //These are already strings, as you're iterating through them. Anyway, establish jobban.
t = "[c] - [r] ## [i]"
u = "[c] - [r]"
dat += "
"
if(check_rights(R_MOD, 0))
dat += "Evacuation Goals: "
diff --git a/code/modules/admin/tabs/admin_tab.dm b/code/modules/admin/tabs/admin_tab.dm
index e0a8c540ea85..cc927a62d3b0 100644
--- a/code/modules/admin/tabs/admin_tab.dm
+++ b/code/modules/admin/tabs/admin_tab.dm
@@ -97,7 +97,7 @@
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
if(body.client)
- body.client.change_view(world_view_size) //reset view range to default.
+ body.client.change_view(GLOB.world_view_size) //reset view range to default.
//re-open STUI
if(new_STUI)
@@ -383,7 +383,7 @@
set name = "Admin Verbs - Show"
set category = "Admin"
- add_verb(src, admin_verbs_hideable)
+ add_verb(src, GLOB.admin_verbs_hideable)
remove_verb(src, /client/proc/enable_admin_verbs)
if(!(admin_holder.rights & R_DEBUG))
@@ -396,7 +396,7 @@
set name = "Admin Verbs - Hide"
set category = "Admin"
- remove_verb(src, admin_verbs_hideable)
+ remove_verb(src, GLOB.admin_verbs_hideable)
add_verb(src, /client/proc/enable_admin_verbs)
/client/proc/strip_all_in_view()
@@ -657,13 +657,13 @@
/proc/set_lz_resin_allowed(allowed = TRUE)
if(allowed)
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.flags_area & AREA_UNWEEDABLE)
continue
A.is_resin_allowed = TRUE
msg_admin_niche("Areas close to landing zones are now weedable.")
else
- for(var/area/A in all_areas)
+ for(var/area/A in GLOB.all_areas)
if(A.flags_area & AREA_UNWEEDABLE)
continue
A.is_resin_allowed = initial(A.is_resin_allowed)
diff --git a/code/modules/admin/tabs/debug_tab.dm b/code/modules/admin/tabs/debug_tab.dm
index d8187abe3714..df11917f087a 100644
--- a/code/modules/admin/tabs/debug_tab.dm
+++ b/code/modules/admin/tabs/debug_tab.dm
@@ -5,7 +5,7 @@
if(!check_rights(R_DEBUG))
return
- add_verb(src, debug_verbs)
+ add_verb(src, GLOB.debug_verbs)
remove_verb(src, /client/proc/enable_debug_verbs)
/client/proc/hide_debug_verbs()
@@ -15,7 +15,7 @@
if(!check_rights(R_DEBUG))
return
- remove_verb(src, debug_verbs)
+ remove_verb(src, GLOB.debug_verbs)
add_verb(src, /client/proc/enable_debug_verbs)
/client/proc/enter_tree()
@@ -81,8 +81,8 @@
set name = "Reset Intel Data Tab"
if(tgui_alert(src, "Clear the data tab?", "Confirm", list("Yes", "No"), 10 SECONDS) == "Yes")
- for(var/datum/cm_objective/Objective in intel_system.oms.disks)
- intel_system.oms.disks -= Objective
+ for(var/datum/cm_objective/Objective in GLOB.intel_system.oms.disks)
+ GLOB.intel_system.oms.disks -= Objective
/client/proc/check_round_statistics()
set category = "Debug"
@@ -90,7 +90,7 @@
if(!check_rights(R_ADMIN|R_DEBUG))
return
- debug_variables(round_statistics)
+ debug_variables(GLOB.round_statistics)
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in world)
set category = "Debug"
@@ -165,10 +165,10 @@
set name = "Reload Whitelist"
set category = "Debug"
if(alert("Are you sure you want to do this?",, "Yes", "No") != "Yes") return
- if(!check_rights(R_SERVER) || !RoleAuthority) return
+ if(!check_rights(R_SERVER) || !GLOB.RoleAuthority) return
message_admins("[usr.ckey] manually reloaded the role whitelist.")
- RoleAuthority.load_whitelist()
+ GLOB.RoleAuthority.load_whitelist()
/client/proc/bulk_fetcher()
set name = "Bulk Fetch Items"
diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm
index fcc604c9cfa8..7a6359ccf090 100644
--- a/code/modules/admin/tabs/event_tab.dm
+++ b/code/modules/admin/tabs/event_tab.dm
@@ -275,12 +275,12 @@
var/points_to_add = tgui_input_real_number(usr, "Enter the amount of points to give, or a negative number to subtract. 1 point = $100.", "Points", 0)
if(!points_to_add)
return
- else if((supply_controller.points + points_to_add) < 0)
- supply_controller.points = 0
- else if((supply_controller.points + points_to_add) > 99999)
- supply_controller.points = 99999
+ else if((GLOB.supply_controller.points + points_to_add) < 0)
+ GLOB.supply_controller.points = 0
+ else if((GLOB.supply_controller.points + points_to_add) > 99999)
+ GLOB.supply_controller.points = 99999
else
- supply_controller.points += points_to_add
+ GLOB.supply_controller.points += points_to_add
message_admins("[key_name_admin(usr)] granted requisitions [points_to_add] points.")
@@ -294,11 +294,11 @@
if(!SSticker.mode || !check_rights(R_ADMIN))
return
- var/req_heat_change = tgui_input_real_number(usr, "Set the new requisitions black market heat. ERT is called at 100, disabled at -1. Current Heat: [supply_controller.black_market_heat]", "Modify Req Heat", 0, 100, -1)
+ var/req_heat_change = tgui_input_real_number(usr, "Set the new requisitions black market heat. ERT is called at 100, disabled at -1. Current Heat: [GLOB.supply_controller.black_market_heat]", "Modify Req Heat", 0, 100, -1)
if(!req_heat_change)
return
- supply_controller.black_market_heat = req_heat_change
+ GLOB.supply_controller.black_market_heat = req_heat_change
message_admins("[key_name_admin(usr)] set requisitions heat to [req_heat_change].")
@@ -433,12 +433,12 @@
return
var/datum/supply_order/new_order = new()
- new_order.ordernum = supply_controller.ordernum
- supply_controller.ordernum++
- new_order.object = supply_controller.supply_packs[nuketype]
+ new_order.ordernum = GLOB.supply_controller.ordernum
+ GLOB.supply_controller.ordernum++
+ new_order.object = GLOB.supply_controller.supply_packs[nuketype]
new_order.orderedby = MAIN_AI_SYSTEM
new_order.approvedby = MAIN_AI_SYSTEM
- supply_controller.shoppinglist += new_order
+ GLOB.supply_controller.shoppinglist += new_order
marine_announcement("A nuclear device has been supplied and will be delivered to requisitions via ASRS.", "NUCLEAR ARSENAL ACQUIRED", 'sound/misc/notice2.ogg')
message_admins("[key_name_admin(usr)] admin-spawned a [encrypt] nuke.")
@@ -507,7 +507,7 @@
if(!customname)
customname = "[faction] Update"
if(faction == FACTION_MARINE)
- for(var/obj/structure/machinery/computer/almayer_control/C in machines)
+ for(var/obj/structure/machinery/computer/almayer_control/C in GLOB.machines)
if(!(C.inoperable()))
var/obj/item/paper/P = new /obj/item/paper( C.loc )
P.name = "'[customname].'"
@@ -678,14 +678,14 @@
set name = "Mob Event Verbs - Show"
set category = "Admin.Events"
- add_verb(src, admin_mob_event_verbs_hideable)
+ add_verb(src, GLOB.admin_mob_event_verbs_hideable)
remove_verb(src, /client/proc/enable_event_mob_verbs)
/client/proc/hide_event_mob_verbs()
set name = "Mob Event Verbs - Hide"
set category = "Admin.Events"
- remove_verb(src, admin_mob_event_verbs_hideable)
+ remove_verb(src, GLOB.admin_mob_event_verbs_hideable)
add_verb(src, /client/proc/enable_event_mob_verbs)
// ----------------------------
diff --git a/code/modules/admin/tabs/round_tab.dm b/code/modules/admin/tabs/round_tab.dm
index 22ba96a2317a..39a9050053f1 100644
--- a/code/modules/admin/tabs/round_tab.dm
+++ b/code/modules/admin/tabs/round_tab.dm
@@ -38,9 +38,9 @@
return
if(!(predator_round.flags_round_type & MODE_PREDATOR))
- var/datum/job/PJ = RoleAuthority.roles_for_mode[JOB_PREDATOR]
+ var/datum/job/PJ = GLOB.RoleAuthority.roles_for_mode[JOB_PREDATOR]
if(istype(PJ) && !PJ.spawn_positions)
- PJ.set_spawn_positions(players_preassigned)
+ PJ.set_spawn_positions(GLOB.players_preassigned)
predator_round.flags_round_type |= MODE_PREDATOR
else
predator_round.flags_round_type &= ~MODE_PREDATOR
@@ -58,8 +58,8 @@
var/roles[] = new
var/i
var/datum/job/J
- for(i in RoleAuthority.roles_for_mode) //All the roles in the game.
- J = RoleAuthority.roles_for_mode[i]
+ for(i in GLOB.RoleAuthority.roles_for_mode) //All the roles in the game.
+ J = GLOB.RoleAuthority.roles_for_mode[i]
if(J.total_positions > 0 && J.current_positions > 0)
roles += i
@@ -67,7 +67,7 @@
var/role = input("This list contains all roles that have at least one slot taken.\nPlease select role slot to free.", "Free role slot") as null|anything in roles
if(!role)
return
- RoleAuthority.free_role_admin(RoleAuthority.roles_for_mode[role], TRUE, src)
+ GLOB.RoleAuthority.free_role_admin(GLOB.RoleAuthority.roles_for_mode[role], TRUE, src)
/client/proc/modify_slot()
set name = "Adjust Job Slots"
@@ -81,10 +81,10 @@
var/active_role_names = GLOB.gamemode_roles[GLOB.master_mode]
if(!active_role_names)
- active_role_names = ROLES_DISTRESS_SIGNAL
+ active_role_names = GLOB.ROLES_DISTRESS_SIGNAL
for(var/role_name as anything in active_role_names)
- var/datum/job/job = RoleAuthority.roles_by_name[role_name]
+ var/datum/job/job = GLOB.RoleAuthority.roles_by_name[role_name]
if(!job)
continue
roles += role_name
@@ -92,12 +92,12 @@
var/role = input("Please select role slot to modify", "Modify amount of slots") as null|anything in roles
if(!role)
return
- J = RoleAuthority.roles_by_name[role]
+ J = GLOB.RoleAuthority.roles_by_name[role]
var/tpos = J.spawn_positions
var/num = tgui_input_number(src, "How many slots role [J.title] should have?\nCurrently taken slots: [J.current_positions]\nTotal amount of slots opened this round: [J.total_positions_so_far]","Number:", tpos)
if(isnull(num))
return
- if(!RoleAuthority.modify_role(J, num))
+ if(!GLOB.RoleAuthority.modify_role(J, num))
to_chat(usr, SPAN_BOLDNOTICE("Can't set job slots to be less than amount of log-ins or you are setting amount of slots less than minimal. Free slots first."))
message_admins("[key_name(usr)] adjusted job slots of [J.title] to be [num].")
diff --git a/code/modules/admin/tabs/server_tab.dm b/code/modules/admin/tabs/server_tab.dm
index 84c9426dfa3f..382b08c182b5 100644
--- a/code/modules/admin/tabs/server_tab.dm
+++ b/code/modules/admin/tabs/server_tab.dm
@@ -21,8 +21,8 @@
set desc = "Players can still log into the server, but players won't be able to join the game as a new mob."
set category = "Server"
- enter_allowed = !enter_allowed
- if(!enter_allowed)
+ GLOB.enter_allowed = !GLOB.enter_allowed
+ if(!GLOB.enter_allowed)
to_world("New players may no longer join the game.")
else
to_world("New players may now join the game.")
@@ -34,8 +34,8 @@
set desc = "Globally Toggles Deadchat"
set category = "Server"
- dsay_allowed = !dsay_allowed
- if(dsay_allowed)
+ GLOB.dsay_allowed = !GLOB.dsay_allowed
+ if(GLOB.dsay_allowed)
to_world("Deadchat has been globally enabled!")
else
to_world("Deadchat has been globally disabled!")
@@ -46,8 +46,8 @@
set desc = "Globally Toggles OOC"
set category = "Server"
- ooc_allowed = !ooc_allowed
- if(ooc_allowed)
+ GLOB.ooc_allowed = !GLOB.ooc_allowed
+ if(GLOB.ooc_allowed)
to_world("The OOC channel has been globally enabled!")
else
to_world("The OOC channel has been globally disabled!")
@@ -58,8 +58,8 @@
set desc = "Globally Toggles LOOC"
set category = "Server"
- looc_allowed = !looc_allowed
- if(looc_allowed)
+ GLOB.looc_allowed = !GLOB.looc_allowed
+ if(GLOB.looc_allowed)
to_world("The LOOC channel has been globally enabled!")
else
to_world("The LOOC channel has been globally disabled!")
diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm
index d60377123c49..a0e9e8b787aa 100644
--- a/code/modules/admin/topic/topic.dm
+++ b/code/modules/admin/topic/topic.dm
@@ -50,7 +50,7 @@
if(task == "add")
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
if(!new_ckey) return
- if(new_ckey in admin_datums)
+ if(new_ckey in GLOB.admin_datums)
to_chat(usr, "Error: Topic 'editrights': [new_ckey] is already an admin")
return
adm_ckey = new_ckey
@@ -61,20 +61,20 @@
to_chat(usr, "Error: Topic 'editrights': No valid ckey")
return
- var/datum/admins/D = admin_datums[adm_ckey]
+ var/datum/admins/D = GLOB.admin_datums[adm_ckey]
if(task == "remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
if(!D) return
- admin_datums -= adm_ckey
+ GLOB.admin_datums -= adm_ckey
D.disassociate()
message_admins("[key_name_admin(usr)] removed [adm_ckey] from the admins list")
else if(task == "rank")
var/new_rank
- if(admin_ranks.len)
- new_rank = tgui_input_list(usr, "Please select a rank", "New rank", (admin_ranks|"*New Rank*"))
+ if(GLOB.admin_ranks.len)
+ new_rank = tgui_input_list(usr, "Please select a rank", "New rank", (GLOB.admin_ranks|"*New Rank*"))
else
new_rank = tgui_input_list(usr, "Please select a rank", "New rank", list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*"))
@@ -91,15 +91,15 @@
to_chat(usr, "Error: Topic 'editrights': Invalid rank")
return
if(CONFIG_GET(flag/admin_legacy_system))
- if(admin_ranks.len)
- if(new_rank in admin_ranks)
- rights = admin_ranks[new_rank] //we typed a rank which already exists, use its rights
+ if(GLOB.admin_ranks.len)
+ if(new_rank in GLOB.admin_ranks)
+ rights = GLOB.admin_ranks[new_rank] //we typed a rank which already exists, use its rights
else
- admin_ranks[new_rank] = 0 //add the new rank to admin_ranks
+ GLOB.admin_ranks[new_rank] = 0 //add the new rank to admin_ranks
else
if(CONFIG_GET(flag/admin_legacy_system))
new_rank = ckeyEx(new_rank)
- rights = admin_ranks[new_rank] //we input an existing rank, use its rights
+ rights = GLOB.admin_ranks[new_rank] //we input an existing rank, use its rights
if(D)
D.disassociate() //remove adminverbs and unlink from client
@@ -238,31 +238,31 @@
var/reason
var/banfolder = href_list["unbanupgradeperma"]
- Banlist.cd = "/base/[banfolder]"
- var/reason2 = Banlist["reason"]
+ GLOB.Banlist.cd = "/base/[banfolder]"
+ var/reason2 = GLOB.Banlist["reason"]
- var/minutes = Banlist["minutes"]
+ var/minutes = GLOB.Banlist["minutes"]
- var/banned_key = Banlist["key"]
- Banlist.cd = "/base"
+ var/banned_key = GLOB.Banlist["key"]
+ GLOB.Banlist.cd = "/base"
var/mins = 0
- if(minutes > CMinutes)
- mins = minutes - CMinutes
+ if(minutes > GLOB.CMinutes)
+ mins = minutes - GLOB.CMinutes
if(!mins) return
mins = max(5255990,mins) // 10 years
- minutes = CMinutes + mins
+ minutes = GLOB.CMinutes + mins
reason = input(usr,"Reason?","reason",reason2) as message|null
if(!reason) return
ban_unban_log_save("[key_name(usr)] upgraded [banned_key]'s ban to a permaban. Reason: [sanitize(reason)]")
message_admins("[key_name_admin(usr)] upgraded [banned_key]'s ban to a permaban. Reason: [sanitize(reason)]")
- Banlist.cd = "/base/[banfolder]"
- Banlist["reason"] << sanitize(reason)
- Banlist["temp"] << 0
- Banlist["minutes"] << minutes
- Banlist["bannedby"] << usr.ckey
- Banlist.cd = "/base"
+ GLOB.Banlist.cd = "/base/[banfolder]"
+ GLOB.Banlist["reason"] << sanitize(reason)
+ GLOB.Banlist["temp"] << 0
+ GLOB.Banlist["minutes"] << minutes
+ GLOB.Banlist["bannedby"] << usr.ckey
+ GLOB.Banlist.cd = "/base"
unbanpanel()
else if(href_list["unbane"])
@@ -272,36 +272,36 @@
var/reason
var/banfolder = href_list["unbane"]
- Banlist.cd = "/base/[banfolder]"
- var/reason2 = Banlist["reason"]
- var/temp = Banlist["temp"]
+ GLOB.Banlist.cd = "/base/[banfolder]"
+ var/reason2 = GLOB.Banlist["reason"]
+ var/temp = GLOB.Banlist["temp"]
- var/minutes = Banlist["minutes"]
+ var/minutes = GLOB.Banlist["minutes"]
- var/banned_key = Banlist["key"]
- Banlist.cd = "/base"
+ var/banned_key = GLOB.Banlist["key"]
+ GLOB.Banlist.cd = "/base"
var/duration
var/mins = 0
- if(minutes > CMinutes)
- mins = minutes - CMinutes
+ if(minutes > GLOB.CMinutes)
+ mins = minutes - GLOB.CMinutes
mins = tgui_input_number(usr,"How long (in minutes)? \n 1440 = 1 day \n 4320 = 3 days \n 10080 = 7 days \n 43800 = 1 Month","Ban time", 1440, 262800, 1)
if(!mins) return
mins = min(525599,mins)
- minutes = CMinutes + mins
+ minutes = GLOB.CMinutes + mins
duration = GetExp(minutes)
reason = input(usr,"Reason?","reason",reason2) as message|null
if(!reason) return
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [sanitize(reason)] Duration: [duration]")
message_admins("[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [sanitize(reason)] Duration: [duration]")
- Banlist.cd = "/base/[banfolder]"
- Banlist["reason"] << sanitize(reason)
- Banlist["temp"] << temp
- Banlist["minutes"] << minutes
- Banlist["bannedby"] << usr.ckey
- Banlist.cd = "/base"
+ GLOB.Banlist.cd = "/base/[banfolder]"
+ GLOB.Banlist["reason"] << sanitize(reason)
+ GLOB.Banlist["temp"] << temp
+ GLOB.Banlist["minutes"] << minutes
+ GLOB.Banlist["bannedby"] << usr.ckey
+ GLOB.Banlist.cd = "/base"
unbanpanel()
/////////////////////////////////////new ban stuff
@@ -320,7 +320,7 @@
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
- if(!RoleAuthority)
+ if(!GLOB.RoleAuthority)
to_chat(usr, "Role Authority has not been set up!")
return
@@ -333,23 +333,23 @@
var/list/joblist = list()
switch(href_list["jobban3"])
if("CICdept")
- joblist += get_job_titles_from_list(ROLES_COMMAND)
+ joblist += get_job_titles_from_list(GLOB.ROLES_COMMAND)
if("Supportdept")
- joblist += get_job_titles_from_list(ROLES_AUXIL_SUPPORT)
+ joblist += get_job_titles_from_list(GLOB.ROLES_AUXIL_SUPPORT)
if("Policedept")
- joblist += get_job_titles_from_list(ROLES_POLICE)
+ joblist += get_job_titles_from_list(GLOB.ROLES_POLICE)
if("Engineeringdept")
- joblist += get_job_titles_from_list(ROLES_ENGINEERING)
+ joblist += get_job_titles_from_list(GLOB.ROLES_ENGINEERING)
if("Requisitiondept")
- joblist += get_job_titles_from_list(ROLES_REQUISITION)
+ joblist += get_job_titles_from_list(GLOB.ROLES_REQUISITION)
if("Medicaldept")
- joblist += get_job_titles_from_list(ROLES_MEDICAL)
+ joblist += get_job_titles_from_list(GLOB.ROLES_MEDICAL)
if("Marinesdept")
- joblist += get_job_titles_from_list(ROLES_MARINES)
+ joblist += get_job_titles_from_list(GLOB.ROLES_MARINES)
if("Miscdept")
- joblist += get_job_titles_from_list(ROLES_MISC)
+ joblist += get_job_titles_from_list(GLOB.ROLES_MISC)
if("Xenosdept")
- joblist += get_job_titles_from_list(ROLES_XENO)
+ joblist += get_job_titles_from_list(GLOB.ROLES_XENO)
else
joblist += href_list["jobban3"]
@@ -562,23 +562,9 @@
var/dat = {"What mode do you wish to play?"}
for(var/mode in config.modes)
dat += {"[config.mode_names[mode]] "}
- dat += {"Now: [master_mode]"}
+ dat += {"Now: [GLOB.master_mode]"}
show_browser(usr, dat, "Change Gamemode", "c_mode")
- else if(href_list["f_secret"])
- if(!check_rights(R_ADMIN)) return
-
- if(SSticker.mode)
- return alert(usr, "The game has already started.", null, null, null, null)
- if(master_mode != "secret")
- return alert(usr, "The game mode has to be secret!", null, null, null, null)
- var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret."}
- for(var/mode in config.modes)
- dat += {"[config.mode_names[mode]] "}
- dat += {"Random (default) "}
- dat += {"Now: [secret_force_mode]"}
- show_browser(usr, dat, "Change Secret Gamemode", "f_secret")
-
else if(href_list["c_mode2"])
if(!check_rights(R_ADMIN|R_SERVER)) return
@@ -588,19 +574,6 @@
Game() // updates the main game menu
SSticker.save_mode(GLOB.master_mode)
-
- else if(href_list["f_secret2"])
- if(!check_rights(R_ADMIN|R_SERVER)) return
-
- if(SSticker.mode)
- return alert(usr, "The game has already started.", null, null, null, null)
- if(master_mode != "secret")
- return alert(usr, "The game mode has to be secret!", null, null, null, null)
- secret_force_mode = href_list["f_secret2"]
- message_admins("[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].")
- Game() // updates the main game menu
- .(href, list("f_secret"=1))
-
else if(href_list["monkeyone"])
if(!check_rights(R_SPAWN)) return
@@ -612,17 +585,6 @@
message_admins("[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]")
H.monkeyize()
- else if(href_list["corgione"])
- if(!check_rights(R_SPAWN)) return
-
- var/mob/living/carbon/human/H = locate(href_list["corgione"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
- return
-
- message_admins("[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]")
- H.corgize()
-
else if(href_list["forcespeech"])
if(!check_rights(R_ADMIN)) return
@@ -949,7 +911,7 @@
H.mind.transfer_to(M)
else
M.key = H.key
- if(M.client) M.client.change_view(world_view_size)
+ if(M.client) M.client.change_view(GLOB.world_view_size)
if(M.skills)
qdel(M.skills)
@@ -1044,7 +1006,7 @@
return
if(alert("Are you sure you want to cancel this OB?",,"Yes","No") != "Yes")
return
- orbital_cannon_cancellation["[cancel_token]"] = null
+ GLOB.orbital_cannon_cancellation["[cancel_token]"] = null
message_admins("[src.owner] has cancelled the orbital strike.")
else if(href_list["admincancelpredsd"])
@@ -1208,7 +1170,7 @@
msg_ghost += "view message"
announce_fax(msg_ghost = msg_ghost)
- for(var/obj/structure/machinery/faxmachine/F in machines)
+ for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
if(F == fax)
if(!(F.inoperable()))
@@ -1290,7 +1252,7 @@
msg_ghost += "view message"
announce_fax( ,msg_ghost)
- for(var/obj/structure/machinery/faxmachine/F in machines)
+ for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
if(F == fax)
if(!(F.inoperable()))
@@ -1372,7 +1334,7 @@
announce_fax( ,msg_ghost)
- for(var/obj/structure/machinery/faxmachine/F in machines)
+ for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
if(F == fax)
if(!(F.inoperable()))
@@ -1454,7 +1416,7 @@
announce_fax( ,msg_ghost)
- for(var/obj/structure/machinery/faxmachine/F in machines)
+ for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
if(F == fax)
if(!(F.inoperable()))
@@ -1778,16 +1740,16 @@
//unanswered_distress -= ref_person
if(href_list["distresscancel"])
- if(distress_cancel)
+ if(GLOB.distress_cancel)
to_chat(usr, "The distress beacon was either canceled, or you are too late to cancel.")
return
log_game("[key_name_admin(usr)] has canceled the distress beacon.")
message_admins("[key_name_admin(usr)] has canceled the distress beacon.")
- distress_cancel = TRUE
+ GLOB.distress_cancel = TRUE
return
if(href_list["distress"]) //Distress Beacon, sends a random distress beacon when pressed
- distress_cancel = FALSE
+ GLOB.distress_cancel = FALSE
message_admins("[key_name_admin(usr)] has opted to SEND the distress beacon! Launching in 10 seconds... (CANCEL)")
addtimer(CALLBACK(src, PROC_REF(accept_ert), usr, locate(href_list["distress"])), 10 SECONDS)
//unanswered_distress -= ref_person
@@ -1795,7 +1757,7 @@
if(href_list["distress_handheld"]) //Prepares to call and logs accepted handheld distress beacons
var/mob/ref_person = href_list["distress_handheld"]
var/ert_name = href_list["ert_name"]
- distress_cancel = FALSE
+ GLOB.distress_cancel = FALSE
message_admins("[key_name_admin(usr)] has opted to SEND [ert_name]! Launching in 10 seconds... (CANCEL)")
addtimer(CALLBACK(src, PROC_REF(accept_handheld_ert), usr, ref_person, ert_name), 10 SECONDS)
@@ -1806,10 +1768,10 @@
message_admins("[key_name_admin(usr)] has denied a distress beacon, requested by [key_name_admin(ref_person)]")
if(href_list["destroyship"]) //Distress Beacon, sends a random distress beacon when pressed
- destroy_cancel = FALSE
+ GLOB.destroy_cancel = FALSE
message_admins("[key_name_admin(usr)] has opted to GRANT the self-destruct! Starting in 10 seconds... (CANCEL)")
spawn(100)
- if(distress_cancel)
+ if(GLOB.distress_cancel)
return
var/mob/ref_person = locate(href_list["destroyship"])
set_security_level(SEC_LEVEL_DELTA)
@@ -1830,12 +1792,12 @@
//make ASRS order for nuke
var/datum/supply_order/new_order = new()
- new_order.ordernum = supply_controller.ordernum
- supply_controller.ordernum++
- new_order.object = supply_controller.supply_packs[nuketype]
+ new_order.ordernum = GLOB.supply_controller.ordernum
+ GLOB.supply_controller.ordernum++
+ new_order.object = GLOB.supply_controller.supply_packs[nuketype]
new_order.orderedby = ref_person
new_order.approvedby = "USCM High Command"
- supply_controller.shoppinglist += new_order
+ GLOB.supply_controller.shoppinglist += new_order
//Can no longer request a nuke
GLOB.ares_datacore.nuke_available = FALSE
@@ -1859,7 +1821,7 @@
message_admins("[key_name_admin(usr)] has denied self-destruct, requested by [key_name_admin(ref_person)]", 1)
if(href_list["sdcancel"])
- if(destroy_cancel)
+ if(GLOB.destroy_cancel)
to_chat(usr, "The self-destruct was already canceled.")
return
if(get_security_level() == "delta")
@@ -1867,7 +1829,7 @@
return
log_game("[key_name_admin(usr)] has canceled the self-destruct.")
message_admins("[key_name_admin(usr)] has canceled the self-destruct.")
- destroy_cancel = 1
+ GLOB.destroy_cancel = TRUE
return
if(href_list["tag_datum"])
@@ -1975,18 +1937,18 @@
return
/datum/admins/proc/accept_ert(mob/approver, mob/ref_person)
- if(distress_cancel)
+ if(GLOB.distress_cancel)
return
- distress_cancel = TRUE
+ GLOB.distress_cancel = TRUE
SSticker.mode.activate_distress()
log_game("[key_name_admin(approver)] has sent a randomized distress beacon, requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(approver)] has sent a randomized distress beacon, requested by [key_name_admin(ref_person)]")
///Handles calling the ERT sent by handheld distress beacons
/datum/admins/proc/accept_handheld_ert(mob/approver, mob/ref_person, ert_called)
- if(distress_cancel)
+ if(GLOB.distress_cancel)
return
- distress_cancel = TRUE
+ GLOB.distress_cancel = TRUE
SSticker.mode.get_specific_call("[ert_called]", TRUE, FALSE)
log_game("[key_name_admin(approver)] has sent [ert_called], requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(approver)] has sent [ert_called], requested by [key_name_admin(ref_person)]")
@@ -2000,7 +1962,7 @@
for(var/jobPos in roles)
if(!jobPos)
continue
- var/datum/job/job = RoleAuthority.roles_by_name[jobPos]
+ var/datum/job/job = GLOB.RoleAuthority.roles_by_name[jobPos]
if(!job)
continue
@@ -2022,7 +1984,7 @@
for(var/jobPos in roles)
if(!jobPos)
continue
- var/datum/job/J = RoleAuthority.roles_by_name[jobPos]
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[jobPos]
if(!J)
continue
temp += J.title
diff --git a/code/modules/admin/topic/topic_chems.dm b/code/modules/admin/topic/topic_chems.dm
index fe8af3b77d96..77e1c0c6d1b8 100644
--- a/code/modules/admin/topic/topic_chems.dm
+++ b/code/modules/admin/topic/topic_chems.dm
@@ -39,14 +39,14 @@
var/response = alert(usr,"Enter ID or select ID from list?",null, "Enter ID","Select from list")
var/target
if(response == "Select from list")
- var/list/pool = chemical_reagents_list
+ var/list/pool = GLOB.chemical_reagents_list
pool = sortAssoc(pool)
target = tgui_input_list(usr,"Select the ID of the chemical reagent you wish to view:", "View reagent", pool)
else if(response == "Enter ID")
target = input(usr,"Enter the ID of the chemical reagent you wish to view:")
if(!target)
return
- var/datum/reagent/R = chemical_reagents_list[target]
+ var/datum/reagent/R = GLOB.chemical_reagents_list[target]
if(R)
usr.client.debug_variables(R)
else
@@ -56,7 +56,7 @@
var/target = input(usr,"Enter the ID of the chemical reaction you wish to view:")
if(!target)
return
- var/datum/chemical_reaction/R = chemical_reactions_list[target]
+ var/datum/chemical_reaction/R = GLOB.chemical_reactions_list[target]
if(R)
usr.client.debug_variables(R)
log_admin("[key_name(usr)] is viewing the chemical reaction for [R].")
@@ -67,7 +67,7 @@
var/target = input(usr,"Enter the ID of the chemical reaction you wish to syncronize. This is only necessary if you edited a reaction through the debugger (VV).")
if(!target)
return
- var/datum/chemical_reaction/R = chemical_reactions_list[target]
+ var/datum/chemical_reaction/R = GLOB.chemical_reactions_list[target]
if(R)
R.add_to_filtered_list(TRUE)
log_debug("[key_name(usr)] resyncronized [R.id]")
@@ -77,7 +77,7 @@
return
if("spawn_reagent")
var/target = input(usr,"Enter the ID of the chemical reagent you wish to make:")
- if(!chemical_reagents_list[target])
+ if(!GLOB.chemical_reagents_list[target])
to_chat(usr,SPAN_WARNING("No reagent with this ID could been found."))
return
var/volume = tgui_input_number(usr,"How much? An appropriate container will be selected.")
@@ -88,18 +88,18 @@
return
if("make_report")
var/target = input(usr, "Enter the ID of the chemical reagent you wish to make a report of:")
- if(!chemical_reagents_list[target])
+ if(!GLOB.chemical_reagents_list[target])
to_chat(usr, SPAN_WARNING("No reagent with this ID could be found."))
return
- var/datum/reagent/R = chemical_reagents_list[target]
+ var/datum/reagent/R = GLOB.chemical_reagents_list[target]
R.print_report(loc = usr.loc, admin_spawned = TRUE)
//For quickly generating a new chemical
if("create_random_reagent")
var/target = input(usr,"Enter the ID of the chemical reagent you wish to make:")
if(!target)
return
- if(chemical_reagents_list[target])
+ if(GLOB.chemical_reagents_list[target])
to_chat(usr,SPAN_WARNING("This ID is already in use."))
return
var/tier = tgui_input_number(usr,"Enter the generation tier you wish. This will affect the number of properties (tier + 1), rarity of components and potential for good properties. Ought to be 1-4, max 10.", "Generation tier", 1, 10)
@@ -116,41 +116,41 @@
R.generate_name()
R.generate_stats()
//Save our reagent
- chemical_reagents_list[target] = R
+ GLOB.chemical_reagents_list[target] = R
message_admins("[key_name_admin(usr)] has generated the reagent: [target].")
var/response = alert(usr,"Do you want to do anything else?",null,"Generate associated reaction","View my reagent","Finish")
while(response != "Finish")
switch(response)
if("Generate associated reaction")
- if(chemical_reactions_list[target])
+ if(GLOB.chemical_reactions_list[target])
to_chat(usr,SPAN_WARNING("This ID is already in use."))
return
R.generate_assoc_recipe()
- if(!chemical_reactions_list[target])
+ if(!GLOB.chemical_reactions_list[target])
to_chat(usr,SPAN_WARNING("Something went wrong when saving the reaction. The associated reagent has been deleted."))
- chemical_reagents_list[target] -= R
+ GLOB.chemical_reagents_list[target] -= R
return
response = alert(usr,"Do you want to do anything else?",null,"View my reaction","View my reagent","Finish")
if("View my reagent")
- if(chemical_reagents_list[target])
- R = chemical_reagents_list[target]
+ if(GLOB.chemical_reagents_list[target])
+ R = GLOB.chemical_reagents_list[target]
usr.client.debug_variables(R)
log_admin("[key_name(usr)] is viewing the chemical reaction for [R].")
else
to_chat(usr,SPAN_WARNING("No reagent with this ID could been found. Wait what? But I just... Contact a debugger."))
- chemical_reagents_list.Remove(target)
- chemical_reactions_list.Remove("[target]")
- chemical_reactions_filtered_list.Remove("[target]")
+ GLOB.chemical_reagents_list.Remove(target)
+ GLOB.chemical_reactions_list.Remove("[target]")
+ GLOB.chemical_reactions_filtered_list.Remove("[target]")
return
if("View my reaction")
- if(chemical_reactions_list[target])
- var/datum/chemical_reaction/generated/G = chemical_reactions_list[target]
+ if(GLOB.chemical_reactions_list[target])
+ var/datum/chemical_reaction/generated/G = GLOB.chemical_reactions_list[target]
usr.client.debug_variables(G)
else
to_chat(usr,SPAN_WARNING("No reaction with this ID could been found. Wait what? But I just... Contact a debugger."))
- chemical_reagents_list.Remove(target)
- chemical_reactions_list.Remove("[target]")
- chemical_reactions_filtered_list.Remove("[target]")
+ GLOB.chemical_reagents_list.Remove(target)
+ GLOB.chemical_reactions_list.Remove("[target]")
+ GLOB.chemical_reactions_filtered_list.Remove("[target]")
return
else
break
@@ -165,7 +165,7 @@
var/target = input(usr,"Enter the ID of the chemical reagent you wish to make:")
if(!target)
return
- if(chemical_reagents_list[target])
+ if(GLOB.chemical_reagents_list[target])
to_chat(usr,SPAN_WARNING("This ID is already in use."))
return
var/datum/reagent/generated/R = new /datum/reagent/generated
@@ -190,7 +190,7 @@
response = alert(usr,"Select Input Type","Custom reagent [target]","Manual Input","Select","No more properties")
if("Manual Input")
var/input = input(usr,"Enter the name of the chemical property you wish to add:")
- var/datum/chem_property/P = chemical_properties_list[input]
+ var/datum/chem_property/P = GLOB.chemical_properties_list[input]
if(!P)
to_chat(usr,SPAN_WARNING("Property not found, did you spell it right?"))
response = "Specific property"
@@ -199,7 +199,7 @@
R.insert_property(P.name,level)
response = alert(usr,"Done. Add more?","Custom reagent [target]","Specific property","Specific number","No more properties")
if("Select")
- var/list/pool = chemical_properties_list
+ var/list/pool = GLOB.chemical_properties_list
pool = sortAssoc(pool)
var/P = tgui_input_list(usr,"Which property do you want?", "Property selection", pool)
var/level = tgui_input_number(usr,"Choose the level (this is a strength modifier, ought to be between 1-8)", "strengthmod", 1)
@@ -221,7 +221,7 @@
break
R.generate_description()
//Save our reagent
- chemical_reagents_list[target] = R
+ GLOB.chemical_reagents_list[target] = R
message_admins("[key_name_admin(usr)] has created a custom reagent: [target].")
//See what we want to do last
response = alert(usr,"Spawn container with reagent?","Custom reagent [target]","Yes","No, show me the reagent","No, I'm all done")
@@ -233,14 +233,14 @@
spawn_reagent(target, volume)
if("No, show me the reagent")
- usr.client.debug_variables(chemical_reagents_list[target])
+ usr.client.debug_variables(GLOB.chemical_reagents_list[target])
return
//For creating a custom reaction
if("create_custom_reaction")
var/target = input(usr,"Enter the ID of the chemical reaction you wish to make:")
if(!target)
return
- if(chemical_reactions_list[target])
+ if(GLOB.chemical_reactions_list[target])
to_chat(usr,SPAN_WARNING("This ID is already in use."))
return
var/datum/chemical_reaction/generated/R = new /datum/chemical_reaction/generated
@@ -262,7 +262,7 @@
if("Select type")
response = alert(usr,"Enter id manually or select from list?","Custom reaction [target]","Select from list","Manual input","Back")
if("Select from list")
- var/list/pool = chemical_reagents_list
+ var/list/pool = GLOB.chemical_reagents_list
pool = sortAssoc(pool)
component = tgui_input_list(usr,"Select:", "Create custom reaction", pool)
if(!component)
@@ -274,7 +274,7 @@
if(!component)
response = "Select type"
continue
- if(!chemical_reagents_list[component])
+ if(!GLOB.chemical_reagents_list[component])
to_chat(usr,SPAN_WARNING("ID not found. Try again."))
continue
response = "Add"
@@ -290,11 +290,11 @@
to_chat(usr,SPAN_WARNING("You need to add at least 3 components excluding catalysts. The reaction has not been saved."))
return
//Save our reaction
- chemical_reactions_list[target] = R
+ GLOB.chemical_reactions_list[target] = R
R.add_to_filtered_list()
- if(!chemical_reactions_list[target])
+ if(!GLOB.chemical_reactions_list[target])
to_chat(usr,SPAN_WARNING("Something went wrong when saving the reaction."))
return
- usr.client.debug_variables(chemical_reactions_list[target])
+ usr.client.debug_variables(GLOB.chemical_reactions_list[target])
message_admins("[key_name_admin(usr)] has created a custom chemical reaction: [target].")
return
diff --git a/code/modules/admin/topic/topic_events.dm b/code/modules/admin/topic/topic_events.dm
index c38f715d93bf..5e59ba4835f5 100644
--- a/code/modules/admin/topic/topic_events.dm
+++ b/code/modules/admin/topic/topic_events.dm
@@ -52,7 +52,7 @@
if("whiteout")
if(alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") != "Yes")
return
- for(var/obj/structure/machinery/light/L in machines)
+ for(var/obj/structure/machinery/light/L in GLOB.machines)
L.fix()
message_admins("[key_name_admin(usr)] fixed all lights")
if("power")
@@ -82,16 +82,16 @@
power_restore_ship_reactors()
if("change_clearance")
var/list/clearance_levels = list(0,1,2,3,4,5)
- var/level = tgui_input_list(usr, "Select new clearance level:","Current level: [chemical_data.clearance_level]", clearance_levels)
+ var/level = tgui_input_list(usr, "Select new clearance level:","Current level: [GLOB.chemical_data.clearance_level]", clearance_levels)
if(!level)
return
message_admins("[key_name_admin(usr)] changed research clearance level to [level].")
- chemical_data.clearance_level = level
+ GLOB.chemical_data.clearance_level = level
if("give_research_credits")
var/amount = tgui_input_real_number(usr, "How many credits to add?")
if(amount != 0) //can add negative numbers too!
message_admins("[key_name_admin(usr)] added [amount] research credits.")
- chemical_data.update_credits(amount)
+ GLOB.chemical_data.update_credits(amount)
/datum/admins/proc/create_humans_list(href_list)
if(SSticker?.current_state < GAME_STATE_PLAYING)
@@ -272,7 +272,7 @@
if(!length(turfs))
return
- var/caste_type = RoleAuthority.get_caste_by_text(xeno_caste)
+ var/caste_type = GLOB.RoleAuthority.get_caste_by_text(xeno_caste)
var/list/xenos = list()
var/mob/living/carbon/xenomorph/X
diff --git a/code/modules/admin/topic/topic_teleports.dm b/code/modules/admin/topic/topic_teleports.dm
index 38eefdb49257..8a5360169999 100644
--- a/code/modules/admin/topic/topic_teleports.dm
+++ b/code/modules/admin/topic/topic_teleports.dm
@@ -8,7 +8,7 @@
owner.jump_to_area(choice)
if("jump_to_turf")
- var/turf/choice = tgui_input_list(owner, "Pick a turf to jump to:", "Jump", turfs)
+ var/turf/choice = tgui_input_list(owner, "Pick a turf to jump to:", "Jump", GLOB.turfs)
if(QDELETED(choice))
return
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 2806b8c3bad2..8a86d7282aa9 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -29,7 +29,7 @@
message_admins(WRAP_STAFF_LOG(usr, "jumped to area [get_area(usr)] ([usr.loc.x],[usr.loc.y],[usr.loc.z])."), usr.loc.x, usr.loc.y, usr.loc.z)
-/client/proc/jump_to_turf(turf/T in turfs)
+/client/proc/jump_to_turf(turf/T in GLOB.turfs)
set name = "Jump to Turf"
set category = null
diff --git a/code/modules/admin/verbs/adminpanelgq.dm b/code/modules/admin/verbs/adminpanelgq.dm
index 8ef1ed869661..82efd0906873 100644
--- a/code/modules/admin/verbs/adminpanelgq.dm
+++ b/code/modules/admin/verbs/adminpanelgq.dm
@@ -2,7 +2,7 @@
set name = "Call General Quarters"
set category = "Admin.Ship"
- if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA)
+ if(GLOB.security_level == SEC_LEVEL_RED || GLOB.security_level == SEC_LEVEL_DELTA)
tgui_alert(src, "Security is already red or above, General Quarters cannot be called.", "Acknowledge!", list("ok."), 10 SECONDS)
return FALSE
diff --git a/code/modules/admin/verbs/autoreplace.dm b/code/modules/admin/verbs/autoreplace.dm
index dc6ebb09db2c..b2fe04cfb4a3 100644
--- a/code/modules/admin/verbs/autoreplace.dm
+++ b/code/modules/admin/verbs/autoreplace.dm
@@ -1,4 +1,4 @@
-var/list/datum/decorator/manual/admin_runtime/admin_runtime_decorators = list()
+GLOBAL_LIST_INIT_TYPED(admin_runtime_decorators, /datum/decorator/manual/admin_runtime, list())
/client/proc/set_autoreplacer()
set category = "Admin.Events"
@@ -30,9 +30,9 @@ var/list/datum/decorator/manual/admin_runtime/admin_runtime_decorators = list()
if("No")
return
- admin_runtime_decorators.Add(SSdecorator.add_decorator(/datum/decorator/manual/admin_runtime, types, subtypes, field, value))
+ GLOB.admin_runtime_decorators.Add(SSdecorator.add_decorator(/datum/decorator/manual/admin_runtime, types, subtypes, field, value))
- log_and_message_admins("[src] activated new decorator id: [admin_runtime_decorators.len] set for [hint_text] `[types]` for field `[field]` set value `[value]`")
+ log_and_message_admins("[src] activated new decorator id: [GLOB.admin_runtime_decorators.len] set for [hint_text] `[types]` for field `[field]` set value `[value]`")
/client/proc/deactivate_autoreplacer()
set category = "Admin.Events"
@@ -47,7 +47,7 @@ var/list/datum/decorator/manual/admin_runtime/admin_runtime_decorators = list()
if(!num_value)
return
- admin_runtime_decorators[num_value].enabled = FALSE
+ GLOB.admin_runtime_decorators[num_value].enabled = FALSE
log_and_message_admins("[src] deactivated decorator id: [num_value]")
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index a7ee69469f1d..c776a12eb330 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -86,8 +86,8 @@
if(!SSticker.mode)
to_chat(usr, "Mode not found?")
- round_should_check_for_win = !round_should_check_for_win
- if (round_should_check_for_win)
+ GLOB.round_should_check_for_win = !GLOB.round_should_check_for_win
+ if (GLOB.round_should_check_for_win)
message_admins("[key_name(src)] enabled checking for round-end.")
else
message_admins("[key_name(src)] disabled checking for round-end.")
@@ -333,17 +333,17 @@
individual_counts["[M.type]"]++
for(var/mob/M in SShuman.processable_human_list)
individual_counts["[M.type]"]++
- for(var/obj/structure/machinery/M in processing_machines)
+ for(var/obj/structure/machinery/M in GLOB.processing_machines)
individual_counts["[M.type]"]++
- for(var/datum/powernet/M in powernets)
+ for(var/datum/powernet/M in GLOB.powernets)
individual_counts["[M.type]"]++
for(var/mob/M in SSmob.living_misc_mobs)
individual_counts["[M.type]"]++
- for(var/datum/nanoui/M in nanomanager.processing_uis)
+ for(var/datum/nanoui/M in SSnano.nanomanager.processing_uis)
individual_counts["[M.type]"]++
- for(var/datum/powernet/M in powernets)
+ for(var/datum/powernet/M in GLOB.powernets)
individual_counts["[M.type]"]++
- for(var/datum/M in power_machines)
+ for(var/datum/M in GLOB.power_machines)
individual_counts["[M.type]"]++
for(var/mob/M in GLOB.xeno_mob_list)
individual_counts["[M.type]"]++
diff --git a/code/modules/admin/verbs/mob_verbs.dm b/code/modules/admin/verbs/mob_verbs.dm
index 351d281e1881..abb43461c2fe 100644
--- a/code/modules/admin/verbs/mob_verbs.dm
+++ b/code/modules/admin/verbs/mob_verbs.dm
@@ -24,7 +24,7 @@
message_admins("[key_name_admin(usr)] modified [key_name(M)]'s ckey to [new_ckey]", 1)
M.ckey = new_ckey
- M.client?.change_view(world_view_size)
+ M.client?.change_view(GLOB.world_view_size)
/client/proc/cmd_admin_changekey(mob/O in GLOB.mob_list)
set name = "Change CKey"
@@ -72,13 +72,13 @@
var/datum/mob_hud/H
switch(hud_choice)
if("Medical HUD")
- H = huds[MOB_HUD_MEDICAL_ADVANCED]
+ H = GLOB.huds[MOB_HUD_MEDICAL_ADVANCED]
if("Security HUD")
- H = huds[MOB_HUD_SECURITY_ADVANCED]
+ H = GLOB.huds[MOB_HUD_SECURITY_ADVANCED]
if("Squad HUD")
- H = huds[MOB_HUD_FACTION_OBSERVER]
+ H = GLOB.huds[MOB_HUD_FACTION_OBSERVER]
if("Xeno Status HUD")
- H = huds[MOB_HUD_XENO_STATUS]
+ H = GLOB.huds[MOB_HUD_XENO_STATUS]
else return
H.add_hud_to(M, HUD_SOURCE_ADMIN)
@@ -220,7 +220,7 @@
"Narrating as [selected.name]")
if(!message) return
- var/list/heard = get_mobs_in_view(world_view_size, selected)
+ var/list/heard = get_mobs_in_view(GLOB.world_view_size, selected)
switch(type)
if(NARRATION_METHOD_SAY)
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 9d622fce501b..0763a0e10795 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -1,45 +1,83 @@
-/client/proc/play_web_sound()
+/client/proc/play_admin_sound()
set category = "Admin.Fun"
- set name = "Play Internet Sound"
+ set name = "Play Admin Sound"
if(!check_rights(R_SOUNDS))
return
- var/ytdl = CONFIG_GET(string/invoke_youtubedl)
- if(!ytdl)
- to_chat(src, SPAN_BOLDWARNING("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
+ var/sound_mode = tgui_input_list(src, "Play a sound from which source?", "Select Source", list("Web", "Upload"))
+ if(!sound_mode)
return
- var/web_sound_input = input("Enter content URL (supported sites only)", "Play Internet Sound via youtube-dl") as text|null
- if(!istext(web_sound_input) || !length(web_sound_input))
- return
+ var/list/data = list()
+ var/log_title = TRUE
+ var/web_sound_input
+ var/asset_name
+ var/must_send_assets = FALSE
+ var/announce_title = TRUE
+
+ if(sound_mode == "Web")
+ var/ytdl = CONFIG_GET(string/invoke_youtubedl)
+ if(!ytdl)
+ to_chat(src, SPAN_BOLDWARNING("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
+ return
- web_sound_input = trim(web_sound_input)
+ web_sound_input = input("Enter content URL (supported sites only)", "Play Internet Sound via youtube-dl") as text|null
+ if(!istext(web_sound_input) || !length(web_sound_input))
+ return
- if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol))
- to_chat(src, SPAN_WARNING("Non-http(s) URIs are not allowed."))
- to_chat(src, SPAN_WARNING("For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website."))
- return
+ web_sound_input = trim(web_sound_input)
- var/web_sound_url = ""
- var/list/music_extra_data = list()
- var/title
+ if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol))
+ to_chat(src, SPAN_WARNING("Non-http(s) URIs are not allowed."))
+ to_chat(src, SPAN_WARNING("For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website."))
+ return
- var/list/output = world.shelleo("[ytdl] --geo-bypass --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --dump-single-json --no-playlist -- \"[shell_url_scrub(web_sound_input)]\"")
- var/errorlevel = output[SHELLEO_ERRORLEVEL]
- var/stdout = output[SHELLEO_STDOUT]
- var/stderr = output[SHELLEO_STDERR]
+ var/list/output = world.shelleo("[ytdl] --geo-bypass --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --dump-single-json --no-playlist -- \"[shell_url_scrub(web_sound_input)]\"")
+ var/errorlevel = output[SHELLEO_ERRORLEVEL]
+ var/stdout = output[SHELLEO_STDOUT]
+ var/stderr = output[SHELLEO_STDERR]
- if(errorlevel)
- to_chat(src, SPAN_WARNING("Youtube-dl URL retrieval FAILED: [stderr]"))
- return
+ if(errorlevel)
+ to_chat(src, SPAN_WARNING("Youtube-dl URL retrieval FAILED: [stderr]"))
+ return
- var/list/data = list()
- try
- data = json_decode(stdout)
- catch(var/exception/e)
- to_chat(src, SPAN_WARNING("Youtube-dl JSON parsing FAILED: [e]: [stdout]"))
- return
+ try
+ data = json_decode(stdout)
+ catch(var/exception/e)
+ to_chat(src, SPAN_WARNING("Youtube-dl JSON parsing FAILED: [e]: [stdout]"))
+ return
+
+ else if(sound_mode == "Upload")
+ var/current_transport = CONFIG_GET(string/asset_transport)
+ if(!current_transport || current_transport == "simple")
+ if(tgui_alert(usr, "WARNING: Your server is using simple asset transport. Sounds will have to be sent directly to players, which may freeze the game for long durations. Are you SURE?", "Really play direct sound?", list("Yes", "No")) != "Yes")
+ return
+ must_send_assets = TRUE
+
+ var/soundfile = input(usr, "Choose a sound file to play", "Upload Sound") as null|file
+ if(!soundfile)
+ return
+
+ var/static/regex/only_extension = regex(@{"^.*\.([a-z0-9]{1,5})$"}, "gi")
+ var/extension = only_extension.Replace("[soundfile]", "$1")
+ if(!length(extension))
+ to_chat(src, SPAN_WARNING("Invalid filename extension."))
+ return
+
+ var/static/playsound_notch = 1
+ asset_name = "admin_sound_[playsound_notch++].[extension]"
+ SSassets.transport.register_asset(asset_name, soundfile)
+ message_admins("[key_name_admin(src)] uploaded admin sound '[soundfile]' to asset transport.")
+
+ var/static/regex/remove_extension = regex(@{"\.[a-z0-9]+$"}, "gi")
+ data["title"] = remove_extension.Replace("[soundfile]", "")
+ data["url"] = SSassets.transport.get_asset_url(asset_name)
+ web_sound_input = "[soundfile]"
+ log_title = FALSE
+ var/title
+ var/web_sound_url = ""
+ var/list/music_extra_data = list()
if(data["url"])
music_extra_data["link"] = data["url"]
music_extra_data["title"] = data["title"]
@@ -48,19 +86,28 @@
music_extra_data["start"] = data["start_time"]
music_extra_data["end"] = data["end_time"]
- if(web_sound_url && !findtext(web_sound_url, GLOB.is_http_protocol))
+ if(!must_send_assets && web_sound_url && !findtext(web_sound_url, GLOB.is_http_protocol))
to_chat(src, SPAN_BOLDWARNING("BLOCKED: Content URL not using http(s) protocol"), confidential = TRUE)
to_chat(src, SPAN_WARNING("The media provider returned a content URL that isn't using the HTTP or HTTPS protocol"), confidential = TRUE)
return
+ switch(tgui_alert(src, "Show the name of this sound to the players?", "Sound Name", list("Yes","No","Cancel")))
+ if("No")
+ music_extra_data["title"] = "Admin sound"
+ announce_title = FALSE
+ if("Cancel")
+ return
+
var/list/targets = list()
var/list/sound_type_list = list(
"Meme" = SOUND_ADMIN_MEME,
"Atmospheric" = SOUND_ADMIN_ATMOSPHERIC
)
- var/style = tgui_input_list(src, "Who do you want to play this to?", "Select Listeners", list("Globally", "Xenos", "Marines", "Ghosts", "All Inview", "Single Inview"))
+
+ var/style = tgui_input_list(src, "Who do you want to play this to?", "Select Listeners", list("Globally", "Xenos", "Marines", "Ghosts", "All In View Range", "Single Mob"))
var/sound_type = tgui_input_list(src, "What kind of sound is this?", "Select Sound Type", sound_type_list)
sound_type = sound_type_list[sound_type]
+
switch(style)
if("Globally")
targets = GLOB.mob_list
@@ -70,30 +117,40 @@
targets = GLOB.human_mob_list + GLOB.dead_mob_list
if("Ghosts")
targets = GLOB.observer_list + GLOB.dead_mob_list
- if("All Inview")
- targets = viewers(usr.client.view, src)
- if("Single Inview")
- var/mob/choice = tgui_input_list(src, "Select the mob to play to:","Select Mob", sortmobs())
+ if("All In View Range")
+ var/list/atom/ranged_atoms = urange(usr.client.view, get_turf(usr))
+ for(var/mob/receiver in ranged_atoms)
+ targets += receiver
+ if("Single Mob")
+ var/list/mob/all_mobs = sortmobs()
+ var/list/mob/all_client_mobs = list()
+ for(var/mob/mob in all_mobs)
+ if(mob.client)
+ all_client_mobs += mob
+ var/mob/choice = tgui_input_list(src, "Select the mob to play to:","Select Mob", all_client_mobs)
if(QDELETED(choice))
return
targets.Add(choice)
else
return
- for(var/i in targets)
- var/mob/M = i
- var/client/client = M?.client
- if((client?.prefs.toggles_sound & SOUND_INTERNET) && (client?.prefs.toggles_sound & sound_type))
+ for(var/mob/mob as anything in targets)
+ var/client/client = mob?.client
+ if((client?.prefs?.toggles_sound & SOUND_MIDI) && (client?.prefs?.toggles_sound & sound_type))
+ if(must_send_assets)
+ SSassets.transport.send_assets(client, asset_name)
client?.tgui_panel?.play_music(web_sound_url, music_extra_data)
+ if(announce_title)
+ to_chat(client, SPAN_BOLDANNOUNCE("An admin played: [music_extra_data["title"]]"), confidential = TRUE)
else
client?.tgui_panel?.stop_music()
- log_admin("[key_name(src)] played web sound: [web_sound_input] - [title] - [style]")
- message_admins("[key_name_admin(src)] played web sound: [web_sound_input] - [title] - [style]")
+ log_admin("[key_name(src)] played admin sound: [web_sound_input] -[log_title ? " [title] -" : ""] [style]")
+ message_admins("[key_name_admin(src)] played admin sound: [web_sound_input] -[log_title ? " [title] -" : ""] [style]")
-/client/proc/stop_web_sound()
+/client/proc/stop_admin_sound()
set category = "Admin.Fun"
- set name = "Stop Internet Sounds"
+ set name = "Stop Admin Sounds"
if(!check_rights(R_SOUNDS))
return
@@ -105,86 +162,3 @@
log_admin("[key_name(src)] stopped the currently playing web sounds.")
message_admins("[key_name_admin(src)] stopped the currently playing web sounds.")
-/client/proc/play_sound(S as sound)
- set category = "Admin.Fun"
- set name = "Play Midi Sound"
- if(!check_rights(R_SOUNDS))
- return
-
- var/freq = 1
- var/vol = tgui_input_number(src, "What volume would you like the sound to play at?", "Volume", 25, 100, 1)
- if(!vol)
- return
- vol = clamp(vol, 1, 100)
-
- var/sound/admin_sound = new()
- admin_sound.file = S
- admin_sound.priority = 250
- admin_sound.channel = SOUND_CHANNEL_ADMIN_MIDI
- admin_sound.frequency = freq
- admin_sound.wait = 1
- admin_sound.repeat = FALSE
- admin_sound.status = SOUND_STREAM
- admin_sound.volume = vol
-
- var/showtitle = FALSE
- var/res = alert(src, "Show the title of this song to the players?",, "Yes","No", "Cancel")
- switch(res)
- if("Yes")
- showtitle = TRUE
- if("Cancel")
- return
-
- var/list/targets = list()
- var/list/sound_type_list = list(
- "Meme" = SOUND_ADMIN_MEME,
- "Atmospheric" = SOUND_ADMIN_ATMOSPHERIC
- )
- var/style = tgui_input_list(src, "Who do you want to play this to?", "Select Listeners", list("Globally", "Xenos", "Marines", "Ghosts", "All Inview", "Single Inview"))
- var/sound_type = tgui_input_list(src, "What kind of sound is this?", "Select Sound Type", sound_type_list)
- sound_type = sound_type_list[sound_type]
- switch(style)
- if("Globally")
- targets = GLOB.mob_list
- if("Xenos")
- targets = GLOB.xeno_mob_list + GLOB.dead_mob_list
- if("Marines")
- targets = GLOB.human_mob_list + GLOB.dead_mob_list
- if("Ghosts")
- targets = GLOB.observer_list + GLOB.dead_mob_list
- if("All Inview")
- targets = viewers(usr.client.view, src)
- if("Single Inview")
- var/mob/choice = tgui_input_list(src, "Select the mob to play to:","Select Mob", sortmobs())
- if(QDELETED(choice))
- return
- targets.Add(choice)
- else
- return
-
- for(var/items in targets)
- var/mob/Mob = items
- var/client/client = Mob?.client
- if((client?.prefs.toggles_sound & SOUND_INTERNET) && (client?.prefs.toggles_sound & sound_type))
- admin_sound.volume = vol * client?.admin_music_volume
- SEND_SOUND(Mob, admin_sound)
- admin_sound.volume = vol
- if(showtitle)
- to_chat(client, SPAN_BOLDANNOUNCE("An admin played: [S]"), confidential = TRUE)
-
- log_admin("[key_name(src)] played midi sound [S] - [style]")
- message_admins("[key_name_admin(src)] played midi sound [S] - [style]")
-
-/client/proc/stop_sound()
- set category = "Admin.Fun"
- set name = "Stop Midi Sounds"
-
- if(!check_rights(R_SOUNDS))
- return
-
- for(var/mob/M in GLOB.player_list)
- if(M.client)
- SEND_SOUND(M, sound(null))
-
- log_admin("[key_name(src)] stopped midi sounds.")
- message_admins("[key_name_admin(src)] stopped midi sounds.")
diff --git a/code/modules/admin/verbs/select_equipment.dm b/code/modules/admin/verbs/select_equipment.dm
index b684fc0d6f95..7e78652c5c35 100644
--- a/code/modules/admin/verbs/select_equipment.dm
+++ b/code/modules/admin/verbs/select_equipment.dm
@@ -5,7 +5,7 @@
alert("Invalid mob")
return
- var/rank_list = list("Custom", "Weyland-Yutani") + RoleAuthority.roles_by_name
+ var/rank_list = list("Custom", "Weyland-Yutani") + GLOB.RoleAuthority.roles_by_name
var/newrank = tgui_input_list(usr, "Select new rank for [H]", "Change the mob's rank and skills", rank_list)
if (!newrank)
@@ -14,8 +14,8 @@
return
var/obj/item/card/id/I = H.wear_id
- if(RoleAuthority.roles_by_name[newrank])
- var/datum/job/J = RoleAuthority.roles_by_name[newrank]
+ if(GLOB.RoleAuthority.roles_by_name[newrank])
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[newrank]
H.comm_title = J.get_comm_title()
H.set_skills(J.get_skills())
if(istype(I))
@@ -44,14 +44,14 @@
H.faction = FACTION_WY
H.faction_group = FACTION_LIST_WY
- var/newskillset = tgui_input_list(usr, "Select a skillset", "Skill Set", (list("Keep Skillset") +RoleAuthority.roles_by_name))
+ var/newskillset = tgui_input_list(usr, "Select a skillset", "Skill Set", (list("Keep Skillset") +GLOB.RoleAuthority.roles_by_name))
if(!newskillset || newskillset == "Keep Skillset")
return
if(!H)
return
- var/datum/job/J = RoleAuthority.roles_by_name[newskillset]
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[newskillset]
H.set_skills(J.get_skills())
if("Custom")
@@ -88,14 +88,14 @@
new_faction = FACTION_NEUTRAL
H.faction = new_faction
- var/newskillset = tgui_input_list(usr, "Select a skillset", "Skill Set", RoleAuthority.roles_by_name)
+ var/newskillset = tgui_input_list(usr, "Select a skillset", "Skill Set", GLOB.RoleAuthority.roles_by_name)
if(!newskillset)
return
if(!H)
return
- var/datum/job/J = RoleAuthority.roles_by_name[newskillset]
+ var/datum/job/J = GLOB.RoleAuthority.roles_by_name[newskillset]
H.set_skills(J.get_skills())
/client/proc/cmd_admin_dress(mob/M)
diff --git a/code/modules/almayer/machinery.dm b/code/modules/almayer/machinery.dm
index e72f4e7f9f52..74ce9a81eb88 100644
--- a/code/modules/almayer/machinery.dm
+++ b/code/modules/almayer/machinery.dm
@@ -205,7 +205,7 @@
var/obj/item/dogtag/D = I
if(D.fallen_names)
to_chat(user, SPAN_NOTICE("You add [D] to [src]."))
- fallen_list += D.fallen_names
+ GLOB.fallen_list += D.fallen_names
qdel(D)
return TRUE
else
@@ -213,13 +213,13 @@
/obj/structure/prop/almayer/ship_memorial/get_examine_text(mob/user)
. = ..()
- if((isobserver(user) || ishuman(user)) && fallen_list)
+ if((isobserver(user) || ishuman(user)) && GLOB.fallen_list)
var/faltext = ""
- for(var/i = 1 to fallen_list.len)
- if(i != fallen_list.len)
- faltext += "[fallen_list[i]], "
+ for(var/i = 1 to GLOB.fallen_list.len)
+ if(i != GLOB.fallen_list.len)
+ faltext += "[GLOB.fallen_list[i]], "
else
- faltext += fallen_list[i]
+ faltext += GLOB.fallen_list[i]
. += SPAN_NOTICE("To our fallen soldiers: [faltext].")
/obj/structure/prop/almayer/particle_cannon
diff --git a/code/modules/almayer/shakeship.dm b/code/modules/almayer/shakeship.dm
index c3f359c9a77c..29d9b7a762f8 100644
--- a/code/modules/almayer/shakeship.dm
+++ b/code/modules/almayer/shakeship.dm
@@ -35,7 +35,7 @@
playsound_client(current_mob.client, 'sound/effects/bigboom3.ogg', 100)
if(drop)
- INVOKE_ASYNC(current_mob, TYPE_PROC_REF(/atom/movable, throw_atom), get_ranged_target_turf(current_mob, pick(cardinal), sstrength-5), pick(cardinal), sstrength)
+ INVOKE_ASYNC(current_mob, TYPE_PROC_REF(/atom/movable, throw_atom), get_ranged_target_turf(current_mob, pick(GLOB.cardinals), sstrength-5), pick(GLOB.cardinals), sstrength)
to_chat(current_mob, SPAN_HIGHDANGER("YOU ARE THROWN AROUND VIOLENTLY AND HIT THE DECK WITH FULL FORCE!!"))
if(current_mob.client && osound)
diff --git a/code/modules/animations/animation_library.dm b/code/modules/animations/animation_library.dm
index 2bbff8d4cfcd..d4fd8feeaf24 100644
--- a/code/modules/animations/animation_library.dm
+++ b/code/modules/animations/animation_library.dm
@@ -249,7 +249,7 @@ Can look good elsewhere as well.*/
var/pre_rappel_alpha = alpha
alpha = 20
dir = WEST
- canmove = FALSE
+ ADD_TRAIT(src, TRAIT_IMMOBILIZED, INTERACTION_TRAIT)
var/matrix/initial_matrix = matrix()
initial_matrix.Turn(45)
apply_transform(initial_matrix)
@@ -257,4 +257,4 @@ Can look good elsewhere as well.*/
var/matrix/reset_matrix = matrix()
animate(src, 3, transform = reset_matrix, pixel_y = 0, alpha = pre_rappel_alpha, flags = ANIMATION_PARALLEL)
sleep(3)
- canmove = TRUE
+ REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, INTERACTION_TRAIT)
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index 05ad7c5a87c7..929e2d6af7b2 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -137,7 +137,7 @@
/obj/item/device/assembly/infra/Topic(href, href_list)
..()
- if(!usr.canmove || usr.stat || usr.is_mob_restrained() || !in_range(loc, usr))
+ if(usr.is_mob_incapacitated() || !in_range(loc, usr))
close_browser(usr, "infra")
return
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index fbb9e5d06ac1..cb9bb98d339d 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -286,7 +286,7 @@
list("SL", "hudsquad_leader"),
)
- for(var/datum/squad/marine/squad in RoleAuthority.squads)
+ for(var/datum/squad/marine/squad in GLOB.RoleAuthority.squads)
var/color = squad.equipment_color
for(var/iref in icon_data)
var/list/iconref = iref
diff --git a/code/modules/buildmode/submodes/variable_edit.dm b/code/modules/buildmode/submodes/variable_edit.dm
index da4620b157a6..7517012583da 100644
--- a/code/modules/buildmode/submodes/variable_edit.dm
+++ b/code/modules/buildmode/submodes/variable_edit.dm
@@ -44,7 +44,7 @@
if(TYPE_OBJ_REFERENCE)
selected_value = input(usr,"Enter variable value:" ,"Value") as obj in world
if(TYPE_TURF_REFERENCE)
- selected_value = input(usr,"Enter variable value:" ,"Value") as turf in turfs
+ selected_value = input(usr,"Enter variable value:" ,"Value") as turf in GLOB.turfs
#undef TYPE_TEXT
#undef TYPE_NUMBER
diff --git a/code/modules/clans/client.dm b/code/modules/clans/client.dm
index d1f403c08300..c46adf89711a 100644
--- a/code/modules/clans/client.dm
+++ b/code/modules/clans/client.dm
@@ -5,12 +5,12 @@
set waitfor = FALSE
. = ..()
- if(RoleAuthority && (RoleAuthority.roles_whitelist[ckey] & WHITELIST_PREDATOR))
+ if(GLOB.RoleAuthority && (GLOB.RoleAuthority.roles_whitelist[ckey] & WHITELIST_PREDATOR))
clan_info = GET_CLAN_PLAYER(player.id)
clan_info.sync()
- if(RoleAuthority.roles_whitelist[ckey] & WHITELIST_YAUTJA_LEADER)
- clan_info.clan_rank = clan_ranks_ordered[CLAN_RANK_ADMIN]
+ if(GLOB.RoleAuthority.roles_whitelist[ckey] & WHITELIST_YAUTJA_LEADER)
+ clan_info.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_ADMIN]
clan_info.permissions |= CLAN_PERMISSION_ALL
else
clan_info.permissions &= ~CLAN_PERMISSION_ADMIN_MANAGER // Only the leader can manage the ancients
@@ -157,7 +157,7 @@
var/list/player = list(
player_id = CP.player_id,
name = CP.ckey,
- rank = clan_ranks[CP.clan_rank], // rank_to_give not used here, because we need to get their visual rank, not their position
+ rank = GLOB.clan_ranks[CP.clan_rank], // rank_to_give not used here, because we need to get their visual rank, not their position
rank_pos = rank_to_give,
honor = (CP.honor? CP.honor : 0)
)
@@ -166,7 +166,7 @@
data["clan_keys"] = clan_members
- var/datum/nanoui/ui = nanomanager.try_update_ui(mob, mob, "clan_status_ui", null, data)
+ var/datum/nanoui/ui = SSnano.nanomanager.try_update_ui(mob, mob, "clan_status_ui", null, data)
if(!ui)
ui = new(mob, mob, "clan_status_ui", "clan_menu.tmpl", "Clan Menu", 550, 500)
ui.set_initial_data(data)
@@ -295,8 +295,8 @@
pl.sync()
pl.clan_id = null
- pl.permissions = clan_ranks[CLAN_RANK_UNBLOODED].permissions
- pl.clan_rank = clan_ranks_ordered[CLAN_RANK_UNBLOODED]
+ pl.permissions = GLOB.clan_ranks[CLAN_RANK_UNBLOODED].permissions
+ pl.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_UNBLOODED]
pl.save()
@@ -377,16 +377,16 @@
if(input == "Remove from clan" && target.clan_id)
target.clan_id = null
- target.clan_rank = clan_ranks_ordered[CLAN_RANK_YOUNG]
+ target.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_YOUNG]
to_chat(src, SPAN_NOTICE("Removed [player_name] from their clan."))
log_and_message_admins("[key_name_admin(src)] has removed [player_name] from their current clan.")
else if(input == "Remove from Ancient")
- target.clan_rank = clan_ranks_ordered[CLAN_RANK_YOUNG]
- target.permissions = clan_ranks[CLAN_RANK_YOUNG].permissions
+ target.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_YOUNG]
+ target.permissions = GLOB.clan_ranks[CLAN_RANK_YOUNG].permissions
to_chat(src, SPAN_NOTICE("Removed [player_name] from ancient."))
log_and_message_admins("[key_name_admin(src)] has removed [player_name] from ancient.")
else if(input == "Make Ancient" && is_clan_manager)
- target.clan_rank = clan_ranks_ordered[CLAN_RANK_ADMIN]
+ target.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_ADMIN]
target.permissions = CLAN_PERMISSION_ADMIN_ANCIENT
to_chat(src, SPAN_NOTICE("Made [player_name] an ancient."))
log_and_message_admins("[key_name_admin(src)] has made [player_name] an ancient.")
@@ -397,15 +397,15 @@
target.clan_id = clans[input]
if(!(target.permissions & CLAN_PERMISSION_ADMIN_ANCIENT))
- target.permissions = clan_ranks[CLAN_RANK_BLOODED].permissions
- target.clan_rank = clan_ranks_ordered[CLAN_RANK_BLOODED]
+ target.permissions = GLOB.clan_ranks[CLAN_RANK_BLOODED].permissions
+ target.clan_rank = GLOB.clan_ranks_ordered[CLAN_RANK_BLOODED]
if(CLAN_ACTION_PLAYER_MODIFYRANK)
if(!target.clan_id)
to_chat(src, SPAN_WARNING("This player doesn't belong to a clan!"))
return
- var/list/datum/yautja_rank/ranks = clan_ranks.Copy()
+ var/list/datum/yautja_rank/ranks = GLOB.clan_ranks.Copy()
ranks -= CLAN_RANK_ADMIN // Admin rank should not and cannot be obtained from here
var/datum/yautja_rank/chosen_rank
@@ -430,7 +430,7 @@
chosen_rank = ranks[input]
if(chosen_rank.limit_type)
- var/list/datum/view_record/clan_playerbase_view/CPV = DB_VIEW(/datum/view_record/clan_playerbase_view/, DB_AND(DB_COMP("clan_id", DB_EQUALS, target.clan_id), DB_COMP("rank", DB_EQUALS, clan_ranks_ordered[input])))
+ var/list/datum/view_record/clan_playerbase_view/CPV = DB_VIEW(/datum/view_record/clan_playerbase_view/, DB_AND(DB_COMP("clan_id", DB_EQUALS, target.clan_id), DB_COMP("rank", DB_EQUALS, GLOB.clan_ranks_ordered[input])))
var/players_in_rank = CPV.len
switch(chosen_rank.limit_type)
@@ -453,7 +453,7 @@
if(!has_clan_permission(chosen_rank.permission_required)) // Double check
return
- target.clan_rank = clan_ranks_ordered[chosen_rank.name]
+ target.clan_rank = GLOB.clan_ranks_ordered[chosen_rank.name]
target.permissions = chosen_rank.permissions
log_and_message_admins("[key_name_admin(src)] has set the rank of [player_name] to [chosen_rank.name] for their clan.")
to_chat(src, SPAN_NOTICE("Set [player_name]'s rank to [chosen_rank.name]"))
diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm
index 7811a6c9cb5a..e1dbd1f026c1 100644
--- a/code/modules/client/client_procs.dm
+++ b/code/modules/client/client_procs.dm
@@ -318,20 +318,20 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
if(isnull(address) || (address in localhost_addresses))
var/datum/admins/admin = new("!localhost!", RL_HOST, ckey)
admin.associate(src)
- RoleAuthority.roles_whitelist[ckey] = WHITELIST_EVERYTHING
+ GLOB.RoleAuthority.roles_whitelist[ckey] = WHITELIST_EVERYTHING
//Admin Authorisation
- admin_holder = admin_datums[ckey]
+ admin_holder = GLOB.admin_datums[ckey]
if(admin_holder)
admin_holder.associate(src)
notify_login()
add_pref_verbs()
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
- prefs = preferences_datums[ckey]
+ prefs = GLOB.preferences_datums[ckey]
if(QDELETED(prefs) || !istype(prefs))
prefs = new /datum/preferences(src)
- preferences_datums[ckey] = prefs
+ GLOB.preferences_datums[ckey] = prefs
prefs.client_reconnected(src)
prefs.last_ip = address //these are gonna be used for banning
prefs.last_id = computer_id //these are gonna be used for banning
@@ -351,7 +351,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
player_details.byond_version = full_version
GLOB.player_details[ckey] = player_details
- view = world_view_size
+ view = GLOB.world_view_size
. = ..() //calls mob.Login()
if(SSinput.initialized)
@@ -405,10 +405,6 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
CEI = GLOB.custom_event_info_list[mob.faction]
CEI.show_player_event_info(src)
- if( (world.address == address || !address) && !host )
- host = key
- world.update_status()
-
connection_time = world.time
winset(src, null, "command=\".configure graphics-hwmode on\"")
@@ -442,7 +438,7 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
load_player_data()
- view = world_view_size
+ view = GLOB.world_view_size
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_CLIENT_LOGIN, src)
@@ -534,17 +530,17 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
/proc/setup_player_entity(ckey)
if(!ckey)
return
- if(player_entities["[ckey]"])
- return player_entities["[ckey]"]
+ if(GLOB.player_entities["[ckey]"])
+ return GLOB.player_entities["[ckey]"]
var/datum/entity/player_entity/P = new()
P.ckey = ckey
P.name = ckey
- player_entities["[ckey]"] = P
+ GLOB.player_entities["[ckey]"] = P
// P.setup_save(ckey)
return P
/proc/save_player_entities()
- for(var/key_ref in player_entities)
+ for(var/key_ref in GLOB.player_entities)
// var/datum/entity/player_entity/P = player_entities["[key_ref]"]
// P.save_statistics()
log_debug("STATISTICS: Statistics saving complete.")
diff --git a/code/modules/client/country_flags.dm b/code/modules/client/country_flags.dm
index 7d49bf836977..4955c446aea1 100644
--- a/code/modules/client/country_flags.dm
+++ b/code/modules/client/country_flags.dm
@@ -26,10 +26,10 @@
else //null response, ratelimited most likely. Try again in 60s
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(ip2country), ipaddr, origin), 60 SECONDS)
-var/list/countries = icon_states('icons/flags.dmi')
+GLOBAL_LIST_INIT(countries, icon_states('icons/flags.dmi'))
/proc/country2chaticon(country_code, targets)
- if(countries.Find(country_code))
+ if(GLOB.countries.Find(country_code))
return "[icon2html('icons/flags.dmi', targets, country_code)]"
else
return "[icon2html('icons/flags.dmi', targets, "unknown")]"
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 04b82628e3c6..6c52b497f9a3 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -7,7 +7,7 @@
#define MENU_SETTINGS "settings"
#define MENU_SPECIAL "special"
-var/list/preferences_datums = list()
+GLOBAL_LIST_EMPTY(preferences_datums)
GLOBAL_LIST_INIT(stylesheets, list(
"Modern" = "common.css",
@@ -21,7 +21,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
"whitefull"
))
-var/const/MAX_SAVE_SLOTS = 10
+#define MAX_SAVE_SLOTS 10
/datum/preferences
var/client/owner
@@ -306,13 +306,13 @@ var/const/MAX_SAVE_SLOTS = 10
dat += "
"
dat += "Human - "
dat += "Xenomorph - "
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_COMMANDER)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_COMMANDER)
dat += "Commanding Officer - "
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_SYNTHETIC)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_SYNTHETIC)
dat += "Synthetic - "
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_PREDATOR)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_PREDATOR)
dat += "Yautja - "
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_MENTOR)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_MENTOR)
dat += "Mentor - "
dat += "Settings - "
dat += "Special Roles"
@@ -382,7 +382,7 @@ var/const/MAX_SAVE_SLOTS = 10
dat += "Underwear:[underwear] "
dat += "Undershirt:[undershirt] "
- dat += "Backpack Type:[backbaglist[backbag]] "
+ dat += "Backpack Type:[GLOB.backbaglist[backbag]] "
dat += "Preferred Armor:[preferred_armor] "
@@ -398,7 +398,7 @@ var/const/MAX_SAVE_SLOTS = 10
if(length(gear))
dat += " "
for(var/i = 1; i <= gear.len; i++)
- var/datum/gear/G = gear_datums_by_name[gear[i]]
+ var/datum/gear/G = GLOB.gear_datums_by_name[gear[i]]
if(G)
total_cost += G.cost
dat += "[gear[i]] ([G.cost] points) Remove "
@@ -482,7 +482,7 @@ var/const/MAX_SAVE_SLOTS = 10
n++
if(MENU_CO)
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_COMMANDER)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_COMMANDER)
dat += "
"
dat += "
Commander Settings:
"
dat += "Commander Whitelist Status:[commander_status] "
@@ -492,7 +492,7 @@ var/const/MAX_SAVE_SLOTS = 10
else
dat += "You do not have the whitelist for this role."
if(MENU_SYNTHETIC)
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_SYNTHETIC)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_SYNTHETIC)
dat += "
"
dat += "
Synthetic Settings:
"
dat += "Synthetic Name:[synthetic_name] "
@@ -502,7 +502,7 @@ var/const/MAX_SAVE_SLOTS = 10
else
dat += "You do not have the whitelist for this role."
if(MENU_YAUTJA)
- if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_PREDATOR)
+ if(GLOB.RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_PREDATOR)
dat += "
"
dat += "
Yautja Information:
"
dat += "Yautja Name:[predator_name] "
@@ -516,7 +516,7 @@ var/const/MAX_SAVE_SLOTS = 10
dat += "
"
txt += "During experiment [pick("C","Q","V","W","X","Y","Z")][rand(100,999)][pick("a","b","c")] the theorized compound identified as [C.name], was successfully synthesized using the following formula: \n \n"
for(var/I in G.required_reagents)
- var/datum/reagent/R = chemical_reagents_list["[I]"]
+ var/datum/reagent/R = GLOB.chemical_reagents_list["[I]"]
var/U = G.required_reagents[I]
txt += " - [U] [R.name] \n"
if(G.required_catalysts && G.required_catalysts.len)
txt += " \nWhile using the following catalysts: \n \n"
for(var/I in G.required_catalysts)
- var/datum/reagent/R = chemical_reagents_list["[I]"]
+ var/datum/reagent/R = GLOB.chemical_reagents_list["[I]"]
var/U = G.required_catalysts[I]
txt += " - [U] [R.name] \n"
if(full_report)
@@ -770,16 +770,16 @@
/obj/item/paper/research_notes/unique/Initialize()
//Each one of these get a new unique chem
var/datum/reagent/generated/C = new /datum/reagent/generated
- C.id = "tau-[length(chemical_gen_classes_list["tau"])]"
+ C.id = "tau-[length(GLOB.chemical_gen_classes_list["tau"])]"
C.generate_name()
C.chemclass = CHEM_CLASS_RARE
if(gen_tier)
C.gen_tier = gen_tier
else
- C.gen_tier = chemical_data.clearance_level
+ C.gen_tier = GLOB.chemical_data.clearance_level
C.generate_stats()
- chemical_gen_classes_list["tau"] += C.id //Because each unique_vended should be unique, we do not save the chemclass anywhere but in the tau list
- chemical_reagents_list[C.id] = C
+ GLOB.chemical_gen_classes_list["tau"] += C.id //Because each unique_vended should be unique, we do not save the chemclass anywhere but in the tau list
+ GLOB.chemical_reagents_list[C.id] = C
C.generate_assoc_recipe()
data = C
msg_admin_niche("New reagent with id [C.id], name [C.name], level [C.gen_tier], generated and printed at [loc] [ADMIN_JMP(loc)].")
@@ -803,7 +803,7 @@
info += "ID:[S.name]
\n"
info += "Database Details: \n"
if(S.chemclass >= CHEM_CLASS_ULTRA)
- if(chemical_data.clearance_level >= S.gen_tier || info_only)
+ if(GLOB.chemical_data.clearance_level >= S.gen_tier || info_only)
info += "The following information relating to [S.name] is restricted with a level [S.gen_tier] clearance classification. "
info += "[S.description]\n"
info += " Overdoses at: [S.overdose] units\n"
@@ -813,7 +813,7 @@
else
info += "CLASSIFIED: Clearance level [S.gen_tier] required to read the database entry. \n"
icon_state = "paper_wy_partial_report"
- else if(S.chemclass == CHEM_CLASS_SPECIAL && !chemical_data.clearance_x_access && !info_only)
+ else if(S.chemclass == CHEM_CLASS_SPECIAL && !GLOB.chemical_data.clearance_x_access && !info_only)
info += "CLASSIFIED: Clearance level X required to read the database entry. \n"
icon_state = "paper_wy_partial_report"
else if(S.description)
@@ -825,14 +825,14 @@
else
info += "No details on this reagent could be found in the database. \n"
icon_state = "paper_wy_synthesis"
- if(S.chemclass >= CHEM_CLASS_SPECIAL && !chemical_data.chemical_identified_list[S.id] && !info_only)
+ if(S.chemclass >= CHEM_CLASS_SPECIAL && !GLOB.chemical_data.chemical_identified_list[S.id] && !info_only)
info += " Saved emission spectrum of [S.name] to the database. \n"
info += " Composition Details: \n"
- if(chemical_reactions_list[S.id])
- var/datum/chemical_reaction/C = chemical_reactions_list[S.id]
+ if(GLOB.chemical_reactions_list[S.id])
+ var/datum/chemical_reaction/C = GLOB.chemical_reactions_list[S.id]
for(var/I in C.required_reagents)
- var/datum/reagent/R = chemical_reagents_list["[I]"]
- if(R.chemclass >= CHEM_CLASS_SPECIAL && !chemical_data.chemical_identified_list[R.id] && !info_only)
+ var/datum/reagent/R = GLOB.chemical_reagents_list["[I]"]
+ if(R.chemclass >= CHEM_CLASS_SPECIAL && !GLOB.chemical_data.chemical_identified_list[R.id] && !info_only)
info += " - Unknown emission spectrum \n"
completed = FALSE
else
@@ -842,14 +842,14 @@
if(C.required_catalysts.len)
info += " Reaction would require the following catalysts: \n"
for(var/I in C.required_catalysts)
- var/datum/reagent/R = chemical_reagents_list["[I]"]
- if(R.chemclass >= CHEM_CLASS_SPECIAL && !chemical_data.chemical_identified_list[R.id] && !info_only)
+ var/datum/reagent/R = GLOB.chemical_reagents_list["[I]"]
+ if(R.chemclass >= CHEM_CLASS_SPECIAL && !GLOB.chemical_data.chemical_identified_list[R.id] && !info_only)
info += " - Unknown emission spectrum \n"
completed = FALSE
else
var/U = C.required_catalysts[I]
info += " - [U] [R.name] \n"
- else if(chemical_gen_classes_list["C1"].Find(S.id))
+ else if(GLOB.chemical_gen_classes_list["C1"].Find(S.id))
info += " - [S.name] \n"
else
info += "ERROR: Unable to analyze emission spectrum of sample." //A reaction to make this doesn't exist, so this is our IC excuse
@@ -860,7 +860,7 @@
else
if(!S.properties) //Safety for empty reagents
completed = FALSE
- if(S.chemclass == CHEM_CLASS_SPECIAL && chemical_data.clearance_x_access)
+ if(S.chemclass == CHEM_CLASS_SPECIAL && GLOB.chemical_data.clearance_x_access)
completed = TRUE
data = S
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index dbd490792e8f..cebb4ad613b0 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -213,7 +213,7 @@
// Check if we're looking at a mob that's lying down
if(istype(cur_atom, /mob/living))
var/mob/living/cur_mob = cur_atom
- if(!isxeno(cur_mob) && cur_mob.lying) //xenos don't use icon rotatin for lying.
+ if(!isxeno(cur_mob) && cur_mob.body_position == LYING_DOWN) //xenos don't use icon rotatin for lying.
cur_icon.BecomeLying()
// Calculate where we are relative to the center of the photo
@@ -288,7 +288,7 @@
/obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag)
var/mob_descriptions = ""
var/radius = (size-1)*0.5
- var/list/turf/turfs = RANGE_TURFS(radius, target) & view(world_view_size + radius, user.client)
+ var/list/turf/turfs = RANGE_TURFS(radius, target) & view(GLOB.world_view_size + radius, user.client)
for(var/turf/the_turf as anything in turfs)
mob_descriptions = get_mob_descriptions(the_turf, mob_descriptions)
var/datum/picture/the_picture = createpicture(target, user, turfs, mob_descriptions, flag)
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 731ad78caa5b..dd0327e3821d 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1000,7 +1000,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list(
SEND_SIGNAL(user, COMSIG_MOB_APC_POWER_PULSE, src)
addtimer(VARSET_CALLBACK(src, shorted, FALSE), 2 MINUTES)
-/obj/structure/machinery/power/apc/proc/can_use(mob/user as mob, loud = 0) //used by attack_hand() and Topic()
+/obj/structure/machinery/power/apc/proc/can_use(mob/living/user as mob, loud = 0) //used by attack_hand() and Topic()
if(user.client && user.client.remote_control)
return TRUE
@@ -1011,12 +1011,12 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list(
return 0
if(!(ishuman(user) || isRemoteControlling(user)))
to_chat(user, SPAN_WARNING("You don't have the dexterity to use [src]!"))
- nanomanager.close_user_uis(user, src)
+ SSnano.nanomanager.close_user_uis(user, src)
return 0
if(user.is_mob_restrained())
to_chat(user, SPAN_WARNING("You must have free hands to use [src]."))
return 0
- if(user.lying)
+ if(user.body_position == LYING_DOWN)
to_chat(user, SPAN_WARNING("You can't reach [src]!"))
return 0
autoflag = 5
@@ -1024,11 +1024,11 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list(
if(aidisabled)
if(!loud)
to_chat(user, SPAN_WARNING("[src] has AI control disabled!"))
- nanomanager.close_user_uis(user, src)
+ SSnano.nanomanager.close_user_uis(user, src)
return 0
else
if((!in_range(src, user) || !istype(src.loc, /turf)))
- nanomanager.close_user_uis(user, src)
+ SSnano.nanomanager.close_user_uis(user, src)
return 0
var/mob/living/carbon/human/H = user
diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm
index bee3e0aac8c2..00e6b92eab8f 100644
--- a/code/modules/power/power.dm
+++ b/code/modules/power/power.dm
@@ -81,13 +81,13 @@
if(has_power || !src.needs_power)
if(machine_processing)
if(stat & NOPOWER)
- addToListNoDupe(processing_machines, src) // power interupted us, start processing again
+ addToListNoDupe(GLOB.processing_machines, src) // power interupted us, start processing again
stat &= ~NOPOWER
src.update_use_power(USE_POWER_IDLE)
else
if(machine_processing)
- processing_machines -= src // no power, can't process.
+ GLOB.processing_machines -= src // no power, can't process.
stat |= NOPOWER
src.update_use_power(USE_POWER_NONE)
@@ -97,19 +97,19 @@
// rebuild all power networks from scratch
/proc/makepowernets()
- for(var/datum/powernet/PN in powernets)
+ for(var/datum/powernet/PN in GLOB.powernets)
del(PN) //not qdel on purpose, powernet is still using del.
- powernets.Cut()
+ GLOB.powernets.Cut()
- for(var/area/A in all_areas)
- if(powernets_by_name[A.powernet_name])
+ for(var/area/A in GLOB.all_areas)
+ if(GLOB.powernets_by_name[A.powernet_name])
continue
var/datum/powernet/PN = new()
PN.powernet_name = A.powernet_name
- powernets += PN
- powernets_by_name[A.powernet_name] = PN
+ GLOB.powernets += PN
+ GLOB.powernets_by_name[A.powernet_name] = PN
- for(var/obj/structure/machinery/power/M in machines)
+ for(var/obj/structure/machinery/power/M in GLOB.machines)
M.connect_to_network()
return 1
@@ -222,7 +222,7 @@
var/cdir
- for(var/card in cardinal)
+ for(var/card in GLOB.cardinals)
var/turf/T = get_step(loc,card)
cdir = get_dir(T,loc)
@@ -250,7 +250,7 @@
var/area/A = get_area(src)
if(!A)
return 0
- var/datum/powernet/PN = powernets_by_name[A.powernet_name]
+ var/datum/powernet/PN = GLOB.powernets_by_name[A.powernet_name]
if(!PN)
return 0
powernet = PN
diff --git a/code/modules/power/profiling.dm b/code/modules/power/profiling.dm
index 21c8e2a63538..b4b67b8c8543 100644
--- a/code/modules/power/profiling.dm
+++ b/code/modules/power/profiling.dm
@@ -1,29 +1,27 @@
-datum
+GLOBAL_VAR_INIT(enable_power_update_profiling, FALSE)
-var/global/enable_power_update_profiling = 0
-
-var/global/power_profiled_time = 0
-var/global/power_last_profile_time = 0
-var/global/list/power_update_requests_by_machine = list()
-var/global/list/power_update_requests_by_area = list()
+GLOBAL_VAR_INIT(power_profiled_time, 0)
+GLOBAL_VAR_INIT(power_last_profile_time, 0)
+GLOBAL_LIST_EMPTY(power_update_requests_by_machine)
+GLOBAL_LIST_EMPTY(power_update_requests_by_area)
/proc/log_power_update_request(area/A, obj/structure/machinery/M)
- if (!enable_power_update_profiling)
+ if (!GLOB.enable_power_update_profiling)
return
var/machine_type = "[M.type]"
- if (machine_type in power_update_requests_by_machine)
- power_update_requests_by_machine[machine_type]++
+ if (machine_type in GLOB.power_update_requests_by_machine)
+ GLOB.power_update_requests_by_machine[machine_type]++
else
- power_update_requests_by_machine[machine_type] = 1
+ GLOB.power_update_requests_by_machine[machine_type] = 1
- if (A.name in power_update_requests_by_area)
- power_update_requests_by_area[A.name]++
+ if (A.name in GLOB.power_update_requests_by_area)
+ GLOB.power_update_requests_by_area[A.name]++
else
- power_update_requests_by_area[A.name] = 1
+ GLOB.power_update_requests_by_area[A.name] = 1
- power_profiled_time += (world.time - power_last_profile_time)
- power_last_profile_time = world.time
+ GLOB.power_profiled_time += (world.time - GLOB.power_last_profile_time)
+ GLOB.power_last_profile_time = world.time
/client/proc/toggle_power_update_profiling()
set name = "Toggle Area Power Update Profiling"
@@ -31,14 +29,14 @@ var/global/list/power_update_requests_by_area = list()
set category = "Debug.Profiling"
if(!check_rights(R_DEBUG)) return
if(!ishost(usr) || alert("Are you sure you want to do this?",, "Yes", "No") != "Yes") return
- if(enable_power_update_profiling)
- enable_power_update_profiling = 0
+ if(GLOB.enable_power_update_profiling)
+ GLOB.enable_power_update_profiling = 0
to_chat(usr, "Area power update profiling disabled.")
message_admins("[key_name(src)] toggled area power update profiling off.")
else
- enable_power_update_profiling = 1
- power_last_profile_time = world.time
+ GLOB.enable_power_update_profiling = 1
+ GLOB.power_last_profile_time = world.time
to_chat(usr, "Area power update profiling enabled.")
message_admins("[key_name(src)] toggled area power update profiling on.")
@@ -52,9 +50,9 @@ var/global/list/power_update_requests_by_area = list()
if(!check_rights(R_DEBUG)) return
- to_chat(usr, "Total profiling time: [power_profiled_time] ticks")
- for (var/M in power_update_requests_by_machine)
- to_chat(usr, "[M] = [power_update_requests_by_machine[M]]")
+ to_chat(usr, "Total profiling time: [GLOB.power_profiled_time] ticks")
+ for (var/M in GLOB.power_update_requests_by_machine)
+ to_chat(usr, "[M] = [GLOB.power_update_requests_by_machine[M]]")
/client/proc/view_power_update_stats_area()
set name = "View Area Power Update Statistics By Area"
@@ -63,7 +61,7 @@ var/global/list/power_update_requests_by_area = list()
if(!check_rights(R_DEBUG)) return
- to_chat(usr, "Total profiling time: [power_profiled_time] ticks")
- to_chat(usr, "Total profiling time: [power_profiled_time] ticks")
- for (var/A in power_update_requests_by_area)
- to_chat(usr, "[A] = [power_update_requests_by_area[A]]")
+ to_chat(usr, "Total profiling time: [GLOB.power_profiled_time] ticks")
+ to_chat(usr, "Total profiling time: [GLOB.power_profiled_time] ticks")
+ for (var/A in GLOB.power_update_requests_by_area)
+ to_chat(usr, "[A] = [GLOB.power_update_requests_by_area[A]]")
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 0e469a7fe577..7cf72ce1cb81 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -46,7 +46,7 @@
connect_to_network()
dir_loop:
- for(var/d in cardinal)
+ for(var/d in GLOB.cardinals)
var/turf/T = get_step(src, d)
for(var/obj/structure/machinery/power/terminal/term in T)
if(term && term.dir == turn(d, 180))
diff --git a/code/modules/projectiles/ammo_boxes/grenade_packets.dm b/code/modules/projectiles/ammo_boxes/grenade_packets.dm
index 83c222a0a128..5546fe3bc520 100644
--- a/code/modules/projectiles/ammo_boxes/grenade_packets.dm
+++ b/code/modules/projectiles/ammo_boxes/grenade_packets.dm
@@ -25,7 +25,7 @@
for(var/i in 1 to storage_slots)
new content_type(src)
-var/list/grenade_packets = list(
+GLOBAL_LIST_INIT(grenade_packets, list(
/obj/item/storage/box/packet/high_explosive,
/obj/item/storage/box/packet/baton_slug,
/obj/item/storage/box/packet/flare,
@@ -37,7 +37,7 @@ var/list/grenade_packets = list(
/obj/item/storage/box/packet/m15,
/obj/item/storage/box/packet/airburst_he,
/obj/item/storage/box/packet/airburst_incen
- )
+ ))
/obj/item/storage/box/packet/high_explosive
name = "\improper HEDP grenade packet"
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 4767f443506b..8d7ab1532ade 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -1400,7 +1400,7 @@ and you're good to go.
var/damage_buff = BASE_BULLET_DAMAGE_MULT
//if target is lying or unconscious - add damage bonus
- if(attacked_mob.lying == TRUE || attacked_mob.stat == UNCONSCIOUS)
+ if(!(attacked_mob.mobility_flags & MOBILITY_STAND) || attacked_mob.stat == UNCONSCIOUS)
damage_buff += BULLET_DAMAGE_MULT_TIER_4
projectile_to_fire.damage *= damage_buff //Multiply the damage for point blank.
if(bullets_fired == 1) //First shot gives the PB message.
@@ -1424,7 +1424,7 @@ and you're good to go.
projectile_to_fire.give_bullet_traits(BP)
if(bullets_fired > 1)
BP.original = attacked_mob //original == the original target of the projectile. If the target is downed and this isn't set, the projectile will try to fly over it. Of course, it isn't going anywhere, but it's the principle of the thing. Very embarrassing.
- if(!BP.handle_mob(attacked_mob) && attacked_mob.lying) //This is the 'handle impact' proc for a flying projectile, including hit RNG, on_hit_mob and bullet_act. If it misses, it doesn't go anywhere. We'll pretend it slams into the ground or punches a hole in the ceiling, because trying to make it bypass the xeno or shoot from the tile beyond it is probably more spaghet than my life is worth.
+ if(!BP.handle_mob(attacked_mob) && attacked_mob.body_position == LYING_DOWN) //This is the 'handle impact' proc for a flying projectile, including hit RNG, on_hit_mob and bullet_act. If it misses, it doesn't go anywhere. We'll pretend it slams into the ground or punches a hole in the ceiling, because trying to make it bypass the xeno or shoot from the tile beyond it is probably more spaghet than my life is worth.
if(BP.ammo.sound_bounce)
playsound(attacked_mob.loc, BP.ammo.sound_bounce, 35, 1)
attacked_mob.visible_message(SPAN_AVOIDHARM("[BP] slams into [get_turf(attacked_mob)]!"), //Managing to miss an immobile target flat on the ground deserves some recognition, don't you think?
@@ -1437,7 +1437,7 @@ and you're good to go.
if(bullets_fired > 1)
projectile_to_fire.original = attacked_mob
- if(!projectile_to_fire.handle_mob(attacked_mob) && attacked_mob.lying)
+ if(!projectile_to_fire.handle_mob(attacked_mob) && attacked_mob.body_position == LYING_DOWN)
if(projectile_to_fire.ammo.sound_bounce)
playsound(attacked_mob.loc, projectile_to_fire.ammo.sound_bounce, 35, 1)
attacked_mob.visible_message(SPAN_AVOIDHARM("[projectile_to_fire] slams into [get_turf(attacked_mob)]!"),
diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm
index 20781639a579..9f0ddd04fc11 100644
--- a/code/modules/projectiles/gun_attachables.dm
+++ b/code/modules/projectiles/gun_attachables.dm
@@ -495,6 +495,20 @@ Defined in conflicts.dm of the #defines folder.
accuracy_mod = HIT_ACCURACY_MULT_TIER_3
scatter_mod = -SCATTER_AMOUNT_TIER_8
+/obj/item/attachable/pmc_sniperbarrel
+ name = "sniper barrel"
+ icon = 'icons/obj/items/weapons/guns/attachments/barrel.dmi'
+ icon_state = "pmc_sniperbarrel"
+ desc = "A heavy barrel. CANNOT BE REMOVED."
+ slot = "muzzle"
+ flags_attach_features = NO_FLAGS
+ hud_offset_mod = -3
+
+/obj/item/attachable/pmc_sniperbarrel/New()
+ ..()
+ accuracy_mod = HIT_ACCURACY_MULT_TIER_3
+ scatter_mod = -SCATTER_AMOUNT_TIER_8
+
/obj/item/attachable/sniperbarrel/vulture
name = "\improper M707 barrel"
icon_state = "vulture_barrel"
@@ -1283,7 +1297,7 @@ Defined in conflicts.dm of the #defines folder.
switch(action)
if("adjust_dir")
var/direction = params["offset_dir"]
- if(!(direction in alldirs) || !scoping || !scope_user)
+ if(!(direction in GLOB.alldirs) || !scoping || !scope_user)
return
var/mob/scoper = scope_user.resolve()
@@ -1300,7 +1314,7 @@ Defined in conflicts.dm of the #defines folder.
if("adjust_position")
var/direction = params["position_dir"]
- if(!(direction in alldirs) || !scoping || !scope_user)
+ if(!(direction in GLOB.alldirs) || !scoping || !scope_user)
return
var/mob/scoper = scope_user.resolve()
@@ -1367,7 +1381,7 @@ Defined in conflicts.dm of the #defines folder.
return TRUE
/obj/item/attachable/vulture_scope/proc/get_offset_dirs()
- var/list/possible_dirs = alldirs.Copy()
+ var/list/possible_dirs = GLOB.alldirs.Copy()
if(scope_offset_x >= scope_drift_max)
possible_dirs -= list(NORTHEAST, EAST, SOUTHEAST)
else if(scope_offset_x <= -scope_drift_max)
@@ -1384,7 +1398,7 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/vulture_scope/proc/get_adjust_dirs()
if(!scoping)
return list()
- var/list/possible_dirs = alldirs.Copy()
+ var/list/possible_dirs = GLOB.alldirs.Copy()
var/turf/current_turf = get_turf(src)
var/turf/scope_tile = locate(scope_x, scope_y, current_turf.z)
var/mob/scoper = scope_user.resolve()
@@ -2671,7 +2685,7 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/attached_gun/grenade/unique_action(mob/user)
if(!ishuman(usr))
return
- if(!user.canmove || user.stat || user.is_mob_restrained() || !user.loc || !isturf(usr.loc))
+ if(user.is_mob_incapacitated() || !isturf(usr.loc))
to_chat(user, SPAN_WARNING("Not right now."))
return
diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm
index ba5f8e491590..8e73124a8b92 100644
--- a/code/modules/projectiles/gun_helpers.dm
+++ b/code/modules/projectiles/gun_helpers.dm
@@ -462,7 +462,7 @@ DEFINES in setup.dm, referenced here.
/obj/item/weapon/gun/proc/get_active_firearm(mob/user, restrictive = TRUE)
if(!ishuman(usr))
return
- if(!user.canmove || user.stat || user.is_mob_restrained() || !user.loc || !isturf(usr.loc))
+ if(user.is_mob_incapacitated() || !isturf(usr.loc))
to_chat(user, SPAN_WARNING("Not right now."))
return
diff --git a/code/modules/projectiles/guns/boltaction.dm b/code/modules/projectiles/guns/boltaction.dm
index c18e45e38d3e..d21cb5b87254 100644
--- a/code/modules/projectiles/guns/boltaction.dm
+++ b/code/modules/projectiles/guns/boltaction.dm
@@ -214,7 +214,7 @@
return .
for(var/mob/current_mob as anything in get_mobs_in_z_level_range(get_turf(user), fire_message_range) - user)
- var/relative_dir = get_dir(current_mob, user)
+ var/relative_dir = Get_Compass_Dir(current_mob, user)
var/final_dir = dir2text(relative_dir)
to_chat(current_mob, SPAN_HIGHDANGER("You hear a massive boom coming from [final_dir ? "the [final_dir]" : "nearby"]!"))
if(current_mob.client)
diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm
index 0089df506d2d..0e56efe7ab5d 100644
--- a/code/modules/projectiles/guns/flamer/flamer.dm
+++ b/code/modules/projectiles/guns/flamer/flamer.dm
@@ -732,7 +732,7 @@ GLOBAL_LIST_EMPTY(flamer_particles)
if(target.density)
return
- for(var/spread_direction in alldirs)
+ for(var/spread_direction in GLOB.alldirs)
var/spread_power = remaining_distance
@@ -778,7 +778,7 @@ GLOBAL_LIST_EMPTY(flamer_particles)
fire_reag.burncolor = f_color
new/obj/flamer_fire(target, cause_data, fire_reag)
- for(var/direction in alldirs)
+ for(var/direction in GLOB.alldirs)
var/spread_power = range
switch(direction)
if(NORTH,SOUTH,EAST,WEST)
diff --git a/code/modules/projectiles/guns/flamer/flameshape.dm b/code/modules/projectiles/guns/flamer/flameshape.dm
index f5a0699067e4..ae6c2dec0a67 100644
--- a/code/modules/projectiles/guns/flamer/flameshape.dm
+++ b/code/modules/projectiles/guns/flamer/flameshape.dm
@@ -28,7 +28,7 @@
/datum/flameshape/default/handle_fire_spread(obj/flamer_fire/F, fire_spread_amount, burn_dam, fuel_pressure = 1)
var/turf/T
var/turf/source_turf = get_turf(F.loc)
- for(var/dirn in cardinal)
+ for(var/dirn in GLOB.cardinals)
T = get_step(source_turf, dirn)
if(istype(T, /turf/open/space))
continue
@@ -64,7 +64,7 @@
id = FLAMESHAPE_STAR
/datum/flameshape/star/proc/dirs_to_use()
- return alldirs
+ return GLOB.alldirs
/datum/flameshape/star/handle_fire_spread(obj/flamer_fire/F, fire_spread_amount, burn_dam, fuel_pressure = 1)
fire_spread_amount = Floor(fire_spread_amount * 1.5) // branch 'length'
@@ -102,9 +102,9 @@
/datum/flameshape/star/minor/dirs_to_use()
if(prob(50))
- return cardinal
+ return GLOB.cardinals
else
- return diagonals
+ return GLOB.diagonals
/datum/flameshape/line
name = "Line"
diff --git a/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm b/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm
index 6d998002134c..356d0e6c3b48 100644
--- a/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm
+++ b/code/modules/projectiles/guns/specialist/launcher/rocket_launcher.dm
@@ -190,7 +190,7 @@
smoke.start()
playsound(src, 'sound/weapons/gun_rocketlauncher.ogg', 100, TRUE, 10)
for(var/mob/living/carbon/C in backblast_loc)
- if(!C.lying && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff
+ if(C.body_position == STANDING_UP && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff
C.apply_damage(15, BRUTE) //The shockwave hurts, quite a bit. It can knock unarmored targets unconscious in real life
C.apply_effect(4, STUN) //For good measure
C.apply_effect(6, STUTTER)
@@ -362,7 +362,7 @@
smoke.start()
playsound(src, 'sound/weapons/gun_rocketlauncher.ogg', 100, TRUE, 10)
for(var/mob/living/carbon/C in backblast_loc)
- if(!C.lying && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff
+ if(C.body_position == STANDING_UP && !HAS_TRAIT(C, TRAIT_EAR_PROTECTION)) //Have to be standing up to get the fun stuff
C.apply_damage(15, BRUTE) //The shockwave hurts, quite a bit. It can knock unarmored targets unconscious in real life
C.apply_effect(4, STUN) //For good measure
C.apply_effect(6, STUTTER)
diff --git a/code/modules/projectiles/guns/specialist/sniper.dm b/code/modules/projectiles/guns/specialist/sniper.dm
index 1e72a425387b..0cd9d8dd16c8 100644
--- a/code/modules/projectiles/guns/specialist/sniper.dm
+++ b/code/modules/projectiles/guns/specialist/sniper.dm
@@ -75,7 +75,7 @@
/datum/action/item_action/specialist/aimed_shot/can_use_action()
var/mob/living/carbon/human/H = owner
- if(istype(H) && !H.is_mob_incapacitated() && !H.lying && (holder_item == H.r_hand || holder_item || H.l_hand))
+ if(istype(H) && !H.is_mob_incapacitated() && (holder_item == H.r_hand || holder_item || H.l_hand))
return TRUE
/datum/action/item_action/specialist/aimed_shot/proc/use_ability(atom/A)
@@ -337,12 +337,12 @@
damage_mult = BASE_BULLET_DAMAGE_MULT
recoil = RECOIL_AMOUNT_TIER_5
-/obj/item/weapon/gun/rifle/sniper/xm43e1
+/obj/item/weapon/gun/rifle/sniper/XM43E1
name = "\improper XM43E1 experimental anti-materiel rifle"
desc = "An experimental anti-materiel rifle produced by Armat Systems, recently reacquired from the deep storage of an abandoned prototyping facility. This one in particular is currently undergoing field testing. Chambered in 10x99mm Caseless."
icon = 'icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi'
- icon_state = "xm42b"
- item_state = "xm42b"
+ icon_state = "xm43e1"
+ item_state = "xm43e1"
unacidable = TRUE
indestructible = 1
@@ -353,12 +353,12 @@
zoomdevicename = "scope"
attachable_allowed = list(/obj/item/attachable/bipod)
flags_gun_features = GUN_AUTO_EJECTOR|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER
- starting_attachment_types = list(/obj/item/attachable/sniperbarrel)
+ starting_attachment_types = list(/obj/item/attachable/pmc_sniperbarrel)
sniper_beam_type = /obj/effect/ebeam/laser/intense
sniper_beam_icon = "laser_beam_intense"
sniper_lockon_icon = "sniper_lockon_intense"
-/obj/item/weapon/gun/rifle/sniper/XM42B/handle_starting_attachment()
+/obj/item/weapon/gun/rifle/sniper/XM43E1/handle_starting_attachment()
..()
var/obj/item/attachable/scope/variable_zoom/S = new(src)
S.icon_state = "pmcscope"
@@ -368,11 +368,11 @@
update_attachable(S.slot)
-/obj/item/weapon/gun/rifle/sniper/XM42B/set_gun_attachment_offsets()
+/obj/item/weapon/gun/rifle/sniper/XM43E1/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 18,"rail_x" = 15, "rail_y" = 19, "under_x" = 20, "under_y" = 15, "stock_x" = 20, "stock_y" = 15)
-/obj/item/weapon/gun/rifle/sniper/XM42B/set_gun_config_values()
+/obj/item/weapon/gun/rifle/sniper/XM43E1/set_gun_config_values()
..()
set_fire_delay(FIRE_DELAY_TIER_6 * 6 )//Big boy damage, but it takes a lot of time to fire a shot.
//Kaga: Adjusted from 56 (Tier 4, 7*8) -> 30 (Tier 6, 5*6) ticks. 95 really wasn't big-boy damage anymore, although I updated it to 125 to remain consistent with the other 10x99mm caliber weapon (M42C). Now takes only twice as long as the M42A.
@@ -382,7 +382,7 @@
damage_mult = BASE_BULLET_DAMAGE_MULT
recoil = RECOIL_AMOUNT_TIER_1
-/obj/item/weapon/gun/rifle/sniper/XM42B/set_bullet_traits()
+/obj/item/weapon/gun/rifle/sniper/XM43E1/set_bullet_traits()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff),
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_penetrating),
@@ -415,7 +415,7 @@
force = 17
zoomdevicename = "scope"
flags_gun_features = GUN_AUTO_EJECTOR|GUN_WY_RESTRICTED|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER
- starting_attachment_types = list(/obj/item/attachable/sniperbarrel)
+ starting_attachment_types = list(/obj/item/attachable/pmc_sniperbarrel)
sniper_beam_type = /obj/effect/ebeam/laser/intense
sniper_beam_icon = "laser_beam_intense"
sniper_lockon_icon = "sniper_lockon_intense"
@@ -450,7 +450,7 @@
. = ..()
if(.)
var/mob/living/carbon/human/PMC_sniper = user
- if(PMC_sniper.lying == 0 && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/smartgunner/veteran/pmc) && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/veteran))
+ if(PMC_sniper.body_position == STANDING_UP && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/smartgunner/veteran/pmc) && !istype(PMC_sniper.wear_suit,/obj/item/clothing/suit/storage/marine/veteran))
PMC_sniper.visible_message(SPAN_WARNING("[PMC_sniper] is blown backwards from the recoil of the [src.name]!"),SPAN_HIGHDANGER("You are knocked prone by the blowback!"))
step(PMC_sniper,turn(PMC_sniper.dir,180))
PMC_sniper.apply_effect(5, WEAKEN)
diff --git a/code/modules/projectiles/magazines/shotguns.dm b/code/modules/projectiles/magazines/shotguns.dm
index 24e482549dac..9f137b1c2316 100644
--- a/code/modules/projectiles/magazines/shotguns.dm
+++ b/code/modules/projectiles/magazines/shotguns.dm
@@ -8,11 +8,11 @@ you're looking back on the different shotgun projectiles available. In short of
one type of shotgun ammo, but I think it helps in referencing it. ~N
*/
-var/list/shotgun_boxes_12g = list(
+GLOBAL_LIST_INIT(shotgun_boxes_12g, list(
/obj/item/ammo_magazine/shotgun/buckshot,
/obj/item/ammo_magazine/shotgun/flechette,
/obj/item/ammo_magazine/shotgun/slugs
- )
+ ))
/obj/item/ammo_magazine/shotgun
name = "box of shotgun slugs"
@@ -151,21 +151,21 @@ also doesn't really matter. You can only reload them with handfuls.
Handfuls of shotgun rounds. For spawning directly on mobs in roundstart, ERTs, etc
*/
-var/list/shotgun_handfuls_8g = list(
+GLOBAL_LIST_INIT(shotgun_handfuls_8g, list(
/obj/item/ammo_magazine/handful/shotgun/heavy/slug,
/obj/item/ammo_magazine/handful/shotgun/heavy/buckshot,
/obj/item/ammo_magazine/handful/shotgun/heavy/flechette,
/obj/item/ammo_magazine/handful/shotgun/heavy/dragonsbreath
- )
+ ))
-var/list/shotgun_handfuls_12g = list(
+GLOBAL_LIST_INIT(shotgun_handfuls_12g, list(
/obj/item/ammo_magazine/handful/shotgun/slug,
/obj/item/ammo_magazine/handful/shotgun/buckshot,
/obj/item/ammo_magazine/handful/shotgun/flechette,
/obj/item/ammo_magazine/handful/shotgun/incendiary,
/obj/item/ammo_magazine/handful/shotgun/buckshot/incendiary,
/obj/item/ammo_magazine/handful/shotgun/beanbag
- )
+ ))
/obj/item/ammo_magazine/handful/shotgun
name = "handful of shotgun slugs (12g)"
diff --git a/code/modules/projectiles/magazines/specialist.dm b/code/modules/projectiles/magazines/specialist.dm
index 821273247f66..761e77305254 100644
--- a/code/modules/projectiles/magazines/specialist.dm
+++ b/code/modules/projectiles/magazines/specialist.dm
@@ -27,14 +27,14 @@
default_ammo = /datum/ammo/bullet/sniper/flak
ammo_band_color = AMMO_BAND_COLOR_IMPACT
-//M42B Magazine
+//XM43E1 Magazine
/obj/item/ammo_magazine/sniper/anti_materiel
- name = "\improper XM42B marksman magazine (10x99mm)"
+ name = "\improper XM43E1 marksman magazine (10x99mm)"
desc = "A magazine of caseless 10x99mm anti-materiel rounds."
max_rounds = 8
caliber = "10x99mm"
default_ammo = /datum/ammo/bullet/sniper/anti_materiel
- gun_type = /obj/item/weapon/gun/rifle/sniper/XM42B
+ gun_type = /obj/item/weapon/gun/rifle/sniper/XM43E1
//M42C magazine
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index adb97e3a1c43..7de8f12fc546 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -193,10 +193,10 @@
setDir(get_dir(loc, target_turf))
var/ammo_flags = ammo.flags_ammo_behavior | projectile_override_flags
- if(round_statistics && ammo_flags & AMMO_BALLISTIC)
- round_statistics.total_projectiles_fired++
+ if(GLOB.round_statistics && ammo_flags & AMMO_BALLISTIC)
+ GLOB.round_statistics.total_projectiles_fired++
if(ammo.bonus_projectiles_amount)
- round_statistics.total_projectiles_fired += ammo.bonus_projectiles_amount
+ GLOB.round_statistics.total_projectiles_fired += ammo.bonus_projectiles_amount
if(firer && ismob(firer) && weapon_cause_data)
var/mob/M = firer
M.track_shot(weapon_cause_data.cause_name)
@@ -466,7 +466,7 @@
def_zone = rand_zone()
// Other targets do the same roll with penalty - a near hit will hit but redirected to another limb
- else if(!isxeno(L) && hit_roll > hit_chance - 20 - base_miss_chance[def_zone])
+ else if(!isxeno(L) && hit_roll > hit_chance - 20 - GLOB.base_miss_chance[def_zone])
def_zone = rand_zone()
else
@@ -478,7 +478,7 @@
// simply to avoid them from resetting target to chest every time they want to shoot a xeno
if(!direct_hit || !isxeno(L)) // For normal people or direct hits we apply the limb accuracy penalty
- hit_chance -= base_miss_chance[def_zone]
+ hit_chance -= GLOB.base_miss_chance[def_zone]
// else for direct hits on xenos, we skip it, pretending it's a chest shot with zero penalty
#if DEBUG_HIT_CHANCE
@@ -517,7 +517,7 @@
X.behavior_delegate.on_hitby_projectile(ammo)
. = TRUE
- else if(!L.lying)
+ else if(L.body_position != LYING_DOWN)
animatation_displace_reset(L)
if(ammo.sound_miss) playsound_client(L.client, ammo.sound_miss, get_turf(L), 75, TRUE)
L.visible_message(SPAN_AVOIDHARM("[src] misses [L]!"),
@@ -766,8 +766,8 @@
//mobs use get_projectile_hit_chance instead of get_projectile_hit_boolean
/mob/living/proc/get_projectile_hit_chance(obj/projectile/P)
- if(lying && src != P.original)
- return FALSE
+ if((body_position == LYING_DOWN || HAS_TRAIT(src, TRAIT_NESTED)) && src != P.original)
+ return FALSE // Snowflake check for xeno nests, because we want bullets to fly through even though they're standing in it
var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags
if(ammo_flags & AMMO_XENO)
if((status_flags & XENO_HOST) && HAS_TRAIT(src, TRAIT_NESTED))
@@ -775,7 +775,7 @@
. = P.get_effective_accuracy()
- if(lying && stat)
+ if(body_position == LYING_DOWN && stat)
. += 15 //Bonus hit against unconscious people.
if(isliving(P.firer))
@@ -1185,7 +1185,7 @@
var/area/A = get_area(src)
if(ishuman(firingMob) && ishuman(src) && faction == firingMob.faction && !A?.statistic_exempt) //One human shot another, be worried about it but do everything basically the same //special_role should be null or an empty string if done correctly
if(!istype(P.ammo, /datum/ammo/energy/taser))
- round_statistics.total_friendly_fire_instances++
+ GLOB.round_statistics.total_friendly_fire_instances++
var/ff_msg = "[key_name(firingMob)] shot [key_name(src)] with \a [P.name] in [get_area(firingMob)] [ADMIN_JMP(firingMob)] [ADMIN_PM(firingMob)]"
var/ff_living = TRUE
if(src.stat == DEAD)
diff --git a/code/modules/reagents/Chemistry-Generator.dm b/code/modules/reagents/Chemistry-Generator.dm
index bb8f69b714b2..b2e6402d4b06 100644
--- a/code/modules/reagents/Chemistry-Generator.dm
+++ b/code/modules/reagents/Chemistry-Generator.dm
@@ -75,56 +75,56 @@
if(my_chemid) //Do we want a specific chem?
chem_id = my_chemid
else if(class) //do we want a specific class?
- chem_id = pick(chemical_gen_classes_list["C[class]"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C[class]"])
else
var/roll = rand(0,100)
switch(tier)
if(0)
- chem_id = pick(chemical_gen_classes_list["C"])//If tier is 0, we can add any classed chemical
+ chem_id = pick(GLOB.chemical_gen_classes_list["C"])//If tier is 0, we can add any classed chemical
if(1)
if(roll<=35)
- chem_id = pick(chemical_gen_classes_list["C1"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C1"])
else if(roll<=65)
- chem_id = pick(chemical_gen_classes_list["C2"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C2"])
else if(roll<=85)
- chem_id = pick(chemical_gen_classes_list["C3"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C3"])
else
- chem_id = pick(chemical_gen_classes_list["C4"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C4"])
if(2)
if(roll<=30)
- chem_id = pick(chemical_gen_classes_list["C1"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C1"])
else if(roll<=55)
- chem_id = pick(chemical_gen_classes_list["C2"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C2"])
else if(roll<=70)
- chem_id = pick(chemical_gen_classes_list["C3"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C3"])
else
- chem_id = pick(chemical_gen_classes_list["C4"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C4"])
if(3)
if(roll<=10)
- chem_id = pick(chemical_gen_classes_list["C1"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C1"])
else if(roll<=30)
- chem_id = pick(chemical_gen_classes_list["C2"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C2"])
else if(roll<=50)
- chem_id = pick(chemical_gen_classes_list["C3"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C3"])
else if(roll<=70)
- chem_id = pick(chemical_gen_classes_list["C4"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C4"])
else
- chem_id = pick(chemical_gen_classes_list["C5"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C5"])
else
if(!required_reagents || is_catalyst)//first component is more likely to be special in chems tier 4 or higher, catalysts are always special in tier 4 or higher
if (prob(50))
- chem_id = pick(chemical_gen_classes_list["C5"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C5"])
else
- chem_id = pick(chemical_gen_classes_list["C4"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C4"])
else if(roll<=15)
- chem_id = pick(chemical_gen_classes_list["C2"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C2"])
else if(roll<=40)
- chem_id = pick(chemical_gen_classes_list["C3"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C3"])
else if(roll<=65)
- chem_id = pick(chemical_gen_classes_list["C4"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C4"])
else
- chem_id = pick(chemical_gen_classes_list["C5"])
+ chem_id = pick(GLOB.chemical_gen_classes_list["C5"])
//if we are already using this reagent, try again
if(required_reagents && required_reagents.Find(chem_id))
@@ -169,7 +169,7 @@
while(!gen_name)
gen_name = addtext(pick(prefix),pick(wordroot),pick(suffix))
//Make sure this name is not already used
- for(var/datum/reagent/R in chemical_reagents_list)
+ for(var/datum/reagent/R in GLOB.chemical_reagents_list)
if(R.name == gen_name)//if we are already using this name, try again
gen_name = ""
//set name
@@ -249,58 +249,58 @@
var/property
var/roll = rand(1,100)
if(make_rare)
- property = pick(chemical_properties_list["rare"])
+ property = pick(GLOB.chemical_properties_list["rare"])
//Pick the property by value and roll
else if(value_offset > 0) //Balance the value of our chemical
- property = pick(chemical_properties_list["positive"])
+ property = pick(GLOB.chemical_properties_list["positive"])
else if(value_offset < 0)
if(roll <= gen_tier*10)
- property = pick(chemical_properties_list["negative"])
+ property = pick(GLOB.chemical_properties_list["negative"])
else
- property = pick(chemical_properties_list["neutral"])
+ property = pick(GLOB.chemical_properties_list["neutral"])
else
switch(gen_tier)
if(1)
if(roll<=20)
- property = pick(chemical_properties_list["negative"])
+ property = pick(GLOB.chemical_properties_list["negative"])
else if (roll<=50)
- property = pick(chemical_properties_list["neutral"])
+ property = pick(GLOB.chemical_properties_list["neutral"])
else
- property = pick(chemical_properties_list["positive"])
+ property = pick(GLOB.chemical_properties_list["positive"])
if(2)
if(roll<=25)
- property = pick(chemical_properties_list["negative"])
+ property = pick(GLOB.chemical_properties_list["negative"])
else if (roll<=45)
- property = pick(chemical_properties_list["neutral"])
+ property = pick(GLOB.chemical_properties_list["neutral"])
else
- property = pick(chemical_properties_list["positive"])
+ property = pick(GLOB.chemical_properties_list["positive"])
if(3)
if(roll<=15)
- property = pick(chemical_properties_list["negative"])
+ property = pick(GLOB.chemical_properties_list["negative"])
else if (roll<=40)
- property = pick(chemical_properties_list["neutral"])
+ property = pick(GLOB.chemical_properties_list["neutral"])
else
- property = pick(chemical_properties_list["positive"])
+ property = pick(GLOB.chemical_properties_list["positive"])
else
if(roll<=15)
- property = pick(chemical_properties_list["negative"])
+ property = pick(GLOB.chemical_properties_list["negative"])
else if (roll<=40)
- property = pick(chemical_properties_list["neutral"])
+ property = pick(GLOB.chemical_properties_list["neutral"])
else
- property = pick(chemical_properties_list["positive"])
+ property = pick(GLOB.chemical_properties_list["positive"])
if(track_added_properties) //Generated effects are more unique for lower-tier chemicals, but not higher-tier ones
var/property_checks = 0
while(!check_generated_properties(property) && property_checks < 4)
property_checks++
- if(LAZYISIN(chemical_properties_list["negative"], property))
- property = pick(chemical_properties_list["negative"])
- else if(LAZYISIN(chemical_properties_list["neutral"], property))
- property = pick(chemical_properties_list["neutral"])
+ if(LAZYISIN(GLOB.chemical_properties_list["negative"], property))
+ property = pick(GLOB.chemical_properties_list["negative"])
+ else if(LAZYISIN(GLOB.chemical_properties_list["neutral"], property))
+ property = pick(GLOB.chemical_properties_list["neutral"])
else
- property = pick(chemical_properties_list["positive"])
+ property = pick(GLOB.chemical_properties_list["positive"])
- var/datum/chem_property/P = chemical_properties_list[property]
+ var/datum/chem_property/P = GLOB.chemical_properties_list[property]
//Calculate what our chemical value is with our level
var/new_value
@@ -389,7 +389,7 @@
return FALSE
break
//Insert the property
- var/datum/chem_property/P = chemical_properties_list[property]
+ var/datum/chem_property/P = GLOB.chemical_properties_list[property]
P = new P.type()
P.level = level
P.holder = src
@@ -397,7 +397,7 @@
//Special case: If it's a catalyst property, add it nonetheless.
if(initial_property && initial_property != property)
- P = chemical_properties_list[initial_property]
+ P = GLOB.chemical_properties_list[initial_property]
if(P.category & PROPERTY_TYPE_CATALYST)
P = new P.type()
P.level = level
@@ -425,22 +425,22 @@
C.gen_tier = gen_tier
if(!C.generate_recipe(complexity))
return //Generating a recipe failed, so return null
- chemical_reactions_list[C.id] = C
+ GLOB.chemical_reactions_list[C.id] = C
C.add_to_filtered_list()
return C
//Returns false if a property has been generated in a previous reagent and all properties of that category haven't been generated yet.
/datum/reagent/proc/check_generated_properties(datum/chem_property/P)
- if(LAZYISIN(chemical_properties_list["positive"], P))
- if(LAZYISIN(GLOB.generated_properties["positive"], P) && LAZYLEN(GLOB.generated_properties["positive"]) < LAZYLEN(chemical_properties_list["positive"]))
+ if(LAZYISIN(GLOB.chemical_properties_list["positive"], P))
+ if(LAZYISIN(GLOB.generated_properties["positive"], P) && LAZYLEN(GLOB.generated_properties["positive"]) < LAZYLEN(GLOB.chemical_properties_list["positive"]))
return FALSE
GLOB.generated_properties["positive"] += P
- else if(LAZYISIN(chemical_properties_list["negative"], P))
- if(LAZYISIN(GLOB.generated_properties["negative"], P) && LAZYLEN(GLOB.generated_properties["negative"]) < LAZYLEN(chemical_properties_list["negative"]))
+ else if(LAZYISIN(GLOB.chemical_properties_list["negative"], P))
+ if(LAZYISIN(GLOB.generated_properties["negative"], P) && LAZYLEN(GLOB.generated_properties["negative"]) < LAZYLEN(GLOB.chemical_properties_list["negative"]))
return FALSE
GLOB.generated_properties["negative"] += P
- else if(LAZYISIN(chemical_properties_list["neutral"], P))
- if(LAZYISIN(GLOB.generated_properties["neutral"], P) && LAZYLEN(GLOB.generated_properties["neutral"]) < LAZYLEN(chemical_properties_list["neutral"]))
+ else if(LAZYISIN(GLOB.chemical_properties_list["neutral"], P))
+ if(LAZYISIN(GLOB.generated_properties["neutral"], P) && LAZYLEN(GLOB.generated_properties["neutral"]) < LAZYLEN(GLOB.chemical_properties_list["neutral"]))
return FALSE
GLOB.generated_properties["neutral"] += P
return TRUE
diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm
index 2c08e9f4e693..dcb949424bdf 100644
--- a/code/modules/reagents/Chemistry-Holder.dm
+++ b/code/modules/reagents/Chemistry-Holder.dm
@@ -25,7 +25,7 @@
maximum_volume = maximum
#ifdef UNIT_TESTS
- if(!chemical_reagents_list || !chemical_reactions_filtered_list || !chemical_properties_list)
+ if(!GLOB.chemical_reagents_list || !GLOB.chemical_reactions_filtered_list || !GLOB.chemical_properties_list)
CRASH("Chemistry reagents are not set up!")
#endif
@@ -240,7 +240,7 @@
O.volume += R.volume
qdel(R)
break
- for(var/reaction in chemical_reactions_filtered_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id
+ for(var/reaction in GLOB.chemical_reactions_filtered_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id
if(!reaction)
continue
@@ -417,10 +417,10 @@
handle_reactions()
return FALSE
- var/datum/reagent/D = chemical_reagents_list[reagent]
+ var/datum/reagent/D = GLOB.chemical_reagents_list[reagent]
if(D)
if(!istype(D, /datum/reagent))
- CRASH("Not REAGENT - [reagent] - chemical_reagents_list[reagent]")
+ CRASH("Not REAGENT - [reagent] - GLOB.chemical_reagents_list[reagent]")
var/datum/reagent/R = new D.type()
if(D.type == /datum/reagent/generated)
diff --git a/code/modules/reagents/Chemistry-Reactions.dm b/code/modules/reagents/Chemistry-Reactions.dm
index 1d9c03f9e923..7a8f0b21158a 100644
--- a/code/modules/reagents/Chemistry-Reactions.dm
+++ b/code/modules/reagents/Chemistry-Reactions.dm
@@ -22,15 +22,15 @@
/datum/chemical_reaction/proc/add_to_filtered_list(reset = FALSE)
if(reset)
- for(var/R in chemical_reactions_filtered_list)
- LAZYREMOVE(chemical_reactions_filtered_list[R], src)
+ for(var/R in GLOB.chemical_reactions_filtered_list)
+ LAZYREMOVE(GLOB.chemical_reactions_filtered_list[R], src)
for(var/R in required_reagents)
- LAZYADD(chemical_reactions_filtered_list[R], src)
+ LAZYADD(GLOB.chemical_reactions_filtered_list[R], src)
/datum/chemical_reaction/proc/check_duplicate()
for(var/R in required_reagents)
- if(chemical_reactions_filtered_list[R])
- for(var/reaction in chemical_reactions_filtered_list[R])//We filter the chemical_reactions_filtered_list so we don't have to search through as much
+ if(GLOB.chemical_reactions_filtered_list[R])
+ for(var/reaction in GLOB.chemical_reactions_filtered_list[R])//We filter the GLOB.chemical_reactions_filtered_list so we don't have to search through as much
var/datum/chemical_reaction/C = reaction
var/matches = 0
for(var/B in required_reagents)
@@ -43,7 +43,7 @@
// To prevent such a situation, if ALL reagent inside a reaction are medical chemicals, the recipe is considered flawed.
/datum/chemical_reaction/proc/check_reaction_uses_all_default_medical()
for(var/R in required_reagents)
- var/datum/reagent/M = chemical_reagents_list[R]
+ var/datum/reagent/M = GLOB.chemical_reagents_list[R]
if(!(initial(M.flags) & REAGENT_TYPE_MEDICAL))
return FALSE
return TRUE
diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm
index 7f659c54c40d..6d36765146ed 100644
--- a/code/modules/reagents/Chemistry-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents.dm
@@ -267,37 +267,37 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
if(chemclass && !(flags & REAGENT_NO_GENERATION))
switch(chemclass)
if(CHEM_CLASS_BASIC)
- chemical_gen_classes_list["C1"] += id
+ GLOB.chemical_gen_classes_list["C1"] += id
if(CHEM_CLASS_COMMON)
- chemical_gen_classes_list["C2"] += id
+ GLOB.chemical_gen_classes_list["C2"] += id
if(CHEM_CLASS_UNCOMMON)
- chemical_gen_classes_list["C3"] += id
+ GLOB.chemical_gen_classes_list["C3"] += id
if(CHEM_CLASS_RARE)
- chemical_gen_classes_list["C4"] += id
+ GLOB.chemical_gen_classes_list["C4"] += id
if(CHEM_CLASS_SPECIAL)
- chemical_gen_classes_list["C5"] += id
- chemical_data.add_chemical_objective(src)
+ GLOB.chemical_gen_classes_list["C5"] += id
+ GLOB.chemical_data.add_chemical_objective(src)
if(CHEM_CLASS_ULTRA)
- chemical_gen_classes_list["C6"] += id
- chemical_data.add_chemical_objective(src)
- chemical_gen_classes_list["C"] += id
+ GLOB.chemical_gen_classes_list["C6"] += id
+ GLOB.chemical_data.add_chemical_objective(src)
+ GLOB.chemical_gen_classes_list["C"] += id
if(gen_tier)
switch(gen_tier)
if(1)
- chemical_gen_classes_list["T1"] += id
+ GLOB.chemical_gen_classes_list["T1"] += id
if(2)
- chemical_gen_classes_list["T2"] += id
+ GLOB.chemical_gen_classes_list["T2"] += id
if(3)
- chemical_gen_classes_list["T3"] += id
+ GLOB.chemical_gen_classes_list["T3"] += id
if(4)
- chemical_gen_classes_list["T4"] += id
+ GLOB.chemical_gen_classes_list["T4"] += id
if(5)
- chemical_gen_classes_list["T5"] += id
+ GLOB.chemical_gen_classes_list["T5"] += id
/datum/reagent/proc/properties_to_datums()
#ifdef UNIT_TESTS
- if(!chemical_properties_list)
+ if(!GLOB.chemical_properties_list)
CRASH("Chemistry reagents are not set up!")
#endif
@@ -306,7 +306,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
if(istype(prop, /datum/chem_property))
new_properties += prop
continue
- var/datum/chem_property/chem = chemical_properties_list[prop]
+ var/datum/chem_property/chem = GLOB.chemical_properties_list[prop]
if(chem)
chem = new chem.type()
chem.level = properties[prop]
diff --git a/code/modules/reagents/chemical_research/Chemical-Research.dm b/code/modules/reagents/chemical_research/Chemical-Research.dm
index 0b1152154dc3..e66cb474df50 100644
--- a/code/modules/reagents/chemical_research/Chemical-Research.dm
+++ b/code/modules/reagents/chemical_research/Chemical-Research.dm
@@ -1,4 +1,4 @@
-var/global/datum/chemical_data/chemical_data = new /datum/chemical_data
+GLOBAL_DATUM_INIT(chemical_data, /datum/chemical_data, new)
/datum/chemical_data
var/rsc_credits = 0
@@ -38,7 +38,7 @@ var/global/datum/chemical_data/chemical_data = new /datum/chemical_data
/datum/chemical_data/proc/get_report(doc_type, doc_title)
var/obj/item/paper/research_report/report = null
- for(var/document_data in chemical_data.research_documents[doc_type])
+ for(var/document_data in GLOB.chemical_data.research_documents[doc_type])
if(document_data["document_title"] == doc_title)
report = document_data["document"]
break
@@ -92,7 +92,7 @@ var/global/datum/chemical_data/chemical_data = new /datum/chemical_data
if(LAZYLEN(property_names))
has_new_properties = TRUE
for(var/name in property_names)
- var/datum/chem_property/ref = chemical_properties_list[name]
+ var/datum/chem_property/ref = GLOB.chemical_properties_list[name]
var/datum/chem_property/P = new ref.type
P.level = 0
research_property_data += P
@@ -146,7 +146,7 @@ var/global/datum/chemical_data/chemical_data = new /datum/chemical_data
chemical_not_completed_objective_list[chem.id] = chem.objective_value
/datum/chemical_data/proc/get_tgui_data(chemid)
- var/datum/reagent/chem = chemical_reagents_list[chemid]
+ var/datum/reagent/chem = GLOB.chemical_reagents_list[chemid]
if(!chem)
error("Invalid chemid [chemid]")
return
diff --git a/code/modules/reagents/chemical_research/generated_reagents.dm b/code/modules/reagents/chemical_research/generated_reagents.dm
index 6eaa664b6d7e..a21d74e26f8a 100644
--- a/code/modules/reagents/chemical_research/generated_reagents.dm
+++ b/code/modules/reagents/chemical_research/generated_reagents.dm
@@ -16,21 +16,21 @@
//Generate stats
if(!id) //So we can initiate a new datum without generating it
return
- if(!chemical_reagents_list[id])
+ if(!GLOB.chemical_reagents_list[id])
generate_name()
generate_stats()
- chemical_reagents_list[id] = src
- make_alike(chemical_reagents_list[id])
+ GLOB.chemical_reagents_list[id] = src
+ make_alike(GLOB.chemical_reagents_list[id])
recalculate_variables()
/datum/chemical_reaction/generated/New()
//Generate recipe
if(!id) //So we can initiate a new datum without generating it
return
- if(!chemical_reactions_list[id])
+ if(!GLOB.chemical_reactions_list[id])
generate_recipe()
- chemical_reactions_list[id] = src
- make_alike(chemical_reactions_list[id])
+ GLOB.chemical_reactions_list[id] = src
+ make_alike(GLOB.chemical_reactions_list[id])
/////////Tier 1
/datum/chemical_reaction/generated/alpha
diff --git a/code/modules/reagents/chemistry_machinery/acid_harness.dm b/code/modules/reagents/chemistry_machinery/acid_harness.dm
index ae54474c3aed..52a1a5f13bd7 100644
--- a/code/modules/reagents/chemistry_machinery/acid_harness.dm
+++ b/code/modules/reagents/chemistry_machinery/acid_harness.dm
@@ -443,7 +443,7 @@
else if(inject_conditions & ACID_SCAN_CONDITION_DEFIB && vitals_scan < ACID_VITALS_DEAD && last_vitals_scan & ACID_SCAN_CONDITION_DEATH)
condition_scan |= ACID_SCAN_CONDITION_DEFIB //If we were previously dead and are now alive, we assume we got defibbed
- if(inject_conditions & ACID_SCAN_CONDITION_CONCUSSION && (user.knocked_down || user.knocked_out))
+ if(inject_conditions & ACID_SCAN_CONDITION_CONCUSSION && (HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || HAS_TRAIT(src, TRAIT_FLOORED)))
condition_scan |= ACID_SCAN_CONDITION_CONCUSSION
if(inject_conditions & ACID_SCAN_CONDITION_INTOXICATION && (user.dazed || user.slowed || user.confused || user.drowsyness || user.dizziness || user.druggy))
diff --git a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm
index 6778bdd3c72b..85ed21543127 100644
--- a/code/modules/reagents/chemistry_machinery/chem_dispenser.dm
+++ b/code/modules/reagents/chemistry_machinery/chem_dispenser.dm
@@ -59,7 +59,7 @@
/obj/structure/machinery/chem_dispenser/process()
if(!chem_storage)
- chem_storage = chemical_data.connect_chem_storage(network)
+ chem_storage = GLOB.chemical_data.connect_chem_storage(network)
/obj/structure/machinery/chem_dispenser/Initialize()
. = ..()
@@ -68,7 +68,7 @@
/obj/structure/machinery/chem_dispenser/Destroy()
if(!chem_storage)
- chem_storage = chemical_data.disconnect_chem_storage(network)
+ chem_storage = GLOB.chemical_data.disconnect_chem_storage(network)
return ..()
/obj/structure/machinery/chem_dispenser/ex_act(severity)
@@ -155,7 +155,7 @@
var/list/chemicals = list()
for(var/re in dispensable_reagents)
- var/datum/reagent/temp = chemical_reagents_list[re]
+ var/datum/reagent/temp = GLOB.chemical_reagents_list[re]
if(temp)
var/chemname = temp.name
chemicals.Add(list(list("title" = chemname, "id" = temp.id)))
diff --git a/code/modules/reagents/chemistry_machinery/chem_simulator.dm b/code/modules/reagents/chemistry_machinery/chem_simulator.dm
index 2c8602b0dab7..1debbc56b495 100644
--- a/code/modules/reagents/chemistry_machinery/chem_simulator.dm
+++ b/code/modules/reagents/chemistry_machinery/chem_simulator.dm
@@ -62,7 +62,7 @@
..()
if(inoperable())
icon_state = "modifier_off"
- nanomanager.update_uis(src) // update all UIs attached to src
+ SSnano.nanomanager.update_uis(src) // update all UIs attached to src
/obj/structure/machinery/chem_simulator/attackby(obj/item/B, mob/living/user)
if(!skillcheck(user, SKILL_RESEARCH, SKILL_RESEARCH_TRAINED))
@@ -93,7 +93,7 @@
to_chat(user, SPAN_NOTICE("You insert [B] into the [src]."))
flick("[icon_state]_reading",src)
update_costs()
- nanomanager.update_uis(src) // update all UIs attached to src
+ SSnano.nanomanager.update_uis(src) // update all UIs attached to src
/obj/structure/machinery/chem_simulator/attack_hand(mob/user as mob)
if(inoperable())
@@ -105,7 +105,7 @@
/obj/structure/machinery/chem_simulator/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0)
var/list/data = list(
- "rsc_credits" = chemical_data.rsc_credits,
+ "rsc_credits" = GLOB.chemical_data.rsc_credits,
"target" = target,
"reference" = reference,
"mode" = mode,
@@ -122,7 +122,7 @@
if(simulating == SIMULATION_STAGE_FINAL)
for(var/reagent_id in recipe_targets)
- var/datum/reagent/R = chemical_reagents_list[reagent_id]
+ var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id]
var/list/id_name[0]
id_name["[R.id]"] = R.name
data["recipe_targets"] += id_name
@@ -134,7 +134,7 @@
//List of all available properties
data["property_data_list"] = list()
- for(var/datum/chem_property/P in chemical_data.research_property_data)
+ for(var/datum/chem_property/P in GLOB.chemical_data.research_property_data)
data["property_codings"][P.name] = P.code
if(template_filter && !check_bitflag(P.category, template_filter))
continue
@@ -182,7 +182,7 @@
else
data["reference_info"] = ""
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ ui = SSnano.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "chem_simulator.tmpl", "Synthesis Simulator", 800, 550)
ui.set_initial_data(data)
@@ -198,7 +198,7 @@
if(user.stat || user.is_mob_restrained() || !in_range(src, user))
return
- if(mode == MODE_CREATE && chemical_data.has_new_properties)
+ if(mode == MODE_CREATE && GLOB.chemical_data.has_new_properties)
update_costs()
if(href_list["simulate"] && ready)
@@ -252,7 +252,7 @@
return
if(mode == MODE_CREATE)
var/target_name = href_list["set_target"]
- for(var/datum/chem_property/P in chemical_data.research_property_data)
+ for(var/datum/chem_property/P in GLOB.chemical_data.research_property_data)
if(P.name == target_name)
if(target_property && target_property.name == target_name)
//Toggle the property
@@ -294,15 +294,15 @@
newname = reject_bad_name(newname, TRUE, 20, FALSE)
if(isnull(newname))
to_chat(user, "Bad name.")
- else if(chemical_reagents_list[newname])
+ else if(GLOB.chemical_reagents_list[newname])
to_chat(user, "Name already taken.")
else
creation_name = newname
else if(href_list["set_level"] && target_property)
var/level_to_set = 1
- if(chemical_data.clearance_level <= 2)
+ if(GLOB.chemical_data.clearance_level <= 2)
level_to_set = tgui_input_list(usr, "Set target level for [target_property.name]:","[src]", list(1,2,3,4))
- else if(chemical_data.clearance_level <= 4)
+ else if(GLOB.chemical_data.clearance_level <= 4)
level_to_set = tgui_input_list(usr, "Set target level for [target_property.name]:","[src]", list(1,2,3,4,5,6,7,8))
else
level_to_set = tgui_input_list(usr, "Set target level for [target_property.name]:","[src]", list(1,2,3,4,5,6,7,8,9,10))
@@ -350,7 +350,7 @@
calculate_creation_cost()
ready = check_ready()
playsound(loc, pick('sound/machines/computer_typing1.ogg','sound/machines/computer_typing2.ogg','sound/machines/computer_typing3.ogg'), 5, 1)
- nanomanager.update_uis(src)
+ SSnano.nanomanager.update_uis(src)
/obj/structure/machinery/chem_simulator/process()
if(inoperable())
@@ -384,7 +384,7 @@
C.name = C.id
if(C.id in simulations)
//We've already simulated this before, so we don't need to continue
- C = chemical_reagents_list[C.id]
+ C = GLOB.chemical_reagents_list[C.id]
print(C.id)
status_bar = "SIMULATION COMPLETE"
simulating = SIMULATION_STAGE_OFF
@@ -398,13 +398,13 @@
else
ready = check_ready()
stop_processing()
- nanomanager.update_uis(src)
+ SSnano.nanomanager.update_uis(src)
/obj/structure/machinery/chem_simulator/proc/update_costs()
property_costs = list()
var/only_positive = TRUE
if(mode == MODE_CREATE)
- for(var/datum/chem_property/P in chemical_data.research_property_data)
+ for(var/datum/chem_property/P in GLOB.chemical_data.research_property_data)
property_costs[P.name] = max(abs(P.value), 1)
else if(target && target.data && target.completed)
for(var/datum/chem_property/P in target.data.properties)
@@ -431,7 +431,7 @@
if(only_positive)
for(var/P in property_costs)
property_costs[P] = property_costs[P] + 1
- chemical_data.has_new_properties = FALSE
+ GLOB.chemical_data.has_new_properties = FALSE
//Here the cost for creating a chemical is calculated. If you're looking to rebalance create mode, this is where you do it
/obj/structure/machinery/chem_simulator/proc/calculate_creation_cost()
@@ -468,7 +468,7 @@
new_od_level = max(new_od_level - 5, 5)
/obj/structure/machinery/chem_simulator/proc/prepare_recipe_options()
- var/datum/chemical_reaction/generated/O = chemical_reactions_list[target.data.id]
+ var/datum/chemical_reaction/generated/O = GLOB.chemical_reactions_list[target.data.id]
if(!O) //If it doesn't have a recipe, go immediately to finalizing, which will then generate a new associated recipe
return FALSE
recipe_targets = list() //reset
@@ -481,7 +481,7 @@
if(LAZYLEN(R.required_reagents) > 2)
LAZYREMOVE(R.required_reagents, pick(R.required_reagents))
var/new_component_id = R.add_component(tier = max(min(target.data.chemclass, CHEM_CLASS_COMMON), target.data.gen_tier, 1))
- var/datum/reagent/new_component = chemical_reagents_list[new_component_id]
+ var/datum/reagent/new_component = GLOB.chemical_reagents_list[new_component_id]
//Make sure we don't have an identical reaction and that the component is identified
if(R.check_duplicate() || R.check_reaction_uses_all_default_medical() || new_component.chemclass >= CHEM_CLASS_SPECIAL)
R.required_reagents = old_reaction.Copy()
@@ -512,27 +512,27 @@
status_bar = "TARGET CAN NOT BE ALTERED"
return FALSE
//Safety check in case of irregular papers
- var/datum/chemical_reaction/C = chemical_reactions_list[target.data.id]
+ var/datum/chemical_reaction/C = GLOB.chemical_reactions_list[target.data.id]
if(C)
for(var/component in C.required_reagents)
- var/datum/reagent/R = chemical_reagents_list[component]
- if(R && R.chemclass >= CHEM_CLASS_SPECIAL && !chemical_data.chemical_identified_list[R.id])
+ var/datum/reagent/R = GLOB.chemical_reagents_list[component]
+ if(R && R.chemclass >= CHEM_CLASS_SPECIAL && !GLOB.chemical_data.chemical_identified_list[R.id])
status_bar = "UNREGISTERED COMPONENTS DETECTED"
return FALSE
for(var/catalyst in C.required_catalysts)
- var/datum/reagent/R = chemical_reagents_list[catalyst]
- if(R && R.chemclass >= CHEM_CLASS_SPECIAL && !chemical_data.chemical_identified_list[R.id])
+ var/datum/reagent/R = GLOB.chemical_reagents_list[catalyst]
+ if(R && R.chemclass >= CHEM_CLASS_SPECIAL && !GLOB.chemical_data.chemical_identified_list[R.id])
status_bar = "UNREGISTERED CATALYSTS DETECTED"
return FALSE
if(target_property)
- if(property_costs[target_property.name] > chemical_data.rsc_credits)
+ if(property_costs[target_property.name] > GLOB.chemical_data.rsc_credits)
status_bar = "INSUFFICIENT FUNDS"
return FALSE
if(target_property.category & PROPERTY_TYPE_UNADJUSTABLE)
status_bar = "TARGET PROPERTY CAN NOT BE SIMULATED"
return FALSE
if(mode == MODE_AMPLIFY)
- if(target_property.level >= chemical_data.clearance_level*TECHTREE_LEVEL_MULTIPLIER + 2 && chemical_data.clearance_level < 5)
+ if(target_property.level >= GLOB.chemical_data.clearance_level*TECHTREE_LEVEL_MULTIPLIER + 2 && GLOB.chemical_data.clearance_level < 5)
status_bar = "CLEARANCE INSUFFICIENT FOR AMPLIFICATION"
return FALSE
if(target && length(target.data.properties) < 2)
@@ -560,7 +560,7 @@
if(LAZYLEN(creation_name) < 2)
status_bar = "NAME NOT SET"
return FALSE
- if(creation_cost > chemical_data.rsc_credits)
+ if(creation_cost > GLOB.chemical_data.rsc_credits)
status_bar = "INSUFFICIENT FUNDS"
return FALSE
else if(!target)
@@ -575,18 +575,18 @@
flick("[icon_state]_printing",src)
sleep(10)
var/obj/item/paper/research_report/report = new /obj/item/paper/research_report/(loc)
- var/datum/reagent/D = chemical_reagents_list[id]
+ var/datum/reagent/D = GLOB.chemical_reagents_list[id]
var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper)
report.name = "Simulation result for [D.name]"
report.info += "
Official Company Document Simulated Synthesis Report
Result for [D.name]
"
report.generate(D)
- report.info += " This report was automatically printed by the Synthesis Simulator. The [MAIN_SHIP_NAME], [time2text(world.timeofday, "MM/DD")]/[game_year], [worldtime2text()] \n"
+ report.info += " This report was automatically printed by the Synthesis Simulator. The [MAIN_SHIP_NAME], [time2text(world.timeofday, "MM/DD")]/[GLOB.game_year], [worldtime2text()] \n"
playsound(loc, 'sound/machines/twobeep.ogg', 15, 1)
if(is_new)
- chemical_data.save_document(report, "Synthesis Simulations", report.name)
+ GLOB.chemical_data.save_document(report, "Synthesis Simulations", report.name)
/obj/structure/machinery/chem_simulator/proc/encode_reagent(datum/reagent/C)
- var/datum/reagent/O = chemical_reagents_list[C.original_id] //So make the new name based on the Original
+ var/datum/reagent/O = GLOB.chemical_reagents_list[C.original_id] //So make the new name based on the Original
var/suffix = " "
for(var/datum/chem_property/P in C.properties)
suffix += P.code+"[P.level]"
@@ -661,7 +661,7 @@
R.gen_tier = C.gen_tier
if(mode != MODE_CREATE)
- assoc_R = chemical_reactions_list[target.data.id]
+ assoc_R = GLOB.chemical_reactions_list[target.data.id]
if(!assoc_R) //no associated recipe found
if(mode == MODE_CREATE)
assoc_R = C.generate_assoc_recipe(creation_complexity)
@@ -690,25 +690,25 @@
//Pay
if(mode == MODE_CREATE)
- chemical_data.update_credits(creation_cost * -1)
+ GLOB.chemical_data.update_credits(creation_cost * -1)
else
- chemical_data.update_credits(property_costs[target_property.name] * -1)
+ GLOB.chemical_data.update_credits(property_costs[target_property.name] * -1)
//Refund 1 credit if a rare or rarer target was added
- var/datum/reagent/component = chemical_reagents_list[recipe_target]
+ var/datum/reagent/component = GLOB.chemical_reagents_list[recipe_target]
if(component && component.chemclass >= CHEM_CLASS_RARE)
- chemical_data.update_credits(1)
+ GLOB.chemical_data.update_credits(1)
//Save the reagent
C.generate_description()
C.chemclass = CHEM_CLASS_RARE //So that we can always scan this in the future, don't generate defcon, and don't get a loop of making credits
- chemical_reagents_list[C.id] = C
+ GLOB.chemical_reagents_list[C.id] = C
LAZYADD(simulations, C.id) //Remember we've simulated this
//Save the reaction
R.id = C.id
R.result = C.id
- chemical_reactions_list[R.id] = R
+ GLOB.chemical_reactions_list[R.id] = R
R.add_to_filtered_list()
status_bar = "SIMULATION COMPLETE"
print(C.id, TRUE)
diff --git a/code/modules/reagents/chemistry_machinery/chem_storage.dm b/code/modules/reagents/chemistry_machinery/chem_storage.dm
index 3a05201dea25..692daef7864f 100644
--- a/code/modules/reagents/chemistry_machinery/chem_storage.dm
+++ b/code/modules/reagents/chemistry_machinery/chem_storage.dm
@@ -31,11 +31,11 @@
/obj/structure/machinery/chem_storage/Initialize()
. = ..()
- chemical_data.add_chem_storage(src)
+ GLOB.chemical_data.add_chem_storage(src)
start_processing()
/obj/structure/machinery/chem_storage/Destroy()
- chemical_data.remove_chem_storage(src)
+ GLOB.chemical_data.remove_chem_storage(src)
return ..()
/obj/structure/machinery/chem_storage/get_examine_text(mob/user)
diff --git a/code/modules/reagents/chemistry_machinery/pandemic.dm b/code/modules/reagents/chemistry_machinery/pandemic.dm
index c9e34f79609e..5cd7f6584705 100644
--- a/code/modules/reagents/chemistry_machinery/pandemic.dm
+++ b/code/modules/reagents/chemistry_machinery/pandemic.dm
@@ -59,10 +59,10 @@
if(B)
var/datum/disease/D = null
if(!vaccine_type)
- D = archive_diseases[path]
+ D = GLOB.archive_diseases[path]
vaccine_type = path
else
- if(vaccine_type in diseases)
+ if(vaccine_type in GLOB.diseases)
D = new vaccine_type(0, null)
if(D)
@@ -90,11 +90,11 @@
B.icon_state = "bottle3"
var/datum/disease/D = null
if(!virus_type)
- var/datum/disease/advance/A = archive_diseases[href_list["create_virus_culture"]]
+ var/datum/disease/advance/A = GLOB.archive_diseases[href_list["create_virus_culture"]]
if(A)
D = new A.type(0, A)
else
- if(virus_type in diseases) // Make sure this is a disease
+ if(virus_type in GLOB.diseases) // Make sure this is a disease
D = new virus_type(0, null)
var/list/data = list("viruses"=list(D))
var/name = strip_html(input(user,"Name:","Name the culture",D.name))
@@ -129,8 +129,8 @@
if(user.stat || user.is_mob_restrained()) return
if(!in_range(src, user)) return
var/id = href_list["name_disease"]
- if(archive_diseases[id])
- var/datum/disease/advance/A = archive_diseases[id]
+ if(GLOB.archive_diseases[id])
+ var/datum/disease/advance/A = GLOB.archive_diseases[id]
A.AssignName(new_name)
for(var/datum/disease/advance/AD in SSdisease.all_diseases)
AD.Refresh()
@@ -184,7 +184,7 @@
if(istype(D, /datum/disease/advance))
var/datum/disease/advance/A = D
- D = archive_diseases[A.GetDiseaseID()]
+ D = GLOB.archive_diseases[A.GetDiseaseID()]
disease_creation = A.GetDiseaseID()
if(D.name == "Unknown")
dat += "Name Disease "
@@ -216,7 +216,7 @@
var/disease_name = "Unknown"
if(!ispath(type))
- var/datum/disease/advance/A = archive_diseases[type]
+ var/datum/disease/advance/A = GLOB.archive_diseases[type]
if(A)
disease_name = A.name
else
diff --git a/code/modules/reagents/chemistry_machinery/reagent_analyzer.dm b/code/modules/reagents/chemistry_machinery/reagent_analyzer.dm
index dc1f72ec41c7..de059de46436 100644
--- a/code/modules/reagents/chemistry_machinery/reagent_analyzer.dm
+++ b/code/modules/reagents/chemistry_machinery/reagent_analyzer.dm
@@ -89,27 +89,27 @@
var/datum/reagent/S = sample.reagents.reagent_list[1]
S.print_report(report = report, sample_number = sample_number)
sample.name = "vial ([S.name])"
- chemical_data.save_document(report, "XRF Scans", "[sample_number] - [report.name]")
+ GLOB.chemical_data.save_document(report, "XRF Scans", "[sample_number] - [report.name]")
if(S.chemclass < CHEM_CLASS_SPECIAL || (S.chemclass >= CHEM_CLASS_SPECIAL && report.completed))
- chemical_data.save_new_properties(S.properties)
- if(S.chemclass >= CHEM_CLASS_SPECIAL && !chemical_data.chemical_identified_list[S.id])
+ GLOB.chemical_data.save_new_properties(S.properties)
+ if(S.chemclass >= CHEM_CLASS_SPECIAL && !GLOB.chemical_data.chemical_identified_list[S.id])
if(last_used)
last_used.count_niche_stat(STATISTICS_NICHE_CHEMS)
var/datum/chem_property/P = S.get_property(PROPERTY_DNA_DISINTEGRATING)
if(P)
- if(chemical_data.clearance_level >= S.gen_tier)
+ if(GLOB.chemical_data.clearance_level >= S.gen_tier)
P.trigger()
else
return
- chemical_data.complete_chemical(S)
+ GLOB.chemical_data.complete_chemical(S)
else
var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper)
report.name = "Analysis of ERROR"
report.info += "
Official Weyland-Yutani Document Reagent Analysis Print
Analysis ERROR
"
report.info += "Result: Analysis failed for sample #[sample_number].
\n"
report.info += "Reason for error: [reason] \n"
- report.info += " This report was automatically printed by the A-XRF Scanner. The [MAIN_SHIP_NAME], [time2text(world.timeofday, "MM/DD")]/[game_year], [worldtime2text()] \n"
+ report.info += " This report was automatically printed by the A-XRF Scanner. The [MAIN_SHIP_NAME], [time2text(world.timeofday, "MM/DD")]/[GLOB.game_year], [worldtime2text()] \n"
/datum/reagent/proc/print_report(turf/loc, obj/item/paper/research_report/report, admin_spawned = FALSE, sample_number = 0)
if(!report)
diff --git a/code/modules/reagents/chemistry_properties/prop_neutral.dm b/code/modules/reagents/chemistry_properties/prop_neutral.dm
index d420623879ce..3048b12ee296 100644
--- a/code/modules/reagents/chemistry_properties/prop_neutral.dm
+++ b/code/modules/reagents/chemistry_properties/prop_neutral.dm
@@ -199,8 +199,8 @@
M.druggy = min(M.druggy + 0.5 * potency * delta_time, potency * 10)
/datum/chem_property/neutral/hallucinogenic/process_overdose(mob/living/M, potency = 1, delta_time)
- if(isturf(M.loc) && !istype(M.loc, /turf/open/space) && M.canmove && !M.is_mob_restrained())
- step(M, pick(cardinal))
+ if(isturf(M.loc) && !istype(M.loc, /turf/open/space) && (M.mobility_flags & MOBILITY_MOVE) && !M.is_mob_restrained())
+ step(M, pick(GLOB.cardinals))
M.hallucination += 10
M.make_jittery(5)
diff --git a/code/modules/reagents/chemistry_properties/prop_positive.dm b/code/modules/reagents/chemistry_properties/prop_positive.dm
index 971051e9bf88..8bf7eadc5d77 100644
--- a/code/modules/reagents/chemistry_properties/prop_positive.dm
+++ b/code/modules/reagents/chemistry_properties/prop_positive.dm
@@ -455,7 +455,7 @@
if(prob(10 * delta_time))
to_chat(M, SPAN_WARNING("You feel like you have the worst brain freeze ever!"))
M.apply_effect(20, PARALYZE)
- M.stunned = max(M.stunned,21)
+ M.apply_effect(20, STUN)
/datum/chem_property/positive/neurocryogenic/process_overdose(mob/living/M, potency = 1, delta_time)
M.bodytemperature = max(M.bodytemperature - 2.5 * potency * delta_time,0)
diff --git a/code/modules/reagents/chemistry_properties/prop_special.dm b/code/modules/reagents/chemistry_properties/prop_special.dm
index cec04ca66616..52354f0d6b01 100644
--- a/code/modules/reagents/chemistry_properties/prop_special.dm
+++ b/code/modules/reagents/chemistry_properties/prop_special.dm
@@ -97,7 +97,7 @@
/datum/chem_property/special/DNA_Disintegrating/trigger()
SSticker.mode.get_specific_call("Weyland-Yutani Goon (Chemical Investigation Squad)", TRUE, FALSE, holder.name)
- chemical_data.update_credits(10)
+ GLOB.chemical_data.update_credits(10)
message_admins("The research department has discovered DNA_Disintegrating in [holder.name] adding 10 bonus tech points.")
var/datum/techtree/tree = GET_TREE(TREE_MARINE)
tree.add_points(10)
diff --git a/code/modules/reagents/chemistry_reagents/drink.dm b/code/modules/reagents/chemistry_reagents/drink.dm
index 3bd7336c32b6..66ce0844556b 100644
--- a/code/modules/reagents/chemistry_reagents/drink.dm
+++ b/code/modules/reagents/chemistry_reagents/drink.dm
@@ -555,7 +555,8 @@
/datum/reagent/neurotoxin/on_mob_life(mob/living/carbon/M)
. = ..()
if(!.) return
- M.knocked_down = max(M.knocked_down, 3)
+ if(!HAS_TRAIT(src, TRAIT_FLOORED))
+ M.apply_effect(5, WEAKEN)
if(!data) data = 1
data++
M.dizziness +=6
diff --git a/code/modules/reagents/chemistry_reagents/toxin.dm b/code/modules/reagents/chemistry_reagents/toxin.dm
index 6ffd14ea8ae3..d9be565a85b2 100644
--- a/code/modules/reagents/chemistry_reagents/toxin.dm
+++ b/code/modules/reagents/chemistry_reagents/toxin.dm
@@ -113,6 +113,7 @@
if(!. || deleted)
return
M.status_flags |= FAKEDEATH
+ ADD_TRAIT(M, TRAIT_IMMOBILIZED, FAKEDEATH_TRAIT)
M.apply_damage(0.5*REM, OXY)
M.apply_effect(2, WEAKEN)
M.silent = max(M.silent, 10)
@@ -125,6 +126,7 @@
var/mob/living/holder_mob = .
holder_mob.status_flags &= ~FAKEDEATH
+ REMOVE_TRAIT(holder_mob, TRAIT_IMMOBILIZED, FAKEDEATH_TRAIT)
/datum/reagent/toxin/mindbreaker
name = "Mindbreaker Toxin"
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index b4b4f68ed99d..4c60a9e345e0 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -112,7 +112,7 @@
// attack with hand, move pulled object onto conveyor
/obj/structure/machinery/conveyor/attack_hand(mob/user as mob)
- if ((!( user.canmove ) || user.is_mob_restrained() || !( user.pulling )))
+ if (( user.is_mob_incapacitated() || !( user.pulling )))
return
if (user.pulling.anchored)
return
@@ -197,7 +197,7 @@
/obj/structure/machinery/conveyor_switch/LateInitialize()
. = ..()
conveyors = list()
- for(var/obj/structure/machinery/conveyor/C in machines)
+ for(var/obj/structure/machinery/conveyor/C in GLOB.machines)
if(C.id == id)
conveyors += C
start_processing()
@@ -246,7 +246,7 @@
update()
// find any switches with same id as this one, and set their positions to match us
- for(var/obj/structure/machinery/conveyor_switch/S in machines)
+ for(var/obj/structure/machinery/conveyor_switch/S in GLOB.machines)
if(S.id == src.id)
S.position = position
S.update()
@@ -266,7 +266,7 @@
update()
// find any switches with same id as this one, and set their positions to match us
- for(var/obj/structure/machinery/conveyor_switch/S in machines)
+ for(var/obj/structure/machinery/conveyor_switch/S in GLOB.machines)
if(S.id == src.id)
S.position = position
S.update()
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index b2afd77d4aed..1522f0100c4e 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -222,7 +222,7 @@
///Attempt to move while inside
/obj/structure/machinery/disposal/relaymove(mob/living/user)
- if(user.stat || user.stunned || user.knocked_down || flushing)
+ if(user.is_mob_incapacitated(TRUE) || flushing)
return FALSE
if(user.loc == src)
go_out(user)
@@ -234,9 +234,8 @@
user.client.eye = user.client.mob
user.client.perspective = MOB_PERSPECTIVE
user.forceMove(loc)
- user.stunned = max(user.stunned, 2) //Action delay when going out of a bin
- user.update_canmove() //Force the delay to go in action immediately
- if(!user.lying)
+ user.apply_effect(2, STUN)
+ if(user.mobility_flags & MOBILITY_MOVE)
user.visible_message(SPAN_WARNING("[user] suddenly climbs out of [src]!"),
SPAN_WARNING("You climb out of [src] and get your bearings!"))
update()
@@ -305,8 +304,7 @@
if(isliving(AM))
var/mob/living/living = AM
living.Stun(2)
- living.update_canmove() //Force the delay to go in action immediately
- if(!living.lying)
+ if(living.body_position == STANDING_UP)
living.visible_message(SPAN_WARNING("[living] is suddenly pushed out of [src]!"),
SPAN_WARNING("You get pushed out of [src] and get your bearings!"))
update()
@@ -746,7 +744,7 @@
//Remains : set to leave broken pipe pieces in place
/obj/structure/disposalpipe/deconstruct(disassembled = TRUE)
if(disassembled)
- for(var/D in cardinal)
+ for(var/D in GLOB.cardinals)
if(D & dpdir)
var/obj/structure/disposalpipe/broken/P = new(loc)
P.setDir(D)
@@ -1096,7 +1094,8 @@
/obj/structure/disposalpipe/tagger/Initialize(mapload, ...)
. = ..()
dpdir = dir|turn(dir, 180)
- if(sort_tag) tagger_locations |= sort_tag
+ if(sort_tag)
+ GLOB.tagger_locations |= sort_tag
updatename()
updatedesc()
update()
@@ -1152,7 +1151,8 @@
/obj/structure/disposalpipe/sortjunction/Initialize(mapload, ...)
. = ..()
- if(sortType) tagger_locations |= sortType
+ if(sortType)
+ GLOB.tagger_locations |= sortType
updatedir()
updatename()
@@ -1457,7 +1457,7 @@
if(direction)
dirs = list( direction, turn(direction, -45), turn(direction, 45))
else
- dirs = alldirs.Copy()
+ dirs = GLOB.alldirs.Copy()
INVOKE_ASYNC(streak(dirs))
@@ -1466,7 +1466,7 @@
if(direction)
dirs = list( direction, turn(direction, -45), turn(direction, 45))
else
- dirs = alldirs.Copy()
+ dirs = GLOB.alldirs.Copy()
INVOKE_ASYNC(streak(dirs))
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index e8ac568140bc..ec1c8c245f2b 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -337,8 +337,8 @@
var/dat = "
TagMaster 2.3
"
dat += "
"
- for(var/i = 1, i <= tagger_locations.len, i++)
- dat += "