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/conflict.dm b/code/__DEFINES/conflict.dm
index 0820c709cdae..d69f0891ffa0 100644
--- a/code/__DEFINES/conflict.dm
+++ b/code/__DEFINES/conflict.dm
@@ -109,6 +109,7 @@
#define SHOES_SLOWDOWN -1
#define SLOWDOWN_ARMOR_NONE 0
+#define SLOWDOWN_ARMOR_SUPER_LIGHT 0.10
#define SLOWDOWN_ARMOR_VERY_LIGHT 0.20
#define SLOWDOWN_ARMOR_LIGHT 0.35
#define SLOWDOWN_ARMOR_MEDIUM 0.55
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 56cd4dd8cd8e..89f3951e7c99 100644
--- a/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
+++ b/code/__DEFINES/dcs/signals/atom/mob/living/signals_living.dm
@@ -23,11 +23,6 @@
#define COMSIG_LIVING_SPEAK "living_speak"
#define COMPONENT_OVERRIDE_SPEAK (1<<0)
-#define COMSIG_LIVING_APPLY_EFFECT "living_apply_effect"
-#define COMSIG_LIVING_ADJUST_EFFECT "living_adjust_effect"
-#define COMSIG_LIVING_SET_EFFECT "living_set_effect"
- #define COMPONENT_CANCEL_EFFECT (1<<0)
-
/// From /obj/structure/proc/do_climb(var/mob/living/user, mods)
#define COMSIG_LIVING_CLIMB_STRUCTURE "climb_over_structure"
/// From /mob/living/Collide(): (atom/A)
diff --git a/code/__DEFINES/dcs/signals/atom/signals_atom.dm b/code/__DEFINES/dcs/signals/atom/signals_atom.dm
index cac9861d09cb..d9bd1202c159 100644
--- a/code/__DEFINES/dcs/signals/atom/signals_atom.dm
+++ b/code/__DEFINES/dcs/signals/atom/signals_atom.dm
@@ -51,3 +51,6 @@
/// Called when an atom is mouse dropped on another atom, from /client/MouseDrop: (atom/dropped_onto)
#define COMSIG_ATOM_DROP_ON "atom_drop_on"
+
+/// Called when an atom has emp_act called on it, from /atom/emp_act: (severity)
+#define COMSIG_ATOM_EMP_ACT "atom_emp_act"
diff --git a/code/__DEFINES/dcs/signals/atom/signals_cell.dm b/code/__DEFINES/dcs/signals/atom/signals_cell.dm
new file mode 100644
index 000000000000..75e13d8bfdfc
--- /dev/null
+++ b/code/__DEFINES/dcs/signals/atom/signals_cell.dm
@@ -0,0 +1,26 @@
+/// (charge_amount)
+#define COMSIG_CELL_USE_CHARGE "cell_use_charge"
+ #define COMPONENT_CELL_NO_USE_CHARGE (1<<0)
+
+/// (charge_amount)
+#define COMSIG_CELL_ADD_CHARGE "cell_add_charge"
+
+#define COMSIG_CELL_START_TICK_DRAIN "cell_start_tick_drain"
+
+#define COMSIG_CELL_STOP_TICK_DRAIN "cell_stop_tick_drain"
+
+/// (mob/living/user)
+#define COMSIG_CELL_TRY_RECHARGING "cell_try_recharging"
+ #define COMPONENT_CELL_NO_RECHARGE (1<<0)
+
+#define COMSIG_CELL_OUT_OF_CHARGE "cell_out_of_charge"
+
+/// (charge_amount)
+#define COMSIG_CELL_CHECK_CHARGE "cell_check_charge"
+ #define COMPONENT_CELL_CHARGE_INSUFFICIENT (1<<0)
+
+#define COMSIG_CELL_TRY_INSERT_CELL "cell_try_insert_cell"
+ #define COMPONENT_CANCEL_CELL_INSERT (1<<0)
+
+/// (mob/living/user)
+#define COMSIG_CELL_REMOVE_CELL "cell_remove_cell"
diff --git a/code/__DEFINES/dcs/signals/atom/signals_item.dm b/code/__DEFINES/dcs/signals/atom/signals_item.dm
index 64f4c24798e1..6024c0524992 100644
--- a/code/__DEFINES/dcs/signals/atom/signals_item.dm
+++ b/code/__DEFINES/dcs/signals/atom/signals_item.dm
@@ -66,5 +66,5 @@
/// from /obj/item/weapon/gun/proc/load_into_chamber() : ()
#define COMSIG_GUN_INTERRUPT_FIRE "gun_interrupt_fire"
-//Additional procs on items that will be triggered right after the human finishes spawns in
+//from /datum/authority/branch/role/proc/equip_role()
#define COMSIG_POST_SPAWN_UPDATE "post_spawn_update"
diff --git a/code/__DEFINES/equipment.dm b/code/__DEFINES/equipment.dm
index 5f8f27a65711..f0688282572d 100644
--- a/code/__DEFINES/equipment.dm
+++ b/code/__DEFINES/equipment.dm
@@ -80,10 +80,8 @@
#define CAN_DIG_SHRAPNEL (1<<11)
/// whether it has an animated icon state of "[icon_state]_on" to be used during surgeries.
#define ANIMATED_SURGICAL_TOOL (1<<12)
-/// The item goes on top of tables, instead of into them with the overlay system
-#define NOTABLEMERGE (1<<13)
/// Has heat source but isn't 'on fire' and thus can be stored
-#define IGNITING_ITEM (1<<14)
+#define IGNITING_ITEM (1<<13)
//==========================================================================================
@@ -495,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),
@@ -504,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/hud.dm b/code/__DEFINES/hud.dm
index 38e5693dcbe5..deee80c7a91d 100644
--- a/code/__DEFINES/hud.dm
+++ b/code/__DEFINES/hud.dm
@@ -23,3 +23,5 @@
#define NOTIFY_ATTACK "attack"
#define NOTIFY_ORBIT "orbit"
#define NOTIFY_JOIN_XENO "join_xeno"
+#define NOTIFY_XENO_TACMAP "xeno_tacmap"
+#define NOTIFY_USCM_TACMAP "uscm_tacmap"
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/minimap.dm b/code/__DEFINES/minimap.dm
index 71d0ed8e7445..003d723600c4 100644
--- a/code/__DEFINES/minimap.dm
+++ b/code/__DEFINES/minimap.dm
@@ -5,7 +5,17 @@
#define MINIMAP_FLAG_UPP (1<<3)
#define MINIMAP_FLAG_CLF (1<<4)
#define MINIMAP_FLAG_YAUTJA (1<<5)
-#define MINIMAP_FLAG_ALL (1<<6) - 1
+#define MINIMAP_FLAG_XENO_CORRUPTED (1<<6)
+#define MINIMAP_FLAG_XENO_ALPHA (1<<7)
+#define MINIMAP_FLAG_XENO_BRAVO (1<<8)
+#define MINIMAP_FLAG_XENO_CHARLIE (1<<9)
+#define MINIMAP_FLAG_XENO_DELTA (1<<10)
+#define MINIMAP_FLAG_XENO_FERAL (1<<11)
+#define MINIMAP_FLAG_XENO_TAMED (1<<12)
+#define MINIMAP_FLAG_XENO_MUTATED (1<<13)
+#define MINIMAP_FLAG_XENO_FORSAKEN (1<<14)
+#define MINIMAP_FLAG_XENO_RENEGADE (1<<15)
+#define MINIMAP_FLAG_ALL (1<<16) - 1
///Converts the overworld x and y to minimap x and y values
#define MINIMAP_SCALE 2
@@ -77,9 +87,3 @@ GLOBAL_LIST_INIT(all_minimap_flags, bitfield2list(MINIMAP_FLAG_ALL))
#define TACMAP_BASE_OCCLUDED "Occluded"
#define TACMAP_BASE_OPEN "Open"
-
-#define TACMAP_DEFAULT "Default"
-#define TACMAP_XENO "Xeno"
-#define TACMAP_YAUTJA "Yautja"
-#define TACMAP_FACTION "Faction"
-
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index b0ddecc0580f..1f6c700158ad 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -1,5 +1,5 @@
-/// Multiplier for Stun/KD/KO/etc durations in new backend, due to old being based on life ticks
-#define GLOBAL_STATUS_MULTIPLIER 20 // 2 Seconds life tick to ds
+/// Multiplier for Stun/KD/KO/etc durations in new backend, due to old system being based on life ticks
+#define GLOBAL_STATUS_MULTIPLIER 20 // each in-code unit is worth 20ds of duration
#define HEALTH_THRESHOLD_DEAD -100
#define HEALTH_THRESHOLD_CRIT -50
@@ -375,7 +375,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',
@@ -394,9 +394,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',
@@ -404,7 +404,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"
@@ -419,6 +419,8 @@ 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
@@ -445,3 +447,4 @@ var/list/default_xeno_onmob_icons = list(
#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/paygrade_defs/civilian.dm b/code/__DEFINES/paygrade_defs/civilian.dm
new file mode 100644
index 000000000000..ed99a363dedd
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/civilian.dm
@@ -0,0 +1,35 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// Civilians
+/// CIV, Civilian
+#define PAY_SHORT_CIV "CIV"
+
+/// CNUR, Nurse
+#define PAY_SHORT_CNUR "CNUR"
+
+/// CDOC, Doctor
+#define PAY_SHORT_CDOC "CDOC"
+
+/// CCMO, Professor
+#define PAY_SHORT_CCMO "CCMO"
+
+/// CREP, Representative
+#define PAY_SHORT_CREP "CREP"
+
+/// SYN, Synthetic
+#define PAY_SHORT_SYN "SYN"
+
+/// OPR, Operative
+#define PAY_SHORT_OPR "OPR"
+
+/// CPO, Officer
+#define PAY_SHORT_CPO "CPO"
+
+/// CSPO, Senior Officer
+#define PAY_SHORT_CSPO "CSPO"
+
+/// REB, Rebel
+#define PAY_SHORT_REB "REB"
+
+/// REBC, Rebel Commander "REBC"
+#define PAY_SHORT_REBC "REBC"
diff --git a/code/__DEFINES/paygrade_defs/cmb.dm b/code/__DEFINES/paygrade_defs/cmb.dm
new file mode 100644
index 000000000000..8ebd7902dbf8
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/cmb.dm
@@ -0,0 +1,20 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// Colonial Marshal Bureau
+/// IHRO, Interstellar Human Rights Observer
+#define PAY_SHORT_IHRO "IHRO"
+
+/// ICCL, Interstellar Commerce Commission Corporate Liaison
+#define PAY_SHORT_ICCL "ICCL"
+
+/// ICCA, Interstellar Commerce Commission Agent
+#define PAY_SHORT_ICCA "ICCA"
+
+/// CMBM, CMB Marshal
+#define PAY_SHORT_CMBM "CMBM"
+
+/// CMBD, CMB Deputy
+#define PAY_SHORT_CMBD "CMBD"
+
+/// CMBS, CMB Synthetic
+#define PAY_SHORT_CMBS "CMBS"
diff --git a/code/__DEFINES/paygrade_defs/dutch.dm b/code/__DEFINES/paygrade_defs/dutch.dm
new file mode 100644
index 000000000000..299096060f3f
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/dutch.dm
@@ -0,0 +1,17 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// Dutches Dozen
+/// DTC, Dutch's Dozen Standard Mercenary
+#define PAY_SHORT_DTC "DTC"
+
+/// DTCM, Dutch's Dozen Medic
+#define PAY_SHORT_DTCM "DTCM"
+
+/// DTCF, Dutch's Dozen Flamethrower Specialist
+#define PAY_SHORT_DTCF "DTCF"
+
+/// DTCMG, Dutch's Dozen Machinegunner
+#define PAY_SHORT_DTCMG "DTCMG"
+
+/// DTCA, Arnold
+#define PAY_SHORT_DTCA "DTCA"
diff --git a/code/__DEFINES/paygrade_defs/marines.dm b/code/__DEFINES/paygrade_defs/marines.dm
new file mode 100644
index 000000000000..74b659630820
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/marines.dm
@@ -0,0 +1,80 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// USCM MARINES
+/// ME1, Private
+#define PAY_SHORT_ME1 "ME1"
+
+/// ME2, Private First Class
+#define PAY_SHORT_ME2 "ME2"
+
+/// ME3, Lance Corporal
+#define PAY_SHORT_ME3 "ME3"
+
+/// ME4, Corporal
+#define PAY_SHORT_ME4 "ME4"
+
+/// ME5, Sergeant
+#define PAY_SHORT_ME5 "ME5"
+
+/// ME6, Staff Sergeant
+#define PAY_SHORT_ME6 "ME6"
+
+/// ME7, Gunnery Sergeant
+#define PAY_SHORT_ME7 "ME7"
+
+/// ME8, Master Sergeant
+#define PAY_SHORT_ME8 "ME8"
+
+/// ME8E, First Sergeant
+#define PAY_SHORT_ME8E "ME8E"
+
+/// ME9, Master Gunnery Sergeant
+#define PAY_SHORT_ME9 "ME9"
+
+/// ME9E, Sergeant Major
+#define PAY_SHORT_ME9E "ME9E"
+
+/// ME9C, Sergeant Major of the Colonial Marine Corps
+#define PAY_SHORT_ME9C "ME9C"
+
+/// MO1, Second Lieutenant
+#define PAY_SHORT_MO1 "MO1"
+
+/// MO2, First Lieutenant
+#define PAY_SHORT_MO2 "MO2"
+/// MO3, Captain
+
+#define PAY_SHORT_MO3 "MO3"
+/// MO4, Major
+
+#define PAY_SHORT_MO4 "MO4"
+/// MO5, Lieutenant Colonel
+
+#define PAY_SHORT_MO5 "MO5"
+/// MO6, Colonel
+
+#define PAY_SHORT_MO6 "MO6"
+/// MO6E, Senior Colonel
+
+#define PAY_SHORT_MO6E "MO6E"
+/// MO6C, Division Colonel
+
+#define PAY_SHORT_MO6C "MO6C"
+/// MO7, Brigadier General
+
+#define PAY_SHORT_MO7 "MO7"
+/// MO8, Major General
+
+#define PAY_SHORT_MO8 "MO8"
+/// MO9, Lieutenant General
+
+#define PAY_SHORT_MO9 "MO9"
+/// MO10, General
+
+#define PAY_SHORT_MO10 "MO10"
+
+/// MO10C, Assistant Commandant of the Marine Corps
+#define PAY_SHORT_MO10C "MO10C"
+
+/// MO10S, Commandant of the Marine Corps
+#define PAY_SHORT_MO10S "MO10S"
diff --git a/code/__DEFINES/paygrade_defs/navy.dm b/code/__DEFINES/paygrade_defs/navy.dm
new file mode 100644
index 000000000000..d51cccb8fe97
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/navy.dm
@@ -0,0 +1,74 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// USCM NAVY
+/// NE1, Seaman Recruit
+#define PAY_SHORT_NE1 "NE1"
+
+/// NE2M, Seaman Apprentice
+#define PAY_SHORT_NE2 "NE2"
+
+/// NE3, Seaman
+#define PAY_SHORT_NE3 "NE3"
+
+/// NE4, Petty Officer 3rd Class
+#define PAY_SHORT_NE4 "NE4"
+
+/// NE5, Petty Officer 2nd Class
+#define PAY_SHORT_NE5 "NE5"
+
+/// NE6, Petty Officer 1st Class
+#define PAY_SHORT_NE6 "N36"
+
+/// NE7, Chief Petty Officer
+#define PAY_SHORT_NE7 "NE7"
+
+/// NE8, Senior Chief Petty Officer
+#define PAY_SHORT_NE8 "NE8"
+
+/// NE8C, Command Senior Chief Petty Officer
+#define PAY_SHORT_NE8C "NE8C"
+
+/// NE9, Master Chief Petty Officer
+#define PAY_SHORT_NE9 "NE9"
+
+/// NE9C, Command Master Chief Petty Officer
+#define PAY_SHORT_NE9C "NE9C"
+
+/// NO1, Ensign
+#define PAY_SHORT_NO1 "NO1"
+
+/// NO2, Lieutenant Junior Grade
+#define PAY_SHORT_NO2 "NO2"
+
+/// NO3, Lieutenant
+#define PAY_SHORT_NO3 "NO3"
+
+/// NO4, Lieutenant Commander
+#define PAY_SHORT_NO4 "NO4"
+
+/// NO5, Commander
+#define PAY_SHORT_NO5 "NO5"
+
+/// NO6, Captain
+#define PAY_SHORT_NO6 "NO6"
+
+/// NO6E, Commodore
+#define PAY_SHORT_NO6E "NO6E"
+
+/// NO6C, Senior Commodore
+#define PAY_SHORT_NO6C "NO6C"
+
+/// NO7, Rear Admiral (Lower Half)
+#define PAY_SHORT_NO7 "NO7"
+
+/// NO8, Rear Admiral (Upper Half)
+#define PAY_SHORT_NO8 "NO8"
+
+/// NO9, Vice Admiral
+#define PAY_SHORT_NO9 "NO9"
+
+/// NO10, Admiral
+#define PAY_SHORT_NO10 "NO10"
+
+/// NO10C, Chief of Naval Operations
+#define PAY_SHORT_NO10C "NO10C"
diff --git a/code/__DEFINES/paygrade_defs/provost.dm b/code/__DEFINES/paygrade_defs/provost.dm
new file mode 100644
index 000000000000..5b2121642d52
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/provost.dm
@@ -0,0 +1,14 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// PROVOST OFFICE
+/// PvI, Provost Inspector
+#define PAY_SHORT_PVI "PvI"
+
+/// PvM, Provost Marshal
+#define PAY_SHORT_PVM "PvM"
+
+/// PvSM, Provost Sector Marshal
+#define PAY_SHORT_PVSM "PvSM"
+
+/// PvCM, Provost Chief Marshal
+#define PAY_SHORT_PVCM "PvCM"
diff --git a/code/__DEFINES/paygrade_defs/upp.dm b/code/__DEFINES/paygrade_defs/upp.dm
new file mode 100644
index 000000000000..40c0d8441b2e
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/upp.dm
@@ -0,0 +1,59 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// Union of Progressive Peoples
+/// UE,
+#define PAY_SHORT_UEC "UEC"
+
+/// UE1, Private
+#define PAY_SHORT_UE1 "UE1"
+
+/// UE2, Private First Class
+#define PAY_SHORT_UE2 "UE2"
+
+/// UE3, Korporal
+#define PAY_SHORT_UE3 "UE3"
+
+/// UE4, unior Serzhant
+#define PAY_SHORT_UE4 "UE4"
+
+/// UE5, Serzhant
+#define PAY_SHORT_UE5 "UE5"
+
+/// UE6, Master Serzhant
+#define PAY_SHORT_UE6 "UE6"
+
+/// UC1, Junior Kommando
+#define PAY_SHORT_UC1 "UC1"
+
+/// UC2, 2nd Kommando
+#define PAY_SHORT_UC2 "UC2"
+
+/// UC3, 1st Kommando
+#define PAY_SHORT_UC3 "UC3"
+
+/// UO1, Leytenant
+#define PAY_SHORT_UO1 "UO1"
+
+/// UO2, Senior Leytenant
+#define PAY_SHORT_UO2 "UO2"
+
+/// UO3, Kapitan
+#define PAY_SHORT_UO3 "UO3"
+
+/// UO4, Mayjor
+#define PAY_SHORT_UO4 "UO4"
+
+/// UO5, Leytenant Kolonel
+#define PAY_SHORT_UO5 "UO5"
+
+/// UO6, Kolonel
+#define PAY_SHORT_UO6 "UO6"
+
+/// UO7, Mayjor General
+#define PAY_SHORT_UO7 "UO7"
+
+/// UO8, Leytenant General
+#define PAY_SHORT_UO8 "UO8"
+
+/// UO9, Army General
+#define PAY_SHORT_UO9 "UO9"
diff --git a/code/__DEFINES/paygrade_defs/weyland.dm b/code/__DEFINES/paygrade_defs/weyland.dm
new file mode 100644
index 000000000000..1b6c168e9b6e
--- /dev/null
+++ b/code/__DEFINES/paygrade_defs/weyland.dm
@@ -0,0 +1,32 @@
+// Paygrade shorthand defines, to allow clearer designation.
+
+// Weyland Yutani
+/// WYC1, Trainee
+#define PAY_SHORT_WYC1 "WYC1"
+
+/// WYC2, Junior Executive
+#define PAY_SHORT_WYC2 "WYC2"
+
+/// WYC3, Executive
+#define PAY_SHORT_WYC3 "WYC3"
+
+/// WYC4, Senior Executive
+#define PAY_SHORT_WYC4 "WYC4"
+
+/// WYC5, Executive Specialist
+#define PAY_SHORT_WYC5 "WYC5"
+
+/// WYC6, Executive Supervisor
+#define PAY_SHORT_WYC6 "WYC6"
+
+/// WYC7, Assistant Manager
+#define PAY_SHORT_WYC7 "WYC7"
+
+/// WYC8, Division Manager
+#define PAY_SHORT_WYC8 "WYC8"
+
+/// WYC9, Chief Executive
+#define PAY_SHORT_WYC9 "WYC9"
+
+/// WYC10, Director
+#define PAY_SHORT_WYC10 "WYC10"
diff --git a/code/__DEFINES/radio.dm b/code/__DEFINES/radio.dm
index e2bd155fcb0d..cc1831501bad 100644
--- a/code/__DEFINES/radio.dm
+++ b/code/__DEFINES/radio.dm
@@ -61,6 +61,10 @@
#define RADIO_CHANNEL_PMC_CCT "PMC CCT"
#define RADIO_CHANNEL_WY_WO "SpecOps"
+//Listening Devices
+#define RADIO_CHANNEL_BUG_A "Listening Device A"
+#define RADIO_CHANNEL_BUG_B "Listening Device B"
+
//1-Channel ERTs
#define RADIO_CHANNEL_DUTCH_DOZEN "DD"
#define RADIO_CHANNEL_VAI "VAI"
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/skills.dm b/code/__DEFINES/skills.dm
index 5dabb4545a32..d33e26c1c3f6 100644
--- a/code/__DEFINES/skills.dm
+++ b/code/__DEFINES/skills.dm
@@ -42,6 +42,8 @@
#define SKILL_SPEC_DEFAULT 0
/// Is trained to use specialist gear, but hasn't picked a kit.
#define SKILL_SPEC_TRAINED 1
+/// Is trained to use specialist gear & HAS picked a kit. (Functionally same as SPEC_ROCKET)
+#define SKILL_SPEC_KITTED 2
/// Can use RPG
#define SKILL_SPEC_ROCKET 2
/// Can use thermal cloaks and custom M4RA rifle
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/subsystems.dm b/code/__DEFINES/subsystems.dm
index 843d4fd31b4a..9cb67e1e0de1 100644
--- a/code/__DEFINES/subsystems.dm
+++ b/code/__DEFINES/subsystems.dm
@@ -109,6 +109,7 @@
// Subsystems shutdown in the reverse of the order they initialize in
// The numbers just define the ordering, they are meaningless otherwise.
+#define SS_INIT_PROFILER 86
#define SS_INIT_INPUT 85
#define SS_INIT_TOPIC 83
#define SS_INIT_LOBBYART 82
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/tgs.dm b/code/__DEFINES/tgs.dm
index 0cc106ec9cf2..b0e97e05e9b2 100644
--- a/code/__DEFINES/tgs.dm
+++ b/code/__DEFINES/tgs.dm
@@ -1,6 +1,6 @@
// tgstation-server DMAPI
-#define TGS_DMAPI_VERSION "6.6.2"
+#define TGS_DMAPI_VERSION "6.7.0"
// All functions and datums outside this document are subject to change with any version and should not be relied on.
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index 93fd25726f15..4b1c2c8a78cf 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -10,6 +10,9 @@
_L = target._status_traits; \
_L[trait] = list(source); \
SEND_SIGNAL(target, SIGNAL_ADDTRAIT(trait), trait); \
+ if(trait in GLOB.traits_with_elements){ \
+ target.AddElement(GLOB.traits_with_elements[trait]); \
+ } \
} else { \
_L = target._status_traits; \
if (_L[trait]) { \
@@ -17,6 +20,9 @@
} else { \
_L[trait] = list(source); \
SEND_SIGNAL(target, SIGNAL_ADDTRAIT(trait), trait); \
+ if(trait in GLOB.traits_with_elements){ \
+ target.AddElement(GLOB.traits_with_elements[trait]); \
+ } \
} \
} \
} while (0)
@@ -38,6 +44,9 @@
if (!length(_L[trait])) { \
_L -= trait; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(trait), trait); \
+ if(trait in GLOB.traits_with_elements) { \
+ target.RemoveElement(GLOB.traits_with_elements[trait]); \
+ } \
}; \
if (!length(_L)) { \
target._status_traits = null \
@@ -62,6 +71,9 @@
if (!length(_traits_list[trait])) { \
_traits_list -= trait; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(trait), trait); \
+ if(trait in GLOB.traits_with_elements) { \
+ target.RemoveElement(GLOB.traits_with_elements[trait]); \
+ } \
}; \
if (!length(_traits_list)) { \
target._status_traits = null \
@@ -78,8 +90,11 @@
if (!length(_L[_T])) { \
_L -= _T; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(_T), _T); \
+ if(trait in GLOB.traits_with_elements) { \
+ target.RemoveElement(GLOB.traits_with_elements[trait]); \
}; \
};\
+ };\
if (!length(_L)) { \
target._status_traits = null\
};\
@@ -101,8 +116,11 @@
if (!length(_L[_T])) { \
_L -= _T; \
SEND_SIGNAL(target, SIGNAL_REMOVETRAIT(_T)); \
+ if(_T in GLOB.traits_with_elements) { \
+ target.RemoveElement(GLOB.traits_with_elements[_T]); \
}; \
};\
+ };\
if (!length(_L)) { \
target._status_traits = null\
};\
@@ -124,9 +142,6 @@
/// Example trait
// #define TRAIT_X "t_x"
-/// cannot be removed without admin intervention
-#define ROUNDSTART_TRAIT "roundstart"
-
//-- mob traits --
/// 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"
@@ -140,8 +155,10 @@
#define TRAIT_FORCED_STANDING "forcedstanding"
/// Stuns preventing movement and using objects but without further impairement
#define TRAIT_INCAPACITATED "incapacitated"
-/// Disoriented. Unable to talk, and unable to use skills as Xeno
+/// Disoriented. Unable to talk properly, and unable to use some skills as Xeno
#define TRAIT_DAZED "dazed"
+/// Apply this to identify a mob as merged with weeds
+#define TRAIT_MERGED_WITH_WEEDS "merged_with_weeds"
// SPECIES TRAITS
/// Knowledge of Yautja technology
@@ -293,6 +310,7 @@ 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_DAZED" = TRAIT_DAZED,
"TRAIT_UNDENSE" = TRAIT_UNDENSE,
@@ -373,6 +391,8 @@ GLOBAL_LIST(trait_name_map)
/// Example trait source
// #define TRAIT_SOURCE_Y "t_s_y"
#define TRAIT_SOURCE_INHERENT "t_s_inherent"
+/// cannot be removed without admin intervention
+#define ROUNDSTART_TRAIT "roundstart"
//-- mob traits --
///Status trait coming from lying down through update_canmove()
#define LYING_TRAIT "lying"
@@ -382,8 +402,6 @@ GLOBAL_LIST(trait_name_map)
#define TRAIT_SOURCE_HIVE "t_s_hive"
///Status trait coming from being buckled.
#define TRAIT_SOURCE_BUCKLE "t_s_buckle"
-///Status trait coming from roundstart quirks (that don't exist yet). Unremovable by REMOVE_TRAIT
-#define TRAIT_SOURCE_QUIRK "t_s_quirk"
///Status trait coming from being assigned as [acting] squad leader.
#define TRAIT_SOURCE_SQUAD_LEADER "t_s_squad_leader"
///Status trait coming from their job
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/vehicle.dm b/code/__DEFINES/vehicle.dm
index 9c6685085788..8a1617229926 100644
--- a/code/__DEFINES/vehicle.dm
+++ b/code/__DEFINES/vehicle.dm
@@ -53,5 +53,6 @@
#define VEHICLE_CLASS_LIGHT (1<<2) //light class armor (APC, tank)
#define VEHICLE_CLASS_MEDIUM (1<<3) //medium class armor (tank)
#define VEHICLE_CLASS_HEAVY (1<<4) //heavy class armor (tank)
-
-#define TANK_POPLOCK 90
+// Other vehicle flags
+/// Vehicle can bypass vehicle blockers, typically going further into maps than intended
+#define VEHICLE_BYPASS_BLOCKERS (1<<5)
diff --git a/code/__DEFINES/vendors.dm b/code/__DEFINES/vendors.dm
index 04ee5ffef2b6..eeec210a56c3 100644
--- a/code/__DEFINES/vendors.dm
+++ b/code/__DEFINES/vendors.dm
@@ -67,3 +67,10 @@
//Whether or not to load ammo boxes depending on ammo loaded into the vendor
//Only relevant in big vendors, like Requisitions or Squad Prep
#define VEND_LOAD_AMMO_BOXES (1<<9)
+
+// Redemption Tokens
+#define VEND_TOKEN_ENGINEER "Engineer"
+#define VEND_TOKEN_SPEC "Specialist"
+#define VEND_TOKEN_SYNTH "Synthetic"
+/// Token invalid/unrecognised.
+#define VEND_TOKEN_VOID "Void"
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/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 1116f1acb2a8..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
@@ -682,8 +681,9 @@ world
* * moving - whether or not to use a moving state for the given icon
* * sourceonly - if TRUE, only generate the asset and send back the asset url, instead of tags that display the icon to players
* * extra_clases - string of extra css classes to use when returning the icon string
+ * * keyonly - if TRUE, only returns the asset key to use get_asset_url manually. Overrides sourceonly.
*/
-/proc/icon2html(atom/thing, client/target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE, extra_classes = null)
+/proc/icon2html(atom/thing, client/target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE, extra_classes = null, keyonly = FALSE)
if (!thing)
return
@@ -714,6 +714,8 @@ world
SSassets.transport.register_asset(name, thing)
for (var/thing2 in targets)
SSassets.transport.send_assets(thing2, name)
+ if(keyonly)
+ return name
if(sourceonly)
return SSassets.transport.get_asset_url(name)
return ""
@@ -756,6 +758,8 @@ world
SSassets.transport.register_asset(key, rsc_ref, file_hash, icon_path)
for (var/client_target in targets)
SSassets.transport.send_assets(client_target, key)
+ if(keyonly)
+ return key
if(sourceonly)
return SSassets.transport.get_asset_url(key)
return ""
diff --git a/code/__HELPERS/job.dm b/code/__HELPERS/job.dm
index 89fe6877647e..220236c6f7e3 100644
--- a/code/__HELPERS/job.dm
+++ b/code/__HELPERS/job.dm
@@ -14,32 +14,10 @@
all_jobs += new jobtype
return all_jobs
-
/proc/get_all_centcom_jobs() return list()
-//gets the actual job rank (ignoring alt titles)
-//this is used solely for sechuds
-/obj/proc/GetJobRealName()
- if (!istype(src,/obj/item/card/id)) return
- var/obj/item/card/id/I = src
- if(I.rank in GLOB.joblist) return I.rank
- if(I.assignment in GLOB.joblist) return I.assignment
- return "Unknown"
-
/proc/get_all_job_icons() return GLOB.joblist + list("Prisoner")//For all existing HUD icons
-/obj/proc/GetJobName() //Used in secHUD icon generation
- var/obj/item/card/id/I = src
- if(istype(I))
- var/job_icons = get_all_job_icons()
- var/centcom = get_all_centcom_jobs()
-
- if(I.assignment in job_icons) return I.assignment//Check if the job has a hud icon
- if(I.rank in job_icons) return I.rank
- if(I.assignment in centcom) return "Centcom"//Return with the NT logo if it is a Centcom job
- if(I.rank in centcom) return "Centcom"
- return "Unknown" //Return unknown if none of the above apply
-
/proc/get_actual_job_name(mob/M)
if(!M)
return null
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/text.dm b/code/__HELPERS/text.dm
index d4d9eb320633..967967790b28 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -30,6 +30,11 @@
text = replacetext(text, char, repl_chars[char])
return text
+///Helper for only alphanumeric characters plus common punctuation, spaces, underscore and hyphen _ -.
+/proc/replace_non_alphanumeric_plus(text)
+ var/regex/alphanumeric = regex(@{"[^a-z0-9 ,.?!\-_&]"}, "gi")
+ return alphanumeric.Replace(text, "")
+
/proc/readd_quotes(text)
var/list/repl_chars = list(""" = "\"", "'" = "'")
for(var/char in repl_chars)
@@ -341,8 +346,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 +355,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 ec4a9cc87db3..5494a76f4bf4 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -281,9 +281,10 @@
//update the datacore records! This is goig to be a bit costly.
var/mob_ref = WEAKREF(src)
for(var/list/L in list(GLOB.data_core.general, GLOB.data_core.medical, GLOB.data_core.security, GLOB.data_core.locked))
- for(var/datum/data/record/R in L)
- if(R.fields["ref"] == mob_ref)
- R.fields["name"] = newname
+ for(var/datum/data/record/record_entry in L)
+ if(record_entry.fields["ref"] == mob_ref)
+ record_entry.fields["name"] = newname
+ record_entry.name = newname
break
//update our pda and id if we have them on our person
@@ -916,110 +917,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
/*
@@ -1465,7 +1466,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 +1487,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 +1515,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 +1652,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 c0e9569ea02b..d148acb8b09d 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -166,7 +166,6 @@ DEFINE_BITFIELD(flags_item, list(
"ITEM_OVERRIDE_NORTHFACE" = ITEM_OVERRIDE_NORTHFACE,
"CAN_DIG_SHRAPNEL" = CAN_DIG_SHRAPNEL,
"ANIMATED_SURGICAL_TOOL" = ANIMATED_SURGICAL_TOOL,
- "NOTABLEMERGE" = NOTABLEMERGE,
"IGNITING_ITEM" = IGNITING_ITEM,
))
@@ -466,3 +465,11 @@ DEFINE_BITFIELD(vend_flags, list(
"VEND_FACTION_THEMES" = VEND_FACTION_THEMES,
"VEND_USE_VENDOR_FLAGS" = VEND_USE_VENDOR_FLAGS,
))
+
+DEFINE_BITFIELD(vehicle_flags, list(
+ "VEHICLE_CLASS_WEAK" = VEHICLE_CLASS_WEAK,
+ "VEHICLE_CLASS_LIGHT" = VEHICLE_CLASS_LIGHT,
+ "VEHICLE_CLASS_MEDIUM" = VEHICLE_CLASS_MEDIUM,
+ "VEHICLE_CLASS_HEAVY" = VEHICLE_CLASS_HEAVY,
+ "VEHICLE_BYPASS_BLOCKERS" = VEHICLE_BYPASS_BLOCKERS,
+))
diff --git a/code/_globalvars/global_lists.dm b/code/_globalvars/global_lists.dm
index 1e1e9cefd5db..6e1b229e562f 100644
--- a/code/_globalvars/global_lists.dm
+++ b/code/_globalvars/global_lists.dm
@@ -6,20 +6,25 @@ GLOBAL_LIST_EMPTY(CMBFaxes)
GLOBAL_LIST_EMPTY(GeneralFaxes) //Inter-machine faxes
GLOBAL_LIST_EMPTY(fax_contents) //List of fax contents to maintain it even if source paper is deleted
+//datum containing a reference to the flattend map png url, the actual png is stored in the user's cache.
+GLOBAL_LIST_EMPTY(uscm_flat_tacmap_data)
+GLOBAL_LIST_EMPTY(xeno_flat_tacmap_data)
+
+//datum containing the svg overlay coords in array format.
+GLOBAL_LIST_EMPTY(uscm_svg_tacmap_data)
+GLOBAL_LIST_EMPTY(xeno_svg_tacmap_data)
+
GLOBAL_LIST_EMPTY(failed_fultons) //A list of fultoned items which weren't collected and fell back down
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
@@ -101,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()))
@@ -132,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(
@@ -201,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
@@ -269,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)
@@ -453,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 << .
@@ -470,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 44f4b2c4010f..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
@@ -14,8 +100,24 @@ GLOBAL_LIST_INIT(pill_icon_mappings, map_pill_icons())
/// In-round override to default OOC color
GLOBAL_VAR(ooc_color_override)
+// tacmap cooldown for xenos and marines
+GLOBAL_VAR_INIT(uscm_canvas_cooldown, 0)
+GLOBAL_VAR_INIT(xeno_canvas_cooldown, 0)
+
+// getFlatIcon cooldown for xenos and marines
+GLOBAL_VAR_INIT(uscm_flatten_map_icon_cooldown, 0)
+GLOBAL_VAR_INIT(xeno_flatten_map_icon_cooldown, 0)
+
+// latest unannounced flat tacmap for xenos and marines
+GLOBAL_VAR(uscm_unannounced_map)
+GLOBAL_VAR(xeno_unannounced_map)
+
+//global tacmaps for action button access
+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/hud/ghost.dm b/code/_onclick/hud/ghost.dm
index a6754747a019..a99129d09bcd 100644
--- a/code/_onclick/hud/ghost.dm
+++ b/code/_onclick/hud/ghost.dm
@@ -48,6 +48,14 @@
var/mob/dead/observer/G = usr
G.reenter_corpse()
+/atom/movable/screen/ghost/toggle_huds
+ name = "Toggle HUDs"
+ icon_state = "ghost_hud_toggle"
+
+/atom/movable/screen/ghost/toggle_huds/Click()
+ var/client/client = usr.client
+ client.toggle_ghost_hud()
+
/datum/hud/ghost/New(mob/owner, ui_style='icons/mob/hud/human_white.dmi', ui_color, ui_alpha = 230)
. = ..()
var/atom/movable/screen/using
@@ -68,6 +76,9 @@
using.screen_loc = ui_ghost_slot4
static_inventory += using
+ using = new /atom/movable/screen/ghost/toggle_huds()
+ using.screen_loc = ui_ghost_slot5
+ static_inventory += using
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
// don't show this HUD if observing; show the HUD of the observee
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 215e228fdd9d..f5f61424daac 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -230,6 +230,7 @@
hud_version = display_hud_version
persistent_inventory_update(screenmob)
mymob.update_action_buttons(TRUE)
+ reorganize_alerts(screenmob)
mymob.reload_fullscreens()
// ensure observers get an accurate and up-to-date view
diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm
index cfc6c4d034fb..4a23ebd882d3 100644
--- a/code/_onclick/hud/radial.dm
+++ b/code/_onclick/hud/radial.dm
@@ -34,6 +34,12 @@ GLOBAL_LIST_EMPTY(radial_menus)
/atom/movable/screen/radial/slice/clicked(mob/user)
+ if(QDELETED(src))
+ return
+
+ if(!parent)
+ CRASH("clicked() called on a radial slice with a null parent while not deleted/deleting")
+
if(user.client == parent.current_user)
if(next_page)
parent.next_page()
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index b49bce4111f0..d114aff6b7cb 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -535,7 +535,7 @@
if(!user.hive.living_xeno_queen)
to_chat(user, SPAN_WARNING("Without a queen your psychic link is broken!"))
return FALSE
- if(user.burrow || user.is_mob_incapacitated() || user.buckled)
+ if(HAS_TRAIT(user, TRAIT_ABILITY_BURROWED) || user.is_mob_incapacitated() || user.buckled)
return FALSE
user.hive.mark_ui.update_all_data()
user.hive.mark_ui.open_mark_menu(user)
@@ -583,7 +583,7 @@
if(!user.hive.living_xeno_queen)
to_chat(user, SPAN_WARNING("Your hive doesn't have a living queen!"))
return FALSE
- if(user.burrow || user.is_mob_incapacitated() || user.buckled)
+ if(HAS_TRAIT(user, TRAIT_ABILITY_BURROWED) || user.is_mob_incapacitated() || user.buckled)
return FALSE
user.overwatch(user.hive.living_xeno_queen)
diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm
index 9c9784286d09..0bfa0a759287 100644
--- a/code/_onclick/other_mobs.dm
+++ b/code/_onclick/other_mobs.dm
@@ -13,7 +13,7 @@
var/obj/structure/S = A
S.do_climb(src, mods)
return TRUE
- else if(!(isitem(A) && get_dist(src, A) <= 1) && client.prefs.toggle_prefs & TOGGLE_MIDDLE_MOUSE_SWAP_HANDS)
+ else if(!(isitem(A) && get_dist(src, A) <= 1) && (client && (client.prefs.toggle_prefs & TOGGLE_MIDDLE_MOUSE_SWAP_HANDS)))
swap_hand()
return TRUE
diff --git a/code/_onclick/xeno.dm b/code/_onclick/xeno.dm
index 0f9c50acb49d..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(body_position == LYING_DOWN || burrow) //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
diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm
index 743f9be9fec0..741862b5d65d 100644
--- a/code/controllers/configuration/entries/game_options.dm
+++ b/code/controllers/configuration/entries/game_options.dm
@@ -127,3 +127,8 @@
min_val = 1
config_entry_value = 450
integer = TRUE
+
+/datum/config_entry/number/whiskey_required_players
+ min_val = 0
+ config_entry_value = 140
+ integer = TRUE
diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm
index cc3d00fd951b..385cbcb8d446 100644
--- a/code/controllers/configuration/entries/general.dm
+++ b/code/controllers/configuration/entries/general.dm
@@ -627,3 +627,5 @@ This maintains a list of ip addresses that are able to bypass topic filtering.
protection = CONFIG_ENTRY_HIDDEN|CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/guest_ban
+
+/datum/config_entry/flag/auto_profile
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..b8b037c33381 100644
--- a/code/controllers/subsystem/communications.dm
+++ b/code/controllers/subsystem/communications.dm
@@ -66,78 +66,83 @@ 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 VAI_FREQ 1215
+#define RMC_FREQ 1216
+#define CMB_FREQ 1220
//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 // ------------------------------------------------------
+//Listening Bugs (1290-1291)
+#define BUG_A_FREQ 1290
+#define BUG_B_FREQ 1291
+
+//General Radio
+#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 +196,10 @@ 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,
-)
+
+ RADIO_CHANNEL_BUG_A = BUG_A_FREQ,
+ RADIO_CHANNEL_BUG_B = BUG_B_FREQ,
+))
// Response Teams
#define ERT_FREQS list(VAI_FREQ, DUT_FREQ, YAUT_FREQ, CMB_FREQ, RMC_FREQ)
@@ -205,6 +213,9 @@ var/list/radiochannels = list(
// PMC Frequencies
#define PMC_FREQS list(PMC_FREQ, PMC_CMD_FREQ, PMC_ENGI_FREQ, PMC_MED_FREQ, PMC_CCT_FREQ, WY_WO_FREQ, WY_FREQ)
+//Listening Device Frequencies
+#define BUG_FREQS list(BUG_A_FREQ, BUG_B_FREQ)
+
//Depts - used for colors in headset.dm, as well as deciding what the marine comms tower can listen into
#define DEPT_FREQS list(COMM_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SENTRY_FREQ, ALPHA_FREQ, BRAVO_FREQ, CHARLIE_FREQ, DELTA_FREQ, ECHO_FREQ, CRYO_FREQ, REQ_FREQ, JTAC_FREQ, INTEL_FREQ, WY_FREQ)
@@ -217,17 +228,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)
@@ -269,6 +280,8 @@ SUBSYSTEM_DEF(radio)
"[HC_FREQ]" = "hcradio",
"[PVST_FREQ]" = "pvstradio",
"[COLONY_FREQ]" = "deptradio",
+ "[BUG_A_FREQ]" = "airadio",
+ "[BUG_B_FREQ]" = "aiprivradio",
)
/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
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/game_decorator.dm b/code/controllers/subsystem/game_decorator.dm
index cfee0406f84a..dd53b647d1a8 100644
--- a/code/controllers/subsystem/game_decorator.dm
+++ b/code/controllers/subsystem/game_decorator.dm
@@ -20,7 +20,7 @@ SUBSYSTEM_DEF(game_decorator)
var/defer_decoration = TRUE //! So map decoration is done post-setup after nightmare and spawners
/datum/game_decorator/New()
- if(defer_decoration)
+ if(defer_decoration && is_active_decor())
RegisterSignal(SSdcs, COMSIG_GLOB_MODE_POSTSETUP, PROC_REF(defered_decoration))
/datum/game_decorator/proc/is_active_decor()
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/inactivity.dm b/code/controllers/subsystem/inactivity.dm
index 5edd4e8c5294..6b8542444040 100644
--- a/code/controllers/subsystem/inactivity.dm
+++ b/code/controllers/subsystem/inactivity.dm
@@ -17,7 +17,7 @@ SUBSYSTEM_DEF(inactivity)
return
for(var/client/current as anything in GLOB.clients)
- if(current.admin_holder && current.admin_holder.rights & R_ADMIN) //Skip admins.
+ if(current.admin_holder && current.admin_holder.rights & R_MOD) //Skip admins.
continue
if(current.is_afk(INACTIVITY_KICK))
if(!istype(current.mob, /mob/dead))
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 6f5b9303a91f..64f4b92a1edd 100644
--- a/code/controllers/subsystem/minimap.dm
+++ b/code/controllers/subsystem/minimap.dm
@@ -256,8 +256,6 @@ SUBSYSTEM_DEF(minimaps)
removal_cbs[target] = CALLBACK(src, PROC_REF(removeimage), blip, target)
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_marker))
-
-
/**
* removes an image from raw tracked lists, invoked by callback
*/
@@ -322,7 +320,7 @@ SUBSYSTEM_DEF(minimaps)
minimaps_by_z["[z_level]"].images_assoc["[flag]"] -= source
/**
- * Fetches a /atom/movable/screen/minimap instance or creates on if none exists
+ * Fetches a /atom/movable/screen/minimap instance or creates one if none exists
* Note this does not destroy them when the map is unused, might be a potential thing to do?
* Arguments:
* * zlevel: zlevel to fetch map for
@@ -338,6 +336,170 @@ SUBSYSTEM_DEF(minimaps)
hashed_minimaps[hash] = map
return map
+/**
+ * Fetches the datum containing an announced flattend map png reference.
+ *
+ * Arguments:
+ * * faction: FACTION_MARINE or XENO_HIVE_NORMAL
+ */
+/proc/get_tacmap_data_png(faction)
+ var/list/map_list
+
+ if(faction == FACTION_MARINE)
+ map_list = GLOB.uscm_flat_tacmap_data
+ else if(faction == XENO_HIVE_NORMAL)
+ map_list = GLOB.xeno_flat_tacmap_data
+ else
+ return null
+
+ var/map_length = length(map_list)
+
+ if(map_length == 0)
+ return null
+
+ return map_list[map_length]
+
+/**
+ * Fetches the datum containing the latest unannounced flattend map png reference.
+ *
+ * Arguments:
+ * * faction: FACTION_MARINE or XENO_HIVE_NORMAL
+ */
+/proc/get_unannounced_tacmap_data_png(faction)
+ if(faction == FACTION_MARINE)
+ return GLOB.uscm_unannounced_map
+ else if(faction == XENO_HIVE_NORMAL)
+ return GLOB.xeno_unannounced_map
+
+ return null
+
+/**
+ * Fetches the last set of svg coordinates for the tacmap drawing.
+ *
+ * Arguments:
+ * * faction: which faction get the map for: FACTION_MARINE or XENO_HIVE_NORMAL
+ */
+/proc/get_tacmap_data_svg(faction)
+ var/list/map_list
+
+ if(faction == FACTION_MARINE)
+ map_list = GLOB.uscm_svg_tacmap_data
+ else if(faction == XENO_HIVE_NORMAL)
+ map_list = GLOB.xeno_svg_tacmap_data
+ else
+ return null
+
+ var/map_length = length(map_list)
+
+ if(map_length == 0)
+ return null
+
+ return map_list[map_length]
+
+/**
+ * Re-sends relevant flattened tacmaps to a single client.
+ *
+ * Arguments:
+ * * user: The mob that is either an observer, marine, or xeno
+ */
+/proc/resend_current_map_png(mob/user)
+ if(!user.client)
+ return
+
+ var/is_observer = user.faction == FACTION_NEUTRAL && isobserver(user)
+ if(is_observer || user.faction == FACTION_MARINE)
+ // Send marine maps
+ var/datum/flattened_tacmap/latest = get_tacmap_data_png(FACTION_MARINE)
+ if(latest)
+ SSassets.transport.send_assets(user.client, latest.asset_key)
+ var/datum/flattened_tacmap/unannounced = get_unannounced_tacmap_data_png(FACTION_MARINE)
+ if(unannounced && (!latest || latest.asset_key != unannounced.asset_key))
+ SSassets.transport.send_assets(user.client, unannounced.asset_key)
+
+ var/mob/living/carbon/xenomorph/xeno = user
+ if(is_observer || istype(xeno) && xeno.hivenumber == XENO_HIVE_NORMAL)
+ // Send xeno maps
+ var/datum/flattened_tacmap/latest = get_tacmap_data_png(XENO_HIVE_NORMAL)
+ if(latest)
+ SSassets.transport.send_assets(user.client, latest.asset_key)
+ var/datum/flattened_tacmap/unannounced = get_unannounced_tacmap_data_png(XENO_HIVE_NORMAL)
+ if(unannounced && (!latest || latest.asset_key != unannounced.asset_key))
+ SSassets.transport.send_assets(user.client, unannounced.asset_key)
+
+/**
+ * Flattens the current map and then distributes it for the specified faction as an unannounced map.
+ *
+ * Arguments:
+ * * faction: Which faction to distribute the map to: FACTION_MARINE or XENO_HIVE_NORMAL
+ * Return:
+ * * Returns a boolean value, TRUE if the operation was successful, FALSE if it was not (on cooldown generally).
+ */
+/datum/tacmap/drawing/proc/distribute_current_map_png(faction)
+ if(faction == FACTION_MARINE)
+ if(!COOLDOWN_FINISHED(GLOB, uscm_flatten_map_icon_cooldown))
+ return FALSE
+ COOLDOWN_START(GLOB, uscm_flatten_map_icon_cooldown, flatten_map_cooldown_time)
+ else if(faction == XENO_HIVE_NORMAL)
+ if(!COOLDOWN_FINISHED(GLOB, xeno_flatten_map_icon_cooldown))
+ return FALSE
+ COOLDOWN_START(GLOB, xeno_flatten_map_icon_cooldown, flatten_map_cooldown_time)
+ else
+ return FALSE
+
+ var/icon/flat_map = getFlatIcon(map_holder.map, appearance_flags = TRUE)
+ if(!flat_map)
+ to_chat(usr, SPAN_WARNING("A critical error has occurred! Contact a coder.")) // tf2heavy: "Oh, this is bad!"
+ return FALSE
+
+ // Send to only relevant clients
+ var/list/faction_clients = list()
+ for(var/client/client as anything in GLOB.clients)
+ if(!client || !client.mob)
+ continue
+ var/mob/client_mob = client.mob
+ if(client_mob.faction == faction)
+ faction_clients += client
+ else if(client_mob.faction == FACTION_NEUTRAL && isobserver(client_mob))
+ faction_clients += client
+ else if(isxeno(client_mob))
+ var/mob/living/carbon/xenomorph/xeno = client_mob
+ if(xeno.hivenumber == faction)
+ faction_clients += client
+
+ // This may be unnecessary to do this way if the asset url is always the same as the lookup key
+ var/flat_tacmap_key = icon2html(flat_map, faction_clients, keyonly = TRUE)
+ if(!flat_tacmap_key)
+ to_chat(usr, SPAN_WARNING("A critical error has occurred! Contact a coder."))
+ return FALSE
+ var/flat_tacmap_png = SSassets.transport.get_asset_url(flat_tacmap_key)
+ var/datum/flattened_tacmap/new_flat = new(flat_tacmap_png, flat_tacmap_key)
+
+ if(faction == FACTION_MARINE)
+ GLOB.uscm_unannounced_map = new_flat
+ else //if(faction == XENO_HIVE_NORMAL)
+ GLOB.xeno_unannounced_map = new_flat
+
+ return TRUE
+
+/**
+ * Globally stores svg coords for a given faction.
+ *
+ * Arguments:
+ * * faction: which faction to save the data for: FACTION_MARINE or XENO_HIVE_NORMAL
+ * * svg_coords: an array of coordinates corresponding to an svg.
+ * * ckey: the ckey of the user who submitted this
+ */
+/datum/tacmap/drawing/proc/store_current_svg_coords(faction, svg_coords, ckey)
+ var/datum/svg_overlay/svg_store_overlay = new(svg_coords, ckey)
+
+ if(faction == FACTION_MARINE)
+ GLOB.uscm_svg_tacmap_data += svg_store_overlay
+ else if(faction == XENO_HIVE_NORMAL)
+ GLOB.xeno_svg_tacmap_data += svg_store_overlay
+ else
+ qdel(svg_store_overlay)
+ debug_log("SVG coordinates for [faction] are not implemented!")
+
/datum/controller/subsystem/minimaps/proc/fetch_tacmap_datum(zlevel, flags)
var/hash = "[zlevel]-[flags]"
if(hashed_tacmaps[hash])
@@ -442,7 +604,7 @@ SUBSYSTEM_DEF(minimaps)
marker_flags = MINIMAP_FLAG_USCM
/datum/action/minimap/observer
- minimap_flags = MINIMAP_FLAG_XENO|MINIMAP_FLAG_USCM|MINIMAP_FLAG_UPP|MINIMAP_FLAG_CLF|MINIMAP_FLAG_UPP
+ minimap_flags = MINIMAP_FLAG_ALL
marker_flags = NONE
hidden = TRUE
@@ -452,17 +614,61 @@ SUBSYSTEM_DEF(minimaps)
var/targeted_ztrait = ZTRAIT_GROUND
var/atom/owner
+ /// tacmap holder for holding the minimap
var/datum/tacmap_holder/map_holder
+/datum/tacmap/drawing
+ /// A url that will point to the wiki map for the current map as a fall back image
+ var/static/wiki_map_fallback
+
+ /// color selection for the tactical map canvas, defaults to black.
+ var/toolbar_color_selection = "black"
+ var/toolbar_updated_selection = "black"
+
+ var/canvas_cooldown_time = 4 MINUTES
+ var/flatten_map_cooldown_time = 3 MINUTES
+
+ /// boolean value to keep track if the canvas has been updated or not, the value is used in tgui state.
+ var/updated_canvas = FALSE
+ /// current flattend map
+ var/datum/flattened_tacmap/new_current_map
+ /// previous flattened map
+ var/datum/flattened_tacmap/old_map
+ /// current svg
+ var/datum/svg_overlay/current_svg
+
+ var/action_queue_change = 0
+
+ /// The last time the map has been flattened - used as a key to trick react into updating the canvas
+ var/last_update_time = 0
+ /// A temporary lock out time before we can open the new canvas tab to allow the tacmap time to fire
+ var/tacmap_ready_time = 0
+
/datum/tacmap/New(atom/source, minimap_type)
allowed_flags = minimap_type
owner = source
+/datum/tacmap/drawing/status_tab_view/New()
+ var/datum/tacmap/drawing/status_tab_view/uscm_tacmap
+ allowed_flags = MINIMAP_FLAG_USCM
+ owner = uscm_tacmap
+
+/datum/tacmap/drawing/status_tab_view/xeno/New()
+ var/datum/tacmap/drawing/status_tab_view/xeno/xeno_tacmap
+ allowed_flags = MINIMAP_FLAG_XENO
+ owner = xeno_tacmap
+
/datum/tacmap/Destroy()
map_holder = null
owner = null
return ..()
+/datum/tacmap/drawing/Destroy()
+ new_current_map = null
+ old_map = null
+ current_svg = null
+ return ..()
+
/datum/tacmap/tgui_interact(mob/user, datum/tgui/ui)
if(!map_holder)
var/level = SSmapping.levels_by_trait(targeted_ztrait)
@@ -476,11 +682,216 @@ SUBSYSTEM_DEF(minimaps)
ui = new(user, src, "TacticalMap")
ui.open()
+/datum/tacmap/drawing/tgui_interact(mob/user, datum/tgui/ui)
+ var/mob/living/carbon/xenomorph/xeno = user
+ var/is_xeno = istype(xeno)
+ var/faction = is_xeno ? xeno.hivenumber : user.faction
+ if(faction == FACTION_NEUTRAL && isobserver(user))
+ faction = allowed_flags == MINIMAP_FLAG_XENO ? XENO_HIVE_NORMAL : FACTION_MARINE
+
+ new_current_map = get_unannounced_tacmap_data_png(faction)
+ old_map = get_tacmap_data_png(faction)
+ current_svg = get_tacmap_data_svg(faction)
+
+ var/use_live_map = faction == FACTION_MARINE && skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT) || is_xeno
+
+ if(use_live_map && !map_holder)
+ var/level = SSmapping.levels_by_trait(targeted_ztrait)
+ if(!level[1])
+ return
+ map_holder = SSminimaps.fetch_tacmap_datum(level[1], allowed_flags)
+
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ if(!wiki_map_fallback)
+ var/wiki_url = CONFIG_GET(string/wikiurl)
+ var/obj/item/map/current_map/new_map = new
+ if(wiki_url && new_map.html_link)
+ wiki_map_fallback ="[wiki_url]/[new_map.html_link]"
+ else
+ debug_log("Failed to determine fallback wiki map! Attempted '[wiki_url]/[new_map.html_link]'")
+ qdel(new_map)
+
+ // Ensure we actually have the map image sent
+ resend_current_map_png(user)
+
+ if(use_live_map)
+ tacmap_ready_time = SSminimaps.next_fire + 2 SECONDS
+ addtimer(CALLBACK(src, PROC_REF(on_tacmap_fire), faction), SSminimaps.next_fire - world.time + 1 SECONDS)
+ user.client.register_map_obj(map_holder.map)
+
+ ui = new(user, src, "TacticalMap")
+ ui.open()
+
+/datum/tacmap/drawing/ui_data(mob/user)
+ var/list/data = list()
+
+ data["newCanvasFlatImage"] = new_current_map?.flat_tacmap
+ data["oldCanvasFlatImage"] = old_map?.flat_tacmap
+ data["svgData"] = current_svg?.svg_data
+
+ data["actionQueueChange"] = action_queue_change
+
+ data["toolbarColorSelection"] = toolbar_color_selection
+ data["toolbarUpdatedSelection"] = toolbar_updated_selection
+
+ if(isxeno(user))
+ data["canvasCooldown"] = max(GLOB.xeno_canvas_cooldown - world.time, 0)
+ else
+ data["canvasCooldown"] = max(GLOB.uscm_canvas_cooldown - world.time, 0)
+
+ data["nextCanvasTime"] = canvas_cooldown_time
+ data["updatedCanvas"] = updated_canvas
+
+ data["lastUpdateTime"] = last_update_time
+ data["tacmapReady"] = world.time > tacmap_ready_time
+
+ return data
+
/datum/tacmap/ui_static_data(mob/user)
var/list/data = list()
- data["mapRef"] = map_holder.map_ref
+ data["mapRef"] = map_holder?.map_ref
+ data["canDraw"] = FALSE
+ data["canViewTacmap"] = TRUE
+ data["canViewCanvas"] = FALSE
+ data["isXeno"] = FALSE
+
return data
+/datum/tacmap/drawing/ui_static_data(mob/user)
+ var/list/data = list()
+
+ data["mapRef"] = map_holder?.map_ref
+ data["canDraw"] = FALSE
+ data["mapFallback"] = wiki_map_fallback
+
+ var/mob/living/carbon/xenomorph/xeno = user
+ var/is_xeno = istype(xeno)
+ var/faction = is_xeno ? xeno.hivenumber : user.faction
+
+ data["isXeno"] = is_xeno
+ data["canViewTacmap"] = is_xeno
+ data["canViewCanvas"] = faction == FACTION_MARINE || faction == XENO_HIVE_NORMAL
+
+ if(faction == FACTION_MARINE && skillcheck(user, SKILL_LEADERSHIP, SKILL_LEAD_EXPERT) || faction == XENO_HIVE_NORMAL && isqueen(user))
+ data["canDraw"] = TRUE
+ data["canViewTacmap"] = TRUE
+
+ return data
+
+/datum/tacmap/drawing/status_tab_view/ui_static_data(mob/user)
+ var/list/data = list()
+ data["mapFallback"] = wiki_map_fallback
+ data["canDraw"] = FALSE
+ data["canViewTacmap"] = FALSE
+ data["canViewCanvas"] = TRUE
+ data["isXeno"] = FALSE
+
+ return data
+
+/datum/tacmap/drawing/status_tab_view/xeno/ui_static_data(mob/user)
+ var/list/data = list()
+ data["mapFallback"] = wiki_map_fallback
+ data["canDraw"] = FALSE
+ data["canViewTacmap"] = FALSE
+ data["canViewCanvas"] = TRUE
+ data["isXeno"] = TRUE
+
+ return data
+
+/datum/tacmap/drawing/ui_close(mob/user)
+ . = ..()
+ action_queue_change = 0
+ updated_canvas = FALSE
+ toolbar_color_selection = "black"
+ toolbar_updated_selection = "black"
+
+/datum/tacmap/drawing/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
+ . = ..()
+ if(.)
+ return
+
+ var/mob/user = ui.user
+ var/mob/living/carbon/xenomorph/xeno = user
+ var/faction = istype(xeno) ? xeno.hivenumber : user.faction
+ if(faction == FACTION_NEUTRAL && isobserver(user))
+ faction = allowed_flags == MINIMAP_FLAG_XENO ? XENO_HIVE_NORMAL : FACTION_MARINE
+
+ switch (action)
+ if ("menuSelect")
+ if(params["selection"] != "new canvas")
+ if(updated_canvas)
+ updated_canvas = FALSE
+ toolbar_updated_selection = toolbar_color_selection // doing this if it == canvas can cause a latency issue with the stroke.
+ else
+ distribute_current_map_png(faction)
+ last_update_time = world.time
+ // An attempt to get the image to load on first try in the interface, but doesn't seem always reliable
+
+ new_current_map = get_unannounced_tacmap_data_png(faction)
+ old_map = get_tacmap_data_png(faction)
+ current_svg = get_tacmap_data_svg(faction)
+
+ if ("updateCanvas")
+ // forces state change, this will export the svg.
+ toolbar_updated_selection = "export"
+ updated_canvas = TRUE
+ action_queue_change += 1
+
+ if ("clearCanvas")
+ toolbar_updated_selection = "clear"
+ updated_canvas = FALSE
+ action_queue_change += 1
+
+ if ("undoChange")
+ toolbar_updated_selection = "undo"
+ updated_canvas = FALSE
+ action_queue_change += 1
+
+ if ("selectColor")
+ var/newColor = params["color"]
+ if(newColor)
+ toolbar_color_selection = newColor
+ toolbar_updated_selection = newColor
+ action_queue_change += 1
+
+ if ("onDraw")
+ updated_canvas = FALSE
+
+ if ("selectAnnouncement")
+ if(!istype(params["image"], /list)) // potentially very serious?
+ return FALSE
+
+ if(faction == FACTION_MARINE)
+ GLOB.uscm_flat_tacmap_data += new_current_map
+ else if(faction == XENO_HIVE_NORMAL)
+ GLOB.xeno_flat_tacmap_data += new_current_map
+
+ store_current_svg_coords(faction, params["image"], user)
+ current_svg = get_tacmap_data_svg(faction)
+ old_map = get_tacmap_data_png(faction)
+
+ 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 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")
+ notify_ghosts(header = "Tactical Map", message = "The USCM tactical map has been updated.", ghost_sound = "sound/effects/sos-morse-code.ogg", notify_volume = 80, action = NOTIFY_USCM_TACMAP, enter_link = "uscm_tacmap=1", enter_text = "View", source = owner)
+
+ else if(faction == XENO_HIVE_NORMAL)
+ var/mutable_appearance/appearance = mutable_appearance(icon('icons/mob/hud/actions_xeno.dmi'), "toggle_queen_zoom")
+ COOLDOWN_START(GLOB, xeno_canvas_cooldown, canvas_cooldown_time)
+ xeno_maptext("The Queen has updated your hive mind map", "You sense something unusual...", faction)
+ notify_ghosts(header = "Tactical Map", message = "The Xenomorph tactical map has been updated.", ghost_sound = "sound/voice/alien_distantroar_3.ogg", notify_volume = 50, action = NOTIFY_XENO_TACMAP, enter_link = "xeno_tacmap=1", enter_text = "View", source = user, alert_overlay = appearance)
+
+ toolbar_updated_selection = toolbar_color_selection
+ message_admins("[key_name(user)] has updated the tactical map for [faction].")
+ updated_canvas = FALSE
+
+ return TRUE
+
/datum/tacmap/ui_status(mob/user)
if(!(isatom(owner)))
return UI_INTERACTIVE
@@ -493,7 +904,7 @@ SUBSYSTEM_DEF(minimaps)
else
return UI_CLOSE
-/datum/tacmap/xeno/ui_status(mob/user)
+/datum/tacmap/drawing/xeno/ui_status(mob/user)
if(!isxeno(user))
return UI_CLOSE
@@ -516,3 +927,71 @@ SUBSYSTEM_DEF(minimaps)
/datum/tacmap_holder/Destroy()
map = null
return ..()
+
+/datum/flattened_tacmap
+ var/flat_tacmap
+ var/asset_key
+ var/time
+
+/datum/flattened_tacmap/New(flat_tacmap, asset_key)
+ src.flat_tacmap = flat_tacmap
+ src.asset_key = asset_key
+ src.time = time_stamp()
+
+/datum/svg_overlay
+ var/svg_data
+ var/ckey
+ var/name
+ var/time
+
+/datum/svg_overlay/New(svg_data, mob/user)
+ src.svg_data = svg_data
+ src.ckey = user?.persistent_ckey
+ src.name = user?.real_name
+ src.time = time_stamp()
+
+/// Callback when timer indicates the tacmap is flattenable now
+/datum/tacmap/drawing/proc/on_tacmap_fire(faction)
+ distribute_current_map_png(faction)
+ last_update_time = world.time
+
+/// Gets the MINIMAP_FLAG for the provided faction or hivenumber if one exists
+/proc/get_minimap_flag_for_faction(faction)
+ switch(faction)
+ if(XENO_HIVE_NORMAL)
+ return MINIMAP_FLAG_XENO
+ if(FACTION_MARINE)
+ return MINIMAP_FLAG_USCM
+ if(FACTION_UPP)
+ return MINIMAP_FLAG_UPP
+ if(FACTION_WY)
+ return MINIMAP_FLAG_USCM
+ if(FACTION_CLF)
+ return MINIMAP_FLAG_CLF
+ if(FACTION_PMC)
+ return MINIMAP_FLAG_PMC
+ if(FACTION_YAUTJA)
+ return MINIMAP_FLAG_YAUTJA
+ if(XENO_HIVE_CORRUPTED)
+ return MINIMAP_FLAG_XENO_CORRUPTED
+ if(XENO_HIVE_ALPHA)
+ return MINIMAP_FLAG_XENO_ALPHA
+ if(XENO_HIVE_BRAVO)
+ return MINIMAP_FLAG_XENO_BRAVO
+ if(XENO_HIVE_CHARLIE)
+ return MINIMAP_FLAG_XENO_CHARLIE
+ if(XENO_HIVE_DELTA)
+ return MINIMAP_FLAG_XENO_DELTA
+ if(XENO_HIVE_FERAL)
+ return MINIMAP_FLAG_XENO_FERAL
+ if(XENO_HIVE_TAMED)
+ return MINIMAP_FLAG_XENO_TAMED
+ if(XENO_HIVE_MUTATED)
+ return MINIMAP_FLAG_XENO_MUTATED
+ if(XENO_HIVE_FORSAKEN)
+ return MINIMAP_FLAG_XENO_FORSAKEN
+ if(XENO_HIVE_YAUTJA)
+ return MINIMAP_FLAG_YAUTJA
+ if(XENO_HIVE_RENEGADE)
+ return MINIMAP_FLAG_XENO_RENEGADE
+ return 0
diff --git a/code/controllers/subsystem/nanoui.dm b/code/controllers/subsystem/nanoui.dm
index 1f33227a7fee..85ad0d32aaf4 100644
--- a/code/controllers/subsystem/nanoui.dm
+++ b/code/controllers/subsystem/nanoui.dm
@@ -5,6 +5,12 @@ SUBSYSTEM_DEF(nano)
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/profiler.dm b/code/controllers/subsystem/profiler.dm
new file mode 100644
index 000000000000..f9ba79046c2c
--- /dev/null
+++ b/code/controllers/subsystem/profiler.dm
@@ -0,0 +1,74 @@
+#define PROFILER_FILENAME "profiler.json"
+#define SENDMAPS_FILENAME "sendmaps.json"
+
+SUBSYSTEM_DEF(profiler)
+ name = "Profiler"
+ init_order = SS_INIT_PROFILER
+ runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
+ wait = 300 SECONDS
+ var/fetch_cost = 0
+ var/write_cost = 0
+
+/datum/controller/subsystem/profiler/stat_entry(msg)
+ msg += "F:[round(fetch_cost,1)]ms"
+ msg += "|W:[round(write_cost,1)]ms"
+ return msg
+
+/datum/controller/subsystem/profiler/Initialize()
+ if(CONFIG_GET(flag/auto_profile))
+ StartProfiling()
+ else
+ StopProfiling() //Stop the early start profiler
+ return SS_INIT_SUCCESS
+
+/datum/controller/subsystem/profiler/OnConfigLoad()
+ if(CONFIG_GET(flag/auto_profile))
+ StartProfiling()
+ can_fire = TRUE
+ else
+ StopProfiling()
+ can_fire = FALSE
+
+/datum/controller/subsystem/profiler/fire()
+ DumpFile()
+
+/datum/controller/subsystem/profiler/Shutdown()
+ if(CONFIG_GET(flag/auto_profile))
+ DumpFile(allow_yield = FALSE)
+ world.Profile(PROFILE_CLEAR, type = "sendmaps")
+ return ..()
+
+/datum/controller/subsystem/profiler/proc/StartProfiling()
+ world.Profile(PROFILE_START)
+ world.Profile(PROFILE_START, type = "sendmaps")
+
+/datum/controller/subsystem/profiler/proc/StopProfiling()
+ world.Profile(PROFILE_STOP)
+ world.Profile(PROFILE_STOP, type = "sendmaps")
+
+/datum/controller/subsystem/profiler/proc/DumpFile(allow_yield = TRUE)
+ var/timer = TICK_USAGE_REAL
+ var/current_profile_data = world.Profile(PROFILE_REFRESH, format = "json")
+ var/current_sendmaps_data = world.Profile(PROFILE_REFRESH, type = "sendmaps", format="json")
+ fetch_cost = MC_AVERAGE(fetch_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
+ if(allow_yield)
+ CHECK_TICK
+
+ if(!length(current_profile_data)) //Would be nice to have explicit proc to check this
+ stack_trace("Warning, profiling stopped manually before dump.")
+ var/prof_file = file("[GLOB.log_directory]/[PROFILER_FILENAME]")
+ if(fexists(prof_file))
+ fdel(prof_file)
+ if(!length(current_sendmaps_data)) //Would be nice to have explicit proc to check this
+ stack_trace("Warning, sendmaps profiling stopped manually before dump.")
+ var/sendmaps_file = file("[GLOB.log_directory]/[SENDMAPS_FILENAME]")
+ if(fexists(sendmaps_file))
+ fdel(sendmaps_file)
+
+ timer = TICK_USAGE_REAL
+ WRITE_FILE(prof_file, current_profile_data)
+ WRITE_FILE(sendmaps_file, current_sendmaps_data)
+ write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
+
+#undef PROFILER_FILENAME
+#undef SENDMAPS_FILENAME
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/vote.dm b/code/controllers/subsystem/vote.dm
index a56e10636a1e..79bd10c65736 100644
--- a/code/controllers/subsystem/vote.dm
+++ b/code/controllers/subsystem/vote.dm
@@ -276,7 +276,8 @@ SUBSYSTEM_DEF(vote)
var/datum/game_mode/M = mode_type
if(initial(M.config_tag))
var/vote_cycle_met = !initial(M.vote_cycle) || (text2num(SSperf_logging?.round?.id) % initial(M.vote_cycle) == 0)
- if(initial(M.votable) && vote_cycle_met)
+ var/min_players_met = length(GLOB.clients) >= M.required_players
+ if(initial(M.votable) && vote_cycle_met && min_players_met)
choices += initial(M.config_tag)
if("groundmap")
question = "Ground map vote"
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/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 9faaf299669d..06c116d3758e 100644
--- a/code/datums/ammo/ammo.dm
+++ b/code/datums/ammo/ammo.dm
@@ -164,7 +164,8 @@
/datum/ammo/proc/knockback_effects(mob/living/living_mob, obj/projectile/fired_projectile)
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
- target.apply_effect(0.7, WEAKEN) // 0.9 seconds of stun, per agreement from Balance Team when switched from MC stuns to exact stuns
+ target.Stun(0.7) // Previous comment said they believed 0.7 was 0.9s and that the balance team approved this. Geez...
+ target.KnockDown(0.7)
target.apply_effect(1, SUPERSLOW)
target.apply_effect(2, SLOW)
to_chat(target, SPAN_XENODANGER("You are shaken by the sudden impact!"))
diff --git a/code/datums/ammo/bullet/rifle.dm b/code/datums/ammo/bullet/rifle.dm
index b6085572e3b9..0be6f1db8ff4 100644
--- a/code/datums/ammo/bullet/rifle.dm
+++ b/code/datums/ammo/bullet/rifle.dm
@@ -175,7 +175,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
- target.apply_effect(0.5, WEAKEN)
+ target.KnockDown(0.5) // purely for visual effect, noone actually cares
+ target.Stun(0.5)
target.apply_effect(2, SUPERSLOW)
target.apply_effect(5, SLOW)
else
diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm
index 77e1e6401472..96ac4cb6ba04 100644
--- a/code/datums/ammo/bullet/shotgun.dm
+++ b/code/datums/ammo/bullet/shotgun.dm
@@ -25,7 +25,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
- target.apply_effect(0.5, WEAKEN)
+ target.KnockDown(0.5) // If you ask me the KD should be left out, but players like their visual cues
+ target.Stun(0.5)
target.apply_effect(1, SUPERSLOW)
target.apply_effect(3, SLOW)
else
@@ -249,7 +250,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
- target.apply_effect(0.5, WEAKEN)
+ target.KnockDown(0.5) // If you ask me the KD should be left out, but players like their visual cues
+ target.Stun(0.5)
target.apply_effect(2, SUPERSLOW)
target.apply_effect(5, SLOW)
else
@@ -338,7 +340,8 @@
return
shake_camera(M, 3, 4)
- M.apply_effect(2, WEAKEN)
+ M.KnockDown(2) // If you ask me the KD should be left out, but players like their visual cues
+ M.Stun(2)
M.apply_effect(4, SLOW)
if(iscarbonsizexeno(M))
to_chat(M, SPAN_XENODANGER("The impact knocks you off your feet!"))
@@ -351,7 +354,8 @@
if(iscarbonsizexeno(living_mob))
var/mob/living/carbon/xenomorph/target = living_mob
to_chat(target, SPAN_XENODANGER("You are shaken and slowed by the sudden impact!"))
- target.apply_effect(0.5, WEAKEN)
+ target.KnockDown(0.5) // If you ask me the KD should be left out, but players like their visual cues
+ target.Stun(0.5)
target.apply_effect(2, SUPERSLOW)
target.apply_effect(5, SLOW)
else
diff --git a/code/datums/ammo/energy.dm b/code/datums/ammo/energy.dm
index 01c69ffa0015..27d2b7d4e0c5 100644
--- a/code/datums/ammo/energy.dm
+++ b/code/datums/ammo/energy.dm
@@ -103,8 +103,8 @@
icon_state = "shrapnel_plasma"
damage_type = BURN
-/datum/ammo/bullet/shrapnel/plasma/on_hit_mob(mob/hit_mob, obj/projectile/hit_projectile)
- hit_mob.apply_effect(2, WEAKEN)
+/datum/ammo/bullet/shrapnel/plasma/on_hit_mob(mob/living/hit_mob, obj/projectile/hit_projectile)
+ hit_mob.Stun(2)
/datum/ammo/energy/yautja/caster
name = "root caster bolt"
@@ -141,12 +141,8 @@
log_attack("[key_name(C)] was stunned by a high power stun bolt from [key_name(P.firer)] at [get_area(P)]")
if(ishuman(C))
- var/mob/living/carbon/human/H = C
stun_time++
- H.apply_effect(stun_time, WEAKEN)
- else
- M.apply_effect(stun_time, WEAKEN)
-
+ C.apply_effect(stun_time, WEAKEN)
C.apply_effect(stun_time, STUN)
..()
@@ -217,12 +213,7 @@
continue
to_chat(M, SPAN_DANGER("A powerful electric shock ripples through your body, freezing you in place!"))
M.apply_effect(stun_time, STUN)
-
- if (ishuman(M))
- var/mob/living/carbon/human/H = M
- H.apply_effect(stun_time, WEAKEN)
- else
- M.apply_effect(stun_time, WEAKEN)
+ M.apply_effect(stun_time, WEAKEN)
/datum/ammo/energy/yautja/rifle/bolt
name = "plasma rifle bolt"
diff --git a/code/datums/ammo/misc.dm b/code/datums/ammo/misc.dm
index bdb284753dc4..607a6e517a7c 100644
--- a/code/datums/ammo/misc.dm
+++ b/code/datums/ammo/misc.dm
@@ -190,8 +190,8 @@
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.
- O.show_message(SPAN_DANGER("[M] catches the [S]!"), SHOW_MESSAGE_VISIBLE) //Tell them the can was caught.
+ for(var/mob/O in viewers(GLOB.world_view_size, P)) //find all people in view.
+ O.show_message(SPAN_DANGER("[M] catches [S]!"), SHOW_MESSAGE_VISIBLE) //Tell them the can was caught.
return //Can was caught.
if(ishuman(M))
var/mob/living/carbon/human/H = M
diff --git a/code/datums/ammo/rocket.dm b/code/datums/ammo/rocket.dm
index 52914f745110..66a9f65bdcdd 100644
--- a/code/datums/ammo/rocket.dm
+++ b/code/datums/ammo/rocket.dm
@@ -65,7 +65,6 @@
/datum/ammo/rocket/ap/on_hit_mob(mob/M, obj/projectile/P)
var/turf/T = get_turf(M)
M.ex_act(150, P.dir, P.weapon_cause_data, 100)
- M.apply_effect(2, WEAKEN)
M.apply_effect(2, PARALYZE)
if(ishuman_strict(M)) // No yautya or synths. Makes humans gib on direct hit.
M.ex_act(300, P.dir, P.weapon_cause_data, 100)
@@ -84,7 +83,6 @@
var/hit_something = 0
for(var/mob/M in T)
M.ex_act(150, P.dir, P.weapon_cause_data, 100)
- M.apply_effect(4, WEAKEN)
M.apply_effect(4, PARALYZE)
hit_something = 1
continue
diff --git a/code/datums/ammo/xeno.dm b/code/datums/ammo/xeno.dm
index 8e20a1ccb38c..654ab88c7abc 100644
--- a/code/datums/ammo/xeno.dm
+++ b/code/datums/ammo/xeno.dm
@@ -49,8 +49,10 @@
if(!isxeno(M))
if(insta_neuro)
- M.adjust_effect(1 * power, WEAKEN)
- return
+ if(M.GetKnockDownDuration() < 3) // Why are you not using KnockDown(3) ? Do you even know 3 is SIX seconds ? So many questions left unanswered.
+ M.KnockDown(power)
+ M.Stun(power)
+ return
if(ishuman(M))
M.apply_effect(2.5, SUPERSLOW)
@@ -64,8 +66,10 @@
no_clothes_neuro = TRUE
if(no_clothes_neuro)
- M.adjust_effect(1 * power, WEAKEN) // KD them a bit more
- M.visible_message(SPAN_DANGER("[M] falls prone."))
+ if(M.GetKnockDownDuration() < 5) // Nobody actually knows what this means. Supposedly it means less than 10 seconds. Frankly if you get locked into 10s of knockdown to begin with there are bigger issues.
+ M.KnockDown(power)
+ M.Stun(power)
+ M.visible_message(SPAN_DANGER("[M] falls prone."))
/proc/apply_scatter_neuro(mob/living/M)
if(ishuman(M))
@@ -77,7 +81,8 @@
H.visible_message(SPAN_DANGER("[M] shrugs off the neurotoxin!"))
return
- M.apply_effect(0.5, WEAKEN)
+ M.KnockDown(0.7) // Completely arbitrary values from another time where stun timers incorrectly stacked. Kill as needed.
+ M.Stun(0.7)
M.visible_message(SPAN_DANGER("[M] falls prone."))
/datum/ammo/xeno/toxin/on_hit_mob(mob/M,obj/projectile/P)
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/autofire/autofire.dm b/code/datums/components/autofire/autofire.dm
index d052127effc3..455fb70a9fa1 100644
--- a/code/datums/components/autofire/autofire.dm
+++ b/code/datums/components/autofire/autofire.dm
@@ -82,6 +82,8 @@
/datum/component/automatedfire/autofire/proc/initiate_shot()
SIGNAL_HANDLER
if(shooting)//if we are already shooting, it means the shooter is still on cooldown
+ if(bursting && (world.time > (next_fire + (burstfire_shot_delay * burst_shots_to_fire))))
+ hard_reset()
return
shooting = TRUE
process_shot()
diff --git a/code/datums/components/cell.dm b/code/datums/components/cell.dm
new file mode 100644
index 000000000000..81ef3733e2e2
--- /dev/null
+++ b/code/datums/components/cell.dm
@@ -0,0 +1,202 @@
+#define UNLIMITED_CHARGE -1
+#define UNLIMITED_DISTANCE -1
+
+/datum/component/cell
+ dupe_mode = COMPONENT_DUPE_UNIQUE
+ /// Maximum charge of the power cell, set to -1 for infinite charge
+ var/max_charge = 10000
+ /// Initial max charge of the power cell
+ var/initial_max_charge
+ /// Current charge of power cell
+ var/charge = 10000
+ /// If the component can be recharged by hitting its parent with a cell
+ var/hit_charge = FALSE
+ /// The maximum amount that can be recharged per tick when using a cell to recharge this component
+ var/max_recharge_tick = 400
+ /// If draining charge on process(), how much to drain per process call
+ var/charge_drain = 10
+ /// If the parent should show cell charge on examine
+ var/display_charge = TRUE
+ /// From how many tiles at the highest someone can examine the parent to see the charge
+ var/charge_examine_range = 1
+ /// If the component requires a cell to be inserted to work instead of having an integrated one
+ var/cell_insert = FALSE
+ /// Ref to an inserted cell. Should only be null if cell_insert is false
+ var/obj/item/cell/inserted_cell
+
+
+/datum/component/cell/Initialize(
+ max_charge = 10000,
+ hit_charge = FALSE,
+ max_recharge_tick = 400,
+ charge_drain = 10,
+ display_charge = TRUE,
+ charge_examine_range = 1,
+ cell_insert = FALSE,
+ )
+
+ . = ..()
+ if(!isatom(parent))
+ return COMPONENT_INCOMPATIBLE
+
+ src.max_charge = max_charge
+ charge = max_charge
+ src.hit_charge = hit_charge
+ src.max_recharge_tick = max_recharge_tick
+ src.charge_drain = charge_drain
+ src.display_charge = display_charge
+ src.charge_examine_range = charge_examine_range
+ src.cell_insert = cell_insert
+
+/datum/component/cell/Destroy(force, silent)
+ QDEL_NULL(inserted_cell)
+ return ..()
+
+
+/datum/component/cell/RegisterWithParent()
+ ..()
+ RegisterSignal(parent, list(COMSIG_PARENT_ATTACKBY, COMSIG_ITEM_ATTACKED), PROC_REF(on_object_hit))
+ RegisterSignal(parent, COMSIG_CELL_ADD_CHARGE, PROC_REF(add_charge))
+ RegisterSignal(parent, COMSIG_CELL_USE_CHARGE, PROC_REF(use_charge))
+ RegisterSignal(parent, COMSIG_CELL_CHECK_CHARGE, PROC_REF(has_charge))
+ RegisterSignal(parent, COMSIG_CELL_START_TICK_DRAIN, PROC_REF(start_drain))
+ RegisterSignal(parent, COMSIG_CELL_STOP_TICK_DRAIN, PROC_REF(stop_drain))
+ RegisterSignal(parent, COMSIG_CELL_REMOVE_CELL, PROC_REF(remove_cell))
+ RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
+ RegisterSignal(parent, COMSIG_ATOM_EMP_ACT, PROC_REF(on_emp))
+
+/datum/component/cell/process()
+ use_charge(null, charge_drain)
+
+/datum/component/cell/proc/on_emp(datum/source, severity)
+ SIGNAL_HANDLER
+
+ use_charge(null, round(max_charge / severity))
+
+/datum/component/cell/proc/start_drain(datum/source)
+ SIGNAL_HANDLER
+
+ START_PROCESSING(SSobj, src)
+
+/datum/component/cell/proc/stop_drain(datum/source)
+ SIGNAL_HANDLER
+
+ STOP_PROCESSING(SSobj, src)
+
+/datum/component/cell/proc/on_examine(datum/source, mob/examiner, list/examine_text)
+ SIGNAL_HANDLER
+
+ if(!display_charge)
+ return
+
+ if((charge_examine_range != UNLIMITED_DISTANCE) && get_dist(examiner, parent) > charge_examine_range)
+ return
+
+ examine_text += "A small gauge in the corner reads \"Power: [round(100 * charge / max_charge)]%\"."
+
+/datum/component/cell/proc/on_object_hit(datum/source, obj/item/cell/attack_obj, mob/living/attacker, params)
+ SIGNAL_HANDLER
+
+ if(!hit_charge || !istype(attack_obj))
+ return
+
+ if(!cell_insert)
+ INVOKE_ASYNC(src, PROC_REF(charge_from_cell), attack_obj, attacker)
+
+ else
+ insert_cell(attack_obj, attacker)
+
+ return COMPONENT_NO_AFTERATTACK|COMPONENT_CANCEL_ITEM_ATTACK
+
+/datum/component/cell/proc/insert_cell(obj/item/cell/power_cell, mob/living/user)
+ if(inserted_cell)
+ to_chat(user, SPAN_WARNING("There's already a power cell in [parent]!"))
+ return
+
+ if(SEND_SIGNAL(parent, COMSIG_CELL_TRY_INSERT_CELL) & COMPONENT_CANCEL_CELL_INSERT)
+ return
+
+ power_cell.drop_to_floor(user)
+ power_cell.forceMove(parent)
+ inserted_cell = power_cell
+ charge = power_cell.charge
+ max_charge = power_cell.maxcharge
+
+/datum/component/cell/proc/remove_cell(mob/living/user)
+ SIGNAL_HANDLER
+
+ user.put_in_hands(inserted_cell, TRUE)
+ to_chat(user, SPAN_NOTICE("You remove [inserted_cell] from [parent]."))
+ inserted_cell = null
+ max_charge = initial_max_charge
+ charge = 0
+
+/datum/component/cell/proc/charge_from_cell(obj/item/cell/power_cell, mob/living/user)
+ if(max_charge == UNLIMITED_CHARGE)
+ to_chat(user, SPAN_WARNING("[parent] doesn't need more power."))
+ return
+
+ while(charge < max_charge)
+ if(SEND_SIGNAL(parent, COMSIG_CELL_TRY_RECHARGING, user) & COMPONENT_CELL_NO_RECHARGE)
+ return
+
+ if(power_cell.charge <= 0)
+ to_chat(user, SPAN_WARNING("[power_cell] is completely dry."))
+ return
+
+ if(!do_after(user, 1 SECONDS, (INTERRUPT_ALL & (~INTERRUPT_MOVED)), BUSY_ICON_BUILD, power_cell, INTERRUPT_DIFF_LOC))
+ to_chat(user, SPAN_WARNING("You were interrupted."))
+ return
+
+ if(power_cell.charge <= 0)
+ return
+
+ var/to_transfer = min(max_recharge_tick, power_cell.charge, (max_charge - charge))
+ if(power_cell.use(to_transfer))
+ add_charge(null, to_transfer)
+ to_chat(user, "You transfer some power between [power_cell] and [parent]. The gauge now reads: [round(100 * charge / max_charge)]%.")
+
+/datum/component/cell/proc/add_charge(datum/source, charge_add = 0)
+ SIGNAL_HANDLER
+
+ if(max_charge == UNLIMITED_CHARGE)
+ return
+
+ if(!charge_add)
+ return
+
+ charge = clamp(charge + charge_add, 0, max_charge)
+
+/datum/component/cell/proc/use_charge(datum/source, charge_use = 0)
+ SIGNAL_HANDLER
+
+ if(max_charge == UNLIMITED_CHARGE)
+ return
+
+ if(!charge_use)
+ return
+
+ if(!charge)
+ return COMPONENT_CELL_NO_USE_CHARGE
+
+ charge = clamp(charge - charge_use, 0, max_charge)
+
+ if(!charge)
+ on_charge_empty()
+ return
+
+/datum/component/cell/proc/has_charge(datum/source, charge_amount = 0)
+ SIGNAL_HANDLER
+
+ if(!charge)
+ return COMPONENT_CELL_CHARGE_INSUFFICIENT
+
+ if(charge < charge_amount)
+ return COMPONENT_CELL_CHARGE_INSUFFICIENT
+
+/datum/component/cell/proc/on_charge_empty()
+ stop_drain()
+ SEND_SIGNAL(parent, COMSIG_CELL_OUT_OF_CHARGE)
+
+#undef UNLIMITED_CHARGE
+#undef UNLIMITED_DISTANCE
diff --git a/code/datums/components/healing_reduction.dm b/code/datums/components/healing_reduction.dm
index b98d52cab251..54ea02dc6b73 100644
--- a/code/datums/components/healing_reduction.dm
+++ b/code/datums/components/healing_reduction.dm
@@ -21,33 +21,36 @@ Humans will take continuous damage instead.
src.healing_reduction_dissipation = healing_reduction_dissipation
src.max_buildup = max_buildup
-/datum/component/healing_reduction/InheritComponent(datum/component/healing_reduction/C, i_am_original, healing_reduction)
+/datum/component/healing_reduction/InheritComponent(datum/component/healing_reduction/inherit_component, i_am_original, healing_reduction)
. = ..()
- if(!C)
+ if(!inherit_component)
src.healing_reduction += healing_reduction
else
- src.healing_reduction += C.healing_reduction
+ src.healing_reduction += inherit_component.healing_reduction
src.healing_reduction = min(src.healing_reduction, max_buildup)
/datum/component/healing_reduction/process(delta_time)
if(!parent)
qdel(src)
- healing_reduction = max(healing_reduction - healing_reduction_dissipation * delta_time, 0)
+ return
- if(ishuman(parent)) //deals brute to humans
- var/mob/living/carbon/human/H = parent
- H.apply_damage(healing_reduction_dissipation * delta_time, BRUTE)
+ healing_reduction = max(healing_reduction - healing_reduction_dissipation * delta_time, 0)
if(healing_reduction <= 0)
qdel(src)
+ return
+
+ if(ishuman(parent)) //deals brute to humans
+ var/mob/living/carbon/human/human_parent = parent
+ human_parent.apply_damage(healing_reduction_dissipation * delta_time, BRUTE)
var/color = GLOW_COLOR
var/intensity = healing_reduction/max_buildup
color += num2text(MAX_ALPHA*intensity, 2, 16)
- var/atom/A = parent
- A.add_filter("healing_reduction", 2, list("type" = "outline", "color" = color, "size" = 1))
+ var/atom/parent_atom = parent
+ parent_atom.add_filter("healing_reduction", 2, list("type" = "outline", "color" = color, "size" = 1))
/datum/component/healing_reduction/RegisterWithParent()
START_PROCESSING(SSdcs, src)
@@ -64,14 +67,14 @@ Humans will take continuous damage instead.
COMSIG_XENO_ON_HEAL_WOUNDS,
COMSIG_XENO_APPEND_TO_STAT
))
- var/atom/A = parent
- A.remove_filter("healing_reduction")
+ var/atom/parent_atom = parent
+ parent_atom.remove_filter("healing_reduction")
-/datum/component/healing_reduction/proc/stat_append(mob/M, list/L)
+/datum/component/healing_reduction/proc/stat_append(mob/target_mob, list/stat_list)
SIGNAL_HANDLER
- L += "Healing Reduction: [healing_reduction]/[max_buildup]"
+ stat_list += "Healing Reduction: [healing_reduction]/[max_buildup]"
-/datum/component/healing_reduction/proc/apply_healing_reduction(mob/living/carbon/xenomorph/X, list/healing)
+/datum/component/healing_reduction/proc/apply_healing_reduction(mob/living/carbon/xenomorph/xeno, list/healing)
SIGNAL_HANDLER
healing["healing"] -= healing_reduction
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..933b547aa1f2 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
@@ -32,18 +32,18 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
)
departments += marines_by_squad
var/list/manifest_out = list()
- for(var/datum/data/record/t in GLOB.data_core.general)
- if(t.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
+ for(var/datum/data/record/record_entry in GLOB.data_core.general)
+ if(record_entry.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
continue
- var/name = t.fields["name"]
- var/rank = t.fields["rank"]
- var/squad = t.fields["squad"]
+ var/name = record_entry.fields["name"]
+ var/rank = record_entry.fields["rank"]
+ var/squad = record_entry.fields["squad"]
if(isnull(name) || isnull(rank))
continue
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,16 +83,16 @@ 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
+ for(var/datum/data/record/record_entry in GLOB.data_core.general)
+ if(record_entry.fields["mob_faction"] != FACTION_MARINE) //we process only USCM humans
continue
- var/name = t.fields["name"]
- var/rank = t.fields["rank"]
- var/real_rank = t.fields["real_rank"]
- var/squad_name = t.fields["squad"]
+ var/name = record_entry.fields["name"]
+ var/rank = record_entry.fields["rank"]
+ var/real_rank = record_entry.fields["real_rank"]
+ var/squad_name = record_entry.fields["squad"]
if(isnull(name) || isnull(rank) || isnull(real_rank))
continue
@@ -104,37 +104,37 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
break
isactive[name] = active ? "Active" : "Inactive"
else
- isactive[name] = t.fields["p_stat"]
+ isactive[name] = record_entry.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
@@ -216,14 +216,14 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/datum/data/record/foundrecord
var/use_name = isnull(ref)
- for(var/datum/data/record/t in GLOB.data_core.general)
+ for(var/datum/data/record/record_entry in GLOB.data_core.general)
if(use_name)
- if(t.fields["name"] == name)
- foundrecord = t
+ if(record_entry.fields["name"] == name)
+ foundrecord = record_entry
break
else
- if(t.fields["ref"] == ref)
- foundrecord = t
+ if(record_entry.fields["ref"] == ref)
+ foundrecord = record_entry
break
if(foundrecord)
@@ -239,102 +239,106 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
return TRUE
return FALSE
-/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H)
+/datum/datacore/proc/manifest_inject(mob/living/carbon/human/target)
var/assignment
- if(H.job)
- assignment = H.job
+ if(target.job)
+ assignment = target.job
else
assignment = "Unassigned"
- var/id = add_zero(num2hex(H.gid), 6) //this was the best they could come up with? A large random number? *sigh*
+ var/id = add_zero(num2hex(target.gid), 6) //this was the best they could come up with? A large random number? *sigh*
//var/icon/front = new(get_id_photo(H), dir = SOUTH)
//var/icon/side = new(get_id_photo(H), dir = WEST)
//General Record
- var/datum/data/record/G = new()
- G.fields["id"] = id
- G.fields["name"] = H.real_name
- G.fields["real_rank"] = H.job
- G.fields["rank"] = assignment
- G.fields["squad"] = H.assigned_squad ? H.assigned_squad.name : null
- G.fields["age"] = H.age
- G.fields["p_stat"] = "Active"
- G.fields["m_stat"] = "Stable"
- G.fields["sex"] = H.gender
- G.fields["species"] = H.get_species()
- G.fields["origin"] = H.origin
- G.fields["faction"] = H.personal_faction
- G.fields["mob_faction"] = H.faction
- G.fields["religion"] = H.religion
- G.fields["ref"] = WEAKREF(H)
- //G.fields["photo_front"] = front
- //G.fields["photo_side"] = side
-
- if(H.gen_record && !jobban_isbanned(H, "Records"))
- G.fields["notes"] = H.gen_record
+ var/datum/data/record/record_general = new()
+ record_general.fields["id"] = id
+ record_general.fields["name"] = target.real_name
+ record_general.name = target.real_name
+ record_general.fields["real_rank"] = target.job
+ record_general.fields["rank"] = assignment
+ record_general.fields["squad"] = target.assigned_squad ? target.assigned_squad.name : null
+ record_general.fields["age"] = target.age
+ record_general.fields["p_stat"] = "Active"
+ record_general.fields["m_stat"] = "Stable"
+ record_general.fields["sex"] = target.gender
+ record_general.fields["species"] = target.get_species()
+ record_general.fields["origin"] = target.origin
+ record_general.fields["faction"] = target.personal_faction
+ record_general.fields["mob_faction"] = target.faction
+ record_general.fields["religion"] = target.religion
+ record_general.fields["ref"] = WEAKREF(target)
+ //record_general.fields["photo_front"] = front
+ //record_general.fields["photo_side"] = side
+
+ if(target.gen_record && !jobban_isbanned(target, "Records"))
+ record_general.fields["notes"] = target.gen_record
else
- G.fields["notes"] = "No notes found."
- general += G
+ record_general.fields["notes"] = "No notes found."
+ general += record_general
//Medical Record
- var/datum/data/record/M = new()
- M.fields["id"] = id
- M.fields["name"] = H.real_name
- M.fields["b_type"] = H.blood_type
- M.fields["mi_dis"] = "None"
- M.fields["mi_dis_d"] = "No minor disabilities have been declared."
- M.fields["ma_dis"] = "None"
- M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
- M.fields["alg"] = "None"
- M.fields["alg_d"] = "No allergies have been detected in this patient."
- M.fields["cdi"] = "None"
- M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
- M.fields["last_scan_time"] = null
- M.fields["last_scan_result"] = "No scan data on record" // body scanner results
- M.fields["autodoc_data"] = list()
- M.fields["autodoc_manual"] = list()
- M.fields["ref"] = WEAKREF(H)
-
- if(H.med_record && !jobban_isbanned(H, "Records"))
- M.fields["notes"] = H.med_record
+ var/datum/data/record/record_medical = new()
+ record_medical.fields["id"] = id
+ record_medical.fields["name"] = target.real_name
+ record_medical.name = target.name
+ record_medical.fields["b_type"] = target.blood_type
+ record_medical.fields["mi_dis"] = "None"
+ record_medical.fields["mi_dis_d"] = "No minor disabilities have been declared."
+ record_medical.fields["ma_dis"] = "None"
+ record_medical.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
+ record_medical.fields["alg"] = "None"
+ record_medical.fields["alg_d"] = "No allergies have been detected in this patient."
+ record_medical.fields["cdi"] = "None"
+ record_medical.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
+ record_medical.fields["last_scan_time"] = null
+ record_medical.fields["last_scan_result"] = "No scan data on record" // body scanner results
+ record_medical.fields["autodoc_data"] = list()
+ record_medical.fields["autodoc_manual"] = list()
+ record_medical.fields["ref"] = WEAKREF(target)
+
+ if(target.med_record && !jobban_isbanned(target, "Records"))
+ record_medical.fields["notes"] = target.med_record
else
- M.fields["notes"] = "No notes found."
- medical += M
+ record_medical.fields["notes"] = "No notes found."
+ medical += record_medical
//Security Record
- var/datum/data/record/S = new()
- S.fields["id"] = id
- S.fields["name"] = H.real_name
- S.fields["criminal"] = "None"
- S.fields["incident"] = ""
- S.fields["ref"] = WEAKREF(H)
+ var/datum/data/record/record_security = new()
+ record_security.fields["id"] = id
+ record_security.fields["name"] = target.real_name
+ record_security.name = target.real_name
+ record_security.fields["criminal"] = "None"
+ record_security.fields["incident"] = ""
+ record_security.fields["ref"] = WEAKREF(target)
- if(H.sec_record && !jobban_isbanned(H, "Records"))
- var/new_comment = list("entry" = H.sec_record, "created_by" = list("name" = "\[REDACTED\]", "rank" = "Military Police"), "deleted_by" = null, "deleted_at" = null, "created_at" = "Pre-Deployment")
- S.fields["comments"] = list("1" = new_comment)
- S.fields["notes"] = H.sec_record
- security += S
+ if(target.sec_record && !jobban_isbanned(target, "Records"))
+ var/new_comment = list("entry" = target.sec_record, "created_by" = list("name" = "\[REDACTED\]", "rank" = "Military Police"), "deleted_by" = null, "deleted_at" = null, "created_at" = "Pre-Deployment")
+ record_security.fields["comments"] = list("1" = new_comment)
+ record_security.fields["notes"] = target.sec_record
+ security += record_security
//Locked Record
- var/datum/data/record/L = new()
- L.fields["id"] = md5("[H.real_name][H.job]")
- L.fields["name"] = H.real_name
- L.fields["rank"] = H.job
- L.fields["age"] = H.age
- L.fields["sex"] = H.gender
- L.fields["b_type"] = H.b_type
- L.fields["species"] = H.get_species()
- L.fields["origin"] = H.origin
- L.fields["faction"] = H.personal_faction
- L.fields["religion"] = H.religion
- L.fields["ref"] = WEAKREF(H)
-
- if(H.exploit_record && !jobban_isbanned(H, "Records"))
- L.fields["exploit_record"] = H.exploit_record
+ var/datum/data/record/record_locked = new()
+ record_locked.fields["id"] = md5("[target.real_name][target.job]")
+ record_locked.fields["name"] = target.real_name
+ record_locked.name = target.real_name
+ record_locked.fields["rank"] = target.job
+ record_locked.fields["age"] = target.age
+ record_locked.fields["sex"] = target.gender
+ record_locked.fields["b_type"] = target.b_type
+ record_locked.fields["species"] = target.get_species()
+ record_locked.fields["origin"] = target.origin
+ record_locked.fields["faction"] = target.personal_faction
+ record_locked.fields["religion"] = target.religion
+ record_locked.fields["ref"] = WEAKREF(target)
+
+ if(target.exploit_record && !jobban_isbanned(target, "Records"))
+ record_locked.fields["exploit_record"] = target.exploit_record
else
- L.fields["exploit_record"] = "No additional information acquired."
- locked += L
+ record_locked.fields["exploit_record"] = "No additional information acquired."
+ locked += record_locked
/proc/get_id_photo(mob/living/carbon/human/H)
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/flu.dm b/code/datums/diseases/flu.dm
index 15a2fe90afaf..fad0b15228b1 100644
--- a/code/datums/diseases/flu.dm
+++ b/code/datums/diseases/flu.dm
@@ -46,7 +46,7 @@
stage--
return
*/
- if(affected_mob.resting && 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/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/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..fb8d4b8a5a69 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,41 +43,41 @@
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++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_LEADER, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/leader/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Squad Leader in the USCM"))
- to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (heavies < max_heavies && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(human.client, JOB_SQUAD_SPECIALIST, time_required_for_job))))
heavies++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/spec/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
- to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (medics < max_medics && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(human.client, JOB_SQUAD_MEDIC, time_required_for_job))))
medics++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_MEDIC, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/medic/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Hospital Corpsman in the USCM"))
- to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else if (engineers < max_engineers && (!mind || (HAS_FLAG(human.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(human.client, JOB_SQUAD_ENGI, time_required_for_job))))
engineers++
human.client?.prefs.copy_all_to(human, JOB_SQUAD_ENGI, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/engineer/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are an Engineer in the USCM"))
- to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
else
human.client?.prefs.copy_all_to(human, JOB_SQUAD_MARINE, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/pfc/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Rifleman in the USCM"))
- to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(human, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
sleep(10)
diff --git a/code/datums/emergency_calls/cryo_marines_heavy.dm b/code/datums/emergency_calls/cryo_marines_heavy.dm
index f4fe3c9f2a57..42f25a461254 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,37 +35,37 @@
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++
arm_equipment(H, /datum/equipment_preset/uscm/leader_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Squad Leader in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if (heavies < max_heavies && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(H.client, JOB_SQUAD_SPECIALIST, time_required_for_job))
heavies++
arm_equipment(H, /datum/equipment_preset/uscm/specialist_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if(smartgunners < max_smartgunners && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(H.client, JOB_SQUAD_SMARTGUN, time_required_for_job))
smartgunners++
arm_equipment(H, /datum/equipment_preset/uscm/smartgunner_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Smartgunner in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if(engineers < max_engineers && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(H.client, JOB_SQUAD_ENGI, time_required_for_job))
engineers++
arm_equipment(H, /datum/equipment_preset/uscm/engineer_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are an Engineer in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if (medics < max_medics && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(H.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(H, /datum/equipment_preset/uscm/medic_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Hospital Corpsman in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else
arm_equipment(H, /datum/equipment_preset/uscm/private_equipped/cryo, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Rifleman in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(H, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
sleep(10)
to_chat(H, SPAN_BOLD("Objectives: [objectives]"))
diff --git a/code/datums/emergency_calls/cryo_spec.dm b/code/datums/emergency_calls/cryo_spec.dm
index 6cc7c905efbc..8d563b0693f8 100644
--- a/code/datums/emergency_calls/cryo_spec.dm
+++ b/code/datums/emergency_calls/cryo_spec.dm
@@ -34,7 +34,7 @@
human.client?.prefs.copy_all_to(human, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/spec/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
- to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
sleep(10)
diff --git a/code/datums/emergency_calls/deathsquad.dm b/code/datums/emergency_calls/deathsquad.dm
index 0bfab8fbf2b7..1cd5bdef6713 100644
--- a/code/datums/emergency_calls/deathsquad.dm
+++ b/code/datums/emergency_calls/deathsquad.dm
@@ -3,7 +3,7 @@
//Weyland-Yutani Deathsquad - W-Y Deathsquad. Event only
/datum/emergency_call/death
- name = "Weyland Whiteout Operators"
+ name = "Weyland Whiteout Operators (!DEATHSQUAD!)"
mob_max = 8
mob_min = 5
arrival_message = "'!`2*%slau#*jer t*h$em a!l%. le&*ve n(o^ w&*nes%6es.*v$e %#d ou^'"
@@ -18,41 +18,76 @@
// DEATH SQUAD--------------------------------------------------------------------------------
-/datum/emergency_call/death/create_member(datum/mind/M, turf/override_spawn_loc)
+/datum/emergency_call/death/create_member(datum/mind/player, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()
if(!istype(spawn_loc))
return //Didn't find a useable spawn point.
- var/mob/living/carbon/human/H = new(spawn_loc)
- M.transfer_to(H, TRUE)
+ var/mob/living/carbon/human/person = new(spawn_loc)
+ player.transfer_to(person, TRUE)
- if(!leader && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(H.client, JOB_SQUAD_LEADER, time_required_for_job))
- leader = H
- to_chat(H, SPAN_ROLE_HEADER("You are the Whiteout Team Leader!"))
- to_chat(H, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
- arm_equipment(H, /datum/equipment_preset/pmc/w_y_whiteout/leader, TRUE, TRUE)
- else if(medics < max_medics && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(H.client, JOB_SQUAD_MEDIC, time_required_for_job))
+ if(!leader && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(person.client, JOB_SQUAD_LEADER, time_required_for_job))
+ leader = person
+ to_chat(person, SPAN_ROLE_HEADER("You are the Whiteout Team Leader!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/leader, TRUE, TRUE)
+ else if(medics < max_medics && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(person.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
- to_chat(H, SPAN_ROLE_HEADER("You are a Whiteout Team Medic!"))
- to_chat(H, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
- arm_equipment(H, /datum/equipment_preset/pmc/w_y_whiteout/medic, TRUE, TRUE)
- else if(heavies < max_heavies && HAS_FLAG(H.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(H.client, list(JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN), time_required_for_job))
+ to_chat(person, SPAN_ROLE_HEADER("You are a Whiteout Team Medic!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/medic, TRUE, TRUE)
+ else if(heavies < max_heavies && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(person.client, list(JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN), time_required_for_job))
heavies++
- to_chat(H, SPAN_ROLE_HEADER("You are a Whiteout Team Terminator!"))
- to_chat(H, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
- arm_equipment(H, /datum/equipment_preset/pmc/w_y_whiteout/terminator, TRUE, TRUE)
+ to_chat(person, SPAN_ROLE_HEADER("You are a Whiteout Team Terminator!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/terminator, TRUE, TRUE)
else
- to_chat(H, SPAN_ROLE_HEADER("You are a Whiteout Team Operative!"))
- to_chat(H, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
- arm_equipment(H, /datum/equipment_preset/pmc/w_y_whiteout, TRUE, TRUE)
+ to_chat(person, SPAN_ROLE_HEADER("You are a Whiteout Team Operative!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout, TRUE, TRUE)
- addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), H, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)
+ addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), person, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)
+
+/datum/emergency_call/death/low_threat
+ name = "Weyland Whiteout Operators"
+
+// DEATH SQUAD--------------------------------------------------------------------------------
+/datum/emergency_call/death/low_threat/create_member(datum/mind/player, turf/override_spawn_loc)
+ var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()
+
+ if(!istype(spawn_loc))
+ return //Didn't find a useable spawn point.
+
+ var/mob/living/carbon/human/person = new(spawn_loc)
+ player.transfer_to(person, TRUE)
+
+ if(!leader && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(person.client, JOB_SQUAD_LEADER, time_required_for_job))
+ leader = person
+ to_chat(person, SPAN_ROLE_HEADER("You are the Whiteout Team Leader!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/low_threat/leader, TRUE, TRUE)
+ else if(medics < max_medics && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(person.client, JOB_SQUAD_MEDIC, time_required_for_job))
+ medics++
+ to_chat(person, SPAN_ROLE_HEADER("You are a Whiteout Team Medic!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/low_threat/medic, TRUE, TRUE)
+ else if(heavies < max_heavies && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(person.client, list(JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN), time_required_for_job))
+ heavies++
+ to_chat(person, SPAN_ROLE_HEADER("You are a Whiteout Team Terminator!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/low_threat/terminator, TRUE, TRUE)
+ else
+ to_chat(person, SPAN_ROLE_HEADER("You are a Whiteout Team Operative!"))
+ to_chat(person, SPAN_ROLE_BODY("Whiteout protocol is in effect for the target, all assets onboard are to be liquidated with expediency unless otherwise instructed by Weyland Yutani personnel holding the position of Director or above."))
+ arm_equipment(person, /datum/equipment_preset/pmc/w_y_whiteout/low_threat, TRUE, TRUE)
+
+ addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), person, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)
//################################################################################################
// Marine commandos - USCM Deathsquad. Event only
/datum/emergency_call/marsoc
- name = "Marine Raider Strike Team"
+ name = "Marine Raider Strike Team (!DEATHSQUAD!)"
mob_max = 8
mob_min = 5
probability = 0
@@ -81,7 +116,7 @@
return
/datum/emergency_call/marsoc_covert
- name = "Marine Raider Operatives (Covert)"
+ name = "Marine Raider Operatives (!DEATHSQUAD! Covert)"
mob_max = 8
mob_min = 5
probability = 0
@@ -107,3 +142,27 @@
to_chat(H, SPAN_BOLDNOTICE("You are absolutely loyal to High Command and must follow their directives."))
to_chat(H, SPAN_BOLDNOTICE("Execute the mission assigned to you with extreme prejudice!"))
return
+
+
+/datum/emergency_call/marsoc/low_threat
+ name = "Marine Raider Operatives"
+
+/datum/emergency_call/marsoc/low_threat/create_member(datum/mind/MIND)
+
+ var/turf/spawn_loc = get_spawn_point()
+
+ if(!istype(spawn_loc))
+ return //Didn't find a useable spawn point.
+
+ var/mob/living/carbon/human/player = new(spawn_loc)
+ MIND.transfer_to(player, TRUE)
+ if(!leader && HAS_FLAG(player.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(player.client, JOB_SQUAD_LEADER, time_required_for_job)) //First one spawned is always the leader.
+ leader = player
+ to_chat(player, SPAN_WARNING(FONT_SIZE_BIG("You are a Marine Raider Team Leader, better than all the rest.")))
+ arm_equipment(player, /datum/equipment_preset/uscm/marsoc/low_threat/sl, TRUE, TRUE)
+ else
+ to_chat(player, SPAN_WARNING(FONT_SIZE_BIG("You are an elite Marine Raider, the best of the best.")))
+ arm_equipment(player, /datum/equipment_preset/uscm/marsoc/low_threat, TRUE, TRUE)
+ to_chat(player, SPAN_BOLDNOTICE("You are absolutely loyal to High Command and must follow their directives."))
+ to_chat(player, SPAN_BOLDNOTICE("Execute the mission assigned to you with extreme prejudice!"))
+ return
diff --git a/code/datums/emergency_calls/emergency_call.dm b/code/datums/emergency_calls/emergency_call.dm
index 9db46955a5ea..c6f71382b877 100644
--- a/code/datums/emergency_calls/emergency_call.dm
+++ b/code/datums/emergency_calls/emergency_call.dm
@@ -200,7 +200,7 @@
SSticker.mode.picked_calls += src
show_join_message() //Show our potential candidates the message to let them join.
- message_admins("Distress beacon: '[name]' activated [src.hostility? "[SPAN_WARNING("(THEY ARE HOSTILE)")]":"(they are friendly)"]. Looking for candidates.")
+ message_admins("Distress beacon: '[name]' activated [hostility? "[SPAN_WARNING("(THEY ARE HOSTILE)")]":"(they are friendly)"]. Looking for candidates.")
if(!quiet_launch)
marine_announcement("A distress beacon has been launched from the [MAIN_SHIP_NAME].", "Priority Alert", 'sound/AI/distressbeacon.ogg', logging = ARES_LOG_SECURITY)
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/tank_crew.dm b/code/datums/emergency_calls/tank_crew.dm
index fb437c179e48..f8d20051c244 100644
--- a/code/datums/emergency_calls/tank_crew.dm
+++ b/code/datums/emergency_calls/tank_crew.dm
@@ -24,11 +24,10 @@
sleep(5)
arm_equipment(H, /datum/equipment_preset/uscm/tank/full, TRUE, TRUE)
to_chat(H, SPAN_ROLE_HEADER("You are a Vehicle Crewman in the USCM"))
- to_chat(H, SPAN_ROLE_BODY("You are here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
+ to_chat(H, SPAN_ROLE_BODY("You are here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(H, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))
sleep(10)
to_chat(H, SPAN_BOLD("Objectives: [objectives]"))
GLOB.data_core.manifest_inject(H) //Put people in crew manifest
-
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/upp_commando.dm b/code/datums/emergency_calls/upp_commando.dm
index 14c4af46c27b..1bc2b59ba08c 100644
--- a/code/datums/emergency_calls/upp_commando.dm
+++ b/code/datums/emergency_calls/upp_commando.dm
@@ -1,7 +1,7 @@
//UPP COMMANDOS
/datum/emergency_call/upp_commando
- name = "UPP Commandos"
+ name = "UPP Commandos (!DEATHSQUAD!)"
mob_max = 6
probability = 0
objectives = "Stealthily assault the ship. Use your silenced weapons, tranquilizers, and night vision to get the advantage on the enemy. Take out the power systems, comms and engine. Stick together and keep a low profile."
@@ -51,3 +51,29 @@
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), H, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)
+/datum/emergency_call/upp_commando/low_threat
+ name = "UPP Commandos"
+
+/datum/emergency_call/upp_commando/create_member(datum/mind/mind, turf/override_spawn_loc)
+ var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()
+
+ if(!istype(spawn_loc))
+ return //Didn't find a useable spawn point.
+
+ var/mob/living/carbon/human/person = new(spawn_loc)
+ mind.transfer_to(person, TRUE)
+
+ if(!leader && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(person.client, JOB_SQUAD_LEADER, time_required_for_job)) //First one spawned is always the leader.
+ leader = person
+ arm_equipment(person, /datum/equipment_preset/upp/commando/leader/low_threat, TRUE, TRUE)
+ to_chat(person, SPAN_ROLE_HEADER("You are a Commando Team Leader of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
+ else if(medics < max_medics && HAS_FLAG(person.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(person.client, JOB_SQUAD_MEDIC, time_required_for_job))
+ medics++
+ to_chat(person, SPAN_ROLE_HEADER("You are a Commando Medic of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
+ arm_equipment(person, /datum/equipment_preset/upp/commando/medic/low_threat, TRUE, TRUE)
+ else
+ to_chat(person, SPAN_ROLE_HEADER("You are a Commando of the Union of Progressive People, a powerful socialist state that rivals the United Americas!"))
+ arm_equipment(person, /datum/equipment_preset/upp/commando/low_threat, TRUE, TRUE)
+ print_backstory(person)
+
+ addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), person, SPAN_BOLD("Objectives: [objectives]")), 1 SECONDS)
diff --git a/code/datums/emergency_calls/whiskey_outpost.dm b/code/datums/emergency_calls/whiskey_outpost.dm
index 436e02007c6c..c6a7e4947756 100644
--- a/code/datums/emergency_calls/whiskey_outpost.dm
+++ b/code/datums/emergency_calls/whiskey_outpost.dm
@@ -28,30 +28,30 @@
if(!leader && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(mob.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = mob
arm_equipment(mob, /datum/equipment_preset/dust_raider/leader, TRUE, TRUE)
- to_chat(mob, SPAN_BOLDNOTICE("You are a Squad Leader in the USCM, your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(mob, SPAN_BOLDNOTICE("You are a Squad Leader in the USCM, your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if (heavies < max_heavies && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_HEAVY) && check_timelock(mob.client, JOB_SQUAD_SPECIALIST, time_required_for_job))
heavies++
arm_equipment(mob, /datum/equipment_preset/dust_raider/specialist, TRUE, TRUE)
- to_chat(mob, SPAN_BOLDNOTICE("You are a Specialist in the USCM, your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(mob, SPAN_BOLDNOTICE("You are a Specialist in the USCM, your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if(smartgunners < max_smartgunners && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(mob.client, JOB_SQUAD_SMARTGUN, time_required_for_job))
smartgunners++
arm_equipment(mob, /datum/equipment_preset/dust_raider/smartgunner, TRUE, TRUE)
- to_chat(mob, SPAN_BOLDNOTICE("You are a Smartgunner in the USCM, your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(mob, SPAN_BOLDNOTICE("You are a Smartgunner in the USCM, your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if(engineers < max_engineers && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(mob.client, JOB_SQUAD_ENGI, time_required_for_job))
engineers++
arm_equipment(mob, /datum/equipment_preset/dust_raider/engineer, TRUE, TRUE)
- to_chat(mob, SPAN_BOLDNOTICE("You are an Engineer in the USCM, your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(mob, SPAN_BOLDNOTICE("You are an Engineer in the USCM, your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else if (medics < max_medics && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(mob.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(mob, /datum/equipment_preset/dust_raider/medic, TRUE, TRUE)
- to_chat(mob, SPAN_BOLDNOTICE("You are a Hospital Corpsman in the USCM, your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]."))
+ to_chat(mob, SPAN_BOLDNOTICE("You are a Hospital Corpsman in the USCM, your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
else
arm_equipment(mob, /datum/equipment_preset/dust_raider/private, TRUE, TRUE)
to_chat(mob, SPAN_BOLDNOTICE("You are a Rifleman in the USCM, your squad is here to assist in the defence of [SSmapping.configs[GROUND_MAP].map_name]."))
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/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index 16825ab8a7ba..207310ac34c5 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -166,15 +166,15 @@
/datum/teleport/instant/science/teleportChecks()
if(istype(teleatom, /obj/item/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
- teleatom.visible_message(SPAN_DANGER("The [teleatom] bounces off of the portal!"))
+ teleatom.visible_message(SPAN_DANGER("[teleatom] bounces off of the portal!"))
return 0
if(length(teleatom.search_contents_for(/obj/item/disk/nuclear)))
if(istype(teleatom, /mob/living))
var/mob/living/MM = teleatom
- MM.visible_message(SPAN_DANGER("The [MM] bounces off of the portal!"),SPAN_DANGER("Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through."))
+ MM.visible_message(SPAN_DANGER("[MM] bounces off of the portal!"),SPAN_DANGER("Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through."))
else
- teleatom.visible_message(SPAN_DANGER("The [teleatom] bounces off of the portal!"))
+ teleatom.visible_message(SPAN_DANGER("[teleatom] bounces off of the portal!"))
return 0
if(is_admin_level(destination.z))
diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm
index c6fc23c68eba..11ba15146430 100644
--- a/code/datums/looping_sounds/_looping_sound.dm
+++ b/code/datums/looping_sounds/_looping_sound.dm
@@ -37,6 +37,15 @@
/// Has the looping started yet?
var/loop_started = FALSE
+ /**
+ * Let's you make a "loud" sound that "projects." IE you can hear this sound from a further distance away.
+ * Think of like an air raid siren. They're loud if you're close yeah... but you can hear them from mad far away, bruv
+ * with a longer "falloff distance." Fixes the extra_range stuff
+ */
+ var/is_sound_projecting = FALSE
+ ///only applicable to is_sound_projecting: max range till sound volume starts dropping as distance increases
+ var/falloff_distance = 50
+
/* // as of yet unused varen \\
/// How much the sound will be affected by falloff per tile.
@@ -130,19 +139,18 @@
sound_to_play.channel = get_free_channel()
sound_to_play.volume = volume_override || volume //Use volume as fallback if theres no override
SEND_SOUND(parent, sound_to_play)
- else
- playsound(
- parent,
- sound_to_play,
- volume,
- vary,
- extra_range//,
- // falloff_exponent = falloff_exponent,
- // pressure_affected = pressure_affected,
- // ignore_walls = ignore_walls,
- // falloff_distance = falloff_distance,
- // use_reverb = use_reverb
- )
+ return
+ if (is_sound_projecting)
+ playsound(parent, sound_to_play, volume, vary, extra_range, VOLUME_SFX, 0, 0, falloff_distance)
+ return
+
+ playsound(
+ parent,
+ sound_to_play,
+ volume,
+ vary,
+ extra_range
+ )
/// Returns the sound we should now be playing.
/datum/looping_sound/proc/get_sound(_mid_sounds)
diff --git a/code/datums/looping_sounds/misc_sounds.dm b/code/datums/looping_sounds/misc_sounds.dm
new file mode 100644
index 000000000000..6411b3f51f4a
--- /dev/null
+++ b/code/datums/looping_sounds/misc_sounds.dm
@@ -0,0 +1,3 @@
+/datum/looping_sound/looping_launch_announcement_alarm
+ mid_sounds = list('sound/vehicles/Dropships/single_alarm_brr_dropship_1.ogg' = 1)
+ start_sound = list('sound/vehicles/Dropships/single_alarm_brr_dropship_1.ogg' = 1)
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 d401a4e7f91d..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
@@ -283,6 +283,12 @@ var/list/datum/mob_hud/huds = list(
return
/mob/living/carbon/xenomorph/med_hud_set_health()
+ if(QDELETED(src))
+ return
+
+ if(!(HEALTH_HUD_XENO in hud_list))
+ CRASH("hud_list lacks HEALTH_HUD_XENO despite not being deleted in med_hud_set_health()")
+
var/image/holder = hud_list[HEALTH_HUD_XENO]
var/health_hud_type = "xenohealth"
@@ -666,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()
@@ -678,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
@@ -708,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
@@ -727,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
@@ -797,6 +803,6 @@ var/global/image/hud_icon_hudfocus
if (tag_found)
tag_holder.overlays += image('icons/mob/hud/hud.dmi', src, "prae_tag")
- var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && body_position == STANDING_UP // Don't display roots on targets down due to eg. Knockdowns, Knockouts, SSD, resting, and so on
+ 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/paygrades/factions/civillian/civilian.dm b/code/datums/paygrades/factions/civillian/civilian.dm
deleted file mode 100644
index 2c2aa5feac1c..000000000000
--- a/code/datums/paygrades/factions/civillian/civilian.dm
+++ /dev/null
@@ -1,30 +0,0 @@
-/datum/paygrade/civilian
- name = "Civilian Paygrade"
- pay_multiplier = 0.5 // civvies are poor
-
-/datum/paygrade/civilian/civilian
- paygrade = "C"
- name = "Civilian"
-
-/datum/paygrade/civilian/nurse
- paygrade = "CN"
- name = "Nurse"
- prefix = "Nrs."
-
-/datum/paygrade/civilian/doctor
- paygrade = "CD"
- name = "Doctor"
- prefix = "Dr."
- pay_multiplier = 0.75
-
-/datum/paygrade/civilian/professor
- paygrade = "CCMO"
- name = "Professor"
- prefix = "Prof."
- pay_multiplier = 1
-
-/datum/paygrade/civillian/representative
- paygrade = "CR"
- name = "Representative"
- prefix = "Rep."
- pay_multiplier = 1
diff --git a/code/datums/paygrades/factions/other/civilian.dm b/code/datums/paygrades/factions/other/civilian.dm
new file mode 100644
index 000000000000..6587a82a54d6
--- /dev/null
+++ b/code/datums/paygrades/factions/other/civilian.dm
@@ -0,0 +1,52 @@
+/datum/paygrade/civilian
+ name = "Civilian Paygrade"
+ pay_multiplier = 0.5 // civvies are poor
+
+/datum/paygrade/civilian/civilian
+ paygrade = PAY_SHORT_CIV
+ name = "Civilian"
+ prefix = "C"
+
+/datum/paygrade/civilian/nurse
+ paygrade = PAY_SHORT_CNUR
+ name = "Nurse"
+ prefix = "Nrs."
+
+/datum/paygrade/civilian/doctor
+ paygrade = PAY_SHORT_CDOC
+ name = "Doctor"
+ prefix = "Dr."
+ pay_multiplier = 0.75
+
+/datum/paygrade/civilian/professor
+ paygrade = PAY_SHORT_CCMO
+ name = "Professor"
+ prefix = "Prof."
+ pay_multiplier = 1
+
+/datum/paygrade/civillian/representative
+ paygrade = PAY_SHORT_CREP
+ name = "Representative"
+ prefix = "Rep."
+ pay_multiplier = 1
+
+/datum/paygrade/civillian/officer
+ paygrade = PAY_SHORT_CPO
+ name = "Officer"
+ prefix = "Off."
+ pay_multiplier = 0.66
+
+/datum/paygrade/civillian/officer/senior
+ paygrade = PAY_SHORT_CSPO
+ name = "Senior Officer"
+ prefix = "Sr. Off."
+ pay_multiplier = 0.8
+
+/datum/paygrade/civilian/rebel
+ paygrade = PAY_SHORT_REB
+ name = "Rebel"
+
+/datum/paygrade/civilian/rebel/leader
+ paygrade = PAY_SHORT_REBC
+ name = "Rebel Commander"
+ prefix = "CMDR."
diff --git a/code/datums/paygrades/factions/other/cmb.dm b/code/datums/paygrades/factions/other/cmb.dm
index a4b656d8692d..eeeb061ea335 100644
--- a/code/datums/paygrades/factions/other/cmb.dm
+++ b/code/datums/paygrades/factions/other/cmb.dm
@@ -3,78 +3,29 @@
pay_multiplier = 1.4 // Government work. Nice benefits.
/datum/paygrade/cmb/standard
- paygrade = "GS-9"
+ paygrade = PAY_SHORT_CMBD
name = "CMB Deputy"
prefix = "Dep."
/datum/paygrade/cmb/leader
- paygrade = "GS-13"
+ paygrade = PAY_SHORT_CMBM
name = "CMB Marshal"
prefix = "Marshal"
/datum/paygrade/cmb/syn
- paygrade = "GS-C.9"
+ paygrade = PAY_SHORT_CMBS
name = "CMB Investigative Synthetic"
-/datum/paygrade/cmb/liaison
- paygrade = "GS-6"
+/datum/paygrade/cmb/icc
+ paygrade = PAY_SHORT_ICCA
+ name = "Interstellar Commerce Commission Agent"
+ prefix = "Agent"
+
+/datum/paygrade/cmb/icc/liaison
+ paygrade = PAY_SHORT_ICCL
name = "Interstellar Commerce Commission Corporate Liaison"
prefix = "Exec."
/datum/paygrade/cmb/observer
- paygrade = "GS-3"
+ paygrade = PAY_SHORT_IHRO
name = "Interstellar Human Rights Observer"
-/datum/paygrade/marine
- name = "Marine Paygrade"
- rank_pin = /obj/item/clothing/accessory/ranks/marine
- pay_multiplier = 1
-
-// ENLISTED PAYGRADES
-
-/datum/paygrade/marine/e1
- paygrade = "ME1"
- name = "Private"
- prefix = "PVT"
- rank_pin = /obj/item/clothing/accessory/ranks/marine/e1
- ranking = 0
- pay_multiplier = 0.8
-
-/datum/paygrade/marine/e2
- paygrade = "ME2"
- name = "Private First Class"
- prefix = "PFC"
- rank_pin = /obj/item/clothing/accessory/ranks/marine/e2
- ranking = 1
- pay_multiplier = 1 // the default.
-
-/datum/paygrade/marine/e3
- paygrade = "ME3"
- name = "Lance Corporal"
- prefix = "LCpl"
- rank_pin = /obj/item/clothing/accessory/ranks/marine/e3
- ranking = 2
- pay_multiplier = 1.4
-
-/datum/paygrade/marine/e4
- paygrade = "ME4"
- name = "Corporal"
- prefix = "Cpl"
- rank_pin = /obj/item/clothing/accessory/ranks/marine/e4
- ranking = 3
- pay_multiplier = 1.6
-
-/datum/paygrade/marine/e5
- paygrade = "ME5"
- name = "Sergeant"
- prefix = "Sgt"
- rank_pin = /obj/item/clothing/accessory/ranks/marine/e5
- ranking = 4
- pay_multiplier = 1.8
-
-/datum/paygrade/marine/e6
- paygrade = "ME6"
- name = "Staff Sergeant"
- prefix = "SSgt"
- rank_pin = /obj/item/clothing/accessory/ranks/marine/e6
- ranking = 5
- pay_multiplier = 2
diff --git a/code/datums/paygrades/factions/other/dutch_dozen.dm b/code/datums/paygrades/factions/other/dutch_dozen.dm
index 9b8bd7e4f8c4..8877bd11afbb 100644
--- a/code/datums/paygrades/factions/other/dutch_dozen.dm
+++ b/code/datums/paygrades/factions/other/dutch_dozen.dm
@@ -1,33 +1,33 @@
/datum/paygrade/dutch
name = "Dutch Paygrade"
pay_multiplier = 5
+ fprefix = "DTC."
/datum/paygrade/dutch/standard
- paygrade = "DTC"
+ paygrade = PAY_SHORT_DTC
name = "Dutch's Dozen Standard Mercenary"
- prefix = "DTC."
/datum/paygrade/dutch/medic
- paygrade = "DTCM"
+ paygrade = PAY_SHORT_DTCM
name = "Dutch's Dozen Medic"
- prefix = "DTC MED."
+ prefix = "MED."
pay_multiplier = 6
/datum/paygrade/dutch/specialist_flamer
- paygrade = "DTCF"
+ paygrade = PAY_SHORT_DTCF
name = "Dutch's Dozen Flamethrower Specialist"
- prefix = "DTC SPC."
+ prefix = "SPC."
pay_multiplier = 6
/datum/paygrade/dutch/specialist_minigunner
- paygrade = "DTCMG"
- name = "Dutch's Dozen Medic"
- prefix = "DTC SPC."
+ paygrade = PAY_SHORT_DTCMG
+ name = "Dutch's Dozen Machinegunner"
+ prefix = "SPC."
pay_multiplier = 6
/datum/paygrade/dutch/arnold
- paygrade = "ARN"
- name = "Arnold"
- prefix = "DTC LDR."
+ paygrade = PAY_SHORT_DTCA
+ name = "Major"
+ prefix = "LDR."
pay_multiplier = 9
diff --git a/code/datums/paygrades/factions/other/misc.dm b/code/datums/paygrades/factions/other/misc.dm
index 30865228d3af..04e522580b50 100644
--- a/code/datums/paygrades/factions/other/misc.dm
+++ b/code/datums/paygrades/factions/other/misc.dm
@@ -1,9 +1,9 @@
-/datum/paygrade/misc/operator
+/datum/paygrade/misc/operative
name = "Operative"
- paygrade = "O"
+ paygrade = PAY_SHORT_OPR
pay_multiplier = 1 //????
/datum/paygrade/misc/synth
name = "Synthetic"
- paygrade = "SYN"
+ paygrade = PAY_SHORT_SYN
pay_multiplier = 1
diff --git a/code/datums/paygrades/factions/upp/upp.dm b/code/datums/paygrades/factions/upp/upp.dm
index a1363383ad55..8670f99269dc 100644
--- a/code/datums/paygrades/factions/upp/upp.dm
+++ b/code/datums/paygrades/factions/upp/upp.dm
@@ -5,115 +5,115 @@
//UPP Enlisted
/datum/paygrade/upp/ue0
- paygrade = "UE0"
+ paygrade = PAY_SHORT_UEC
name = "Conscript"
pay_multiplier = 0.05
/datum/paygrade/upp/ue1
- paygrade = "UE1"
+ paygrade = PAY_SHORT_UE1
name = "Private"
prefix = "PVT."
/datum/paygrade/upp/ue2
- paygrade = "UE2"
+ paygrade = PAY_SHORT_UE2
name = "Private First Class"
prefix = "PFC."
pay_multiplier = 0.2
/datum/paygrade/upp/ue3
- paygrade = "UE3"
+ paygrade = PAY_SHORT_UE3
name = "Korporal"
prefix = "Kpl."
pay_multiplier = 0.3
/datum/paygrade/upp/ue4
- paygrade = "UE4"
+ paygrade = PAY_SHORT_UE4
name = "Junior Serzhant"
prefix = "JrSzh."
pay_multiplier = 0.5
/datum/paygrade/upp/ue5
- paygrade = "UE5"
+ paygrade = PAY_SHORT_UE5
name = "Serzhant"
prefix = "Szh."
pay_multiplier = 0.7
/datum/paygrade/upp/ue6
- paygrade = "UE6"
+ paygrade = PAY_SHORT_UE6
name = "Master Serzhant"
prefix = "MSzh."
pay_multiplier = 0.9
//UPP Commandos
/datum/paygrade/upp/uc1
- paygrade = "UC1"
+ paygrade = PAY_SHORT_UC1
name = "Junior Kommando"
prefix = "JKdo."
pay_multiplier = 1.5
/datum/paygrade/upp/uc2
- paygrade = "UC2"
+ paygrade = PAY_SHORT_UC2
name = "2nd Kommando"
prefix = "2ndKdo."
pay_multiplier = 2
/datum/paygrade/upp/uc3
- paygrade = "UC3"
+ paygrade = PAY_SHORT_UC3
name = "1st Kommando"
prefix = "1stKdo."
pay_multiplier = 2.5
//UPP Officers
/datum/paygrade/upp/uo1
- paygrade = "UO1"
+ paygrade = PAY_SHORT_UO1
name = "Leytenant"
prefix = "Lt."
pay_multiplier = 1.25
/datum/paygrade/upp/uo2
- paygrade = "UO2"
+ paygrade = PAY_SHORT_UO2
name = "Senior Leytenant"
prefix = "Sr. LT."
pay_multiplier = 1.5
/datum/paygrade/upp/uo3
- paygrade = "UO3"
+ paygrade = PAY_SHORT_UO3
name = "Kapitan"
prefix = "Kpt."
pay_multiplier = 2
/datum/paygrade/upp/uo4
- paygrade = "UO4"
- name = "Mayjor."
+ paygrade = PAY_SHORT_UO4
+ name = "Mayjor"
prefix = "May."
pay_multiplier = 2.5
/datum/paygrade/upp/uo5
- paygrade = "UO5"
+ paygrade = PAY_SHORT_UO5
name = "Leytenant Kolonel"
prefix = "Lt. Kol."
pay_multiplier = 3
/datum/paygrade/upp/uo6
- paygrade = "UO6"
+ paygrade = PAY_SHORT_UO6
name = "Kolonel"
prefix = "Kol."
pay_multiplier = 4
/datum/paygrade/upp/uo7
- paygrade = "UO7"
+ paygrade = PAY_SHORT_UO7
name = "Mayjor General"
prefix = "May. Gen."
pay_multiplier = 5
/datum/paygrade/upp/uo8
- paygrade = "UO8"
+ paygrade = PAY_SHORT_UO8
name = "Leytenant General"
prefix = "Lt. Gen."
pay_multiplier = 6
/datum/paygrade/upp/uo9
- paygrade = "UO9"
+ paygrade = PAY_SHORT_UO9
name = "Army General"
prefix = "Gen."
pay_multiplier = 7
diff --git a/code/datums/paygrades/factions/uscm/marine.dm b/code/datums/paygrades/factions/uscm/marine.dm
index e351311e65ee..7d315f364025 100644
--- a/code/datums/paygrades/factions/uscm/marine.dm
+++ b/code/datums/paygrades/factions/uscm/marine.dm
@@ -6,7 +6,7 @@
// ENLISTED PAYGRADES
/datum/paygrade/marine/e1
- paygrade = "ME1"
+ paygrade = PAY_SHORT_ME1
name = "Private"
prefix = "PVT"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e1
@@ -14,7 +14,7 @@
pay_multiplier = 1.6
/datum/paygrade/marine/e2
- paygrade = "ME2"
+ paygrade = PAY_SHORT_ME2
name = "Private First Class"
prefix = "PFC"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e2
@@ -22,7 +22,7 @@
pay_multiplier = 1.7
/datum/paygrade/marine/e3
- paygrade = "ME3"
+ paygrade = PAY_SHORT_ME3
name = "Lance Corporal"
prefix = "LCpl"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e3
@@ -30,7 +30,7 @@
pay_multiplier = 1.9
/datum/paygrade/marine/e4
- paygrade = "ME4"
+ paygrade = PAY_SHORT_ME4
name = "Corporal"
prefix = "Cpl"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e4
@@ -38,7 +38,7 @@
pay_multiplier = 2.1
/datum/paygrade/marine/e5
- paygrade = "ME5"
+ paygrade = PAY_SHORT_ME5
name = "Sergeant"
prefix = "Sgt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e5
@@ -46,7 +46,7 @@
pay_multiplier = 2.2
/datum/paygrade/marine/e6
- paygrade = "ME6"
+ paygrade = PAY_SHORT_ME6
name = "Staff Sergeant"
prefix = "SSgt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e6
@@ -54,7 +54,7 @@
pay_multiplier = 2.4
/datum/paygrade/marine/e7
- paygrade = "ME7"
+ paygrade = PAY_SHORT_ME7
name = "Gunnery Sergeant"
prefix = "GySgt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e7
@@ -62,7 +62,7 @@
pay_multiplier = 2.75
/datum/paygrade/marine/e8
- paygrade = "ME8"
+ paygrade = PAY_SHORT_ME8
name = "Master Sergeant"
prefix = "MSgt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e8
@@ -70,7 +70,7 @@
pay_multiplier = 2.75
/datum/paygrade/marine/e8e
- paygrade = "ME8E"
+ paygrade = PAY_SHORT_ME8E
name = "First Sergeant"
prefix = "1Sgt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e8e
@@ -78,7 +78,7 @@
pay_multiplier = 2.75
/datum/paygrade/marine/e9
- paygrade = "ME9"
+ paygrade = PAY_SHORT_ME9
name = "Master Gunnery Sergeant"
prefix = "MGySgt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e9
@@ -86,7 +86,7 @@
pay_multiplier = 3
/datum/paygrade/marine/e9e
- paygrade = "ME9E"
+ paygrade = PAY_SHORT_ME9E
name = "Sergeant Major"
prefix = "SgtMaj"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e9e
@@ -94,7 +94,7 @@
pay_multiplier = 3
/datum/paygrade/marine/e9c
- paygrade = "ME9C"
+ paygrade = PAY_SHORT_ME9C
name = "Sergeant Major of the Colonial Marine Corps"
prefix = "SMCMC"
rank_pin = /obj/item/clothing/accessory/ranks/marine/e9c
@@ -104,7 +104,7 @@
// COMMISSIONED PAYGRADES
/datum/paygrade/marine/o1
- paygrade = "MO1"
+ paygrade = PAY_SHORT_MO1
name = "Second Lieutenant"
prefix = "2ndLt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o1
@@ -112,7 +112,7 @@
pay_multiplier = 3
/datum/paygrade/marine/o2
- paygrade = "MO2"
+ paygrade = PAY_SHORT_MO2
name = "First Lieutenant"
prefix = "1stLt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o2
@@ -120,7 +120,7 @@
pay_multiplier = 3.2
/datum/paygrade/marine/o3
- paygrade = "MO3"
+ paygrade = PAY_SHORT_MO3
name = "Captain"
prefix = "Capt"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o3
@@ -128,7 +128,7 @@
pay_multiplier = 4
/datum/paygrade/marine/o4
- paygrade = "MO4"
+ paygrade = PAY_SHORT_MO4
name = "Major"
prefix = "Maj"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o4
@@ -136,7 +136,7 @@
pay_multiplier = 4
/datum/paygrade/marine/o5
- paygrade = "MO5"
+ paygrade = PAY_SHORT_MO5
name = "Lieutenant Colonel"
prefix = "LtCol"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o5
@@ -145,7 +145,7 @@
//Platoon Commander
/datum/paygrade/marine/o6
- paygrade = "MO6"
+ paygrade = PAY_SHORT_MO6
name = "Colonel"
prefix = "Col"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o6
@@ -153,7 +153,7 @@
pay_multiplier = 4.4
/datum/paygrade/marine/o6e
- paygrade = "MO6E"
+ paygrade = PAY_SHORT_MO6E
name = "Senior Colonel"
prefix = "Snr Col."
rank_pin = /obj/item/clothing/accessory/ranks/marine/o6e
@@ -161,7 +161,7 @@
pay_multiplier = 4.6
/datum/paygrade/marine/o6c
- paygrade = "MO6C"
+ paygrade = PAY_SHORT_MO6C
name = "Division Colonel"
prefix = "Div Col."
rank_pin = /obj/item/clothing/accessory/ranks/marine/o6c
@@ -170,7 +170,7 @@
//High Command
/datum/paygrade/marine/o7
- paygrade = "MO7"
+ paygrade = PAY_SHORT_MO7
name = "Brigadier General"
prefix = "BGen"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o7
@@ -178,7 +178,7 @@
pay_multiplier = 6
/datum/paygrade/marine/o8
- paygrade = "MO8"
+ paygrade = PAY_SHORT_MO8
name = "Major General"
prefix = "MajGen"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o8
@@ -186,7 +186,7 @@
pay_multiplier = 6.2
/datum/paygrade/marine/o9
- paygrade = "MO9"
+ paygrade = PAY_SHORT_MO9
name = "Lieutenant General"
prefix = "LtGen"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o9
@@ -194,7 +194,7 @@
pay_multiplier = 6.4
/datum/paygrade/marine/o10
- paygrade = "MO10"
+ paygrade = PAY_SHORT_MO10
name = "General"
prefix = "Gen"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o10
@@ -202,7 +202,7 @@
pay_multiplier = 6.6
/datum/paygrade/marine/o10c
- paygrade = "MO10C"
+ paygrade = PAY_SHORT_MO10C
name = "Assistant Commandant of the Marine Corps"
prefix = "ACMC"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o10c
@@ -210,7 +210,7 @@
pay_multiplier = 6.8
/datum/paygrade/marine/o10s
- paygrade = "MO10S"
+ paygrade = PAY_SHORT_MO10S
name = "Commandant of the Marine Corps"
prefix = "CMC"
rank_pin = /obj/item/clothing/accessory/ranks/marine/o10c
diff --git a/code/datums/paygrades/factions/uscm/navy.dm b/code/datums/paygrades/factions/uscm/navy.dm
index 7e648a75bac2..9e22c72fe566 100644
--- a/code/datums/paygrades/factions/uscm/navy.dm
+++ b/code/datums/paygrades/factions/uscm/navy.dm
@@ -6,77 +6,77 @@
// ENLISTED PAYGRADES
/datum/paygrade/navy/e1
- paygrade = "NE1"
+ paygrade = PAY_SHORT_NE1
name = "Seaman Recruit"
prefix = "SR."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e1
ranking = 0
/datum/paygrade/navy/e2
- paygrade = "NE2"
+ paygrade = PAY_SHORT_NE2
name = "Seaman Apprentice"
prefix = "SA."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e2
ranking = 1
/datum/paygrade/navy/e3
- paygrade = "NE3"
+ paygrade = PAY_SHORT_NE3
name = "Seaman"
prefix = "SN."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e3
ranking = 2
/datum/paygrade/navy/e4
- paygrade = "NE4"
+ paygrade = PAY_SHORT_NE4
name = "Petty Officer 3rd Class"
prefix = "PO1."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e4
ranking = 3
/datum/paygrade/navy/e5
- paygrade = "NE5"
+ paygrade = PAY_SHORT_NE5
name = "Petty Officer 2nd Class"
prefix = "PO2."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e5
ranking = 4
/datum/paygrade/navy/e6
- paygrade = "NE6"
+ paygrade = PAY_SHORT_NE6
name = "Petty Officer 1st Class"
prefix = "PO1."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e6
ranking = 5
/datum/paygrade/navy/e7
- paygrade = "NE7"
+ paygrade = PAY_SHORT_NE7
name = "Chief Petty Officer"
prefix = "CPO."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e7
ranking = 6
/datum/paygrade/navy/e8
- paygrade = "NE8"
+ paygrade = PAY_SHORT_NE8
name = "Senior Chief Petty Officer"
prefix = "SCPO."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e8
ranking = 7
/datum/paygrade/navy/e8c
- paygrade = "NE8C"
+ paygrade = PAY_SHORT_NE8C
name = "Command Senior Chief Petty Officer"
prefix = "CSCPO."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e8c
ranking = 8
/datum/paygrade/navy/e9
- paygrade = "NE9"
+ paygrade = PAY_SHORT_NE9
name = "Master Chief Petty Officer"
prefix = "MCPO."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e9
ranking = 9
/datum/paygrade/navy/e9c
- paygrade = "NE9C"
+ paygrade = PAY_SHORT_NE9C
name = "Command Master Chief Petty Officer"
prefix = "CMCPO."
rank_pin = /obj/item/clothing/accessory/ranks/navy/e9c
@@ -85,91 +85,91 @@
// COMMISSIONED PAYGRADES
/datum/paygrade/navy/o1
- paygrade = "NO1"
+ paygrade = PAY_SHORT_NO1
name = "Ensign"
prefix = "ENS."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o1
ranking = 11
/datum/paygrade/navy/o2
- paygrade = "NO2"
+ paygrade = PAY_SHORT_NO2
name = "Lieutenant Junior Grade"
prefix = "LTJG."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o2
ranking = 12
/datum/paygrade/navy/o3
- paygrade = "NO3"
+ paygrade = PAY_SHORT_NO3
name = "Lieutenant"
prefix = "LT."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o3
ranking = 13
/datum/paygrade/navy/o4
- paygrade = "NO4"
+ paygrade = PAY_SHORT_NO4
name = "Lieutenant Commander"
prefix = "LCDR."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o4
ranking = 14
/datum/paygrade/navy/o5
- paygrade = "NO5"
+ paygrade = PAY_SHORT_NO5
name = "Commander"
prefix = "CDR."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o5
ranking = 15
/datum/paygrade/navy/o6
- paygrade = "NO6"
+ paygrade = PAY_SHORT_NO6
name = "Captain"
prefix = "CAPT."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o6
ranking = 16
/datum/paygrade/navy/o6e
- paygrade = "NO6E"
+ paygrade = PAY_SHORT_NO6E
name = "Commodore"
prefix = "CDRE."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o6e
ranking = 17
/datum/paygrade/navy/o6c
- paygrade = "NO6C"
+ paygrade = PAY_SHORT_NO6C
name = "Senior Commodore"
prefix = "Snr CDRE."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o6e
ranking = 18
/datum/paygrade/navy/o7
- paygrade = "NO7"
+ paygrade = PAY_SHORT_NO7
name = "Rear Admiral (Lower Half)"
prefix = "RDML."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o7
ranking = 19
/datum/paygrade/navy/o8
- paygrade = "NO8"
+ paygrade = PAY_SHORT_NO8
name = "Rear Admiral (Upper Half)"
prefix = "RADM."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o8
ranking = 20
/datum/paygrade/navy/o9
- paygrade = "NO9"
+ paygrade = PAY_SHORT_NO9
name = "Vice Admiral"
prefix = "VADM."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o9
ranking = 21
/datum/paygrade/navy/o10
- paygrade = "NO10"
+ paygrade = PAY_SHORT_NO10
name = "Admiral"
prefix = "ADM."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o10
ranking = 22
/datum/paygrade/navy/o10c
- paygrade = "NO10C"
+ paygrade = PAY_SHORT_NO10C
name = "Chief of Naval Operations"
prefix = "CNO."
rank_pin = /obj/item/clothing/accessory/ranks/navy/o10c
diff --git a/code/datums/paygrades/factions/uscm/provost.dm b/code/datums/paygrades/factions/uscm/provost.dm
index b27c8f7f721f..e378bd7beb61 100644
--- a/code/datums/paygrades/factions/uscm/provost.dm
+++ b/code/datums/paygrades/factions/uscm/provost.dm
@@ -2,44 +2,23 @@
name = "Provost Paygrade"
pay_multiplier = 2
-/datum/paygrade/provost/officer
- paygrade = "PvE7"
- name = "Chief Petty Officer"
- prefix = "CPO."
- rank_pin = /obj/item/clothing/accessory/ranks/navy/e7/pvst
-
-/datum/paygrade/provost/enforcer
- paygrade = "PvE8"
- name = "Senior Chief Petty Officer"
- prefix = "SCPO."
- rank_pin = /obj/item/clothing/accessory/ranks/navy/e8/pvst
-
-/datum/paygrade/provost/tml
- paygrade = "PvE9"
- name = "Master Chief Petty Officer"
- prefix = "MCPO."
- rank_pin = /obj/item/clothing/accessory/ranks/navy/e9/pvst
-
/datum/paygrade/provost/inspector
- paygrade = "PvI"
- name = "Inspector"
+ paygrade = PAY_SHORT_PVI
+ name = "Provost Inspector"
prefix = "Insp."
rank_pin = /obj/item/clothing/accessory/ranks/special/insp
/datum/paygrade/provost/marshal
- paygrade = "PvO8"
- name = "Rear Admiral"
- prefix = "RADM."
- rank_pin = /obj/item/clothing/accessory/ranks/navy/o8/pvst
+ paygrade = PAY_SHORT_PVM
+ name = "Provost Marshal"
+ prefix = "Marshal"
/datum/paygrade/provost/sectormarshal
- paygrade = "PvO9"
- name = "Vice Admiral"
- prefix = "VADM."
- rank_pin = /obj/item/clothing/accessory/ranks/navy/o9/pvst
+ paygrade = PAY_SHORT_PVSM
+ name = "Provost Sector Marshal"
+ prefix = "S. Marshal"
/datum/paygrade/provost/chiefmarshal
- paygrade = "PvCM"
+ paygrade = PAY_SHORT_PVCM
name = "Provost Chief Marshal"
- prefix = "PCM."
- rank_pin = /obj/item/clothing/accessory/ranks/navy/o10c/pvst
+ prefix = "Chief Marshal"
diff --git a/code/datums/paygrades/factions/wy/goons.dm b/code/datums/paygrades/factions/wy/goons.dm
deleted file mode 100644
index 679bb42e7f76..000000000000
--- a/code/datums/paygrades/factions/wy/goons.dm
+++ /dev/null
@@ -1,15 +0,0 @@
-/datum/paygrade/goon
- name = "WY Goon Paygrade"
- pay_multiplier = 0.66 // better than colonists. barely.
-
-//Standard PMCs
-/datum/paygrade/goon/standard
- paygrade = "WEY-GOON"
- name = "Officer"
- prefix = "Off."
-
-/datum/paygrade/goon/lead
- paygrade = "WEY-GOON-L"
- name = "Senior Officer"
- prefix = "Sr. Off."
- pay_multiplier = 0.8
diff --git a/code/datums/paygrades/factions/wy/wy.dm b/code/datums/paygrades/factions/wy/wy.dm
index 03d54cbd3cda..58ec9eb3f197 100644
--- a/code/datums/paygrades/factions/wy/wy.dm
+++ b/code/datums/paygrades/factions/wy/wy.dm
@@ -3,69 +3,69 @@
pay_multiplier = 1
/datum/paygrade/wy_ranks/wyc1
- paygrade = "WYC1"
+ paygrade = PAY_SHORT_WYC1
name = "Trainee"
prefix = "Trn."
ranking = 0
/datum/paygrade/wy_ranks/wyc2
- paygrade = "WYC2"
+ paygrade = PAY_SHORT_WYC2
name = "Junior Executive"
prefix = "Jr. Exec."
ranking = 1
pay_multiplier = 2
/datum/paygrade/wy_ranks/wyc3
- paygrade = "WYC3"
+ paygrade = PAY_SHORT_WYC3
name = "Executive"
prefix = "Exec."
ranking = 2
pay_multiplier = 3
/datum/paygrade/wy_ranks/wyc4
- paygrade = "WYC4"
+ paygrade = PAY_SHORT_WYC4
name = "Senior Executive"
prefix = "Sr. Exec."
ranking = 3
pay_multiplier = 4
/datum/paygrade/wy_ranks/wyc5
- paygrade = "WYC5"
+ paygrade = PAY_SHORT_WYC5
name = "Executive Specialist"
prefix = "Exec. Spc."
ranking = 4
pay_multiplier = 5
/datum/paygrade/wy_ranks/wyc6
- paygrade = "WYC6"
+ paygrade = PAY_SHORT_WYC6
name = "Executive Supervisor"
prefix = "Exec. Suvp."
ranking = 5
pay_multiplier = 6
/datum/paygrade/wy_ranks/wyc7
- paygrade = "WYC7"
+ paygrade = PAY_SHORT_WYC7
name = "Assistant Manager"
prefix = "Assis. Mng."
ranking = 6
pay_multiplier = 7
/datum/paygrade/wy_ranks/wyc8
- paygrade = "WYC8"
+ paygrade = PAY_SHORT_WYC8
name = "Division Manager"
prefix = "Div. Mng."
ranking = 7
pay_multiplier = 8
/datum/paygrade/wy_ranks/wyc9
- paygrade = "WYC9"
+ paygrade = PAY_SHORT_WYC9
name = "Chief Executive"
prefix = "Chief. Exec."
ranking = 8
pay_multiplier = 9
/datum/paygrade/wy_ranks/wyc10
- paygrade = "WYC10"
+ paygrade = PAY_SHORT_WYC10
name = "Director"
prefix = "Director"
ranking = 9
diff --git a/code/datums/paygrades/paygrade.dm b/code/datums/paygrades/paygrade.dm
index bb0a3aa84bfa..cc336319278a 100644
--- a/code/datums/paygrades/paygrade.dm
+++ b/code/datums/paygrades/paygrade.dm
@@ -26,36 +26,36 @@ GLOBAL_LIST_INIT_TYPED(paygrades, /datum/paygrade, setup_paygrades())
GLOBAL_LIST_INIT(highcom_paygrades, list(
"PvI",
- "NO7",
- "MO7",
- "NO8",
- "MO8",
- "NO9",
- "MO9",
- "NO10",
- "MO10",
- "NO10C",
- "MO10C",
+ PAY_SHORT_NO7,
+ PAY_SHORT_MO7,
+ PAY_SHORT_NO8,
+ PAY_SHORT_MO8,
+ PAY_SHORT_NO9,
+ PAY_SHORT_MO9,
+ PAY_SHORT_NO10,
+ PAY_SHORT_MO10,
+ PAY_SHORT_NO10C,
+ PAY_SHORT_MO10C,
"PvO8",
"PvO9",
"PvCM"
))
GLOBAL_LIST_INIT(co_paygrades, list(
- "NO6",
- "NO6E",
- "NO6C",
- "NO5",
- "NO4",
- "MO6",
- "MO6E",
- "MO6C",
- "MO5",
- "MO4"
+ PAY_SHORT_NO6,
+ PAY_SHORT_NO6E,
+ PAY_SHORT_NO6C,
+ PAY_SHORT_NO5,
+ PAY_SHORT_NO4,
+ PAY_SHORT_MO6,
+ PAY_SHORT_MO6E,
+ PAY_SHORT_MO6C,
+ PAY_SHORT_MO5,
+ PAY_SHORT_MO4
))
GLOBAL_LIST_INIT(wy_paygrades, list(
- "WYC8",
- "WYC9",
- "WYC10"
+ PAY_SHORT_WYC8,
+ PAY_SHORT_WYC9,
+ PAY_SHORT_WYC10
))
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/status_effects/_status_effect.dm b/code/datums/status_effects/_status_effect.dm
index 51f23052ac4a..2a895e4e18ef 100644
--- a/code/datums/status_effects/_status_effect.dm
+++ b/code/datums/status_effects/_status_effect.dm
@@ -128,7 +128,7 @@
return
else if(duration - world.time <= STATUS_EFFECT_TIME_THRESHOLD)
if(!timerid || force_refresh)
- timerid = addtimer(CALLBACK(src, PROC_REF(timer_callback)), duration - world.time, TIMER_OVERRIDE|TIMER_UNIQUE|TIMER_STOPPABLE)
+ timerid = addtimer(CALLBACK(src, PROC_REF(timer_callback)), duration - world.time, TIMER_OVERRIDE|TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_NO_HASH_WAIT)
else if(timerid)
deltimer(timerid)
timerid = null
@@ -139,7 +139,7 @@
timerid = null
qdel(src) // shrimple as that
-/// Called whenever the effect is applied in on_created
+/// Called when the effect is applied in on_created
/// Returning FALSE will cause it to delete itself during creation instead.
/datum/status_effect/proc/on_apply()
return TRUE
diff --git a/code/datums/status_effects/debuffs/debuffs.dm b/code/datums/status_effects/debuffs/debuffs.dm
index be371e2c1694..5630f89ce9be 100644
--- a/code/datums/status_effects/debuffs/debuffs.dm
+++ b/code/datums/status_effects/debuffs/debuffs.dm
@@ -51,10 +51,10 @@
. = ..()
if(!.)
return
- ADD_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id))
+ owner.add_traits(list(TRAIT_FLOORED, TRAIT_IMMOBILIZED), TRAIT_STATUS_EFFECT(id))
/datum/status_effect/incapacitating/knockdown/on_remove()
- REMOVE_TRAIT(owner, TRAIT_FLOORED, TRAIT_STATUS_EFFECT(id))
+ owner.remove_traits(list(TRAIT_FLOORED, TRAIT_IMMOBILIZED), TRAIT_STATUS_EFFECT(id))
return ..()
/atom/movable/screen/alert/status_effect/knockdown
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/operations.dm b/code/datums/supply_packs/operations.dm
index 6d5e5d14756c..dcc270cb00a1 100644
--- a/code/datums/supply_packs/operations.dm
+++ b/code/datums/supply_packs/operations.dm
@@ -112,10 +112,10 @@
/datum/supply_packs/spec_kits
name = "Weapons Specialist Kits"
contains = list(
- /obj/item/spec_kit/asrs,
- /obj/item/spec_kit/asrs,
- /obj/item/spec_kit/asrs,
- /obj/item/spec_kit/asrs,
+ /obj/item/spec_kit/rifleman,
+ /obj/item/spec_kit/rifleman,
+ /obj/item/spec_kit/rifleman,
+ /obj/item/spec_kit/rifleman,
)
cost = 0
containertype = /obj/structure/closet/crate/supply
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/defines/procs/records.dm b/code/defines/procs/records.dm
index a1e2ade2b709..a9d40f993629 100644
--- a/code/defines/procs/records.dm
+++ b/code/defines/procs/records.dm
@@ -1,48 +1,50 @@
/proc/CreateGeneralRecord()
- var/datum/data/record/G = new /datum/data/record()
- G.fields["name"] = "New Record"
- G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
- G.fields["rank"] = "Unassigned"
- G.fields["real_rank"] = "Unassigned"
- G.fields["sex"] = "Male"
- G.fields["age"] = "Unknown"
- G.fields["ethnicity"] = "Unknown"
- G.fields["p_stat"] = "Active"
- G.fields["m_stat"] = "Stable"
- G.fields["species"] = "Human"
- G.fields["origin"] = "Unknown"
- G.fields["faction"] = "Unknown"
- G.fields["mob_faction"] = "Unknown"
- G.fields["religion"] = "Unknown"
- GLOB.data_core.general += G
- return G
+ var/datum/data/record/general_record = new /datum/data/record()
+ general_record.fields["name"] = "New Record"
+ general_record.name = "New Record"
+ general_record.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
+ general_record.fields["rank"] = "Unassigned"
+ general_record.fields["real_rank"] = "Unassigned"
+ general_record.fields["sex"] = "Male"
+ general_record.fields["age"] = "Unknown"
+ general_record.fields["ethnicity"] = "Unknown"
+ general_record.fields["p_stat"] = "Active"
+ general_record.fields["m_stat"] = "Stable"
+ general_record.fields["species"] = "Human"
+ general_record.fields["origin"] = "Unknown"
+ general_record.fields["faction"] = "Unknown"
+ general_record.fields["mob_faction"] = "Unknown"
+ general_record.fields["religion"] = "Unknown"
+ GLOB.data_core.general += general_record
+ return general_record
/proc/CreateSecurityRecord(name as text, id as text)
- var/datum/data/record/R = new /datum/data/record()
- R.fields["name"] = name
- R.fields["id"] = id
- R.name = text("Security Record #[id]")
- R.fields["incidents"] = "None"
- GLOB.data_core.security += R
- return R
+ var/datum/data/record/security_record = new /datum/data/record()
+ security_record.fields["name"] = name
+ security_record.fields["id"] = id
+ security_record.name = text("Security Record #[id]")
+ security_record.fields["incidents"] = "None"
+ GLOB.data_core.security += security_record
+ return security_record
-/proc/create_medical_record(mob/living/carbon/human/H)
- var/datum/data/record/M = new /datum/data/record()
- M.fields["id"] = null
- M.fields["name"] = H.real_name
- M.fields["b_type"] = H.b_type
- M.fields["mi_dis"] = "None"
- M.fields["mi_dis_d"] = "No minor disabilities have been declared."
- M.fields["ma_dis"] = "None"
- M.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
- M.fields["alg"] = "None"
- M.fields["alg_d"] = "No allergies have been detected in this patient."
- M.fields["cdi"] = "None"
- M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
- M.fields["last_scan_time"] = null
- M.fields["last_scan_result"] = "No scan data on record"
- M.fields["autodoc_data"] = list()
- M.fields["autodoc_manual"] = list()
- M.fields["ref"] = WEAKREF(H)
- GLOB.data_core.medical += M
- return M
+/proc/create_medical_record(mob/living/carbon/human/person)
+ var/datum/data/record/medical_record = new /datum/data/record()
+ medical_record.fields["id"] = null
+ medical_record.fields["name"] = person.real_name
+ medical_record.name = person.real_name
+ medical_record.fields["b_type"] = person.b_type
+ medical_record.fields["mi_dis"] = "None"
+ medical_record.fields["mi_dis_d"] = "No minor disabilities have been declared."
+ medical_record.fields["ma_dis"] = "None"
+ medical_record.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
+ medical_record.fields["alg"] = "None"
+ medical_record.fields["alg_d"] = "No allergies have been detected in this patient."
+ medical_record.fields["cdi"] = "None"
+ medical_record.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
+ medical_record.fields["last_scan_time"] = null
+ medical_record.fields["last_scan_result"] = "No scan data on record"
+ medical_record.fields["autodoc_data"] = list()
+ medical_record.fields["autodoc_manual"] = list()
+ medical_record.fields["ref"] = WEAKREF(person)
+ GLOB.data_core.medical += medical_record
+ return medical_record
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 283efdc50a22..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)
@@ -205,7 +205,9 @@ directive is properly returned.
return
/atom/proc/emp_act(severity)
- return
+ SHOULD_CALL_PARENT(TRUE)
+
+ SEND_SIGNAL(src, COMSIG_ATOM_EMP_ACT, severity)
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
@@ -245,8 +247,8 @@ directive is properly returned.
if(!examine_strings)
log_debug("Attempted to create an examine block with no strings! Atom : [src], user : [user]")
return
- to_chat(user, examine_block(examine_strings.Join("\n")))
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, examine_strings)
+ to_chat(user, examine_block(examine_strings.Join("\n")))
/atom/proc/get_examine_text(mob/user)
. = list()
@@ -385,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)
@@ -416,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
@@ -721,7 +723,7 @@ Parameters are passed from New.
usr.client.cmd_admin_emp(src)
if(href_list[VV_HK_MODIFY_TRANSFORM] && check_rights(R_VAREDIT))
- var/result = tgui_input_list(usr, "Choose the transformation to apply","Transform Mod", list("Scale","Translate","Rotate"))
+ var/result = tgui_input_list(usr, "Choose the transformation to apply","Transform Mod", list("Scale","Translate","Rotate", "Reflect X Axis", "Reflect Y Axis"))
if(!result)
return
if(!result)
@@ -747,7 +749,22 @@ Parameters are passed from New.
return
var/matrix/base_matrix = matrix(base_transform)
update_base_transform(base_matrix.Turn(angle))
-
+ if("Reflect X Axis")
+ var/matrix/current = matrix(base_transform)
+ var/matrix/reflector = matrix()
+ reflector.a = -1
+ reflector.d = 0
+ reflector.b = 0
+ reflector.e = 1
+ update_base_transform(current * reflector)
+ if("Reflect Y Axis")
+ var/matrix/current = matrix(base_transform)
+ var/matrix/reflector = matrix()
+ reflector.a = 1
+ reflector.d = 0
+ reflector.b = 0
+ reflector.e = -1
+ update_base_transform(current * reflector)
SEND_SIGNAL(src, COMSIG_ATOM_VV_MODIFY_TRANSFORM)
if(href_list[VV_HK_AUTO_RENAME] && check_rights(R_VAREDIT))
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 effd3325f887..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))
@@ -423,7 +429,7 @@ Additional game mode variables.
for(var/mob_name in picked_hive.banished_ckeys)
if(picked_hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
to_chat(xeno_candidate, SPAN_WARNING("You are banished from the [picked_hive], you may not rejoin unless the Queen re-admits you or dies."))
- return
+ return FALSE
if(isnewplayer(xeno_candidate))
var/mob/new_player/noob = xeno_candidate
noob.close_spawn_windows()
@@ -443,9 +449,6 @@ Additional game mode variables.
return FALSE
new_xeno = userInput
- if(!xeno_candidate)
- return FALSE
-
if(!(new_xeno in GLOB.living_xeno_list) || new_xeno.stat == DEAD)
to_chat(xeno_candidate, SPAN_WARNING("You cannot join if the xenomorph is dead."))
return FALSE
@@ -479,14 +482,14 @@ Additional game mode variables.
else new_xeno = pick(available_xenos_non_ssd) //Just picks something at random.
if(istype(new_xeno) && xeno_candidate && xeno_candidate.client)
if(isnewplayer(xeno_candidate))
- var/mob/new_player/N = xeno_candidate
- N.close_spawn_windows()
+ var/mob/new_player/noob = xeno_candidate
+ noob.close_spawn_windows()
for(var/mob_name in new_xeno.hive.banished_ckeys)
if(new_xeno.hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
to_chat(xeno_candidate, SPAN_WARNING("You are banished from this hive, You may not rejoin unless the Queen re-admits you or dies."))
- return
+ return FALSE
if(transfer_xeno(xeno_candidate, new_xeno))
- return 1
+ return TRUE
to_chat(xeno_candidate, "JAS01: Something went wrong, tell a coder.")
/datum/game_mode/proc/attempt_to_join_as_facehugger(mob/xeno_candidate)
@@ -594,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))
@@ -614,20 +624,21 @@ Additional game mode variables.
/datum/game_mode/proc/transfer_xeno(xeno_candidate, mob/living/new_xeno)
if(!xeno_candidate || !isxeno(new_xeno) || QDELETED(new_xeno))
return FALSE
+
var/datum/mind/xeno_candidate_mind
if(ismind(xeno_candidate))
xeno_candidate_mind = xeno_candidate
else if(ismob(xeno_candidate))
- var/mob/M = xeno_candidate
- if(M.mind)
- xeno_candidate_mind = M.mind
+ var/mob/xeno_candidate_mob = xeno_candidate
+ if(xeno_candidate_mob.mind)
+ xeno_candidate_mind = xeno_candidate_mob.mind
else
- xeno_candidate_mind = new /datum/mind(M.key, M.ckey)
+ xeno_candidate_mind = new /datum/mind(xeno_candidate_mob.key, xeno_candidate_mob.ckey)
xeno_candidate_mind.active = TRUE
xeno_candidate_mind.current = new_xeno
else if(isclient(xeno_candidate))
- var/client/C = xeno_candidate
- xeno_candidate_mind = new /datum/mind(C.key, C.ckey)
+ var/client/xeno_candidate_client = xeno_candidate
+ xeno_candidate_mind = new /datum/mind(xeno_candidate_client.key, xeno_candidate_client.ckey)
xeno_candidate_mind.active = TRUE
xeno_candidate_mind.current = new_xeno
else
@@ -644,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
@@ -911,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
@@ -953,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
@@ -971,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
@@ -998,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..310785070458 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)
@@ -244,7 +244,8 @@ var/waiting_for_drop_votes = 0
H.skills = null //no restriction on what the contestants can do
- H.apply_effect(15, WEAKEN)
+ H.KnockDown(15)
+ H.Stun(15)
H.nutrition = NUTRITION_NORMAL
var/randjob = rand(0,10)
@@ -393,8 +394,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 +416,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 f45b83c4d796..6ebda633a19b 100644
--- a/code/game/gamemodes/colonialmarines/whiskey_outpost.dm
+++ b/code/game/gamemodes/colonialmarines/whiskey_outpost.dm
@@ -2,14 +2,14 @@
//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
/datum/game_mode/whiskey_outpost
name = GAMEMODE_WHISKEY_OUTPOST
config_tag = GAMEMODE_WHISKEY_OUTPOST
- required_players = 0
+ required_players = 140
xeno_bypass_timer = 1
flags_round_type = MODE_NEW_SPAWN
role_mappings = list(
@@ -76,12 +76,16 @@
hardcore = TRUE
votable = TRUE
- vote_cycle = 25 // approx. once every 5 days, if it wins the vote
+ vote_cycle = 75 // approx. once every 5 days, if it wins the vote
taskbar_icon = 'icons/taskbar/gml_wo.png'
+/datum/game_mode/whiskey_outpost/New()
+ . = ..()
+ required_players = CONFIG_GET(number/whiskey_required_players)
+
/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 +182,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 +216,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 +258,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 +267,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 +280,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
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 0e3107858b3b..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
@@ -192,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
@@ -262,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()
@@ -277,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 d807cd3be38b..78b6ab7e3ab2 100644
--- a/code/game/jobs/job/antag/xeno/xenomorph.dm
+++ b/code/game/jobs/job/antag/xeno/xenomorph.dm
@@ -88,7 +88,7 @@
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)
start_nest.buckled_mob = human_to_transform
start_nest.afterbuckle(human_to_transform)
diff --git a/code/game/jobs/job/civilians/other/mess_seargent.dm b/code/game/jobs/job/civilians/other/mess_seargent.dm
index 97578eb1159d..fb4f5ee14d7c 100644
--- a/code/game/jobs/job/civilians/other/mess_seargent.dm
+++ b/code/game/jobs/job/civilians/other/mess_seargent.dm
@@ -1,13 +1,31 @@
/datum/job/civilian/chef
title = JOB_MESS_SERGEANT
- total_positions = 1
+ total_positions = 2
spawn_positions = 1
+ allow_additional = TRUE
+ scaled = TRUE
selection_class = "job_ot"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT
supervisors = "the auxiliary support officer"
gear_preset = /datum/equipment_preset/uscm_ship/chef
entry_message_body = "Your job is to service the marines with excellent food, drinks and entertaining the shipside crew when needed. You have a lot of freedom and it is up to you, to decide what to do with it. Good luck!"
+/datum/job/civilian/chef/set_spawn_positions(count)
+ spawn_positions = mess_sergeant_slot_formula(count)
+
+/datum/job/civilian/chef/get_total_positions(latejoin = FALSE)
+ var/positions = spawn_positions
+ if(latejoin)
+ positions = mess_sergeant_slot_formula(get_total_marines())
+ if(positions <= total_positions_so_far)
+ positions = total_positions_so_far
+ else
+ total_positions_so_far = positions
+ else
+ total_positions_so_far = positions
+
+ return positions
+
/obj/effect/landmark/start/chef
name = JOB_MESS_SERGEANT
icon_state = "chef_spawn"
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 51039663a43f..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)
@@ -579,9 +578,7 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
new_human.sec_hud_set_ID()
new_human.hud_set_squad()
- for(var/obj/current_item in new_human.get_contents())
- SEND_SIGNAL(current_item, COMSIG_POST_SPAWN_UPDATE, new_human)
-
+ SEND_SIGNAL(new_human, COMSIG_POST_SPAWN_UPDATE)
SSround_recording.recorder.track_player(new_human)
//Find which squad has the least population. If all 4 squads are equal it should just use a random one
@@ -819,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/slot_scaling.dm b/code/game/jobs/slot_scaling.dm
index 7230f57eb745..2d444d06e5ab 100644
--- a/code/game/jobs/slot_scaling.dm
+++ b/code/game/jobs/slot_scaling.dm
@@ -50,3 +50,6 @@
/proc/working_joe_slot_formula(playercount)
return job_slot_formula(playercount,30,1,3,6)
+
+/proc/mess_sergeant_slot_formula(playercount)
+ return job_slot_formula(playercount, 70, 1, 1, 2)
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 0e45d5ee171b..aa1cd92547ec 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
@@ -382,7 +382,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.")
@@ -392,7 +392,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
@@ -423,11 +423,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
@@ -451,7 +451,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 831f76e48930..06b082e3c5e2 100644
--- a/code/game/machinery/ARES/ARES_procs.dm
+++ b/code/game/machinery/ARES/ARES_procs.dm
@@ -79,7 +79,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/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..d62d688fcfc5 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -98,12 +98,12 @@ update_flag
/obj/structure/machinery/portable_atmospherics/canister/attackby(obj/item/W as obj, mob/user as mob)
if(!HAS_TRAIT(W, TRAIT_TOOL_WRENCH) && !istype(W, /obj/item/tank) && !istype(W, /obj/item/device/analyzer))
- visible_message(SPAN_DANGER("[user] hits the [src] with a [W]!"))
+ visible_message(SPAN_DANGER("[user] hits [src] with [W]!"))
update_health(W.force)
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/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index 0af38cacd75e..1c240fb05dfb 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -18,16 +18,14 @@
PF.flags_can_pass_all = PASS_OVER|PASS_AROUND|PASS_UNDER
/obj/structure/machinery/portable_atmospherics/powered/scrubber/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
if(prob(50/severity))
on = !on
update_icon()
- ..(severity)
-
/obj/structure/machinery/portable_atmospherics/powered/scrubber/update_icon()
src.overlays = 0
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 116753093fe5..46050d2705b3 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -114,6 +114,7 @@
/obj/structure/machinery/bot/emp_act(severity)
+ . = ..()
var/was_on = on
stat |= EMPED
new /obj/effect/overlay/temp/emp_sparks (loc)
@@ -150,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 4ad40a6058bb..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]"
@@ -915,11 +915,11 @@
post_signal_multiple(control_freq, kv)
/obj/structure/machinery/bot/mulebot/emp_act(severity)
+ . = ..()
if (cell)
cell.emp_act(severity)
if(load)
load.emp_act(severity)
- ..()
/obj/structure/machinery/bot/mulebot/explode()
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index d416c561fcd3..acb6d26bf0d5 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -35,6 +35,9 @@
var/colony_camera_mapload = TRUE
+ /// If this camera should have innate EMP-proofing
+ var/emp_proof = FALSE
+
/obj/structure/machinery/camera/Initialize(mapload, ...)
. = ..()
WireColorToFlag = randomCameraWires()
@@ -72,12 +75,13 @@
if(WEST) pixel_x = 27
/obj/structure/machinery/camera/emp_act(severity)
+ . = ..()
if(!isEmpProof())
if(prob(100/severity))
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()
@@ -87,9 +91,8 @@
stat &= ~EMPED
cancelCameraAlarm()
if(can_use())
- cameranet.addCamera(src)
+ GLOB.cameranet.addCamera(src)
kick_viewers()
- ..()
/obj/structure/machinery/camera/ex_act(severity)
@@ -101,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 a8735cbc06a8..1f680ad76712 100644
--- a/code/game/machinery/camera/presets.dm
+++ b/code/game/machinery/camera/presets.dm
@@ -30,6 +30,7 @@
network = list(CAMERA_NET_LASER_TARGETS)
unslashable = TRUE
unacidable = TRUE
+ emp_proof = TRUE
/obj/structure/machinery/camera/laser_cam/Initialize(mapload, laser_name)
. = ..()
@@ -37,8 +38,6 @@
var/area/A = get_area(src)
c_tag = "[laser_name] ([A.name])"
-/obj/structure/machinery/camera/laser_cam/emp_act(severity)
- return //immune to EMPs, just in case
/obj/structure/machinery/camera/laser_cam/ex_act()
return
@@ -79,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)
@@ -125,9 +124,7 @@
invisibility = 101 //fuck you init()
colony_camera_mapload = FALSE
-
-/obj/structure/machinery/camera/autoname/lz_camera/emp_act(severity)
- return //immune to EMPs, just in case
+ emp_proof = TRUE
/obj/structure/machinery/camera/autoname/lz_camera/ex_act()
return
@@ -137,7 +134,7 @@
/obj/structure/machinery/camera/proc/isEmpProof()
var/O = locate(/obj/item/stack/sheet/mineral/osmium) in assembly.upgrades
- return O
+ return O || emp_proof
/obj/structure/machinery/camera/proc/isXRay()
var/obj/item/stock_parts/scanning_module/O = locate(/obj/item/stock_parts/scanning_module) in assembly.upgrades
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/cell_charger.dm b/code/game/machinery/cell_charger.dm
index fcd8c65e93ca..eb7a501fa078 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -80,11 +80,11 @@
return
/obj/structure/machinery/cell_charger/emp_act(severity)
+ . = ..()
if(inoperable())
return
if(charging)
charging.emp_act(severity)
- ..(severity)
/obj/structure/machinery/cell_charger/process()
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 08de86581518..55df45c70ccc 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,19 +148,19 @@
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
- visible_message(SPAN_DANGER("[user] dunks [M] into the [src]!"))
+ visible_message(SPAN_DANGER("[user] dunks [M] into [src]!"))
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
- visible_message(SPAN_NOTICE("[user] dunks [W] into the [src]!"))
+ visible_message(SPAN_NOTICE("[user] dunks [W] into [src]!"))
return
/obj/structure/holohoop/BlockedPassDirs(atom/movable/mover, target_dir)
@@ -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/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/arcade.dm b/code/game/machinery/computer/arcade.dm
index 8d35dd1b6aff..1ac5a06738d5 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -165,8 +165,8 @@
return
/obj/structure/machinery/computer/arcade/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
var/empprize = null
var/num_of_prizes = 0
@@ -178,5 +178,3 @@
for(num_of_prizes; num_of_prizes > 0; num_of_prizes--)
empprize = pickweight(prizes)
new empprize(src.loc)
-
- ..(severity)
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 281c548227b0..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
@@ -354,8 +356,8 @@
exproof = TRUE
colony_camera_mapload = FALSE
-/obj/structure/machinery/computer/cameras/mortar/emp_act(severity)
- return FALSE
+/obj/structure/machinery/computer/cameras/mortar/set_broken()
+ return
/obj/structure/machinery/computer/cameras/dropship
name = "abstract dropship camera computer"
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 3332577683fe..7a51539b8888 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -43,7 +43,7 @@
var/stat_msg1
var/stat_msg2
- var/datum/tacmap/tacmap
+ var/datum/tacmap/drawing/tacmap
var/minimap_type = MINIMAP_FLAG_USCM
processing = TRUE
@@ -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/computer.dm b/code/game/machinery/computer/computer.dm
index 304b24a14f04..c33517796271 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -31,8 +31,9 @@
return 1
/obj/structure/machinery/computer/emp_act(severity)
- if(prob(20/severity)) set_broken()
- ..()
+ . = ..()
+ if(prob(20/severity))
+ set_broken()
/obj/structure/machinery/computer/ex_act(severity)
diff --git a/code/game/machinery/computer/dropship_weapons.dm b/code/game/machinery/computer/dropship_weapons.dm
index 6218bf0cdedb..d86b9fc28a28 100644
--- a/code/game/machinery/computer/dropship_weapons.dm
+++ b/code/game/machinery/computer/dropship_weapons.dm
@@ -64,7 +64,7 @@
power = MATRIX.power
else
- to_chat(user, SPAN_WARNING("matrix is not complete!"))
+ to_chat(user, SPAN_WARNING("Matrix is not complete!"))
/obj/structure/machinery/computer/dropship_weapons/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0)
var/data[0]
@@ -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 9856ae8f970e..7b4c2d5df771 100644
--- a/code/game/machinery/computer/groundside_operations.dm
+++ b/code/game/machinery/computer/groundside_operations.dm
@@ -25,7 +25,11 @@
add_pmcs = FALSE
else if(SSticker.current_state < GAME_STATE_PLAYING)
RegisterSignal(SSdcs, COMSIG_GLOB_MODE_PRESETUP, PROC_REF(disable_pmc))
- tacmap = new(src, minimap_type)
+ if(announcement_faction == FACTION_MARINE)
+ tacmap = new /datum/tacmap/drawing(src, minimap_type)
+ else
+ tacmap = new(src, minimap_type) // Non-drawing version
+
return ..()
/obj/structure/machinery/computer/groundside_operations/Destroy()
@@ -55,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 += "
"
@@ -247,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
@@ -276,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)
@@ -290,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 7ad223093130..20aa6925d0b4 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -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
@@ -483,15 +483,15 @@
return
/obj/structure/machinery/computer/med_data/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
for(var/datum/data/record/R as anything in GLOB.data_core.medical)
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)
@@ -509,8 +509,6 @@
qdel(R)
continue
- ..(severity)
-
/obj/structure/machinery/computer/med_data/laptop
name = "Medical Laptop"
diff --git a/code/game/machinery/computer/research.dm b/code/game/machinery/computer/research.dm
index 2f37d9b2598a..1ba696eeee9c 100644
--- a/code/game/machinery/computer/research.dm
+++ b/code/game/machinery/computer/research.dm
@@ -28,8 +28,8 @@
if(N.note_type == "grant")
if(!N.grant)
return
- chemical_data.update_credits(N.grant)
- visible_message(SPAN_NOTICE("[user] scans the [N.name] on the [src], collecting the [N.grant] research credits."))
+ GLOB.chemical_data.update_credits(N.grant)
+ visible_message(SPAN_NOTICE("[user] scans the [N.name] on [src], collecting the [N.grant] research credits."))
N.grant = 0
qdel(N)
return
@@ -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,8 +60,8 @@
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))
- visible_message(SPAN_NOTICE("[user] swipes the clearance card on the [src], but nothing happens."))
+ 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 [src], but nothing happens."))
return
if(user.real_name != card.registered_name)
visible_message(SPAN_WARNING("WARNING: ILLEGAL CLEARANCE USER DETECTED. CARD DATA HAS BEEN WIPED."))
@@ -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,20 @@
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/security.dm b/code/game/machinery/computer/security.dm
index 857118937910..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
@@ -524,15 +524,15 @@ What a mess.*/
return selection.fields["img"]
/obj/structure/machinery/computer/secure_data/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
for(var/datum/data/record/R in GLOB.data_core.security)
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)
@@ -550,8 +550,6 @@ What a mess.*/
qdel(R)
continue
- ..(severity)
-
/obj/structure/machinery/computer/secure_data/detective_computer
icon = 'icons/obj/structures/machinery/computer.dmi'
icon_state = "messyfiles"
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index a20d344b53a9..6e35d147ff38 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -347,15 +347,15 @@ What a mess.*/
return
/obj/structure/machinery/computer/skills/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
for(var/datum/data/record/R in GLOB.data_core.security)
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)
@@ -373,4 +373,3 @@ What a mess.*/
qdel(R)
continue
- ..(severity)
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/deployable.dm b/code/game/machinery/deployable.dm
index 99996bea8978..687882d9d7ae 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -65,6 +65,7 @@
return
/obj/structure/machinery/deployable/barrier/emp_act(severity)
+ . = ..()
if(inoperable())
return
if(prob(50/severity))
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 df032301ee45..332d9b96bd44 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -557,7 +557,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
if(istype(attacking_item, /obj/item/clothing/mask/cigarette))
if(isElectrified())
var/obj/item/clothing/mask/cigarette/L = attacking_item
- L.light(SPAN_NOTICE("[user] lights their [L] on an electrical arc from the [src]"))
+ L.light(SPAN_NOTICE("[user] lights their [L] on an electrical arc from [src]"))
return
if(!isRemoteControlling(user))
@@ -568,7 +568,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
add_fingerprint(user)
if(istype(attacking_item, /obj/item/weapon/zombie_claws) && (welded || locked))
- user.visible_message(SPAN_NOTICE("[user] starts tearing into the door on the [src]!"), \
+ user.visible_message(SPAN_NOTICE("[user] starts tearing into the door on [src]!"), \
SPAN_NOTICE("You start prying your hand into the gaps of the door with your fingers... This will take about 30 seconds."), \
SPAN_NOTICE("You hear tearing noises!"))
@@ -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)
@@ -845,7 +845,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
for(var/i in resin_door_shmushereds)
if(istype(x,i)) //I would like to just use a if(locate() in ) here but Im not gonna add every child to GLOB.resin_door_shmushereds so it works
playsound(loc, "alien_resin_break", 25)
- visible_message(SPAN_WARNING("The [src.name] closes on the [x], shmushing it!"))
+ visible_message(SPAN_WARNING("The [src.name] closes on [x], shmushing it!"))
if(isturf(x))
var/turf/closed/wall/resin_wall_to_destroy = x
resin_wall_to_destroy.dismantle_wall()
@@ -858,7 +858,8 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(5, 1, src)
sparks.start()
- xeno.apply_effect(1, WEAKEN)
+ xeno.KnockDown(1)
+ xeno.Stun(1)
playsound(src, 'sound/effects/metalhit.ogg', 50, TRUE)
xeno.visible_message(SPAN_XENOWARNING("\The [xeno] strikes \the [src] with its tail!"), SPAN_XENOWARNING("You strike \the [src] with your tail!"))
@@ -866,3 +867,8 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list(
var/damage = xeno.melee_damage_upper * TAILSTAB_AIRLOCK_DAMAGE_MULTIPLIER
take_damage(damage, xeno)
return TAILSTAB_COOLDOWN_NORMAL
+
+/obj/structure/machinery/door/airlock/autoclose()
+ if(locked)
+ return
+ ..()
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index f4d09796194c..feb699fd245e 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -138,7 +138,6 @@
opacity = 0
assembly_type = /obj/structure/airlock_assembly/airlock_assembly_research
glass = 1
- heat_proof = 1
req_one_access = list(ACCESS_CIVILIAN_RESEARCH, ACCESS_CIVILIAN_COMMAND, ACCESS_WY_COLONIAL)
/obj/structure/machinery/door/airlock/glass_mining/colony
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/door.dm b/code/game/machinery/doors/door.dm
index 578ef368f5d9..021cb60769f9 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -1,4 +1,3 @@
-
/obj/structure/machinery/door
name = "\improper Door"
desc = "It opens and closes."
@@ -7,50 +6,43 @@
anchored = TRUE
opacity = TRUE
density = TRUE
- throwpass = 0
+ throwpass = FALSE
layer = DOOR_OPEN_LAYER
minimap_color = MINIMAP_DOOR
var/open_layer = DOOR_OPEN_LAYER
var/closed_layer = DOOR_CLOSED_LAYER
var/id = ""
+ var/width = 1
var/secondsElectrified = 0
- var/visible = 1
+ var/visible = TRUE
var/panel_open = FALSE
- var/operating = 0
- var/autoclose = 0
- var/glass = 0
- var/normalspeed = 1
- var/openspeed = 10 //How many seconds does it take to open it? Default 1 second. Use only if you have long door opening animations
- var/heat_proof = 0 // For glass airlocks/opacity firedoors
- var/air_properties_vary_with_direction = 0
- var/turf/filler //Fixes double door opacity issue
+ var/operating = FALSE
+ var/autoclose = FALSE
+ var/glass = FALSE
+ /// If FALSE it speeds up the autoclosing timing.
+ var/normalspeed = TRUE
+ /// Time to open/close airlock, default is 1 second.
+ var/openspeed = 1 SECONDS
+ /// Fixes multi_tile doors opacity issues.
+ var/list/filler_turfs = list() //Previously this was just var, because no one had forseen someone creating doors more than 2 tiles wide
/// Stops it being forced open through normal means (Hunters/Zombies/Aliens).
var/heavy = FALSE
/// Resistance to masterkey
var/masterkey_resist = FALSE
var/masterkey_mod = 0.1
-
-
- //Multi-tile doors
- dir = EAST
- var/width = 1
+ dir = EAST //So multitile doors are directioned properly
/obj/structure/machinery/door/Initialize(mapload, ...)
. = ..()
- if(density)
- layer = closed_layer
- update_flags_heat_protection(get_turf(src))
- else
- layer = open_layer
-
+ layer = density ? closed_layer : open_layer
handle_multidoor()
/obj/structure/machinery/door/Destroy()
. = ..()
- if(filler && width > 1)
- filler.set_opacity(0)// Ehh... let's hope there are no walls there. Must fix this
- filler = null
+ if(length(filler_turfs) && width > 1)
+ change_filler_opacity(0) // It still doesn't check for walls, might want to add checking that in the future
+ filler_turfs = null
density = FALSE
/obj/structure/machinery/door/initialize_pass_flags(datum/pass_flags_container/PF)
@@ -58,21 +50,41 @@
if (PF)
PF.flags_can_pass_all = NONE
+/// Also refreshes filler_turfs list.
+/obj/structure/machinery/door/proc/change_filler_opacity(new_opacity)
+ // I have no idea why do we null opacity first before... changing it
+ for(var/turf/filler_turf as anything in filler_turfs)
+ filler_turf.set_opacity(null)
+
+ filler_turfs = list()
+ for(var/turf/filler as anything in locate_filler_turfs())
+ filler.set_opacity(new_opacity)
+ filler_turfs += filler
+
+/// Updates collision box and opacity of multi_tile airlocks.
/obj/structure/machinery/door/proc/handle_multidoor()
if(width > 1)
if(dir in list(EAST, WEST))
bound_width = width * world.icon_size
bound_height = world.icon_size
- filler = get_step(src,EAST)
- filler.set_opacity(opacity)
else
bound_width = world.icon_size
bound_height = width * world.icon_size
- filler = get_step(src,NORTH)
- filler.set_opacity(opacity)
+ change_filler_opacity(opacity)
+
+/// Finds turfs which should be filler ones.
+/obj/structure/machinery/door/proc/locate_filler_turfs()
+ var/turf/filler_temp
+ var/list/located_turfs = list()
-//process()
- //return
+ for(var/i in 1 to width - 1)
+ if (dir in list(EAST, WEST))
+ filler_temp = locate(x + i, y, z)
+ else
+ filler_temp = locate(x, y + i, z)
+ if (filler_temp)
+ located_turfs += filler_temp
+ return located_turfs
/obj/structure/machinery/door/proc/borders_space()
for(var/turf/target in range(1, src))
@@ -81,7 +93,8 @@
return FALSE
/obj/structure/machinery/door/Collided(atom/movable/AM)
- if(panel_open || operating) return
+ if(panel_open || operating)
+ return
if(ismob(AM))
var/mob/M = AM
if(world.time - M.last_bumped <= openspeed) return //Can bump-open one airlock per second. This is to prevent shock spam.
@@ -89,12 +102,10 @@
if(!M.is_mob_restrained() && M.mob_size > MOB_SIZE_SMALL)
bumpopen(M)
return
-
if(istype(AM, /obj))
var/obj/O = AM
if(O.buckled_mob)
Collided(O.buckled_mob)
-
if(istype(AM, /obj/structure/machinery/bot))
var/obj/structure/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
@@ -102,16 +113,17 @@
open()
return
-
/obj/structure/machinery/door/proc/bumpopen(mob/user as mob)
- if(operating) return
- src.add_fingerprint(user)
- if(!src.requiresID())
+ if(operating)
+ return
+ add_fingerprint(user)
+ if(!requiresID())
user = null
-
if(density)
- if(allowed(user)) open()
- else flick("door_deny", src)
+ if(allowed(user))
+ open()
+ else
+ flick("door_deny", src)
return
/obj/structure/machinery/door/attack_remote(mob/user)
@@ -124,9 +136,7 @@
add_fingerprint(user)
if(operating)
return
- if(!Adjacent(user))
- user = null //so allowed(user) always succeeds
- if(!requiresID())
+ if(!Adjacent(user) || !requiresID())
user = null //so allowed(user) always succeeds
if(allowed(user))
if(density)
@@ -137,64 +147,56 @@
if(density)
flick("door_deny", src)
-
/obj/structure/machinery/door/attackby(obj/item/I, mob/user)
if(!(I.flags_item & NOBLUDGEON))
try_to_activate_door(user)
- return 1
+ return TRUE
/obj/structure/machinery/door/emp_act(severity)
- if(prob(20/severity) && (istype(src,/obj/structure/machinery/door/airlock) || istype(src,/obj/structure/machinery/door/window)) )
+ . = ..()
+ if(prob(20/severity) && use_power)
open()
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
spawn(30 SECONDS)
secondsElectrified = 0
- ..()
-
/obj/structure/machinery/door/ex_act(severity)
- if(unacidable) return
+ if(unacidable)
+ return
if(density)
switch(severity)
if(0 to EXPLOSION_THRESHOLD_LOW)
if(prob(80))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
+ var/datum/effect_system/spark_spread/spark = new /datum/effect_system/spark_spread
+ spark.set_up(2, 1, src)
+ spark.start()
if(EXPLOSION_THRESHOLD_LOW to INFINITY)
qdel(src)
else
switch(severity)
if(0 to EXPLOSION_THRESHOLD_MEDIUM)
if(prob(80))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
+ var/datum/effect_system/spark_spread/spark = new /datum/effect_system/spark_spread
+ spark.set_up(2, 1, src)
+ spark.start()
else
qdel(src)
return
-
/obj/structure/machinery/door/get_explosion_resistance()
if(density)
if(unacidable)
- return 1000000
+ return 1000000 //Used for negation of explosions, should probably be made into define in the future
else
return EXPLOSION_THRESHOLD_LOW //this should exactly match the amount of damage needed to destroy the door
else
return 0
-
/obj/structure/machinery/door/update_icon()
- if(density)
- icon_state = "door1"
- else
- icon_state = "door0"
- return
-
+ icon_state = density ? "door1" : "door0"
/obj/structure/machinery/door/proc/do_animate(animation)
switch(animation)
@@ -212,7 +214,6 @@
flick("door_deny", src)
return
-
/obj/structure/machinery/door/proc/open(forced=0)
if(!density)
return TRUE
@@ -223,8 +224,8 @@
do_animate("opening")
icon_state = "door0"
set_opacity(FALSE)
- if(filler)
- filler.set_opacity(opacity)
+ if(length(filler_turfs))
+ change_filler_opacity(opacity)
addtimer(CALLBACK(src, PROC_REF(finish_open)), openspeed)
return TRUE
@@ -235,11 +236,9 @@
if(operating)
operating = FALSE
-
if(autoclose)
addtimer(CALLBACK(src, PROC_REF(autoclose)), normalspeed ? 150 + openspeed : 5)
-
/obj/structure/machinery/door/proc/close()
if(density)
return TRUE
@@ -256,22 +255,19 @@
update_icon()
if(visible && !glass)
set_opacity(TRUE)
- if(filler)
- filler.set_opacity(opacity)
+ if(length(filler_turfs))
+ change_filler_opacity(opacity)
operating = FALSE
/obj/structure/machinery/door/proc/requiresID()
return TRUE
-
-/obj/structure/machinery/door/proc/update_flags_heat_protection(turf/source)
-
-
+/// Used for overriding in airlocks
/obj/structure/machinery/door/proc/autoclose()
- var/obj/structure/machinery/door/airlock/A = src
- if(!A.density && !A.operating && !A.locked && !A.welded && A.autoclose)
+ if(!autoclose)
+ return
+ if(!density && !operating)
close()
- return
/obj/structure/machinery/door/Move(new_loc, new_dir)
. = ..()
@@ -279,16 +275,15 @@
if(dir in list(EAST, WEST))
bound_width = width * world.icon_size
bound_height = world.icon_size
- filler.set_opacity(0)
- filler = (get_step(src,EAST)) //Find new turf
- filler.set_opacity(opacity)
else
bound_width = world.icon_size
bound_height = width * world.icon_size
- filler.set_opacity(0)
- filler = (get_step(src,NORTH)) //Find new turf
- filler.set_opacity(opacity)
+ change_filler_opacity(opacity)
+/obj/structure/machinery/door/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation)
+ . = ..()
+ // Yes, for a split second after departure you can see through rear dropship airlocks, but it's the simplest solution I could've think of
+ handle_multidoor()
/obj/structure/machinery/door/morgue
icon = 'icons/obj/structures/doors/doormorgue.dmi'
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index d236b9616620..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)
@@ -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 65ecd67a438e..0a179af27803 100644
--- a/code/game/machinery/doors/multi_tile.dm
+++ b/code/game/machinery/doors/multi_tile.dm
@@ -13,7 +13,6 @@
/obj/structure/machinery/door/airlock/multi_tile/Initialize()
. = ..()
- handle_multidoor()
update_icon()
/obj/structure/machinery/door/airlock/multi_tile/glass
@@ -137,7 +136,6 @@
/obj/structure/window/framed/almayer,
/obj/structure/machinery/door/airlock,
)
- var/multi_filler = list()
/obj/structure/machinery/door/airlock/multi_tile/almayer/Initialize()
. = ..()
@@ -233,42 +231,6 @@
req_access = null
req_one_access = list(ACCESS_CIVILIAN_BRIG, ACCESS_CIVILIAN_COMMAND, ACCESS_WY_COLONIAL)
-/obj/structure/machinery/door/airlock/multi_tile/almayer/handle_multidoor()
- . = ..()
- if(!(width > 1)) return //Bubblewrap
-
- update_filler_turfs()
-
-//We have to find these again since these doors are used on shuttles a lot so the turfs changes
-/obj/structure/machinery/door/airlock/multi_tile/almayer/proc/update_filler_turfs()
- for(var/turf/T in multi_filler)
- T.set_opacity(null)
-
- multi_filler = list()
- for(var/turf/T in get_filler_turfs())
- T.set_opacity(opacity)
- multi_filler += list(T)
-
-/obj/structure/machinery/door/airlock/multi_tile/proc/get_filler_turfs()
- . = list()
- for(var/i = 1, i < width, i++)
- if(dir in list(NORTH, SOUTH))
- var/turf/T = locate(x, y + i, z)
- if(T)
- . += list(T)
- else if(dir in list(EAST, WEST))
- var/turf/T = locate(x + i, y, z)
- if(T)
- . += list(T)
-
-/obj/structure/machinery/door/airlock/multi_tile/almayer/open()
- . = ..()
- update_filler_turfs()
-
-/obj/structure/machinery/door/airlock/multi_tile/almayer/close()
- . = ..()
- update_filler_turfs()
-
//------Dropship Cargo Doors -----//
/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear
@@ -313,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/doors/runed_sandstone.dm b/code/game/machinery/doors/runed_sandstone.dm
index 4bf66dfdc8d8..a6de7348dd7f 100644
--- a/code/game/machinery/doors/runed_sandstone.dm
+++ b/code/game/machinery/doors/runed_sandstone.dm
@@ -110,8 +110,8 @@
density = FALSE
update_icon()
set_opacity(0)
- if(filler)
- filler.set_opacity(opacity)
+ if(length(filler_turfs))
+ change_filler_opacity(opacity)
if(operating)
operating = FALSE
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 2b57fbd0a44d..bd544c5c3f5a 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -11,7 +11,6 @@
flags_atom = ON_BORDER
opacity = FALSE
var/obj/item/circuitboard/airlock/electronics = null
- air_properties_vary_with_direction = 1
/obj/structure/machinery/door/window/Initialize()
. = ..()
diff --git a/code/game/machinery/fax_machine.dm b/code/game/machinery/fax_machine.dm
index 87398700691d..4a5c62b1f9a0 100644
--- a/code/game/machinery/fax_machine.dm
+++ b/code/game/machinery/fax_machine.dm
@@ -1,11 +1,12 @@
-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"
#define DEPARTMENT_CMB "CMB Incident Command Center, Local Operations"
#define DEPARTMENT_PROVOST "USCM Provost Office"
#define DEPARTMENT_PRESS "Various Press Organizations"
+#define HIGHCOM_DEPARTMENTS list(DEPARTMENT_WY, DEPARTMENT_HC, DEPARTMENT_CMB, DEPARTMENT_PROVOST, DEPARTMENT_PRESS)
/obj/structure/machinery/faxmachine // why not fax_machine?
name = "\improper General Purpose Fax Machine"
@@ -44,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)
@@ -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
@@ -320,10 +321,14 @@ var/list/alldepartments = list()
GLOB.fax_contents += faxcontents
+ var/scan_department = target_department
+ if(department in HIGHCOM_DEPARTMENTS)
+ scan_department = department
+
var/msg_admin = SPAN_STAFF_IC("[target_department]: [key_name(user, 1)] ")
msg_admin += "[CC_MARK(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_JMP_USER(user)] "
- switch(target_department)
+ switch(scan_department)
if(DEPARTMENT_HC)
GLOB.USCMFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
@@ -375,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 fe1f80646c4f..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)
@@ -63,8 +63,9 @@ FIRE ALARM
return src.alarm()
/obj/structure/machinery/firealarm/emp_act(severity)
- if(prob(50/severity)) alarm()
- ..()
+ . = ..()
+ if(prob(50/severity))
+ alarm()
/obj/structure/machinery/firealarm/attackby(obj/item/held_object as obj, mob/user as mob)
src.add_fingerprint(user)
@@ -182,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 75d0de56dec0..437ef7b067ea 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -60,7 +60,7 @@
src.last_flash = world.time
use_power(1500)
- for (var/mob/O in viewers(src, null))
+ for (var/mob/living/O in viewers(src, null))
if (get_dist(src, O) > src.range)
continue
@@ -72,7 +72,9 @@
if (istype(O, /mob/living/carbon/xenomorph))//So aliens don't get flashed (they have no external eyes)/N
continue
- O.apply_effect(strength, WEAKEN)
+ O.KnockDown(strength)
+ O.Stun(strength)
+
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
var/datum/internal_organ/eyes/E = H.internal_organs_by_name["eyes"]
@@ -84,12 +86,11 @@
/obj/structure/machinery/flasher/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
if(prob(75/severity))
flash()
- ..(severity)
/obj/structure/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
if ((src.disable) || (src.last_flash && world.time < src.last_flash + 150))
@@ -134,7 +135,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/fusion_engine.dm b/code/game/machinery/fusion_engine.dm
index 8e3097ef52d1..d7c7cc4c7d18 100644
--- a/code/game/machinery/fusion_engine.dm
+++ b/code/game/machinery/fusion_engine.dm
@@ -156,13 +156,13 @@
/obj/structure/machinery/power/fusion_engine/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/fuelCell))
if(is_on)
- to_chat(user, SPAN_WARNING("The [src] needs to be turned off first."))
+ to_chat(user, SPAN_WARNING("[src] needs to be turned off first."))
return TRUE
if(!fusion_cell)
if(user.drop_inv_item_to_loc(O, src))
fusion_cell = O
update_icon()
- to_chat(user, SPAN_NOTICE("You load the [src] with the [O]."))
+ to_chat(user, SPAN_NOTICE("You load [src] with [O]."))
return TRUE
else
to_chat(user, SPAN_WARNING("You need to remove the fuel cell from [src] first."))
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 33f75c50e341..6109833004d6 100644
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -105,11 +105,10 @@
return 1
/obj/structure/machinery/sparker/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
ignite()
- ..(severity)
/obj/structure/machinery/ignition_switch/attack_remote(mob/user as mob)
return attack_hand(user)
@@ -125,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 4b863bec043d..e16d2cacf63b 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -101,7 +101,7 @@
for(var/datum/reagent/chem in beaker.reagents.reagent_list)
reagentnames += ";[chem.name]"
- log_admin("[key_name(user)] put a [beaker] into [src], containing [reagentnames] at ([src.loc.x],[src.loc.y],[src.loc.z]).")
+ log_admin("[key_name(user)] put \a [beaker] into [src], containing [reagentnames] at ([src.loc.x],[src.loc.y],[src.loc.z]).")
to_chat(user, "You attach \the [container] to \the [src].")
update_beam()
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/processor.dm b/code/game/machinery/kitchen/processor.dm
index 0c4b8a973e83..a18f5db8af43 100644
--- a/code/game/machinery/kitchen/processor.dm
+++ b/code/game/machinery/kitchen/processor.dm
@@ -89,7 +89,7 @@
to_chat(user, SPAN_DANGER("That probably won't blend."))
return 1
user.visible_message("[user] put [what] into [src].", \
- "You put the [what] into [src].")
+ "You put [what] into [src].")
user.drop_held_item()
what.forceMove(src)
@@ -118,4 +118,3 @@
src.processing = 0
src.visible_message(SPAN_NOTICE("\the [src] finished processing."), \
"You hear the food processor stopping/")
-
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/lightswitch.dm b/code/game/machinery/lightswitch.dm
index 66eb0386713f..de61830c2501 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -62,8 +62,7 @@
updateicon()
/obj/structure/machinery/light_switch/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
power_change()
- ..(severity)
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 4bb9c55d25d8..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
@@ -175,10 +175,10 @@ Class Procs:
. += SPAN_WARNING("[msg]")
/obj/structure/machinery/emp_act(severity)
+ . = ..()
if(use_power && stat == 0)
use_power(7500/severity)
new /obj/effect/overlay/temp/emp_sparks (loc)
- ..()
/obj/structure/machinery/ex_act(severity)
diff --git a/code/game/machinery/medical_pod/bodyscanner.dm b/code/game/machinery/medical_pod/bodyscanner.dm
index 16584605a8c5..732ff1ba97b9 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.GetKnockOutDuration(),
"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"] * GLOBAL_STATUS_MULTIPLIER / (1 SECONDS))] 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/sleeper.dm b/code/game/machinery/medical_pod/sleeper.dm
index e6216c9ef0f9..84ef2f579ba1 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
@@ -332,14 +332,13 @@
/obj/structure/machinery/medical_pod/sleeper/emp_act(severity)
+ . = ..()
if(filtering)
toggle_filter()
if(inoperable())
- ..(severity)
return
if(occupant)
go_out()
- ..()
/obj/structure/machinery/medical_pod/sleeper/proc/toggle_filter()
if(!occupant)
@@ -366,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!"))
@@ -391,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.GetKnockOutDuration() * GLOBAL_STATUS_MULTIPLIER / (1 SECONDS)] 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 45062cbf6b39..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()
@@ -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")
@@ -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..a886b59f501f 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)
@@ -620,8 +620,8 @@ Buildable meters
playsound(src.loc, 'sound/items/Ratchet.ogg', 25, 1)
user.visible_message( \
- "[user] fastens the [src].", \
- SPAN_NOTICE("You have fastened the [src]."), \
+ "[user] fastens [src].", \
+ SPAN_NOTICE("You have fastened [src]."), \
"You hear ratchet.")
qdel(src) // remove the pipe item
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index c75360e07568..72e311c6d8ff 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -218,20 +218,14 @@
update_icon()
/obj/structure/machinery/recharger/emp_act(severity)
+ . = ..()
if(inoperable() || !anchored)
- ..(severity)
return
-/*
- if(istype(charging, /obj/item/weapon/gun/energy))
- var/obj/item/weapon/gun/energy/E = charging
- if(E.power_supply)
- E.power_supply.emp_act(severity)
-*/
+
if(istype(charging, /obj/item/weapon/baton))
var/obj/item/weapon/baton/B = charging
if(B.bcell)
B.bcell.charge = 0
- ..(severity)
/obj/structure/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
src.overlays = 0
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index 644402128852..56b782cd77a4 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -109,13 +109,12 @@
return
/obj/structure/machinery/recharge_station/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
if(occupant)
occupant.emp_act(severity)
go_out()
- ..(severity)
/obj/structure/machinery/recharge_station/update_icon()
..()
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/spaceheater.dm b/code/game/machinery/spaceheater.dm
index aa51201ae18b..69b21964a4f4 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -40,12 +40,11 @@
/obj/structure/machinery/space_heater/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
if(cell)
cell.emp_act(severity)
- ..(severity)
/obj/structure/machinery/space_heater/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/cell))
@@ -67,7 +66,7 @@
return
else if(HAS_TRAIT(I, TRAIT_TOOL_SCREWDRIVER))
open = !open
- user.visible_message(SPAN_NOTICE("[user] [open ? "opens" : "closes"] the hatch on the [src]."), SPAN_NOTICE("You [open ? "open" : "close"] the hatch on the [src]."))
+ user.visible_message(SPAN_NOTICE("[user] [open ? "opens" : "closes"] the hatch on [src]."), SPAN_NOTICE("You [open ? "open" : "close"] the hatch on [src]."))
update_icon()
if(!open && user.interactee == src)
close_browser(user, "spaceheater")
@@ -108,7 +107,7 @@
start_processing()
else
stop_processing()
- user.visible_message(SPAN_NOTICE("[user] switches [on ? "on" : "off"] the [src]."),SPAN_NOTICE("You switch [on ? "on" : "off"] the [src]."))
+ user.visible_message(SPAN_NOTICE("[user] switches [on ? "on" : "off"] [src]."),SPAN_NOTICE("You switch [on ? "on" : "off"] [src]."))
update_icon()
return
@@ -187,4 +186,3 @@
name = "radiator"
desc = "It's a radiator. It heats the room through convection with hot water. This one has a red handle."
icon_state = "radiator-r"
-
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index c56f8da36150..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)
@@ -188,11 +188,10 @@
var/emotion = "Neutral"
/obj/structure/machinery/ai_status_display/emp_act(severity)
+ . = ..()
if(inoperable())
- ..(severity)
return
set_picture("ai_bsod")
- ..(severity)
/obj/structure/machinery/ai_status_display/proc/update()
if(mode==0) //Blank
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/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 255d70f45870..8b8b12dfd170 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -93,13 +93,13 @@ GLOBAL_LIST_EMPTY_TYPED(telecomms_list, /obj/structure/machinery/telecomms)
update_state()
/obj/structure/machinery/telecomms/emp_act(severity)
+ . = ..()
if(prob(100/severity))
if(!(stat & EMPED))
stat |= EMPED
var/duration = (300 * 10)/severity
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
stat &= ~EMPED
- ..()
/*
The receiver idles and receives messages from subspace-compatible radio equipment;
diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm
index 1e82a69482f1..0745f05ab2d1 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")
@@ -440,10 +440,68 @@ GLOBAL_LIST_EMPTY(vending_products)
user.set_interaction(src)
tgui_interact(user)
+/// Handles redeeming coin tokens.
+/obj/structure/machinery/cm_vending/proc/redeem_token(obj/item/coin/marine/token, mob/user)
+ var/reward_typepath
+ switch(token.token_type)
+ if(VEND_TOKEN_VOID)
+ to_chat(user, SPAN_WARNING("ERROR: TOKEN NOT RECOGNISED."))
+ return FALSE
+ if(VEND_TOKEN_SPEC)
+ reward_typepath = /obj/item/spec_kit/rifleman
+ else
+ to_chat(user, SPAN_WARNING("ERROR: INCORRECT TOKEN."))
+ return FALSE
+
+ if(reward_typepath && user.drop_inv_item_to_loc(token, src))
+ to_chat(user, SPAN_NOTICE("You insert \the [token] into \the [src]."))
+ var/obj/new_item = new reward_typepath(get_turf(src))
+ user.put_in_any_hand_if_possible(new_item)
+ return TRUE
+ return FALSE
+
+
//------------TGUI PROCS---------------
/obj/structure/machinery/cm_vending/ui_data(mob/user)
- return vendor_user_ui_data(src, user)
+ if(vend_flags & VEND_LIMITED_INVENTORY)
+ return vendor_inventory_ui_data(user)
+
+ . = list()
+ var/list/ui_listed_products = get_listed_products(user)
+ // list format
+ // (
+ // name: str
+ // cost
+ // item reference
+ // allowed to buy flag
+ // item priority (mandatory/recommended/regular)
+ // )
+
+ var/list/stock_values = list()
+
+ var/mob/living/carbon/human/marine = user
+ var/points = 0
+
+ if(instanced_vendor_points)
+ points = available_points_to_display
+ else
+ if(use_snowflake_points)
+ points = marine.marine_snowflake_points
+ else if(use_points)
+ points = marine.marine_points
+
+ for (var/i in 1 to length(ui_listed_products))
+ var/list/myprod = ui_listed_products[i] //we take one list from listed_products
+ var/prod_available = FALSE
+ var/p_cost = myprod[2]
+ var/category = myprod[4]
+ if(points >= p_cost && (!category || ((category in marine.marine_buyable_categories) && (marine.marine_buyable_categories[category]))))
+ prod_available = TRUE
+ stock_values += list(prod_available)
+
+ .["stock_listing"] = stock_values
+ .["current_m_points"] = points
/obj/structure/machinery/cm_vending/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
@@ -492,7 +550,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
@@ -523,14 +581,14 @@ 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."))
vend_fail()
return FALSE
- if(!handle_vend(src, itemspec, user))
+ if(!handle_vend(itemspec, user))
to_chat(user, SPAN_WARNING("You can't buy things from this category anymore."))
vend_fail()
return FALSE
@@ -548,7 +606,7 @@ GLOBAL_LIST_EMPTY(vending_products)
vend_fail()
return TRUE // one left and the player spam click during a lagspike.
- vendor_successful_vend(src, itemspec, user)
+ vendor_successful_vend(itemspec, user)
return TRUE
add_fingerprint(user)
@@ -701,13 +759,20 @@ GLOBAL_LIST_EMPTY(vending_products)
hack_access(user)
return TRUE
+ ///If we want to redeem a token
+ else if(istype(W, /obj/item/coin/marine))
+ if(!can_access_to_vend(user, ignore_hack = TRUE))
+ return FALSE
+ . = redeem_token(W, user)
+ return
+
..()
/obj/structure/machinery/cm_vending/proc/get_listed_products(mob/user)
return listed_products
-/obj/structure/machinery/cm_vending/proc/can_access_to_vend(mob/user, display=TRUE)
- if(!hacked)
+/obj/structure/machinery/cm_vending/proc/can_access_to_vend(mob/user, display = TRUE, ignore_hack = FALSE)
+ if(!hacked || ignore_hack)
if(!allowed(user))
if(display)
to_chat(user, SPAN_WARNING("Access denied."))
@@ -779,7 +844,7 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/structure/machinery/cm_vending/gear/ui_static_data(mob/user)
. = ..(user)
.["vendor_type"] = "gear"
- .["displayed_categories"] = vendor_user_inventory_list(src, user)
+ .["displayed_categories"] = vendor_user_inventory_list(user)
//------------CLOTHING VENDORS---------------
//clothing vendors automatically put item on user. QoL at it's finest.
@@ -796,7 +861,7 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/structure/machinery/cm_vending/clothing/ui_static_data(mob/user)
. = ..(user)
.["vendor_type"] = "clothing"
- .["displayed_categories"] = vendor_user_inventory_list(src, user)
+ .["displayed_categories"] = vendor_user_inventory_list(user)
//------------SORTED VENDORS---------------
//22.06.2019 Modified ex-"marine_selector" system that doesn't use points by Jeser. In theory, should replace all vendors.
@@ -855,7 +920,7 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/structure/machinery/cm_vending/sorted/ui_static_data(mob/user)
. = ..(user)
.["vendor_type"] = "sorted"
- .["displayed_categories"] = vendor_user_inventory_list(src, user, null, 4)
+ .["displayed_categories"] = vendor_user_inventory_list(user, null, 4)
/obj/structure/machinery/cm_vending/sorted/MouseDrop_T(atom/movable/A, mob/user)
@@ -934,7 +999,7 @@ GLOBAL_LIST_EMPTY(vending_products)
/obj/structure/machinery/cm_vending/own_points/ui_static_data(mob/user)
. = ..(user)
.["vendor_type"] = "gear"
- .["displayed_categories"] = vendor_user_inventory_list(src, user)
+ .["displayed_categories"] = vendor_user_inventory_list(user)
//------------ESSENTIALS SETS AND RANDOM GEAR SPAWNER---------------
@@ -1060,7 +1125,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
//---helper procs
-/proc/vendor_user_inventory_list(vendor, mob/user, cost_index=2, priority_index=5)
+/obj/structure/machinery/cm_vending/proc/vendor_user_inventory_list(mob/user, cost_index=2, priority_index=5)
. = list()
// default list format
// (
@@ -1070,8 +1135,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
// allowed to buy flag
// item priority (mandatory/recommended/regular)
// )
- var/obj/structure/machinery/cm_vending/vending_machine = vendor
- var/list/ui_listed_products = vending_machine.get_listed_products(user)
+ var/list/ui_listed_products = get_listed_products(user)
for (var/i in 1 to length(ui_listed_products))
var/list/myprod = ui_listed_products[i] //we take one list from listed_products
@@ -1113,10 +1177,9 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
var/last_category = .[last_index]
last_category["items"] += list(display_item)
-/proc/vendor_inventory_ui_data(vendor, mob/user)
+/obj/structure/machinery/cm_vending/proc/vendor_inventory_ui_data(mob/user)
. = list()
- var/obj/structure/machinery/cm_vending/vending_machine = vendor
- var/list/ui_listed_products = vending_machine.get_listed_products(user)
+ var/list/ui_listed_products = get_listed_products(user)
var/list/ui_categories = list()
for (var/i in 1 to length(ui_listed_products))
@@ -1125,92 +1188,50 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
ui_categories += list(p_amount)
.["stock_listing"] = ui_categories
-/proc/vendor_user_ui_data(obj/structure/machinery/cm_vending/vending_machine, mob/user)
- if(vending_machine.vend_flags & VEND_LIMITED_INVENTORY)
- return vendor_inventory_ui_data(vending_machine, user)
-
- . = list()
- var/list/ui_listed_products = vending_machine.get_listed_products(user)
- // list format
- // (
- // name: str
- // cost
- // item reference
- // allowed to buy flag
- // item priority (mandatory/recommended/regular)
- // )
-
- var/list/stock_values = list()
-
- var/mob/living/carbon/human/marine = user
- var/points = 0
-
- if(vending_machine.instanced_vendor_points)
- points = vending_machine.available_points_to_display
- else
- if(vending_machine.use_snowflake_points)
- points = marine.marine_snowflake_points
- else if(vending_machine.use_points)
- points = marine.marine_points
-
- for (var/i in 1 to length(ui_listed_products))
- var/list/myprod = ui_listed_products[i] //we take one list from listed_products
- var/prod_available = FALSE
- var/p_cost = myprod[2]
- var/category = myprod[4]
- if(points >= p_cost && (!category || ((category in marine.marine_buyable_categories) && (marine.marine_buyable_categories[category]))))
- prod_available = TRUE
- stock_values += list(prod_available)
-
- .["stock_listing"] = stock_values
- .["current_m_points"] = points
-
-/proc/vendor_successful_vend(obj/structure/machinery/cm_vending/vendor, list/itemspec, mob/living/carbon/human/user)
- if(vendor.stat & IN_USE)
+/obj/structure/machinery/cm_vending/proc/vendor_successful_vend(list/itemspec, mob/living/carbon/human/user)
+ if(stat & IN_USE)
return
- vendor.stat |= IN_USE
+ stat |= IN_USE
- var/vend_flags = vendor.vend_flags
- var/turf/target_turf = vendor.get_appropriate_vend_turf(user)
+ var/turf/target_turf = get_appropriate_vend_turf(user)
if(LAZYLEN(itemspec)) //making sure it's not empty
- if(vendor.vend_delay)
- vendor.overlays.Cut()
- vendor.icon_state = "[initial(vendor.icon_state)]_vend"
- if(vendor.vend_sound)
- playsound(vendor.loc, vendor.vend_sound, 25, 1, 2) //heard only near vendor
- sleep(vendor.vend_delay)
+ if(vend_delay)
+ overlays.Cut()
+ icon_state = "[initial(icon_state)]_vend"
+ if(vend_sound)
+ playsound(loc, vend_sound, 25, 1, 2) //heard only near vendor
+ sleep(vend_delay)
var/prod_type = itemspec[3]
if(islist(prod_type))
for(var/each_type in prod_type)
- vendor_successful_vend_one(vendor, each_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM)
+ vendor_successful_vend_one(each_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM)
else
- vendor_successful_vend_one(vendor, prod_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM)
+ vendor_successful_vend_one(prod_type, user, target_turf, itemspec[4] == MARINE_CAN_BUY_UNIFORM)
if(vend_flags & VEND_LIMITED_INVENTORY)
itemspec[2]--
if(vend_flags & VEND_LOAD_AMMO_BOXES)
- vendor.update_derived_ammo_and_boxes(itemspec)
+ update_derived_ammo_and_boxes(itemspec)
else
to_chat(user, SPAN_WARNING("ERROR: itemspec is missing. Please report this to admins."))
sleep(15)
- vendor.stat &= ~IN_USE
- vendor.icon_state = initial(vendor.icon_state)
- vendor.update_icon()
+ stat &= ~IN_USE
+ icon_state = initial(icon_state)
+ update_icon()
-/proc/vendor_successful_vend_one(obj/structure/machinery/cm_vending/vendor, prod_type, mob/living/carbon/human/user, turf/target_turf, insignas_override)
+/obj/structure/machinery/cm_vending/proc/vendor_successful_vend_one(prod_type, mob/living/carbon/human/user, turf/target_turf, insignas_override)
var/obj/item/new_item
- var/vend_flags = vendor.vend_flags
if(ispath(prod_type, /obj/item))
if(ispath(prod_type, /obj/item/weapon/gun))
new_item = new prod_type(target_turf, TRUE)
else
if(prod_type == /obj/item/device/radio/headset/almayer/marine)
- prod_type = vendor.headset_type
+ prod_type = headset_type
else if(prod_type == /obj/item/clothing/gloves/marine)
- prod_type = vendor.gloves_type
+ prod_type = gloves_type
new_item = new prod_type(target_turf)
new_item.add_fingerprint(user)
else
@@ -1239,13 +1260,13 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
if(vend_flags & VEND_TO_HAND)
if(user.client?.prefs && (user.client?.prefs?.toggle_prefs & TOGGLE_VEND_ITEM_TO_HAND))
- if(vendor.Adjacent(user))
+ if(Adjacent(user))
user.put_in_any_hand_if_possible(new_item, disable_warning = TRUE)
new_item.post_vendor_spawn_hook(user)
-/proc/handle_vend(obj/structure/machinery/cm_vending/vendor, list/listed_products, mob/living/carbon/human/vending_human)
- if(vendor.vend_flags & VEND_USE_VENDOR_FLAGS)
+/obj/structure/machinery/cm_vending/proc/handle_vend(list/listed_products, mob/living/carbon/human/vending_human)
+ if(vend_flags & VEND_USE_VENDOR_FLAGS)
return TRUE
var/buying_category = listed_products[4]
if(buying_category)
@@ -1281,62 +1302,3 @@ GLOBAL_LIST_INIT(cm_vending_gear_corresponding_types_list, list(
stat &= ~IN_USE
if(destroy)
qdel(src)
-
-//------------HACKING---------------
-
-//Hacking code from old vendors, in case someone will actually would like to add complex hacking in future. For now, simple access hacking I believe sufficient.
-/*
-/obj/structure/machinery/vending/proc/get_wire_descriptions()
- return list(
- VENDING_WIRE_EXTEND = "Inventory control computer",
- VENDING_WIRE_IDSCAN = "ID scanner",
- VENDING_WIRE_SHOCK = "Ground safety",
- VENDING_WIRE_SHOOT_INV = "Dispenser motor control"
- )
-
-/obj/structure/machinery/vending/proc/isWireCut(wire)
- return !(wires & getWireFlag(wire))
-
-/obj/structure/machinery/vending/proc/cut(wire)
- wires ^= getWireFlag(wire)
-
- switch(wire)
- if(VENDING_WIRE_EXTEND)
- src.extended_inventory = 0
- visible_message(SPAN_NOTICE("A weak yellow light turns off underneath \the [src]."))
- if(VENDING_WIRE_SHOCK)
- src.seconds_electrified = -1
- visible_message(SPAN_DANGER("Electric arcs shoot off from \the [src]!"))
- if (VENDING_WIRE_SHOOT_INV)
- if(!src.shoot_inventory)
- src.shoot_inventory = TRUE
- visible_message(SPAN_WARNING("\The [src] begins whirring noisily."))
-
-/obj/structure/machinery/vending/proc/mend(wire)
- wires |= getWireFlag(wire)
-
- switch(wire)
- if(VENDING_WIRE_EXTEND)
- src.extended_inventory = 1
- visible_message(SPAN_NOTICE("A weak yellow light turns on underneath \the [src]."))
- if(VENDING_WIRE_SHOCK)
- src.seconds_electrified = 0
- if (VENDING_WIRE_SHOOT_INV)
- src.shoot_inventory = FALSE
- visible_message(SPAN_NOTICE("\The [src] stops whirring."))
-
-/obj/structure/machinery/vending/proc/pulse(wire)
- switch(wire)
- if(VENDING_WIRE_EXTEND)
- src.extended_inventory = !src.extended_inventory
- visible_message(SPAN_NOTICE("A weak yellow light turns [extended_inventory ? "on" : "off"] underneath \the [src]."))
- if (VENDING_WIRE_SHOCK)
- src.seconds_electrified = 30
- visible_message(SPAN_DANGER("Electric arcs shoot off from \the [src]!"))
- if (VENDING_WIRE_SHOOT_INV)
- src.shoot_inventory = !src.shoot_inventory
- if(shoot_inventory)
- visible_message(SPAN_WARNING("\The [src] begins whirring noisily."))
- else
- visible_message(SPAN_NOTICE("\The [src] stops whirring."))
-*/
diff --git a/code/game/machinery/vending/vending.dm b/code/game/machinery/vending/vending.dm
index b5f2c6181c93..8629ce2bb2be 100644
--- a/code/game/machinery/vending/vending.dm
+++ b/code/game/machinery/vending/vending.dm
@@ -208,23 +208,23 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
update_icon()
return TRUE
else if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI))
- to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src]."))
+ to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name]."))
return FALSE
else if(stat & BROKEN)
- to_chat(user, SPAN_NOTICE("You start to unscrew the [src]'s broken panel."))
+ to_chat(user, SPAN_NOTICE("You start to unscrew [src]'s broken panel."))
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, numticks = 3))
- to_chat(user, SPAN_WARNING("You stop unscrewing the [src]'s broken panel."))
+ to_chat(user, SPAN_WARNING("You stop unscrewing [src]'s broken panel."))
return FALSE
- to_chat(user, SPAN_NOTICE("You unscrew the [src]'s broken panel and remove it, exposing many broken wires."))
+ to_chat(user, SPAN_NOTICE("You unscrew [src]'s broken panel and remove it, exposing many broken wires."))
stat &= ~BROKEN
stat |= REPAIR_STEP_ONE
return TRUE
else if(stat & REPAIR_STEP_FOUR)
- to_chat(user, SPAN_NOTICE("You start to fasten the [src]'s new panel."))
+ to_chat(user, SPAN_NOTICE("You start to fasten [src]'s new panel."))
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, numticks = 3))
- to_chat(user, SPAN_WARNING("You stop fastening the [src]'s new panel."))
+ to_chat(user, SPAN_WARNING("You stop fastening [src]'s new panel."))
return FALSE
- to_chat(user, SPAN_NOTICE("You fasten the [src]'s new panel, fully repairing the vendor."))
+ to_chat(user, SPAN_NOTICE("You fasten [src]'s new panel, fully repairing the vendor."))
stat &= ~REPAIR_STEP_FOUR
stat |= FULLY_REPAIRED
update_icon()
@@ -235,17 +235,17 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
return FALSE
else if(HAS_TRAIT(item, TRAIT_TOOL_WIRECUTTERS))
if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI))
- to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src]."))
+ to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name]."))
return FALSE
else if(stat == WORKING && panel_open)
attack_hand(user)
return
else if(stat & REPAIR_STEP_ONE)
- to_chat(user, SPAN_NOTICE("You start to remove the [src]'s broken wires."))
+ to_chat(user, SPAN_NOTICE("You start to remove [src]'s broken wires."))
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, numticks = 3))
- to_chat(user, SPAN_WARNING("You stop removing the [src]'s broken wires."))
+ to_chat(user, SPAN_WARNING("You stop removing [src]'s broken wires."))
return FALSE
- to_chat(user, SPAN_NOTICE("You remove the [src]'s broken broken wires."))
+ to_chat(user, SPAN_NOTICE("You remove [src]'s broken broken wires."))
stat &= ~REPAIR_STEP_ONE
stat |= REPAIR_STEP_TWO
return TRUE
@@ -255,20 +255,20 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
return FALSE
else if(istype(item, /obj/item/stack/cable_coil))
if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI))
- to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src]."))
+ to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name]."))
return FALSE
var/obj/item/stack/cable_coil/CC = item
if(stat & REPAIR_STEP_TWO)
if(CC.amount < 5)
to_chat(user, SPAN_WARNING("You need more cable coil to replace the removed wires."))
- to_chat(user, SPAN_NOTICE("You start to replace the [src]'s removed wires."))
+ to_chat(user, SPAN_NOTICE("You start to replace [src]'s removed wires."))
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, numticks = 3))
- to_chat(user, SPAN_WARNING("You stop replacing the [src]'s removed wires."))
+ to_chat(user, SPAN_WARNING("You stop replacing [src]'s removed wires."))
return FALSE
if(!CC || !CC.use(5))
to_chat(user, SPAN_WARNING("You need more cable coil to replace the removed wires."))
return FALSE
- to_chat(user, SPAN_NOTICE("You remove the [src]'s broken broken wires."))
+ to_chat(user, SPAN_NOTICE("You remove [src]'s broken broken wires."))
stat &= ~REPAIR_STEP_TWO
stat |= REPAIR_STEP_THREE
return TRUE
@@ -278,18 +278,18 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
return
else if(istype(item, /obj/item/stack/sheet/metal))
if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI))
- to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src]."))
+ to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name]."))
return FALSE
var/obj/item/stack/sheet/metal/M = item
if(stat & REPAIR_STEP_THREE)
- to_chat(user, SPAN_NOTICE("You start to construct a new panel for the [src]."))
+ to_chat(user, SPAN_NOTICE("You start to construct a new panel for [src]."))
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, numticks = 3))
- to_chat(user, SPAN_WARNING("You stop constructing a new panel for the [src]."))
+ to_chat(user, SPAN_WARNING("You stop constructing a new panel for [src]."))
return FALSE
if(!M || !M.use(1))
to_chat(user, SPAN_WARNING("You a sheet of metal to construct a new panel."))
return FALSE
- to_chat(user, SPAN_NOTICE("You construct a new panel for the [src]."))
+ to_chat(user, SPAN_NOTICE("You construct a new panel for [src]."))
stat &= ~REPAIR_STEP_THREE
stat |= REPAIR_STEP_FOUR
return TRUE
@@ -306,9 +306,9 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
switch (anchored)
if (0)
anchored = TRUE
- user.visible_message("[user] tightens the bolts securing the [src] to the floor.", "You tighten the bolts securing the [src] to the floor.")
+ user.visible_message("[user] tightens the bolts securing [src] to the floor.", "You tighten the bolts securing [src] to the floor.")
if (1)
- user.visible_message("[user] unfastens the bolts securing the [src] to the floor.", "You unfasten the bolts securing the [src] to the floor.")
+ user.visible_message("[user] unfastens the bolts securing [src] to the floor.", "You unfasten the bolts securing [src] to the floor.")
anchored = FALSE
return
else if(HAS_TRAIT(item, TRAIT_TOOL_MULTITOOL) || HAS_TRAIT(item, TRAIT_TOOL_WIRECUTTERS))
@@ -321,7 +321,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
return
if(user.drop_inv_item_to_loc(item, src))
coin = item
- to_chat(user, SPAN_NOTICE(" You insert the [item] into the [src]"))
+ to_chat(user, SPAN_NOTICE("You insert [item] into [src]"))
tgui_interact(user)
return
else if(istype(item, /obj/item/spacecash))
@@ -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)
@@ -422,9 +422,9 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
if(is_tipped_over)
if(user.action_busy)
return
- user.visible_message(SPAN_NOTICE("[user] begins to heave the [src] back into place!"), SPAN_NOTICE("You start heaving the [src] back into place..."))
+ user.visible_message(SPAN_NOTICE("[user] begins to heave [src] back into place!"), SPAN_NOTICE("You start heaving [src] back into place..."))
if(do_after(user, 80, INTERRUPT_NO_NEEDHAND, BUSY_ICON_FRIENDLY))
- user.visible_message(SPAN_NOTICE("[user] rights the [src]!"), SPAN_NOTICE("You right the [src]!"))
+ user.visible_message(SPAN_NOTICE("[user] rights [src]!"), SPAN_NOTICE("You right [src]!"))
flip_back()
return
@@ -534,7 +534,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
return
if(coin.string_attached)
if(prob(50))
- to_chat(user, SPAN_NOTICE("You successfully pull the coin out before the [src] could swallow it."))
+ to_chat(user, SPAN_NOTICE("You successfully pull the coin out before [src] could swallow it."))
user.put_in_hands(coin)
else
to_chat(user, SPAN_NOTICE("You weren't able to pull the coin out fast enough, the machine ate it, string and all."))
@@ -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
@@ -882,8 +882,8 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
S.remove_from_storage(item_to_stock, user.loc)
qdel(item_to_stock)
- user.visible_message(SPAN_NOTICE("[user] stocks the [src] with \a [product.product_name]."),
- SPAN_NOTICE("You stock the [src] with \a [product.product_name]."))
+ user.visible_message(SPAN_NOTICE("[user] stocks [src] with \a [product.product_name]."),
+ SPAN_NOTICE("You stock [src] with \a [product.product_name]."))
product.amount++
return //We found our item, no reason to go on.
@@ -967,7 +967,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
if (!throw_item)
return 0
INVOKE_ASYNC(throw_item, /atom/movable/proc/throw_atom, target, 16, SPEED_AVERAGE, src)
- visible_message(SPAN_WARNING("The [src] launches \the [throw_item] at [target]!"))
+ visible_message(SPAN_WARNING("[src] launches [throw_item] at [target]!"))
playsound(src, "sound/machines/vending.ogg", 40, TRUE)
return 1
@@ -988,14 +988,14 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
switch(wire)
if(VENDING_WIRE_EXTEND)
extended_inventory = TRUE
- visible_message(SPAN_NOTICE("A weak yellow light turns off underneath the [src]."))
+ visible_message(SPAN_NOTICE("A weak yellow light turns off underneath [src]."))
if(VENDING_WIRE_SHOCK)
seconds_electrified = -1
- visible_message(SPAN_DANGER("Electric arcs shoot off from the [src]!"))
+ visible_message(SPAN_DANGER("Electric arcs shoot off from [src]!"))
if (VENDING_WIRE_SHOOT_INV)
if(!shoot_inventory)
shoot_inventory = TRUE
- visible_message(SPAN_WARNING("The [src] begins whirring noisily."))
+ visible_message(SPAN_WARNING("[src] begins whirring noisily."))
/obj/structure/machinery/vending/proc/mend(wire)
wires |= getWireFlag(wire)
@@ -1003,24 +1003,24 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending
switch(wire)
if(VENDING_WIRE_EXTEND)
extended_inventory = FALSE
- visible_message(SPAN_NOTICE("A weak yellow light turns on underneath the [src]."))
+ visible_message(SPAN_NOTICE("A weak yellow light turns on underneath [src]."))
if(VENDING_WIRE_SHOCK)
seconds_electrified = 0
if (VENDING_WIRE_SHOOT_INV)
shoot_inventory = FALSE
- visible_message(SPAN_NOTICE("The [src] stops whirring."))
+ visible_message(SPAN_NOTICE("[src] stops whirring."))
/obj/structure/machinery/vending/proc/pulse(wire)
switch(wire)
if(VENDING_WIRE_EXTEND)
extended_inventory = !extended_inventory
- visible_message(SPAN_NOTICE("A weak yellow light turns [extended_inventory ? "on" : "off"] underneath the [src]."))
+ visible_message(SPAN_NOTICE("A weak yellow light turns [extended_inventory ? "on" : "off"] underneath [src]."))
if (VENDING_WIRE_SHOCK)
seconds_electrified = 30
- visible_message(SPAN_DANGER("Electric arcs shoot off from the [src]!"))
+ visible_message(SPAN_DANGER("Electric arcs shoot off from [src]!"))
if (VENDING_WIRE_SHOOT_INV)
shoot_inventory = !shoot_inventory
if(shoot_inventory)
- visible_message(SPAN_WARNING("The [src] begins whirring noisily."))
+ visible_message(SPAN_WARNING("[src] begins whirring noisily."))
else
- visible_message(SPAN_NOTICE("The [src] stops whirring."))
+ visible_message(SPAN_NOTICE("[src] stops whirring."))
diff --git a/code/game/machinery/vending/vending_types.dm b/code/game/machinery/vending/vending_types.dm
index c109db25b3a9..36b0b6e44df6 100644
--- a/code/game/machinery/vending/vending_types.dm
+++ b/code/game/machinery/vending/vending_types.dm
@@ -412,6 +412,12 @@
/obj/item/device/camera_film = 10,
/obj/item/notepad = 5,
/obj/item/device/toner = 5,
+ /obj/item/paper/colonial_grunts = 15,
+ /obj/item/toy/dice/d20 = 10,
+ /obj/item/tool/pen = 10,
+ /obj/item/tool/pen/blue = 10,
+ /obj/item/tool/pen/red = 10,
+ /obj/item/tool/pen/fountain = 3,
)
contraband = list(/obj/item/toy/sword = 2)
@@ -433,5 +439,77 @@
/obj/item/toy/deck/uno = 15,
/obj/item/device/camera = 30,
/obj/item/device/toner = 15,
+ /obj/item/paper/colonial_grunts = 5,
+ /obj/item/toy/dice/d20 = 1,
+ /obj/item/tool/pen = 2,
+ /obj/item/tool/pen/blue = 2,
+ /obj/item/tool/pen/red = 2,
+ /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/synthetic.dm b/code/game/machinery/vending/vendor_types/crew/synthetic.dm
index b489dbab16a4..ecef3ed622d9 100644
--- a/code/game/machinery/vending/vendor_types/crew/synthetic.dm
+++ b/code/game/machinery/vending/vendor_types/crew/synthetic.dm
@@ -335,13 +335,13 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list(
req_access = list(ACCESS_MARINE_SYNTH)
vendor_role = list(JOB_SYNTH)
-/obj/structure/machinery/cm_vending/own_points/experimental_tools/attackby(obj/item/W, mob/user)
- if(istype(W, /obj/item/coin/marine/synth))
- if(user.drop_inv_item_to_loc(W, src))
+/obj/structure/machinery/cm_vending/own_points/experimental_tools/redeem_token(obj/item/coin/marine/token, mob/user)
+ if(token.token_type == VEND_TOKEN_SYNTH)
+ if(user.drop_inv_item_to_loc(token, src))
available_points = 30
available_points_to_display = available_points
- to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]."))
- return
+ to_chat(user, SPAN_NOTICE("You insert \the [token] into \the [src]."))
+ return TRUE
return ..()
/obj/structure/machinery/cm_vending/own_points/experimental_tools/get_listed_products(mob/user)
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 891a2a907b39..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)
@@ -55,8 +55,10 @@
SIGNAL_HANDLER
UnregisterSignal(SSdcs, COMSIG_GLOB_VEHICLE_ORDERED)
- selected_vehicle = "APC"
- available_categories &= ~(VEHICLE_ARMOR_AVAILABLE|VEHICLE_INTEGRAL_AVAILABLE) //APC lacks these, so we need to remove these flags to be able to access spare parts section
+ if(!selected_vehicle)
+ selected_vehicle = "APC" // The whole thing seems to be based upon the assumption you unlock tank as an override, defaulting to APC
+ if(selected_vehicle == "APC")
+ available_categories &= ~(VEHICLE_ARMOR_AVAILABLE|VEHICLE_INTEGRAL_AVAILABLE) //APC lacks these, so we need to remove these flags to be able to access spare parts section
/obj/structure/machinery/cm_vending/gear/vehicle_crew/get_listed_products(mob/user)
var/list/display_list = list()
@@ -85,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/intelligence_officer.dm b/code/game/machinery/vending/vendor_types/intelligence_officer.dm
index ad10037ccfe1..93d31fe13253 100644
--- a/code/game/machinery/vending/vendor_types/intelligence_officer.dm
+++ b/code/game/machinery/vending/vendor_types/intelligence_officer.dm
@@ -4,26 +4,11 @@ GLOBAL_LIST_INIT(cm_vending_gear_intelligence_officer, list(
list("INTELLIGENCE SET (MANDATORY)", 0, null, null, null),
list("Essential Intelligence Set", 0, /obj/effect/essentials_set/intelligence_officer, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),
- list("SUPPLIES", 0, null, null, null),
+ list("ENGINEERING SUPPLIES", 0, null, null, null),
list("Power Control Module", 5, /obj/item/circuitboard/apc, null, VENDOR_ITEM_REGULAR),
- list("Binoculars", 5, /obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR),
- list("Night Vision Optic", 25, /obj/item/device/helmet_visor/night_vision, null, VENDOR_ITEM_RECOMMENDED),
- list("Data Detector", 5, /obj/item/device/motiondetector/intel, null, VENDOR_ITEM_REGULAR),
- list("Intel Radio Encryption Key", 5, /obj/item/device/encryptionkey/intel, null, VENDOR_ITEM_REGULAR),
- list("Fire Extinguisher (Portable)", 5, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
- list("Fulton Recovery Device", 10, /obj/item/stack/fulton, 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("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR),
- list("Medical Helmet Optic", 5, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_REGULAR),
list("Welding Goggles", 5, /obj/item/clothing/glasses/welding, null, VENDOR_ITEM_REGULAR),
- list("POUCHES", 0, null, null, null),
- list("Large Magazine Pouch", 10, /obj/item/storage/pouch/magazine/large, null, VENDOR_ITEM_REGULAR),
- list("Large Shotgun Shell Pouch", 10, /obj/item/storage/pouch/shotgun/large, null, VENDOR_ITEM_REGULAR),
- list("Autoinjector Pouch (Full)", 15, /obj/item/storage/pouch/autoinjector/full, null, VENDOR_ITEM_RECOMMENDED),
- list("Machete Pouch (Full)", 10, /obj/item/storage/pouch/machete/full, null, VENDOR_ITEM_REGULAR),
-
list("PRIMARY AMMUNITION", 0, null, null, null),
list("M4RA AP Magazine (10x24mm)", 10, /obj/item/ammo_magazine/rifle/m4ra/ap, null, VENDOR_ITEM_REGULAR),
list("M39 AP Magazine (10x20mm)", 10, /obj/item/ammo_magazine/smg/m39/ap , null, VENDOR_ITEM_REGULAR),
@@ -35,7 +20,30 @@ GLOBAL_LIST_INIT(cm_vending_gear_intelligence_officer, list(
list("M44 Heavy Speed Loader (.44)", 10, /obj/item/ammo_magazine/revolver/heavy, null, VENDOR_ITEM_REGULAR),
list("M4A3 HP Magazine", 5, /obj/item/ammo_magazine/pistol/hp, null, VENDOR_ITEM_REGULAR),
list("M4A3 AP Magazine", 5, /obj/item/ammo_magazine/pistol/ap, null, VENDOR_ITEM_REGULAR),
- list("VP78 Magazine", 5, /obj/item/ammo_magazine/pistol/vp78, null, VENDOR_ITEM_REGULAR)
+ list("VP78 Magazine", 5, /obj/item/ammo_magazine/pistol/vp78, null, VENDOR_ITEM_REGULAR),
+
+ list("POUCHES", 0, null, null, null),
+ list("Large Magazine Pouch", 10, /obj/item/storage/pouch/magazine/large, null, VENDOR_ITEM_REGULAR),
+ list("Large Shotgun Shell Pouch", 10, /obj/item/storage/pouch/shotgun/large, null, VENDOR_ITEM_REGULAR),
+ list("Autoinjector Pouch (Full)", 15, /obj/item/storage/pouch/autoinjector/full, null, VENDOR_ITEM_RECOMMENDED),
+ list("Machete Pouch (Full)", 10, /obj/item/storage/pouch/machete/full, null, VENDOR_ITEM_REGULAR),
+
+ list("UTILITIES", 0, null, null, null),
+ list("Fire Extinguisher (Portable)", 5, /obj/item/tool/extinguisher/mini, null, VENDOR_ITEM_REGULAR),
+ list("Fulton Device Stack", 10, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR),
+ list("Motion Detector", 15, /obj/item/device/motiondetector, null, VENDOR_ITEM_RECOMMENDED),
+ list("Data Detector", 5, /obj/item/device/motiondetector/intel, 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", 5, /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),
+ list("Night Vision Optic", 25, /obj/item/device/helmet_visor/night_vision, null, VENDOR_ITEM_RECOMMENDED),
+
+ list("RADIO KEYS", 0, null, null, null),
+ list("Intel Radio Encryption Key", 5, /obj/item/device/encryptionkey/intel, null, VENDOR_ITEM_REGULAR),
))
/obj/structure/machinery/cm_vending/gear/intelligence_officer
diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm
index 1dbd31c63de4..93680fb93d2c 100644
--- a/code/game/machinery/vending/vendor_types/requisitions.dm
+++ b/code/game/machinery/vending/vendor_types/requisitions.dm
@@ -413,6 +413,9 @@
list("MASKS", -1, null, null, null),
list("Gas Mask", 20, /obj/item/clothing/mask/gas, VENDOR_ITEM_REGULAR),
list("Heat Absorbent Coif", 10, /obj/item/clothing/mask/rebreather/scarf, VENDOR_ITEM_REGULAR),
+
+ list("MISCELLANEOUS", -1, null, null),
+ list("Bedroll", 30, /obj/item/roller/bedroll, VENDOR_ITEM_REGULAR),
)
/obj/structure/machinery/cm_vending/sorted/uniform_supply/ui_state(mob/user)
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 222cd4693cd2..505ef81a1277 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
@@ -71,8 +71,10 @@
listed_products = list(
list("STANDARD EQUIPMENT", -1, null, null, null),
list("Marine Combat Boots", round(scale * 15), /obj/item/clothing/shoes/marine, VENDOR_ITEM_REGULAR),
+ list("Marine Brown Combat Boots", round(scale * 15), /obj/item/clothing/shoes/marine/brown, VENDOR_ITEM_REGULAR),
list("USCM Uniform", round(scale * 15), /obj/item/clothing/under/marine, VENDOR_ITEM_REGULAR),
list("Marine Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine, VENDOR_ITEM_REGULAR),
+ list("Marine Brown Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine/brown, VENDOR_ITEM_REGULAR),
list("Marine Black Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine/black, VENDOR_ITEM_REGULAR),
list("Marine Radio Headset", round(scale * 15), /obj/item/device/radio/headset/almayer, VENDOR_ITEM_REGULAR),
list("M10 Pattern Marine Helmet", round(scale * 15), /obj/item/clothing/head/helmet/marine, VENDOR_ITEM_REGULAR),
@@ -158,6 +160,7 @@
list("USCM Flair", round(scale * 15), /obj/item/prop/helmetgarb/flair_uscm, VENDOR_ITEM_REGULAR),
list("Falling Falcons Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch/falcon, VENDOR_ITEM_REGULAR),
list("USCM Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch, VENDOR_ITEM_REGULAR),
+ list("Bedroll", round(scale * 20), /obj/item/roller/bedroll, VENDOR_ITEM_REGULAR),
)
//--------------SQUAD SPECIFIC VERSIONS--------------
@@ -306,6 +309,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/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/decals/posters.dm b/code/game/objects/effects/decals/posters.dm
index c688c4e6fb67..7a8054efce1a 100644
--- a/code/game/objects/effects/decals/posters.dm
+++ b/code/game/objects/effects/decals/posters.dm
@@ -184,6 +184,12 @@
serial_number = pick(27,28,30,31)
.=..()
+/obj/structure/sign/poster/io
+ icon_state = "poster14"
+
+/obj/structure/sign/poster/io/Initialize()
+ serial_number = 14
+ . = ..()
////////////////
//Hero Posters//
////////////////
diff --git a/code/game/objects/effects/decals/warning_stripes.dm b/code/game/objects/effects/decals/warning_stripes.dm
index ce0802d72d8e..20c96c2ac737 100644
--- a/code/game/objects/effects/decals/warning_stripes.dm
+++ b/code/game/objects/effects/decals/warning_stripes.dm
@@ -91,6 +91,20 @@
/obj/effect/decal/sand_overlay/sand2/corner2
icon_state = "sand2_c"
+/obj/effect/decal/grass_overlay
+ name = "grass edge"
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ unacidable = TRUE
+ icon = 'icons/turf/floors/auto_strata_grass.dmi'
+ layer = TURF_LAYER
+
+/obj/effect/decal/grass_overlay/grass1
+ icon_state = "grass_outercorner"
+
+/obj/effect/decal/grass_overlay/grass1/inner
+ name = "grass edge"
+ icon_state = "grass_innercorner"
+
/obj/effect/decal/siding
name = "siding"
icon = 'icons/turf/floors/floors.dmi'
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, i\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? "by [user]." : ".")]"))
else
visible_message(SPAN_DANGER("\The [src] have been attacked with \the [W][(user ? "by [user]." : ".")]"))
diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm
index 82566c80302f..2ec61b0cc1f1 100644
--- a/code/game/objects/explosion_recursive.dm
+++ b/code/game/objects/explosion_recursive.dm
@@ -139,7 +139,7 @@ explosion resistance exactly as much as their health
//spread in each ordinal direction
var/direction_angle = dir2angle(direction)
- for(var/spread_direction in alldirs)
+ for(var/spread_direction in GLOB.alldirs)
var/spread_power = power
if(direction) //false if, for example, this turf was the explosion source
@@ -325,7 +325,7 @@ explosion resistance exactly as much as their health
return
if(!direction)
- direction = pick(alldirs)
+ direction = pick(GLOB.alldirs)
var/range = min(round(severity/src.w_class * 0.2, 1), 14)
if(!direction)
range = round( range/2 ,1)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index f6eaff2713ec..11da4cce6d98 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -795,7 +795,7 @@ cases. Override_icon_state should be a list.*/
/obj/item/proc/showoff(mob/user)
- var/list/viewers = get_mobs_in_view(world_view_size, user)
+ var/list/viewers = get_mobs_in_view(GLOB.world_view_size, user)
user.langchat_speech("holds up [src].", viewers, GLOB.all_languages, skip_language_check = TRUE, animation_style = LANGCHAT_FAST_POP, additional_styles = list("langchat_small", "emote"))
for (var/mob/M in viewers)
M.show_message("[user] holds up [src]. Take 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
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/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index a5e0eafe2f91..ac5136b07a4a 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -80,7 +80,7 @@
/// actual job
var/rank = null
/// Marine's paygrade
- var/paygrade = "ME1"
+ var/paygrade = PAY_SHORT_CIV
/// For medics and engineers to 'claim' a locker
var/claimedgear = 1
@@ -97,6 +97,21 @@
. = ..()
screen_loc = null
+/obj/item/card/id/proc/GetJobName() //Used in secHUD icon generation
+
+ var/job_icons = get_all_job_icons()
+ var/centcom = get_all_centcom_jobs()
+
+ if(assignment in job_icons)
+ return assignment//Check if the job has a hud icon
+ if(rank in job_icons)
+ return rank
+ if(assignment in centcom)
+ return "Centcom"//Return with the NT logo if it is a Centcom job
+ if(rank in centcom)
+ return "Centcom"
+ return "Unknown" //Return unknown if none of the above apply
+
/obj/item/card/id/attack_self(mob/user as mob)
..()
user.visible_message("[user] shows you: [icon2html(src, viewers(user))] [name]: assignment: [assignment]")
diff --git a/code/game/objects/items/circuitboards/computer.dm b/code/game/objects/items/circuitboards/computer.dm
index 122136f6f2fa..08dcfc6964a6 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
@@ -287,14 +287,12 @@
/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
if(HAS_TRAIT(I, TRAIT_TOOL_SCREWDRIVER))
- user.visible_message(SPAN_NOTICE("\the [user] adjusts the jumper on the [src]'s access protocol pins."), SPAN_NOTICE("You adjust the jumper on the access protocol pins."))
+ user.visible_message(SPAN_NOTICE("[user] adjusts the jumper on [src]'s access protocol pins."), SPAN_NOTICE("You adjust the jumper on the access protocol pins."))
if(src.build_path == /obj/structure/machinery/computer/rdconsole/core)
src.name = "Circuit Board (RD Console - Robotics)"
src.build_path = /obj/structure/machinery/computer/rdconsole/robotics
- to_chat(user, SPAN_NOTICE(" Access protocols set to robotics."))
+ to_chat(user, SPAN_NOTICE("Access protocols set to robotics."))
else
src.name = "Circuit Board (RD Console)"
src.build_path = /obj/structure/machinery/computer/rdconsole/core
- to_chat(user, SPAN_NOTICE(" Access protocols set to default."))
-
-
+ to_chat(user, SPAN_NOTICE("Access protocols set to default."))
diff --git a/code/game/objects/items/circuitboards/machine.dm b/code/game/objects/items/circuitboards/machine.dm
index ad4c31cb11e9..248d0d5c8885 100644
--- a/code/game/objects/items/circuitboards/machine.dm
+++ b/code/game/objects/items/circuitboards/machine.dm
@@ -141,7 +141,7 @@ to destroy them and players will be able to make replacements.
if(HAS_TRAIT(I, TRAIT_TOOL_SCREWDRIVER))
machine_dir = turn(machine_dir, 90)
init_dirs = machine_dir
- user.visible_message(SPAN_NOTICE("\The [user] adjusts the jumper on the [src]'s port configuration pins."), SPAN_NOTICE("You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)]."))
+ user.visible_message(SPAN_NOTICE("[user] adjusts the jumper on [src]'s port configuration pins."), SPAN_NOTICE("You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)]."))
return
/obj/item/circuitboard/machine/unary_atmos/get_examine_text(mob/user)
@@ -300,5 +300,3 @@ to destroy them and players will be able to make replacements.
// Board itself is high tech. Coils have to be ordered from cargo or salvaged from existing SMESs.
frame_desc = "Requires 1 superconducting magnetic coil and 30 wires."
req_components = list(/obj/item/stock_parts/smes_coil = 1, /obj/item/stack/cable_coil = 30)
-
-
diff --git a/code/game/objects/items/circuitboards/robot_modules.dm b/code/game/objects/items/circuitboards/robot_modules.dm
index 2e5185353852..04fcff10fa2b 100644
--- a/code/game/objects/items/circuitboards/robot_modules.dm
+++ b/code/game/objects/items/circuitboards/robot_modules.dm
@@ -9,13 +9,12 @@
var/list/stacktypes
/obj/item/circuitboard/robot_module/emp_act(severity)
+ . = ..()
if(modules)
for(var/obj/O in modules)
O.emp_act(severity)
if(emag)
emag.emp_act(severity)
- ..()
- return
/obj/item/circuitboard/robot_module/Initialize()
diff --git a/code/game/objects/items/devices/autopsy_scanner.dm b/code/game/objects/items/devices/autopsy_scanner.dm
index 8aa2053fee8b..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]")]
"
+ scan_data += "Time of death: [worldtime2text("hh:mm", timeofdeath)] [time2text(timeofdeath, "DDD MMM DD [GLOB.game_year]")]
"
var/n = 1
for(var/wdata_idx in wdata)
@@ -139,7 +139,7 @@
if(damaging_weapon)
scan_data += "Severity: [damage_desc]
"
scan_data += "Hits by weapon: [total_hits]
"
- scan_data += "Approximate time of wound infliction: [worldtime2text("hh:mm", age)] [time2text(age, "DDD MMM DD [game_year]")]
"
+ scan_data += "Approximate time of wound infliction: [worldtime2text("hh:mm", age)] [time2text(age, "DDD MMM DD [GLOB.game_year]")]
"
scan_data += "Affected limbs: [D.organ_names]
"
scan_data += "Possible weapons:
"
for(var/weapon_name in weapon_chances)
diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm
index f8cf52473114..a9b7706bcfb7 100644
--- a/code/game/objects/items/devices/binoculars.dm
+++ b/code/game/objects/items/devices/binoculars.dm
@@ -215,7 +215,7 @@
/obj/item/device/binoculars/range/designator/Initialize()
. = ..()
- tracking_id = ++cas_tracking_id_increment
+ tracking_id = ++GLOB.cas_tracking_id_increment
/obj/item/device/binoculars/range/designator/Destroy()
QDEL_NULL(laser)
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index 80a0d603282f..1549fbd3739b 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -10,7 +10,7 @@
..()
var/list/cameras = new/list()
- for (var/obj/structure/machinery/camera/C in cameranet.cameras)
+ for (var/obj/structure/machinery/camera/C in GLOB.cameranet.cameras)
if (C.bugged && C.status)
cameras.Add(C)
if (length(cameras) == 0)
diff --git a/code/game/objects/items/devices/cictablet.dm b/code/game/objects/items/devices/cictablet.dm
index 6abd70980136..3f87b2bfbea2 100644
--- a/code/game/objects/items/devices/cictablet.dm
+++ b/code/game/objects/items/devices/cictablet.dm
@@ -24,7 +24,10 @@
COOLDOWN_DECLARE(distress_cooldown)
/obj/item/device/cotablet/Initialize()
- tacmap = new(src, minimap_type)
+ if(announcement_faction == FACTION_MARINE)
+ tacmap = new /datum/tacmap/drawing(src, minimap_type)
+ else
+ tacmap = new(src, minimap_type) // Non-drawing version
if(SSticker.mode && MODE_HAS_FLAG(MODE_FACTION_CLASH))
add_pmcs = FALSE
else if(SSticker.current_state < GAME_STATE_PLAYING)
@@ -60,7 +63,7 @@
/obj/item/device/cotablet/ui_data(mob/user)
var/list/data = list()
- data["alert_level"] = security_level
+ data["alert_level"] = GLOB.security_level
data["evac_status"] = SShijack.evac_status
data["endtime"] = announcement_cooldown
data["distresstime"] = distress_cooldown
@@ -131,7 +134,7 @@
if(announcement_faction != FACTION_MARINE)
return
- 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
@@ -152,7 +155,7 @@
if(!SSticker.mode)
return FALSE //Not a game mode?
- 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/objects/items/devices/cloaking.dm b/code/game/objects/items/devices/cloaking.dm
index 05e7786744e2..b0c5ed799977 100644
--- a/code/game/objects/items/devices/cloaking.dm
+++ b/code/game/objects/items/devices/cloaking.dm
@@ -47,12 +47,12 @@
src.add_fingerprint(user)
if(chameleon_on)
user.alpha = 25
- to_chat(user, SPAN_NOTICE("You activate the [src]."))
+ to_chat(user, SPAN_NOTICE("You activate [src]."))
spark_system.start()
src.icon_state = "shield1"
else
user.alpha = initial(user.alpha)
- to_chat(user, SPAN_NOTICE("You deactivate the [src]."))
+ to_chat(user, SPAN_NOTICE("You deactivate [src]."))
src.icon_state = "shield0"
spark_system.start()
diff --git a/code/game/objects/items/devices/coins.dm b/code/game/objects/items/devices/coins.dm
index 139ea1cbac8c..6c00364642da 100644
--- a/code/game/objects/items/devices/coins.dm
+++ b/code/game/objects/items/devices/coins.dm
@@ -67,12 +67,6 @@
icon_state = "coin_platinum"
black_market_value = 35
-/obj/item/coin/marine/synth
- name = "synthetic experimental tool redemption token"
- desc = "Insert this into a synthetic experimental tools vendor in order to access a variety of experimental support tools."
- icon_state = "coin_synth"
- black_market_value = 0
-
/obj/item/coin/chitin
name = "chitin coin"
desc = "Durable alien chitin pressed into a coin. There are much better uses for chitin..."
@@ -121,3 +115,33 @@
comment = "heads"
user.visible_message(SPAN_NOTICE("[user] has thrown \the [src]. It lands on [comment]! "), \
SPAN_NOTICE("You throw \the [src]. It lands on [comment]! "))
+
+
+/obj/item/coin/marine
+ name = "marine equipment token"
+ desc = "I wonder what it does?"
+ icon_state = "coin_copper"
+ black_market_value = 0
+ /// What is the token for?
+ var/token_type = VEND_TOKEN_VOID
+
+/obj/item/coin/marine/attackby(obj/item/W as obj, mob/user as mob) //To remove attaching a string functionality
+ return
+
+/obj/item/coin/marine/engineer
+ name = "marine engineer support token"
+ desc = "Insert this into an engineer vendor in order to access a support weapon."
+ icon_state = "coin_gold"
+ token_type = VEND_TOKEN_ENGINEER
+
+/obj/item/coin/marine/specialist
+ name = "marine specialist weapon token"
+ desc = "Insert this into a USCM equipment vendor in order to access a single highly dangerous weapon."
+ icon_state = "coin_diamond"
+ token_type = VEND_TOKEN_SPEC
+
+/obj/item/coin/marine/synth
+ name = "synthetic experimental tool redemption token"
+ desc = "Insert this into a synthetic experimental tools vendor in order to access a variety of experimental support tools."
+ icon_state = "coin_synth"
+ token_type = VEND_TOKEN_SYNTH
diff --git a/code/game/objects/items/devices/device.dm b/code/game/objects/items/devices/device.dm
index d3058960233c..23fe7b86bb3a 100644
--- a/code/game/objects/items/devices/device.dm
+++ b/code/game/objects/items/devices/device.dm
@@ -7,7 +7,7 @@
/obj/item/device/Initialize(mapload, ...)
. = ..()
- serial_number = "[rand(0,9)][pick(alphabet_uppercase)][rand(0,9)][rand(0,9)][rand(0,9)][rand(0,9)][pick(alphabet_uppercase)]"
+ serial_number = "[rand(0,9)][pick(GLOB.alphabet_uppercase)][rand(0,9)][rand(0,9)][rand(0,9)][rand(0,9)][pick(GLOB.alphabet_uppercase)]"
/obj/item/device/get_examine_text(mob/user)
. = ..()
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 0a7709aa6101..33a93ed18db5 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -155,6 +155,7 @@
do_flash(user = user, aoe = TRUE)
/obj/item/device/flash/emp_act(severity)
+ . = ..()
if(broken) return
switch(flashes_stored)
if(0 to 5)
@@ -168,7 +169,6 @@
if(M.flash_eyes())
M.apply_effect(10, WEAKEN)
M.visible_message(SPAN_DISARM("[M] is blinded by \the [src]!"))
- ..()
/obj/item/device/flash/synthetic
name = "synthetic flash"
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 114964464a25..58e86998f39a 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -487,13 +487,13 @@
/obj/item/device/flashlight/flare/signal/activate_signal(mob/living/carbon/human/user)
..()
- if(faction && cas_groups[faction])
+ if(faction && GLOB.cas_groups[faction])
signal = new(src)
- signal.target_id = ++cas_tracking_id_increment
+ signal.target_id = ++GLOB.cas_tracking_id_increment
name = "[user.assigned_squad ? user.assigned_squad.name : "X"]-[signal.target_id] flare"
signal.name = name
signal.linked_cam = new(loc, name)
- cas_groups[user.faction].add_signal(signal)
+ GLOB.cas_groups[user.faction].add_signal(signal)
anchored = TRUE
if(activate_message)
visible_message(SPAN_DANGER("[src]'s flame reaches full strength. It's fully active now."), null, 5)
@@ -513,14 +513,14 @@
/obj/item/device/flashlight/flare/signal/Destroy()
STOP_PROCESSING(SSobj, src)
if(signal)
- cas_groups[faction].remove_signal(signal)
+ GLOB.cas_groups[faction].remove_signal(signal)
QDEL_NULL(signal)
return ..()
/obj/item/device/flashlight/flare/signal/turn_off()
anchored = FALSE
if(signal)
- cas_groups[faction].remove_signal(signal)
+ GLOB.cas_groups[faction].remove_signal(signal)
qdel(signal)
..()
@@ -549,9 +549,9 @@
turn_on()
faction = FACTION_MARINE
signal = new(src)
- signal.target_id = ++cas_tracking_id_increment
+ signal.target_id = ++GLOB.cas_tracking_id_increment
name += " [rand(100, 999)]"
signal.name = name
signal.linked_cam = new(loc, name)
- cas_groups[FACTION_MARINE].add_signal(signal)
+ GLOB.cas_groups[FACTION_MARINE].add_signal(signal)
anchored = TRUE
diff --git a/code/game/objects/items/devices/helmet_visors.dm b/code/game/objects/items/devices/helmet_visors.dm
index 596409c88c8b..c3c3f9597060 100644
--- a/code/game/objects/items/devices/helmet_visors.dm
+++ b/code/game/objects/items/devices/helmet_visors.dm
@@ -61,12 +61,12 @@
/// Called by toggle_visor() to activate the visor's effects
/obj/item/device/helmet_visor/proc/activate_visor(obj/item/clothing/head/helmet/marine/attached_helmet, mob/living/carbon/human/user)
- var/datum/mob_hud/current_mob_hud = huds[hud_type]
+ var/datum/mob_hud/current_mob_hud = GLOB.huds[hud_type]
current_mob_hud.add_hud_to(user, attached_helmet)
/// Called by toggle_visor() to deactivate the visor's effects
/obj/item/device/helmet_visor/proc/deactivate_visor(obj/item/clothing/head/helmet/marine/attached_helmet, mob/living/carbon/human/user)
- var/datum/mob_hud/current_mob_hud = huds[hud_type]
+ var/datum/mob_hud/current_mob_hud = GLOB.huds[hud_type]
current_mob_hud.remove_hud_from(user, attached_helmet)
/// Called by /obj/item/clothing/head/helmet/marine/get_examine_text(mob/user) to get extra examine text for this visor
@@ -112,7 +112,7 @@
/obj/item/device/helmet_visor/medical/advanced/ui_data(mob/user)
var/list/data = list(
- "published_documents" = chemical_data.research_publications,
+ "published_documents" = GLOB.chemical_data.research_publications,
"terminal_view" = FALSE
)
return data
@@ -140,7 +140,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
@@ -311,14 +311,14 @@
. = ..()
for(var/type in hud_type)
- var/datum/mob_hud/current_mob_hud = huds[type]
+ var/datum/mob_hud/current_mob_hud = GLOB.huds[type]
current_mob_hud.add_hud_to(user, attached_helmet)
/obj/item/device/helmet_visor/night_vision/marine_raider/deactivate_visor(obj/item/clothing/head/helmet/marine/attached_helmet, mob/living/carbon/human/user)
. = ..()
for(var/type in hud_type)
- var/datum/mob_hud/current_mob_hud = huds[type]
+ var/datum/mob_hud/current_mob_hud = GLOB.huds[type]
current_mob_hud.remove_hud_from(user, attached_helmet)
/obj/item/device/helmet_visor/night_vision/marine_raider/process(delta_time)
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 40ef8792aedb..3f285b358fb2 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -121,7 +121,7 @@
if(target.status != LIGHT_OK)
if(CanUse(U))
if(!Use(U)) return
- to_chat(U, SPAN_NOTICE("You replace the [target.fitting] with the [src]."))
+ to_chat(U, SPAN_NOTICE("You replace the [target.fitting] with [src]."))
if(target.status != LIGHT_EMPTY)
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index 273ced980b44..a92135b9d7ed 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -53,8 +53,8 @@
var/area/A = get_area(src)
var/APC = A? A.get_apc() : null
if(APC)
- to_chat(user, SPAN_NOTICE("The local APC is located at [SPAN_BOLD("[get_dist(src, APC)] units [dir2text(get_dir(src, APC))]")]."))
- user.balloon_alert(user, "[get_dist(src, APC)] units [dir2text(get_dir(src, APC))]")
+ to_chat(user, SPAN_NOTICE("The local APC is located at [SPAN_BOLD("[get_dist(src, APC)] units [dir2text(Get_Compass_Dir(src, APC))]")]."))
+ user.balloon_alert(user, "[get_dist(src, APC)] units [dir2text(Get_Compass_Dir(src, APC))]")
else
to_chat(user, SPAN_WARNING("ERROR: Could not locate local APC."))
user.balloon_alert(user, "could not locate!")
diff --git a/code/game/objects/items/devices/personal_data_transmitter.dm b/code/game/objects/items/devices/personal_data_transmitter.dm
index 6e8aa001cad3..98f8c60452ea 100644
--- a/code/game/objects/items/devices/personal_data_transmitter.dm
+++ b/code/game/objects/items/devices/personal_data_transmitter.dm
@@ -122,7 +122,7 @@
return
var/dist = get_dist(self_turf, bracelet_turf)
- var/direction = dir2text_short(get_dir(self_turf, bracelet_turf))
+ var/direction = dir2text_short(Get_Compass_Dir(self_turf, bracelet_turf))
if(dist > 1)
to_chat(user, SPAN_BOLDNOTICE("The display on \the [src] lights up: [dist]-[direction]"))
else
diff --git a/code/game/objects/items/devices/pinpointer.dm b/code/game/objects/items/devices/pinpointer.dm
index 7ec3118ef96b..2f5d9ffe9d5f 100644
--- a/code/game/objects/items/devices/pinpointer.dm
+++ b/code/game/objects/items/devices/pinpointer.dm
@@ -31,7 +31,7 @@
if(!the_disk)
icon_state = "pinonnull"
return
- setDir(get_dir(src,the_disk))
+ setDir(Get_Compass_Dir(src,the_disk))
switch(get_dist(src,the_disk))
if(0)
icon_state = "pinondirect"
@@ -45,7 +45,7 @@
/obj/item/device/pinpointer/get_examine_text(mob/user)
. = ..()
- for(var/obj/structure/machinery/nuclearbomb/bomb in machines)
+ for(var/obj/structure/machinery/nuclearbomb/bomb in GLOB.machines)
if(bomb.timing)
. += "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
@@ -80,7 +80,7 @@
if(!location)
icon_state = "pinonnull"
return
- setDir(get_dir(src,location))
+ setDir(Get_Compass_Dir(src,location))
switch(get_dist(src,location))
if(0)
icon_state = "pinondirect"
@@ -99,7 +99,7 @@
if(!target)
icon_state = "pinonnull"
return
- setDir(get_dir(src,target))
+ setDir(Get_Compass_Dir(src,target))
switch(get_dist(src,target))
if(0)
icon_state = "pinondirect"
diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm
index 840098cbc492..a69fe64c2565 100644
--- a/code/game/objects/items/devices/pipe_painter.dm
+++ b/code/game/objects/items/devices/pipe_painter.dm
@@ -9,7 +9,7 @@
/obj/item/device/pipe_painter/New()
..()
modes = new()
- for(var/C in pipe_colors)
+ for(var/C in GLOB.pipe_colors)
modes += "[C]"
mode = pick(modes)
@@ -26,7 +26,7 @@
to_chat(user, SPAN_DANGER("You must remove the plating first."))
return
- P.change_color(pipe_colors[mode])
+ P.change_color(GLOB.pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user)
..()
diff --git a/code/game/objects/items/devices/portable_vendor.dm b/code/game/objects/items/devices/portable_vendor.dm
index 65e2128a02c0..29e1d06018ae 100644
--- a/code/game/objects/items/devices/portable_vendor.dm
+++ b/code/game/objects/items/devices/portable_vendor.dm
@@ -210,6 +210,7 @@
s.start()
/obj/item/device/portable_vendor/emp_act(severity)
+ . = ..()
if (broken)
return
if (prob(40*severity))
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index fb8640eeaa71..7ec941f1192b 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -59,8 +59,8 @@
verbs += /obj/item/device/radio/headset/proc/switch_tracker_target
if(frequency)
- for(var/cycled_channel in radiochannels)
- if(radiochannels[cycled_channel] == frequency)
+ for(var/cycled_channel in GLOB.radiochannels)
+ if(GLOB.radiochannels[cycled_channel] == frequency)
default_freq = cycled_channel
/obj/item/device/radio/headset/Destroy()
@@ -183,7 +183,7 @@
/obj/item/device/radio/headset/proc/recalculateChannels()
for(var/ch_name in channels)
- SSradio.remove_object(src, radiochannels[ch_name])
+ SSradio.remove_object(src, GLOB.radiochannels[ch_name])
secure_radio_connections[ch_name] = null
channels = list()
translate_apollo = FALSE
@@ -214,14 +214,14 @@
locate_setting = initial(locate_setting)
for (var/ch_name in channels)
- secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
+ secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
SStgui.update_uis(src)
/obj/item/device/radio/headset/set_frequency(new_frequency)
..()
if(frequency)
- for(var/cycled_channel in radiochannels)
- if(radiochannels[cycled_channel] == frequency)
+ for(var/cycled_channel in GLOB.radiochannels)
+ if(GLOB.radiochannels[cycled_channel] == frequency)
default_freq = cycled_channel
/obj/item/device/radio/headset/equipped(mob/living/carbon/human/user, slot)
@@ -237,7 +237,7 @@
RegisterSignal(user, COMSIG_MOB_DEATH, PROC_REF(update_minimap_icon))
RegisterSignal(user, COMSIG_HUMAN_SET_UNDEFIBBABLE, PROC_REF(update_minimap_icon))
if(headset_hud_on)
- var/datum/mob_hud/H = huds[hud_type]
+ var/datum/mob_hud/H = GLOB.huds[hud_type]
H.add_hud_to(user, src)
//squad leader locator is no longer invisible on our player HUD.
if(user.mind && (user.assigned_squad || misc_tracking) && user.hud_used && user.hud_used.locate_leader)
@@ -256,7 +256,7 @@
COMSIG_MOB_STAT_SET_ALIVE
))
if(istype(user) && user.has_item_in_ears(src)) //dropped() is called before the inventory reference is update.
- var/datum/mob_hud/H = huds[hud_type]
+ var/datum/mob_hud/H = GLOB.huds[hud_type]
H.remove_hud_from(user, src)
//squad leader locator is invisible again
if(user.hud_used && user.hud_used.locate_leader)
@@ -288,7 +288,7 @@
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if(user.has_item_in_ears(src)) //worn
- var/datum/mob_hud/H = huds[hud_type]
+ var/datum/mob_hud/H = GLOB.huds[hud_type]
if(headset_hud_on)
H.add_hud_to(usr, src)
if(user.mind && (misc_tracking || user.assigned_squad) && user.hud_used?.locate_leader)
@@ -808,7 +808,7 @@
set_frequency(frequency)
for(var/ch_name in channels)
- secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
+ secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
recalculateChannels()
if(H.mind && H.hud_used && H.hud_used.locate_leader) //make SL tracker visible
H.hud_used.locate_leader.alpha = 255
diff --git a/code/game/objects/items/devices/radio/listening_bugs.dm b/code/game/objects/items/devices/radio/listening_bugs.dm
new file mode 100644
index 000000000000..4a84df071c60
--- /dev/null
+++ b/code/game/objects/items/devices/radio/listening_bugs.dm
@@ -0,0 +1,276 @@
+#define DISGUISE_REMOVE "remove disguise"
+#define DISGUISE_RADIO "radio"
+#define DISGUISE_PEN "pen"
+#define DISGUISE_FOUNTAIN_PEN "fountain pen"
+#define DISGUISE_ACCESS_TUNER "access tuner"
+#define DISGUISE_WHISTLE "whistle"
+#define DISGUISE_MASS_SPEC "mass-spectrometer"
+#define DISGUISE_CAMERA "camera"
+#define DISGUISE_ZIPPO "zippo lighter"
+#define DISGUISE_TAPE_RECORDER "tape recorder"
+
+/obj/item/device/radio/listening_bug
+ name = "listening device"
+ desc = "A small, and disguisable, listening device."
+
+ icon = 'icons/obj/items/devices.dmi'
+ icon_state = "voice0"
+ item_state = "analyzer"
+
+ w_class = SIZE_TINY
+ volume = RADIO_VOLUME_RAISED
+
+ broadcasting = FALSE
+ listening = FALSE
+ frequency = BUG_A_FREQ
+ canhear_range = 2
+ freqlock = TRUE
+ /// If the bug is disguised or not.
+ var/ready_to_disguise = FALSE
+ var/disguised = FALSE
+ /// Whether or not the bug can be used to listen to its own channel.
+ var/prevent_snooping = FALSE
+ /// The ID tag of the device, for identification.
+ var/nametag = "Device"
+
+/obj/item/device/radio/listening_bug/ui_data(mob/user)
+ var/list/data = list()
+
+ data["broadcasting"] = broadcasting
+ data["listening"] = listening
+ data["frequency"] = frequency
+ data["freqlock"] = freqlock
+
+ var/list/radio_channels = list()
+
+ for(var/channel in channels)
+ var/channel_key = channel_to_prefix(channel)
+ radio_channels += list(list(
+ "name" = channel,
+ "status" = channels[channel] & FREQ_LISTENING,
+ "hotkey" = channel_key))
+
+ data["channels"] = radio_channels
+
+ data["command"] = volume
+ data["useCommand"] = use_volume
+ data["subspace"] = subspace_transmission
+ data["subspaceSwitchable"] = subspace_switchable
+ data["headset"] = FALSE
+
+ return data
+
+/obj/item/device/radio/listening_bug/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
+ switch(action)
+ if("listen")
+ if(prevent_snooping)
+ to_chat(usr, SPAN_WARNING("This device cannot receive transmissions!"))
+ return
+ listening = !listening
+ return
+ if("subspace")
+ if(!ishuman(usr))
+ return
+ var/mob/living/carbon/human/user = usr
+ if(!check_access(user.wear_id) && !check_access(user.get_active_hand()))
+ to_chat(user, SPAN_WARNING("You need an authenticated ID card to change this function!"))
+ return
+ if(subspace_switchable)
+ subspace_transmission = !subspace_transmission
+ var/initial_prevent = initial(prevent_snooping)
+ if(initial_prevent)
+ prevent_snooping = TRUE
+ if(!subspace_transmission)
+ prevent_snooping = FALSE
+ channels = list()
+ return
+ ..()
+
+/obj/item/device/radio/listening_bug/hear_talk(mob/M as mob, msg, verb = "says", datum/language/speaking = null)
+ var/processed_verb = "[SPAN_RED("\[LSTN [nametag]\]")] [verb]"
+ if(broadcasting)
+ if(get_dist(src, M) <= 7)
+ talk_into(M, msg,null,processed_verb,speaking)
+
+/obj/item/device/radio/listening_bug/afterattack(atom/target_atom, mob/user as mob, proximity)
+ if(!ready_to_disguise)
+ return ..()
+
+ var/obj/item/target_item = target_atom
+ if(!istype(target_item) || target_item.anchored || target_item.w_class >= SIZE_LARGE)
+ to_chat(user, SPAN_WARNING("You cannot disguise the listening device as this object."))
+ return FALSE
+
+ var/confirm = tgui_alert(user, "Are you sure you wish to disguise the listening device as '[target_item]'?", "Confirm Choice", list("Yes","No"), 20 SECONDS)
+ if(confirm != "Yes")
+ return FALSE
+
+ icon = target_item.icon
+ name = target_item.name
+ desc = target_item.desc
+ icon_state = target_item.icon_state
+ item_state = target_item.item_state
+ flags_equip_slot = target_item.flags_equip_slot
+ w_class = target_item.w_class
+ ready_to_disguise = FALSE
+ disguised = TRUE
+
+/obj/item/device/radio/listening_bug/get_examine_text(mob/user)
+ if(disguised)
+ . = list()
+ var/size
+ switch(w_class)
+ if(SIZE_TINY)
+ size = "tiny"
+ if(SIZE_SMALL)
+ size = "small"
+ if(SIZE_MEDIUM)
+ size = "normal-sized"
+ . += "This is a [blood_color ? blood_color != "#030303" ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. It is a [size] item."
+ if(desc)
+ . += desc
+ if(desc_lore)
+ . += SPAN_NOTICE("This has an extended lore description.")
+ else
+ . = ..()
+ . += SPAN_INFO("[src] is set to frequency [get_bug_letter()].")
+ if(nametag != initial(nametag))
+ . += SPAN_INFO("[src]'s nametag is set to '[nametag]'")
+
+/obj/item/device/radio/listening_bug/verb/change_disguise()
+ set name = "Change Disguise"
+ set category = "Object"
+ set src in usr
+
+ if(usr.is_mob_incapacitated())
+ to_chat(usr, SPAN_WARNING("You cannot do this while incapacitated!"))
+ return FALSE
+
+ var/check = tgui_alert(usr, "Do you wish to change the disguise of this listening bug?", "Change Disguise?", list("Yes", "No"))
+ if(check != "Yes")
+ return FALSE
+ if(disguised)
+ var/remove_check = tgui_alert(usr, "Do you wish to remove the current disguise?", "Remove Disguise?", list("Yes","No"))
+ if(remove_check == "Yes")
+ icon = initial(icon)
+ name = initial(name)
+ desc = initial(desc)
+ icon_state = initial(icon_state)
+ item_state = initial(item_state)
+ flags_equip_slot = initial(flags_equip_slot)
+ w_class = initial(w_class)
+ disguised = FALSE
+ return TRUE
+
+ to_chat(usr, SPAN_HELPFUL("You can now change the disguise of the device by selecting a normal, or smaller, sized object."))
+ ready_to_disguise = TRUE
+ return TRUE
+
+/obj/item/device/radio/listening_bug/proc/get_bug_letter()
+ switch(frequency)
+ if(BUG_A_FREQ)
+ return "A"
+ if(BUG_B_FREQ)
+ return "B"
+ if(SEC_FREQ)
+ return "MP"
+ if(PVST_FREQ)
+ return "PVST"
+ if(HC_FREQ)
+ return "HC"
+ if(WY_FREQ, PMC_CCT_FREQ)
+ return "WY"
+ if(PMC_CMD_FREQ)
+ return "WYC"
+ if(UPP_CCT_FREQ, UPP_KDO_FREQ)
+ return "UPP"
+ else
+ return "X"
+
+#define OPTION_REMOVE "Remove Tag"
+#define OPTION_NEW "New Tag"
+
+/obj/item/device/radio/listening_bug/verb/set_nametag()
+ set name = "Set Nametag"
+ set category = "Object"
+ set src in usr
+
+ if(usr.is_mob_incapacitated())
+ to_chat(usr, SPAN_WARNING("You cannot do this while incapacitated!"))
+ return FALSE
+
+ var/check = tgui_alert(usr, "Do you wish to change the name tag of this listening bug?", "Change Name tag?", list("Yes", "No"))
+ if(check != "Yes")
+ return FALSE
+
+
+ var/new_nametag
+ var/remove
+ if(nametag != initial(nametag))
+ remove = tgui_alert(usr, "Do you wish to remove the current nametag?", "Remove Nametag", list("Yes", "No"))
+ if(remove == "Yes")
+ new_nametag = initial(nametag)
+ else
+ new_nametag = tgui_input_text(usr, "What new name tag do you wish to use?", "New Name", initial(nametag), 6)
+
+ if(!new_nametag || (new_nametag == nametag))
+ return FALSE
+
+ nametag = new_nametag
+ log_game("[key_name(usr)] set a listening device nametag to [new_nametag].")
+ return TRUE
+
+#undef OPTION_REMOVE
+#undef OPTION_NEW
+
+/obj/item/device/radio/listening_bug/freq_a
+ frequency = BUG_A_FREQ
+
+/obj/item/device/radio/listening_bug/freq_b
+ frequency = BUG_B_FREQ
+
+/obj/item/device/radio/listening_bug/radio_linked
+ prevent_snooping = TRUE
+ subspace_transmission = TRUE
+ subspace_switchable = TRUE
+
+/obj/item/device/radio/listening_bug/radio_linked/mp
+ frequency = SEC_FREQ
+ req_one_access = list(ACCESS_MARINE_BRIG)
+
+/obj/item/device/radio/listening_bug/radio_linked/hc
+ frequency = HC_FREQ
+ req_one_access = list(ACCESS_MARINE_CO)
+/obj/item/device/radio/listening_bug/radio_linked/hc/pvst
+ frequency = PVST_FREQ
+
+/obj/item/device/radio/listening_bug/radio_linked/wy
+ frequency = WY_FREQ
+ req_one_access = list(ACCESS_WY_EXEC, ACCESS_WY_SECURITY)
+
+/obj/item/device/radio/listening_bug/radio_linked/wy/pmc
+ frequency = PMC_CCT_FREQ
+ req_one_access = list(ACCESS_WY_EXEC, ACCESS_WY_SECURITY)
+
+/obj/item/device/radio/listening_bug/radio_linked/upp
+ frequency = UPP_CCT_FREQ
+ req_one_access = list(ACCESS_UPP_COMMANDO, ACCESS_UPP_SECURITY)
+
+/obj/item/device/radio/listening_bug/radio_linked/upp/commando
+ frequency = UPP_KDO_FREQ
+ req_one_access = list(ACCESS_UPP_COMMANDO)
+
+
+// ENCRYPTION KEYS FOR LISTENING IN!
+//REQURIES SUBSPACE ACTIVATION ON THE BUGS FIRST!
+/obj/item/device/encryptionkey/listening_bug
+ desc = "A small encryption key for listening to a secret broadcasting device! Unlikely to work if the device is not using subspace communications!"
+ icon_state = "stripped_key"
+
+/obj/item/device/encryptionkey/listening_bug/freq_a
+ name = "Listening Bug Encryption Key (A)"
+ channels = list(RADIO_CHANNEL_BUG_A = TRUE)
+
+/obj/item/device/encryptionkey/listening_bug/freq_b
+ name = "Listening Bug Encryption Key (B)"
+ channels = list(RADIO_CHANNEL_BUG_B = TRUE)
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index 2092ffa108c6..c628758c74e8 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -73,7 +73,7 @@
set_frequency(frequency)
for (var/ch_name in channels)
- secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
+ secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
flags_atom |= USES_HEARING
@@ -425,11 +425,11 @@
else return
/obj/item/device/radio/emp_act(severity)
+ . = ..()
broadcasting = FALSE
listening = FALSE
for (var/ch_name in channels)
channels[ch_name] = 0
- ..()
///////////////////////////////
//////////Borg Radios//////////
@@ -461,7 +461,7 @@
for(var/ch_name in channels)
- SSradio.remove_object(src, radiochannels[ch_name])
+ SSradio.remove_object(src, GLOB.radiochannels[ch_name])
secure_radio_connections[ch_name] = null
@@ -509,7 +509,7 @@
src.channels[ch_name] += keyslot.channels[ch_name]
for (var/ch_name in src.channels)
- secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
+ secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
SStgui.update_uis(src)
@@ -563,11 +563,11 @@
/obj/item/device/radio/proc/config(op)
for (var/ch_name in channels)
- SSradio.remove_object(src, radiochannels[ch_name])
+ SSradio.remove_object(src, GLOB.radiochannels[ch_name])
secure_radio_connections = new
channels = op
for (var/ch_name in op)
- secure_radio_connections[ch_name] = SSradio.add_object(src, radiochannels[ch_name], RADIO_CHAT)
+ secure_radio_connections[ch_name] = SSradio.add_object(src, GLOB.radiochannels[ch_name], RADIO_CHAT)
/obj/item/device/radio/off
listening = 0
diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm
index d388e06b9fa7..e0f65a4b31ec 100644
--- a/code/game/objects/items/devices/suit_cooling.dm
+++ b/code/game/objects/items/devices/suit_cooling.dm
@@ -110,7 +110,7 @@
cell.add_fingerprint(user)
cell.update_icon()
- to_chat(user, "You remove the [src.cell].")
+ to_chat(user, "You remove [cell].")
src.cell = null
updateicon()
return
@@ -121,7 +121,7 @@
else
turn_on()
if (on)
- to_chat(user, "You switch on the [src].")
+ to_chat(user, "You switch on [src].")
/obj/item/device/suit_cooling_unit/attackby(obj/item/W as obj, mob/user as mob)
if (HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER))
@@ -137,12 +137,12 @@
if (istype(W, /obj/item/cell))
if(cover_open)
if(cell)
- to_chat(user, "There is a [cell] already installed here.")
+ to_chat(user, "There is \a [cell] already installed here.")
else
if(user.drop_held_item())
W.forceMove(src)
cell = W
- to_chat(user, "You insert the [cell].")
+ to_chat(user, "You insert [cell].")
updateicon()
return
@@ -169,7 +169,7 @@
if (cover_open)
if(cell)
- . += "The panel is open, exposing the [cell]."
+ . += "The panel is open, exposing [cell]."
else
. += "The panel is open."
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index a4247c90a5b3..9fe3521d858b 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -261,7 +261,7 @@
audible_message(SPAN_MAROON("[icon2html(src, usr)] End of recording."))
break
- var/list/heard = get_mobs_in_view(world_view_size, src)
+ var/list/heard = get_mobs_in_view(GLOB.world_view_size, src)
langchat_speech(mytape.storedinfo[i], heard, GLOB.all_languages, skip_language_check = TRUE, additional_styles = list("langchat_small"))
audible_message(SPAN_MAROON("[icon2html(src, usr)] [mytape.storedinfo[i]]"))//We want to display this properly, don't double encode
diff --git a/code/game/objects/items/devices/teleportation.dm b/code/game/objects/items/devices/teleportation.dm
index 72a5c970b18f..793f399ecdf0 100644
--- a/code/game/objects/items/devices/teleportation.dm
+++ b/code/game/objects/items/devices/teleportation.dm
@@ -49,7 +49,7 @@
return
var/turf/current_location = get_turf(usr)//What turf is the user on?
if(!current_location || is_admin_level(current_location.z))//If turf was not found or they're on z level 2.
- to_chat(usr, "The [src] is malfunctioning.")
+ to_chat(usr, "[src] is malfunctioning.")
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.set_interaction(src)
@@ -144,7 +144,7 @@
to_chat(user, SPAN_NOTICE("\The [src] is malfunctioning."))
return
var/list/L = list( )
- for(var/obj/structure/machinery/teleport/hub/R in machines)
+ for(var/obj/structure/machinery/teleport/hub/R in GLOB.machines)
var/obj/structure/machinery/computer/teleporter/com = locate(/obj/structure/machinery/computer/teleporter, locate(R.x - 2, R.y, R.z))
if (istype(com, /obj/structure/machinery/computer/teleporter) && com.locked && !com.one_time_use)
if(R.icon_state == "tele1")
@@ -177,4 +177,3 @@
P.creator = src
src.add_fingerprint(user)
return
-
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index b3d433727946..6fc526936809 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -47,7 +47,7 @@
user.temp_drop_inv_item(A)
attached_device = A
A.forceMove(src)
- to_chat(user, SPAN_NOTICE("You attach the [item] to the valve controls and secure it."))
+ to_chat(user, SPAN_NOTICE("You attach [item] to the valve controls and secure it."))
A.holder = src
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
diff --git a/code/game/objects/items/explosives/explosive.dm b/code/game/objects/items/explosives/explosive.dm
index 0c482e8db9e7..4483372c9b85 100644
--- a/code/game/objects/items/explosives/explosive.dm
+++ b/code/game/objects/items/explosives/explosive.dm
@@ -262,8 +262,8 @@
if(falloff_mode == EXPLOSION_FALLOFF_SHAPE_LINEAR)
falloff_mode = EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL
- to_chat(usr, SPAN_NOTICE("You enable the [src]'s blast wave dampener, limiting the blast radius."))
+ to_chat(usr, SPAN_NOTICE("You enable [src]'s blast wave dampener, limiting the blast radius."))
else
falloff_mode = EXPLOSION_FALLOFF_SHAPE_LINEAR
- to_chat(usr, SPAN_NOTICE("You disable the [src]'s blast wave dampener, restoring the blast radius to full."))
+ to_chat(usr, SPAN_NOTICE("You disable [src]'s blast wave dampener, restoring the blast radius to full."))
playsound(loc, 'sound/items/Screwdriver2.ogg', 25, 0, 6)
diff --git a/code/game/objects/items/explosives/grenades/chem_grenade.dm b/code/game/objects/items/explosives/grenades/chem_grenade.dm
index e975603d45d8..48430aacecc9 100644
--- a/code/game/objects/items/explosives/grenades/chem_grenade.dm
+++ b/code/game/objects/items/explosives/grenades/chem_grenade.dm
@@ -1,5 +1,5 @@
/obj/item/explosive/grenade/custom
- name = "Custom grenade"
+ name = "custom grenade"
icon_state = "grenade_custom"
desc = "A custom chemical grenade with an M40 casing. This one is made to fit into underslung grenade launchers, but can also be thrown by hand."
w_class = SIZE_SMALL
@@ -17,7 +17,7 @@
..()
/obj/item/explosive/grenade/custom/large
- name = "Large Custom Grenade"
+ name = "large custom grenade"
desc = "A custom chemical grenade with an M15 casing. This casing has a higher explosive capacity than the M40 variant."
icon_state = "large_grenade_custom"
allowed_containers = list(/obj/item/reagent_container/glass)
@@ -33,7 +33,7 @@
/obj/item/explosive/grenade/custom/metal_foam
- name = "Metal-Foam Grenade"
+ name = "metal-foam grenade"
desc = "Used for emergency sealing of air breaches."
assembly_stage = ASSEMBLY_LOCKED
harmful = FALSE
@@ -56,7 +56,7 @@
update_icon()
/obj/item/explosive/grenade/custom/incendiary
- name = "Incendiary Grenade"
+ name = "incendiary grenade"
desc = "Used for clearing rooms of living things."
assembly_stage = ASSEMBLY_LOCKED
has_blast_wave_dampener = FALSE
@@ -79,7 +79,7 @@
update_icon()
/obj/item/explosive/grenade/custom/flare
- name = "M40-F flare grenade"
+ name = "\improper M40-F flare grenade"
desc = "Chemical flare in a grenade form, designed for compatibility with most standard issue launchers."
assembly_stage = ASSEMBLY_LOCKED
has_blast_wave_dampener = FALSE
@@ -103,7 +103,7 @@
update_icon()
/obj/item/explosive/grenade/custom/large/flare
- name = "M15-F flare grenade"
+ name = "\improper M15-F flare grenade"
desc = "Chemical flare in a grenade form, expanded variant. The casing is too large to fit most launchers."
assembly_stage = ASSEMBLY_LOCKED
has_blast_wave_dampener = FALSE
diff --git a/code/game/objects/items/explosives/mine.dm b/code/game/objects/items/explosives/mine.dm
index 742a5f314c4a..768a32c003fa 100644
--- a/code/game/objects/items/explosives/mine.dm
+++ b/code/game/objects/items/explosives/mine.dm
@@ -42,6 +42,7 @@
prime() //We don't care about how strong the explosion was.
/obj/item/explosive/mine/emp_act()
+ . = ..()
prime() //Same here. Don't care about the effect strength.
@@ -122,7 +123,7 @@
if(prob(75))
triggered = TRUE
if(tripwire)
- var/direction = reverse_dir[src.dir]
+ var/direction = GLOB.reverse_dir[src.dir]
var/step_direction = get_step(src, direction)
tripwire.forceMove(step_direction)
prime()
@@ -240,7 +241,7 @@
//We move the tripwire randomly in either of the four cardinal directions
triggered = TRUE
if(tripwire)
- var/direction = pick(cardinal)
+ var/direction = pick(GLOB.cardinals)
var/step_direction = get_step(src, direction)
tripwire.forceMove(step_direction)
prime()
@@ -308,7 +309,7 @@
map_deployed = TRUE
/obj/item/explosive/mine/custom
- name = "Custom mine"
+ name = "custom mine"
desc = "A custom chemical mine built from an M20 casing."
icon_state = "m20_custom"
customizable = TRUE
diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm
index 830df9659070..071ff3458a91 100644
--- a/code/game/objects/items/explosives/plastic.dm
+++ b/code/game/objects/items/explosives/plastic.dm
@@ -26,7 +26,7 @@
/obj/item/explosive/plastic/Destroy()
disarm()
- . = ..()
+ return ..()
/obj/item/explosive/plastic/explosion_throw(severity, direction, scatter_multiplier)
if(active)
@@ -156,7 +156,9 @@
plant_target.overlays -= overlay
qdel(overlay)
plant_target.contents -= src
- forceMove(get_turf(plant_target))
+ var/turf/plant_turf = get_turf(plant_target)
+ if(plant_turf)
+ forceMove(plant_turf)
plant_target = null
if(customizable)
if(active) //deactivate
@@ -182,7 +184,7 @@
//vehicle interior stuff checks
if(SSinterior.in_interior(target))
- to_chat(user, SPAN_WARNING("It's too cramped in here to deploy \the [src]."))
+ to_chat(user, SPAN_WARNING("It's too cramped in here to deploy [src]."))
return FALSE
if(istype(target, /obj/effect) || istype(target, /obj/structure/machinery))
@@ -193,7 +195,7 @@
if(istype(target, /turf/closed/wall))
var/turf/closed/wall/W = target
if(W.hull)
- to_chat(user, SPAN_WARNING("You are unable to stick \the [src] to the [W]!"))
+ to_chat(user, SPAN_WARNING("You are unable to stick [src] to [W]!"))
return FALSE
if(istype(target, /obj/structure/window))
@@ -299,7 +301,7 @@
prime(TRUE)
/obj/item/explosive/plastic/custom
- name = "Custom plastic explosive"
+ name = "custom plastic explosive"
desc = "A custom plastic explosive."
icon_state = "custom_plastic_explosive"
overlay_image = "custom_plastic_explosive_sensing"
diff --git a/code/game/objects/items/frames/alarms.dm b/code/game/objects/items/frames/alarms.dm
index f34b18d6825c..d665df65fc83 100644
--- a/code/game/objects/items/frames/alarms.dm
+++ b/code/game/objects/items/frames/alarms.dm
@@ -24,7 +24,7 @@ Code shamelessly copied from apc_frame
return
var/ndir = get_dir(on_wall,usr)
- if (!(ndir in cardinal))
+ if (!(ndir in GLOB.cardinals))
return
var/turf/loc = get_turf(usr)
@@ -67,7 +67,7 @@ Code shamelessly copied from apc_frame
return
var/ndir = get_dir(on_wall,usr)
- if (!(ndir in cardinal))
+ if (!(ndir in GLOB.cardinals))
return
var/turf/loc = get_turf(usr)
diff --git a/code/game/objects/items/frames/camera.dm b/code/game/objects/items/frames/camera.dm
index e367e64e641d..efe697c3944b 100644
--- a/code/game/objects/items/frames/camera.dm
+++ b/code/game/objects/items/frames/camera.dm
@@ -105,9 +105,9 @@
C.auto_turn()
C.network = uniquelist(tempnetwork)
- tempnetwork = difflist(C.network,RESTRICTED_CAMERA_NETWORKS)
+ tempnetwork = difflist(C.network,GLOB.RESTRICTED_CAMERA_NETWORKS)
if(!tempnetwork.len)//Camera isn't on any open network - remove its chunk from AI visibility.
- cameranet.removeCamera(C)
+ GLOB.cameranet.removeCamera(C)
C.c_tag = input
@@ -167,7 +167,7 @@
to_chat(user, SPAN_WARNING("\The [WT] needs to be on!"))
return 0
- to_chat(user, SPAN_NOTICE("You start to weld the [src].."))
+ to_chat(user, SPAN_NOTICE("You start to weld [src].."))
playsound(src.loc, 'sound/items/Welder.ogg', 25, 1)
WT.eyecheck(user)
if(do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
diff --git a/code/game/objects/items/frames/frame.dm b/code/game/objects/items/frames/frame.dm
index 9c039821cb75..06b1c14e46c8 100644
--- a/code/game/objects/items/frames/frame.dm
+++ b/code/game/objects/items/frames/frame.dm
@@ -23,7 +23,7 @@
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
- if (!(ndir in cardinal))
+ if (!(ndir in GLOB.cardinals))
return
var/turf/loc = get_turf(usr)
var/area/A = get_area(loc)
diff --git a/code/game/objects/items/frames/light_fixtures.dm b/code/game/objects/items/frames/light_fixtures.dm
index 35f800f28fac..b52e19492cab 100644
--- a/code/game/objects/items/frames/light_fixtures.dm
+++ b/code/game/objects/items/frames/light_fixtures.dm
@@ -21,7 +21,7 @@
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
- if (!(ndir in cardinal))
+ if (!(ndir in GLOB.cardinals))
return
var/turf/loc = get_turf(usr)
if (!istype(loc, /turf/open/floor))
diff --git a/code/game/objects/items/fulton.dm b/code/game/objects/items/fulton.dm
index 98987d1cd2b3..788613cf4c6e 100644
--- a/code/game/objects/items/fulton.dm
+++ b/code/game/objects/items/fulton.dm
@@ -1,7 +1,7 @@
// Fulton baloon deployment devices, used to gather and send crates, dead things, and other objective-based items into space for collection.
/// A list of fultons currently airborne.
-var/global/list/deployed_fultons = list()
+GLOBAL_LIST_EMPTY(deployed_fultons)
/obj/item/stack/fulton
name = "fulton recovery device"
@@ -36,7 +36,7 @@ var/global/list/deployed_fultons = list()
attached_atom = null
if(original_location)
original_location = null
- deployed_fultons -= src
+ GLOB.deployed_fultons -= src
. = ..()
/obj/item/stack/fulton/update_icon()
@@ -90,7 +90,7 @@ var/global/list/deployed_fultons = list()
var/mob/living/carbon/human/H = target_atom
if(isyautja(H) && H.stat == DEAD)
can_attach = TRUE
- else if((H.stat != DEAD || H.mind && H.check_tod() && H.is_revivable()))
+ else if((H.stat != DEAD || H.check_tod() && H.is_revivable()))
to_chat(user, SPAN_WARNING("You can't attach [src] to [target_atom], they still have a chance!"))
return
else
@@ -154,7 +154,7 @@ var/global/list/deployed_fultons = list()
attached_atom.forceMove(space_tile)
forceMove(attached_atom)
- deployed_fultons += src
+ GLOB.deployed_fultons += src
attached_atom.overlays -= I
addtimer(CALLBACK(src, PROC_REF(return_fulton), original_location), 150 SECONDS)
@@ -169,11 +169,11 @@ var/global/list/deployed_fultons = list()
attached_atom.anchored = FALSE
playsound(attached_atom.loc,'sound/effects/bamf.ogg', 50, 1)
- if(intel_system)
+ if(GLOB.intel_system)
if (!LAZYISIN(GLOB.failed_fultons, attached_atom))
//Giving marines an objective to retrieve that fulton (so they'd know what they lost and where)
var/datum/cm_objective/retrieve_item/fulton/objective = new /datum/cm_objective/retrieve_item/fulton(attached_atom)
- intel_system.store_single_objective(objective)
+ GLOB.intel_system.store_single_objective(objective)
qdel(reservation)
qdel(src)
diff --git a/code/game/objects/items/implants/implant.dm b/code/game/objects/items/implants/implant.dm
index d39b7e675452..e7ebe0391fae 100644
--- a/code/game/objects/items/implants/implant.dm
+++ b/code/game/objects/items/implants/implant.dm
@@ -82,6 +82,7 @@ Implant Specifics:
"}
return dat
/obj/item/implant/tracking/emp_act(severity)
+ . = ..()
if (malfunction) //no, dawg, you can't malfunction while you are malfunctioning
return
malfunction = MALFUNCTION_TEMPORARY
@@ -216,6 +217,7 @@ Implant Specifics:
"}
return 1
/obj/item/implant/explosive/emp_act(severity)
+ . = ..()
if (malfunction)
return
malfunction = MALFUNCTION_TEMPORARY
@@ -307,6 +309,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
return
/obj/item/implant/chem/emp_act(severity)
+ . = ..()
if (malfunction)
return
malfunction = MALFUNCTION_TEMPORARY
@@ -432,6 +435,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
STOP_PROCESSING(SSobj, src)
/obj/item/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
+ . = ..()
if (malfunction) //so I'm just going to add a meltdown chance here
return
malfunction = MALFUNCTION_TEMPORARY
diff --git a/code/game/objects/items/implants/implantneurostim.dm b/code/game/objects/items/implants/implantneurostim.dm
index 5893ad5fd233..21ee2542649b 100644
--- a/code/game/objects/items/implants/implantneurostim.dm
+++ b/code/game/objects/items/implants/implantneurostim.dm
@@ -105,6 +105,7 @@
/obj/item/implant/neurostim/emp_act(severity)
+ . = ..()
if (malfunction)
return
if (prob(80))
diff --git a/code/game/objects/items/lightstick.dm b/code/game/objects/items/lightstick.dm
index 70418049994b..89ce2c00762e 100644
--- a/code/game/objects/items/lightstick.dm
+++ b/code/game/objects/items/lightstick.dm
@@ -22,7 +22,7 @@
/obj/item/lightstick/Crossed(mob/living/O)
if(anchored && prob(trample_chance) && can_trample)
if(!istype(O,/mob/living/carbon/xenomorph/larva))
- visible_message(SPAN_DANGER("[O] tramples the [src]!"))
+ visible_message(SPAN_DANGER("[O] tramples [src]!"))
playsound(src, 'sound/weapons/Genhit.ogg', 25, 1)
if(istype(O,/mob/living/carbon/xenomorph))
if(prob(40))
@@ -46,17 +46,17 @@
if(!anchored)//If planted
return
- to_chat(user, "You start pulling out \the [src].")
- if(!do_after(user,20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
+ to_chat(user, "You start pulling out [src].")
+ if(!do_after(user, 2 SECONDS, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
return
anchored = FALSE
- user.visible_message("[user.name] removes \the [src] from the ground.","You remove the [src] from the ground.")
+ user.visible_message("[user.name] removes [src] from the ground.", "You remove [src] from the ground.")
icon_state = "lightstick_[s_color][anchored]"
set_light(0)
pixel_x = 0
pixel_y = 0
- playsound(user, 'sound/weapons/Genhit.ogg', 25, 1)
+ playsound(user, 'sound/weapons/Genhit.ogg', 25, TRUE)
//Red
/obj/item/lightstick/planted
diff --git a/code/game/objects/items/misc.dm b/code/game/objects/items/misc.dm
index 50c5cd75551b..1699cb24ef39 100644
--- a/code/game/objects/items/misc.dm
+++ b/code/game/objects/items/misc.dm
@@ -134,7 +134,7 @@
return
stored_item = object
mobber.drop_inv_item_to_loc(object, src)
- to_chat(mobber, SPAN_NOTICE("You slide the [object] into [src]."))
+ to_chat(mobber, SPAN_NOTICE("You slide [object] into [src]."))
playsound(mobber, 'sound/weapons/gun_shotgun_shell_insert.ogg', 15, TRUE)
update_icon()
break
diff --git a/code/game/objects/items/paint.dm b/code/game/objects/items/paint.dm
index 9089dd228ed0..c538cbf3944f 100644
--- a/code/game/objects/items/paint.dm
+++ b/code/game/objects/items/paint.dm
@@ -1,6 +1,6 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
-var/global/list/cached_icons = list()
+GLOBAL_LIST_EMPTY(cached_icons)
/obj/item/reagent_container/glass/paint
desc = "It's a paint bucket."
diff --git a/code/game/objects/items/props/helmetgarb.dm b/code/game/objects/items/props/helmetgarb.dm
index 72c49a0ea15a..d8e65f1a3cd3 100644
--- a/code/game/objects/items/props/helmetgarb.dm
+++ b/code/game/objects/items/props/helmetgarb.dm
@@ -99,10 +99,8 @@
var/nvg_maxhealth = 125
var/nvg_health = 125
- var/nvg_maxcharge = 2500
- var/nvg_charge = 2500
- var/nvg_drain = 8 // has a 5 minute duration but byond may give it a couple of irl time due to lag
- var/infinite_charge = FALSE
+ /// How much charge the cell should have at most. -1 is infinite
+ var/cell_max_charge = 2500
var/activated = FALSE
var/nightvision = FALSE
@@ -117,6 +115,13 @@
var/mob/living/attached_mob
var/lighting_alpha = 100
+/obj/item/prop/helmetgarb/helmet_nvg/Initialize(mapload, ...)
+ . = ..()
+ if(shape != NVG_SHAPE_COSMETIC)
+ AddComponent(/datum/component/cell, cell_max_charge, TRUE, charge_drain = 8)
+ RegisterSignal(src, COMSIG_CELL_TRY_RECHARGING, PROC_REF(cell_try_recharge))
+ RegisterSignal(src, COMSIG_CELL_OUT_OF_CHARGE, PROC_REF(on_power_out))
+
/obj/item/prop/helmetgarb/helmet_nvg/on_enter_storage(obj/item/storage/internal/S)
..()
@@ -139,42 +144,30 @@
/obj/item/prop/helmetgarb/helmet_nvg/attackby(obj/item/A as obj, mob/user as mob)
- if(istype(A,/obj/item/cell))
- recharge(A, user)
-
if(HAS_TRAIT(A, TRAIT_TOOL_SCREWDRIVER))
repair(user)
else
..()
-/obj/item/prop/helmetgarb/helmet_nvg/proc/recharge(obj/item/cell/C, mob/user as mob)
+/obj/item/prop/helmetgarb/helmet_nvg/proc/cell_try_recharge(datum/source, mob/living/user)
+ SIGNAL_HANDLER
+
if(user.action_busy)
- return
+ return COMPONENT_CELL_NO_RECHARGE
+
if(src != user.get_inactive_hand())
- to_chat(user, SPAN_WARNING("You need to hold \the [src] in hand in order to recharge them."))
- return
+ to_chat(user, SPAN_WARNING("You need to hold [src] in hand in order to recharge them."))
+ return COMPONENT_CELL_NO_RECHARGE
+
if(shape == NVG_SHAPE_COSMETIC)
- to_chat(user, SPAN_WARNING("There is no connector for the power cell inside \the [src]."))
- return
+ to_chat(user, SPAN_WARNING("There is no connector for the power cell inside [src]."))
+ return COMPONENT_CELL_NO_RECHARGE
+
if(shape == NVG_SHAPE_BROKEN)
- to_chat(user, SPAN_WARNING("You need to repair \the [src] first."))
- return
- if(nvg_charge == nvg_maxcharge)
- to_chat(user, SPAN_WARNING("\The [src] are already fully charged."))
- return
+ to_chat(user, SPAN_WARNING("You need to repair [src] first."))
+ return COMPONENT_CELL_NO_RECHARGE
- while(nvg_charge < nvg_maxcharge)
- if(C.charge <= 0)
- to_chat(user, SPAN_WARNING("\The [C] is completely dry."))
- break
- if(!do_after(user, 1 SECONDS, (INTERRUPT_ALL & (~INTERRUPT_MOVED)), BUSY_ICON_BUILD, C, INTERRUPT_DIFF_LOC))
- to_chat(user, SPAN_WARNING("You were interrupted."))
- break
- var/to_transfer = min(400, C.charge, (nvg_maxcharge - nvg_charge))
- if(C.use(to_transfer))
- nvg_charge += to_transfer
- to_chat(user, "You transfer some power between \the [C] and \the [src]. The gauge now reads: [round(100.0*nvg_charge/nvg_maxcharge) ]%.")
/obj/item/prop/helmetgarb/helmet_nvg/proc/repair(mob/user as mob)
if(user.action_busy)
@@ -202,7 +195,6 @@
to_chat(user, "You successfully patch \the [src].")
nvg_maxhealth = 65
nvg_health = 65
- nvg_drain = initial(nvg_drain) * 2
return
else if(nvg_health == nvg_maxhealth)
@@ -212,7 +204,7 @@
to_chat(user, SPAN_WARNING("Nothing to fix."))
else if(shape == NVG_SHAPE_COSMETIC)
- to_chat(user, SPAN_WARNING("it's nothing but a husk of what it used to be."))
+ to_chat(user, SPAN_WARNING("It's nothing but a husk of what it used to be."))
else
to_chat(user, "You begin to repair \the [src].")
@@ -244,9 +236,6 @@
else if(nvg_health_procent >= 0)
. += "They are falling apart."
- if (get_dist(user, src) <= 1 && (shape == NVG_SHAPE_FINE || shape == NVG_SHAPE_PATCHED))
- . += "A small gauge in the corner reads: Power: [round(100.0*nvg_charge/nvg_maxcharge) ]%."
-
/obj/item/prop/helmetgarb/helmet_nvg/on_exit_storage(obj/item/storage/S)
remove_attached_item()
return ..()
@@ -296,7 +285,7 @@
if(attached_mob != user && slot == WEAR_HEAD)
set_attached_mob(user)
- if(slot == WEAR_HEAD && !nightvision && activated && nvg_charge > 0 && shape > NVG_SHAPE_BROKEN)
+ if(slot == WEAR_HEAD && !nightvision && activated && !SEND_SIGNAL(src, COMSIG_CELL_CHECK_CHARGE) && shape > NVG_SHAPE_BROKEN)
enable_nvg(user)
else
remove_nvg()
@@ -319,7 +308,7 @@
attached_item.update_icon()
activation.update_button_icon()
- START_PROCESSING(SSobj, src)
+ SEND_SIGNAL(src, COMSIG_CELL_START_TICK_DRAIN)
/obj/item/prop/helmetgarb/helmet_nvg/proc/update_sight(mob/M)
@@ -353,20 +342,15 @@
attached_mob.update_sight()
- STOP_PROCESSING(SSobj, src)
+ SEND_SIGNAL(src, COMSIG_CELL_STOP_TICK_DRAIN)
/obj/item/prop/helmetgarb/helmet_nvg/process(delta_time)
- if(nvg_charge > 0 && !infinite_charge)
- nvg_charge = max(0, nvg_charge - nvg_drain * delta_time)
-
if(!attached_mob)
return PROCESS_KILL
- if(!activated || !attached_item || nvg_charge <= 0 || attached_mob.is_dead())
- if(activated && !attached_mob.is_dead())
- to_chat(attached_mob, SPAN_WARNING("\The [src] emit a low power warning and immediately shut down!"))
- remove_nvg()
+ if(!activated || !attached_item || attached_mob.is_dead())
+ on_power_out()
return
if(!attached_item.has_garb_overlay())
@@ -375,6 +359,13 @@
return
+/obj/item/prop/helmetgarb/helmet_nvg/proc/on_power_out(datum/source)
+ SIGNAL_HANDLER
+
+ if(activated && !attached_mob.is_dead())
+ to_chat(attached_mob, SPAN_WARNING("[src] emit a low power warning and immediately shut down!"))
+ remove_nvg()
+
/obj/item/prop/helmetgarb/helmet_nvg/ui_action_click(mob/owner, obj/item/holder)
toggle_nods(owner)
@@ -410,7 +401,7 @@
if(activated)
to_chat(user, SPAN_NOTICE("You flip the goggles down."))
icon_state = active_icon_state
- if(nvg_charge > 0 && user.head == attached_item && shape > NVG_SHAPE_BROKEN)
+ if(!SEND_SIGNAL(src, COMSIG_CELL_CHECK_CHARGE) && user.head == attached_item && shape > NVG_SHAPE_BROKEN)
enable_nvg(user)
else
icon_state = active_icon_state
@@ -462,7 +453,7 @@
/obj/item/prop/helmetgarb/helmet_nvg/marsoc //for Marine Raiders
name = "\improper Tactical M3 night vision goggles"
desc = "With an integrated self-recharging battery, nothing can stop you. Put them on your helmet and press the button and it's go-time."
- infinite_charge = TRUE
+ cell_max_charge = -1
#undef NVG_SHAPE_COSMETIC
#undef NVG_SHAPE_BROKEN
@@ -505,14 +496,38 @@
desc = "The USCM had its funding pulled for these when it became apparent that not every deployed enlisted was wearing a helmet 24/7; much to the bafflement of UA High Command."
icon_state = "helmet_gasmask"
+/obj/item/prop/helmetgarb/helmet_gasmask/on_enter_storage(obj/item/storage/internal/helmet_internal_inventory)
+ ..()
+ if(!istype(helmet_internal_inventory))
+ return
+ var/obj/item/clothing/head/helmet/helmet_item = helmet_internal_inventory.master_object
+
+ if(!istype(helmet_item))
+ return
+
+ helmet_item.flags_inventory |= BLOCKGASEFFECT
+ helmet_item.flags_inv_hide |= HIDEFACE
+
+/obj/item/prop/helmetgarb/helmet_gasmask/on_exit_storage(obj/item/storage/internal/helmet_internal_inventory)
+ ..()
+ if(!istype(helmet_internal_inventory))
+ return
+ var/obj/item/clothing/head/helmet/helmet_item = helmet_internal_inventory.master_object
+
+ if(!istype(helmet_item))
+ return
+
+ helmet_item.flags_inventory &= ~(BLOCKGASEFFECT)
+ helmet_item.flags_inv_hide &= ~(HIDEFACE)
+
/obj/item/prop/helmetgarb/trimmed_wire
name = "trimmed barbed wire"
desc = "It is a length of barbed wire that's had most of the sharp points filed down so that it is safe to handle."
icon_state = "trimmed_wire"
/obj/item/prop/helmetgarb/bullet_pipe
- name = "10x99mm XM42B casing pipe"
- desc = "The XM42B was an experimental weapons platform briefly fielded by the USCM and Wey-Yu PMC teams. It was manufactured by ARMAT systems at the Atlas weapons facility. Unfortunately the project had its funding pulled alongside the M5 integrated gasmask program. This spent casing has been converted into a pipe, but there is too much tar in the mouthpiece for it to be useable."
+ name = "10x99mm XM43E1 casing pipe"
+ desc = "The XM43E1 was an experimental weapons platform briefly fielded by the USCM and Wey-Yu PMC teams. It was manufactured by ARMAT systems at the Atlas weapons facility. Unfortunately the project had its funding pulled alongside the M5 integrated gasmask program. This spent casing has been converted into a pipe, but there is too much tar in the mouthpiece for it to be useable."
icon_state = "bullet_pipe"
/obj/item/prop/helmetgarb/chaplain_patch
@@ -527,29 +542,38 @@
icon = 'icons/obj/items/items.dmi'
icon_state = "photo"
///The human who spawns with the photo
- var/mob/living/carbon/human/owner
+ var/datum/weakref/owner
+ ///The belonging human name
+ var/owner_name
+ ///The belonging human faction
+ var/owner_faction
///Text written on the back
var/scribble
-/obj/item/prop/helmetgarb/family_photo/Initialize(mapload, ...)
+/obj/item/prop/helmetgarb/family_photo/pickup(mob/user, silent)
. = ..()
- if(!mapload)
- RegisterSignal(src, COMSIG_POST_SPAWN_UPDATE, PROC_REF(set_owner))
+ if(!owner)
+ RegisterSignal(user, COMSIG_POST_SPAWN_UPDATE, PROC_REF(set_owner), override = TRUE)
+
///Sets the owner of the family photo to the human it spawns with, needs var/source for signals
-/obj/item/prop/helmetgarb/family_photo/proc/set_owner(source = src, mob/living/carbon/human/user)
- UnregisterSignal(src, COMSIG_POST_SPAWN_UPDATE)
- owner = user
+/obj/item/prop/helmetgarb/family_photo/proc/set_owner(datum/source)
+ SIGNAL_HANDLER
+ UnregisterSignal(source, COMSIG_POST_SPAWN_UPDATE)
+ var/mob/living/carbon/human/user = source
+ owner = WEAKREF(user)
+ owner_name = user.name
+ owner_faction = user.faction
/obj/item/prop/helmetgarb/family_photo/get_examine_text(mob/user)
. = ..()
if(scribble)
. += "\"[scribble]\" is written on the back of the photo."
- if(user == owner)
+ if(user.weak_reference == owner)
. += "A photo of you and your family."
return
- if(user.faction == owner?.faction)
- . += "A photo of [owner] and their family."
+ if(user.faction == owner_faction)
+ . += "A photo of [owner_name] and their family."
return
. += "A photo of a family you do not know."
diff --git a/code/game/objects/items/reagent_containers/borghydro.dm b/code/game/objects/items/reagent_containers/borghydro.dm
index 30a9bdbd3c65..4f1f5540988b 100644
--- a/code/game/objects/items/reagent_containers/borghydro.dm
+++ b/code/game/objects/items/reagent_containers/borghydro.dm
@@ -22,7 +22,7 @@
for(var/T in reagent_ids)
reagent_volumes[T] = volume
- var/datum/reagent/R = chemical_reagents_list[T]
+ var/datum/reagent/R = GLOB.chemical_reagents_list[T]
reagent_names += R.name
START_PROCESSING(SSobj, src)
@@ -71,7 +71,7 @@
..()
var/selection = tgui_input_list(usr, "Please select a reagent:", "Reagent", reagent_ids)
if(!selection) return
- var/datum/reagent/R = chemical_reagents_list[selection]
+ var/datum/reagent/R = GLOB.chemical_reagents_list[selection]
to_chat(user, SPAN_NOTICE(" Synthesizer is now producing '[R.name]'."))
mode = reagent_ids.Find(selection)
playsound(src.loc, 'sound/effects/pop.ogg', 15, 0)
@@ -81,6 +81,6 @@
. = ..()
if (user != loc) return
- var/datum/reagent/R = chemical_reagents_list[reagent_ids[mode]]
+ var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
. += SPAN_NOTICE("It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.")
diff --git a/code/game/objects/items/reagent_containers/dropper.dm b/code/game/objects/items/reagent_containers/dropper.dm
index eaf28f66b012..f36145e285cd 100644
--- a/code/game/objects/items/reagent_containers/dropper.dm
+++ b/code/game/objects/items/reagent_containers/dropper.dm
@@ -32,7 +32,7 @@
if(ismob(target))
var/time = 20 //2/3rds the time of a syringe
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(SPAN_DANGER("[user] is trying to squirt something into [target]'s eyes!"), SHOW_MESSAGE_VISIBLE)
if(!do_after(user, time, INTERRUPT_ALL, BUSY_ICON_FRIENDLY, target, INTERRUPT_MOVED, BUSY_ICON_MEDICAL)) return
@@ -56,7 +56,7 @@
safe_thing.create_reagents(100)
trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this)
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(SPAN_DANGER("[user] tries to squirt something into [target]'s eyes, but fails!"), SHOW_MESSAGE_VISIBLE)
spawn(5)
src.reagents.reaction(safe_thing, TOUCH)
@@ -67,7 +67,7 @@
icon_state = "dropper[filled]"
return
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(SPAN_DANGER("[user] squirts something into [target]'s eyes!"), SHOW_MESSAGE_VISIBLE)
src.reagents.reaction(target, TOUCH)
diff --git a/code/game/objects/items/reagent_containers/food/condiment.dm b/code/game/objects/items/reagent_containers/food/condiment.dm
index a13489f0af1e..35944e4422c4 100644
--- a/code/game/objects/items/reagent_containers/food/condiment.dm
+++ b/code/game/objects/items/reagent_containers/food/condiment.dm
@@ -23,7 +23,7 @@
return FALSE
if(M == user)
- to_chat(M, SPAN_NOTICE(" You swallow some of contents of the [src]."))
+ to_chat(M, SPAN_NOTICE("You swallow some of contents of [src]."))
else if(istype(M, /mob/living/carbon/human))
user.affected_message(M,
@@ -80,7 +80,7 @@
to_chat(user, SPAN_DANGER("[src] is empty."))
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
- to_chat(user, SPAN_DANGER("you can't add anymore to [target]."))
+ to_chat(user, SPAN_DANGER("You can't add any more to [target]."))
return
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, SPAN_NOTICE(" You transfer [trans] units of the condiment to [target]."))
@@ -202,7 +202,7 @@
/obj/item/reagent_container/food/condiment/hotsauce/franks
name = "\improper Frank's Red Hot bottle"
desc = "A bottle of Weyland-Yutani brand Frank's Red Hot hot sauce."
- desc_lore = "Supposedly designed as a middle-ground flavor between ketchup and cayenne, this brand of spicy goodness achieved critical acclaim throughout UA space within both colonies and vessels alike. The sudden and widespread adoption was curiously timed with the near-simultaneous shelving of the original Frank's 'ULTRA' hot sauce."
+ desc_lore = "Supposedly designed as a middle-ground flavor between ketchup and cayenne, this brand of spicy goodness achieved critical acclaim throughout UA space within both colonies and vessels alike. The sudden and widespread adoption was curiously timed with the near-simultaneous shelving of the original Frank's 'ULTRA' hot sauce."
icon_state = "hotsauce_franks"
item_state = "hotsauce_franks"
diff --git a/code/game/objects/items/reagent_containers/food/fortunecookie.dm b/code/game/objects/items/reagent_containers/food/fortunecookie.dm
index a878ff589dc8..6077541acd84 100644
--- a/code/game/objects/items/reagent_containers/food/fortunecookie.dm
+++ b/code/game/objects/items/reagent_containers/food/fortunecookie.dm
@@ -75,7 +75,7 @@
to_chat(user,SPAN_WARNING("[src] is cracked open! How are you gonna slip something in that?"))
else
if(!cookiefortune)
- to_chat(user, SPAN_NOTICE("You slip the paper into the [src]."))
+ to_chat(user, SPAN_NOTICE("You slip the paper into [src]."))
cookiefortune = W
user.drop_inv_item_to_loc(W, src)
else
@@ -93,7 +93,7 @@
user.put_in_hands(cookiefortune)
cookiefortune = null
else
- to_chat(SPAN_WARNING("You break open the fortune cookie, but there's no fortune inside! Oh no!"))
+ to_chat(user, SPAN_WARNING("You break open the fortune cookie, but there's no fortune inside! Oh no!"))
else
. = ..()
@@ -109,7 +109,7 @@
user.put_in_hands(cookiefortune)
cookiefortune = null
else
- to_chat(SPAN_WARNING("You break open the fortune cookie, but there's no fortune inside! Oh no!"))
+ to_chat(user, SPAN_WARNING("You break open the fortune cookie, but there's no fortune inside! Oh no!"))
else
. = ..()
diff --git a/code/game/objects/items/reagent_containers/food/sandwich.dm b/code/game/objects/items/reagent_containers/food/sandwich.dm
index 1b7d61eaddad..511c0c042be1 100644
--- a/code/game/objects/items/reagent_containers/food/sandwich.dm
+++ b/code/game/objects/items/reagent_containers/food/sandwich.dm
@@ -18,7 +18,7 @@
/obj/item/reagent_container/food/snacks/csandwich/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/reagent_container/food/snacks/csandwich))
//No sandwitch inception, it causes some bugs...
- to_chat(user, SPAN_NOTICE(" You can't put a [W] in the [src]."))
+ to_chat(user, SPAN_NOTICE("You can't put \a [W] in [src]."))
return
var/sandwich_limit = 4
diff --git a/code/game/objects/items/reagent_containers/food/snacks.dm b/code/game/objects/items/reagent_containers/food/snacks.dm
index 2892eb1113e7..eb33ca6b1d0f 100644
--- a/code/game/objects/items/reagent_containers/food/snacks.dm
+++ b/code/game/objects/items/reagent_containers/food/snacks.dm
@@ -217,10 +217,10 @@
if(isanimal(M))
if(iscorgi(M))
if(bitecount == 0 || prob(50))
- M.emote("nibbles away at the [src]")
+ M.emote("nibbles away at [src]")
bitecount++
if(bitecount >= 5)
- var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where the [src] was")
+ var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where [src] was")
if(sattisfaction_text)
M.emote("[sattisfaction_text]")
qdel(src)
@@ -2801,7 +2801,7 @@
if( open && pizza )
user.put_in_hands( pizza )
- to_chat(user, SPAN_DANGER("You take the [src.pizza] out of the [src]."))
+ to_chat(user, SPAN_DANGER("You take the [src.pizza] out of [src]."))
src.pizza = null
update_icon()
return
@@ -2852,11 +2852,11 @@
box.update_icon()
update_icon()
- to_chat(user, SPAN_DANGER("You put the [box] ontop of the [src]!"))
+ to_chat(user, SPAN_DANGER("You put [box] ontop of [src]!"))
else
to_chat(user, SPAN_DANGER("The stack is too high!"))
else
- to_chat(user, SPAN_DANGER("Close the [box] first!"))
+ to_chat(user, SPAN_DANGER("Close [box] first!"))
return
@@ -2868,9 +2868,9 @@
update_icon()
- to_chat(user, SPAN_DANGER("You put the [I] in the [src]!"))
+ to_chat(user, SPAN_DANGER("You put [I] in [src]!"))
else
- to_chat(user, SPAN_DANGER("You try to push the [I] through the lid but it doesn't work!"))
+ to_chat(user, SPAN_DANGER("You try to push [I] through the lid but it doesn't work!"))
return
if( istype(I, /obj/item/tool/pen/) )
diff --git a/code/game/objects/items/reagent_containers/food/snacks/grown.dm b/code/game/objects/items/reagent_containers/food/snacks/grown.dm
index 12a5a704f663..32423c121b61 100644
--- a/code/game/objects/items/reagent_containers/food/snacks/grown.dm
+++ b/code/game/objects/items/reagent_containers/food/snacks/grown.dm
@@ -30,7 +30,7 @@
/obj/item/reagent_container/food/snacks/grown/proc/update_from_seed()// Fill the object up with the appropriate reagents.
if(!isnull(plantname))
- var/datum/seed/S = seed_types[plantname]
+ var/datum/seed/S = GLOB.seed_types[plantname]
if(!S)
return
name = S.seed_name //Copies the name from the seed, important for renamed plants
diff --git a/code/game/objects/items/reagent_containers/glass.dm b/code/game/objects/items/reagent_containers/glass.dm
index df344506c72c..2a7bde748fba 100644
--- a/code/game/objects/items/reagent_containers/glass.dm
+++ b/code/game/objects/items/reagent_containers/glass.dm
@@ -237,7 +237,7 @@
overlays += lid
/obj/item/reagent_container/glass/minitank
- name = "MS-11 Smart Refill Tank"
+ name = "\improper MS-11 Smart Refill Tank"
desc = "A robust little tank capable of refilling autoinjectors that previously required a nanomed system to refill. Using the wonders of microchips, it automatically sorts the correct chemicals into most single reagent autoinjectors. It is unable to partially fill them however. A valve exists on the top to transfer reagents to another container or to flush it entirely."
icon = 'icons/obj/items/tank.dmi'
icon_state = "mini_reagent_tank"
@@ -277,7 +277,7 @@
if(istype(W, /obj/item/reagent_container/hypospray/autoinjector))
var/obj/item/reagent_container/hypospray/autoinjector/A = W
if(A.mixed_chem)
- to_chat(user, SPAN_WARNING("The autoinjector doesn't fit into the [src]'s valve. It's probably not compatible."))
+ to_chat(user, SPAN_WARNING("The autoinjector doesn't fit into [src]'s valve. It's probably not compatible."))
return
if(reagents.has_reagent(A.chemname, A.volume))
reagents.trans_id_to(A, A.chemname, A.volume)
@@ -285,10 +285,10 @@
A.update_icon()
playsound(src.loc, 'sound/effects/refill.ogg', 25, 1, 3)
else
- to_chat(user, SPAN_WARNING("A small LED on \the [src] blinks. The tank can't refill \the [A] - it's either incompatible or out of chemicals to fill it with!"))
+ to_chat(user, SPAN_WARNING("A small LED on [src] blinks. The tank can't refill [A] - it's either incompatible or out of chemicals to fill it with!"))
. = ..()
return
- to_chat(user,SPAN_INFO("You successfully refill \the [W.name] with \the [src]!"))
+ to_chat(user, SPAN_INFO("You successfully refill [A] with [src]!"))
/obj/item/reagent_container/glass/minitank/verb/flush_tank(mob/user)
set category = "Object"
@@ -299,7 +299,7 @@
to_chat(user, SPAN_WARNING("It's already empty!"))
return
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1, 3)
- to_chat(user, SPAN_WARNING("You work the flush valve and successfully flush \the [src]'s contents!"))
+ to_chat(user, SPAN_WARNING("You work the flush valve and successfully flush [src]'s contents!"))
reagents.clear_reagents()
update_icon() // just to be sure
return
@@ -389,17 +389,17 @@
. = ..()
var/random_chem
if(tier)
- random_chem = pick(chemical_gen_classes_list[tier])
+ random_chem = pick(GLOB.chemical_gen_classes_list[tier])
else
- random_chem = pick( prob(3);pick(chemical_gen_classes_list["C1"]),\
- prob(5);pick(chemical_gen_classes_list["C2"]),\
- prob(7);pick(chemical_gen_classes_list["C3"]),\
- prob(10);pick(chemical_gen_classes_list["C4"]),\
- prob(15);pick(chemical_gen_classes_list["C5"]),\
- prob(25);pick(chemical_gen_classes_list["T1"]),\
- prob(15);pick(chemical_gen_classes_list["T2"]),\
- prob(10);pick(chemical_gen_classes_list["T3"]),\
- prob(5);pick(chemical_gen_classes_list["T4"]),\
+ random_chem = pick( prob(3);pick(GLOB.chemical_gen_classes_list["C1"]),\
+ prob(5);pick(GLOB.chemical_gen_classes_list["C2"]),\
+ prob(7);pick(GLOB.chemical_gen_classes_list["C3"]),\
+ prob(10);pick(GLOB.chemical_gen_classes_list["C4"]),\
+ prob(15);pick(GLOB.chemical_gen_classes_list["C5"]),\
+ prob(25);pick(GLOB.chemical_gen_classes_list["T1"]),\
+ prob(15);pick(GLOB.chemical_gen_classes_list["T2"]),\
+ prob(10);pick(GLOB.chemical_gen_classes_list["T3"]),\
+ prob(5);pick(GLOB.chemical_gen_classes_list["T4"]),\
prob(15);"")
if(random_chem)
reagents.add_reagent(random_chem, 30)
@@ -672,5 +672,5 @@
if(istype(AM) && (src in user))
user.visible_message("[user] starts to wipe down [AM] with [src]!")
if(do_after(user,30, INTERRUPT_ALL, BUSY_ICON_GENERIC))
- user.visible_message("[user] finishes wiping off the [AM]!")
+ user.visible_message("[user] finishes wiping off [AM]!")
AM.clean_blood()
diff --git a/code/game/objects/items/reagent_containers/robodropper.dm b/code/game/objects/items/reagent_containers/robodropper.dm
index 7447681f0566..694194fbef70 100644
--- a/code/game/objects/items/reagent_containers/robodropper.dm
+++ b/code/game/objects/items/reagent_containers/robodropper.dm
@@ -45,7 +45,7 @@
safe_thing.create_reagents(100)
trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this)
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(SPAN_DANGER("[user] tries to squirt something into [target]'s eyes, but fails!"), SHOW_MESSAGE_VISIBLE)
spawn(5)
src.reagents.reaction(safe_thing, TOUCH)
@@ -58,7 +58,7 @@
return
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(SPAN_DANGER("[user] squirts something into [target]'s eyes!"), SHOW_MESSAGE_VISIBLE)
src.reagents.reaction(target, TOUCH)
diff --git a/code/game/objects/items/reagent_containers/syringes.dm b/code/game/objects/items/reagent_containers/syringes.dm
index 06cbb559360c..2bb121740cef 100644
--- a/code/game/objects/items/reagent_containers/syringes.dm
+++ b/code/game/objects/items/reagent_containers/syringes.dm
@@ -258,20 +258,20 @@
return
if (target != user && target.getarmor(target_zone, ARMOR_MELEE) > 5 && prob(50))
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(text(SPAN_DANGER("[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!")), SHOW_MESSAGE_VISIBLE)
user.temp_drop_inv_item(src)
qdel(src)
return
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(text(SPAN_DANGER("[user] stabs [target] in \the [hit_area] with [src.name]!")), SHOW_MESSAGE_VISIBLE)
if(affecting.take_damage(3))
target:UpdateDamageIcon()
else
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(text(SPAN_DANGER("[user] stabs [target] with [src.name]!")), SHOW_MESSAGE_VISIBLE)
target.take_limb_damage(3)// 7 is the same as crowbar punch
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index c5fa39fd100c..de2daa9a3009 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -12,7 +12,7 @@
/obj/item/robot/upgrade/proc/action(mob/living/silicon/robot/R)
if(R.stat == DEAD)
- to_chat(usr, SPAN_DANGER("The [src] will not function on a deceased robot."))
+ to_chat(usr, SPAN_DANGER("[src] will not function on a deceased robot."))
return 1
return 0
@@ -68,7 +68,7 @@
for(var/mob/dead/observer/ghost in GLOB.observer_list)
if(ghost.mind && ghost.mind.original == R)
R.key = ghost.key
- if(R.client) R.client.change_view(world_view_size)
+ if(R.client) R.client.change_view(GLOB.world_view_size)
break
R.set_stat(CONSCIOUS)
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 6d0736f8aeb2..7c12da0707c7 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -106,7 +106,7 @@
if(AC)
to_chat(usr, SPAN_WARNING("\The [src] cannot be built here!"))
return TRUE
- var/list/directions = new/list(cardinal)
+ var/list/directions = GLOB.cardinals.Copy()
var/i = 0
for (var/obj/structure/window/win in user.loc)
i++
@@ -114,7 +114,7 @@
to_chat(user, SPAN_DANGER("There are too many windows in this location."))
return TRUE
directions-=win.dir
- if(!(win.dir in cardinal))
+ if(!(win.dir in GLOB.cardinals))
to_chat(user, SPAN_DANGER("Can't let you do that."))
return TRUE
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 07345dcdc09f..a0814290ca40 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -10,7 +10,7 @@
/*
* Metal
*/
-var/global/list/datum/stack_recipe/metal_recipes = list ( \
+GLOBAL_LIST_INIT_TYPED(metal_recipes, /datum/stack_recipe, list ( \
new/datum/stack_recipe("barbed wire", /obj/item/stack/barbed_wire, 1, 1, 20, time = 1 SECONDS, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_TRAINED), \
new/datum/stack_recipe("metal barricade", /obj/structure/barricade/metal, 4, time = 2 SECONDS, one_per_turf = ONE_TYPE_PER_BORDER, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_TRAINED, min_time = 1 SECONDS), \
new/datum/stack_recipe("folding metal barricade", /obj/structure/barricade/plasteel/metal, 6, time = 3 SECONDS, one_per_turf = ONE_TYPE_PER_BORDER, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI, min_time = 1.5 SECONDS), \
@@ -54,7 +54,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
null, \
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/baseballbat/metal, 10, time = 20, on_floor = 1), \
null, \
-)
+))
/obj/item/stack/sheet/metal
name = "metal sheets"
@@ -88,20 +88,20 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
/obj/item/stack/sheet/metal/cyborg
/obj/item/stack/sheet/metal/Initialize(mapload, amount)
- recipes = metal_recipes
+ recipes = GLOB.metal_recipes
return ..()
/*
* Plasteel
*/
-var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
+GLOBAL_LIST_INIT_TYPED(plasteel_recipes, /datum/stack_recipe, list ( \
new/datum/stack_recipe("plasteel barricade", /obj/structure/barricade/plasteel, 8, time = 4 SECONDS, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI, min_time = 2 SECONDS),
null, \
new/datum/stack_recipe("reinforced window frame", /obj/structure/window_frame/colony/reinforced, 5, time = 40, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI),
null, \
new/datum/stack_recipe("plasteel rod", /obj/item/stack/rods/plasteel, 1, 1, 30),
new/datum/stack_recipe("metal crate", /obj/structure/closet/crate, 5, time = 50, one_per_turf = ONE_TYPE_PER_TURF), \
- )
+ ))
/obj/item/stack/sheet/plasteel
name = "plasteel sheet"
@@ -119,7 +119,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
ground_offset_y = 5
/obj/item/stack/sheet/plasteel/New(loc, amount=null)
- recipes = plasteel_recipes
+ recipes = GLOB.plasteel_recipes
return ..()
@@ -141,7 +141,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
/*
* Wood
*/
-var/global/list/datum/stack_recipe/wood_recipes = list ( \
+GLOBAL_LIST_INIT_TYPED(wood_recipes, /datum/stack_recipe, list ( \
new/datum/stack_recipe("pair of wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
/*
@@ -156,7 +156,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("baseball bat", /obj/item/weapon/baseballbat, 10, time = 20, on_floor = 1), \
new/datum/stack_recipe("wooden cross", /obj/structure/prop/wooden_cross, 2, time = 10, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1), \
new/datum/stack_recipe("wooden pole", /obj/item/weapon/pole, 3, time = 10, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1) \
- )
+ ))
/obj/item/stack/sheet/wood
name = "wooden plank"
@@ -184,7 +184,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
icon_state = "sheet-wood"
/obj/item/stack/sheet/wood/New(loc, amount=null)
- recipes = wood_recipes
+ recipes = GLOB.wood_recipes
return ..()
/*
@@ -201,7 +201,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
/*
* Cardboard
*/
-var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
+GLOBAL_LIST_INIT_TYPED(cardboard_recipes, /datum/stack_recipe, list ( \
new/datum/stack_recipe("box", /obj/item/storage/box), \
new/datum/stack_recipe("donut box", /obj/item/storage/donut_box/empty), \
new/datum/stack_recipe("egg box", /obj/item/storage/fancy/egg_box), \
@@ -223,11 +223,13 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
null, \
new/datum/stack_recipe_list("empty ammo boxes",list( \
new/datum/stack_recipe("empty magazine box (88 Mod 4 AP)", /obj/item/ammo_box/magazine/mod88/empty), \
+ new/datum/stack_recipe("empty magazine box (SU-6)", /obj/item/ammo_box/magazine/su6/empty), \
+ new/datum/stack_recipe("empty magazine box (VP78)", /obj/item/ammo_box/magazine/vp78/empty), \
+ null, \
new/datum/stack_recipe("empty magazine box (M4A3)", /obj/item/ammo_box/magazine/m4a3/empty), \
new/datum/stack_recipe("empty magazine box (M4A3 AP)", /obj/item/ammo_box/magazine/m4a3/ap/empty), \
new/datum/stack_recipe("empty magazine box (M4A3 HP)", /obj/item/ammo_box/magazine/m4a3/hp/empty), \
- new/datum/stack_recipe("empty magazine box (SU-6)", /obj/item/ammo_box/magazine/su6/empty), \
- new/datum/stack_recipe("empty magazine box (VP78)", /obj/item/ammo_box/magazine/vp78/empty), \
+ new/datum/stack_recipe("empty magazine box (M4A3 Incen)", /obj/item/ammo_box/magazine/m4a3/incen/empty), \
null, \
new/datum/stack_recipe("empty speed loader box (M44)", /obj/item/ammo_box/magazine/m44/empty), \
new/datum/stack_recipe("empty speed loader box (M44 Heavy)", /obj/item/ammo_box/magazine/m44/heavy/empty), \
@@ -256,10 +258,27 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("empty magazine box (M41A Incen)", /obj/item/ammo_box/magazine/incen/empty), \
new/datum/stack_recipe("empty magazine box (M41A LE)", /obj/item/ammo_box/magazine/le/empty), \
null, \
+ new/datum/stack_recipe("empty magazine box (M41A MK1)", /obj/item/ammo_box/magazine/mk1/empty), \
+ new/datum/stack_recipe("empty magazine box (M41A MK1 AP)", /obj/item/ammo_box/magazine/mk1/ap/empty), \
+ null, \
+ new/datum/stack_recipe("empty drum box (M56B)", /obj/item/ammo_box/magazine/m56b/empty), \
+ new/datum/stack_recipe("empty drum box (M56B Irradiated)", /obj/item/ammo_box/magazine/m56b/dirty/empty), \
+ new/datum/stack_recipe("empty drum box (M56D)", /obj/item/ammo_box/magazine/m56d/empty), \
+ null, \
+ new/datum/stack_recipe("empty drum box (M2C)", /obj/item/ammo_box/magazine/m2c/empty), \
+ null, \
+ new/datum/stack_recipe("empty magazine box (M41AE2)", /obj/item/ammo_box/magazine/m41ae2/empty), \
+ new/datum/stack_recipe("empty magazine box (M41AE2 Holo-Target)", /obj/item/ammo_box/magazine/m41ae2/holo/empty), \
+ new/datum/stack_recipe("empty magazine box (M41AE2 HEAP)", /obj/item/ammo_box/magazine/m41ae2/heap/empty), \
+ null, \
+ new/datum/stack_recipe("empty flamer tank box (UT-Napthal)", /obj/item/ammo_box/magazine/flamer/empty), \
+ new/datum/stack_recipe("empty flamer tank box (Napalm B-Gel)", /obj/item/ammo_box/magazine/flamer/bgel/empty), \
+ null, \
new/datum/stack_recipe("empty shotgun shell box (Beanbag)", /obj/item/ammo_box/magazine/shotgun/beanbag/empty), \
new/datum/stack_recipe("empty shotgun shell box (Buckshot)", /obj/item/ammo_box/magazine/shotgun/buckshot/empty), \
new/datum/stack_recipe("empty shotgun shell box (Flechette)", /obj/item/ammo_box/magazine/shotgun/flechette/empty), \
new/datum/stack_recipe("empty shotgun shell box (Incendiary)", /obj/item/ammo_box/magazine/shotgun/incendiary/empty), \
+ new/datum/stack_recipe("empty shotgun shell box (Incendiary Buckshot)", /obj/item/ammo_box/magazine/shotgun/incendiarybuck/empty), \
new/datum/stack_recipe("empty shotgun shell box (Slugs)", /obj/item/ammo_box/magazine/shotgun/empty), \
null, \
new/datum/stack_recipe("empty 45-70 bullets box", /obj/item/ammo_box/magazine/lever_action/empty), \
@@ -279,23 +298,48 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("empty rifle ammo box (10x24mm Incen)", /obj/item/ammo_box/rounds/incen/empty), \
new/datum/stack_recipe("empty rifle ammo box (10x24mm LE)", /obj/item/ammo_box/rounds/le/empty), \
null, \
+ new/datum/stack_recipe("empty rifle ammo box (9mm)", /obj/item/ammo_box/rounds/pistol/empty), \
+ new/datum/stack_recipe("empty rifle ammo box (9mm AP)", /obj/item/ammo_box/rounds/pistol/ap/empty), \
+ new/datum/stack_recipe("empty rifle ammo box (9mm HP)", /obj/item/ammo_box/rounds/pistol/hp/empty), \
+ new/datum/stack_recipe("empty rifle ammo box (9mm Incen)", /obj/item/ammo_box/rounds/pistol/incen/empty), \
+ null, \
new/datum/stack_recipe("empty box of MREs", /obj/item/ammo_box/magazine/misc/mre/empty), \
new/datum/stack_recipe("empty box of M94 Marking Flare Packs", /obj/item/ammo_box/magazine/misc/flares/empty), \
+ new/datum/stack_recipe("empty box of M89 Signal Flare Packs", /obj/item/ammo_box/magazine/misc/flares/signal/empty), \
new/datum/stack_recipe("empty box of flashlights", /obj/item/ammo_box/magazine/misc/flashlight/empty), \
new/datum/stack_recipe("empty box of High-Capacity Power Cells", /obj/item/ammo_box/magazine/misc/power_cell/empty), \
null, \
+ new/datum/stack_recipe("empty magazine box (Desert Eagle)", /obj/item/ammo_box/magazine/deagle/empty), \
+ new/datum/stack_recipe("empty magazine box (Desert Eagle Heavy)", /obj/item/ammo_box/magazine/deagle/super/empty), \
+ new/datum/stack_recipe("empty magazine box (Desert Eagle High-Impact)", /obj/item/ammo_box/magazine/deagle/super/highimpact/empty), \
+ new/datum/stack_recipe("empty magazine box (Desert Eagle AP)", /obj/item/ammo_box/magazine/deagle/super/highimpact/ap/empty), \
+ null, \
+ new/datum/stack_recipe("empty magazine box (Spearhead HP)", /obj/item/ammo_box/magazine/spearhead/empty), \
+ new/datum/stack_recipe("empty magazine box (Spearhead)", /obj/item/ammo_box/magazine/spearhead/normalpoint/empty), \
+ null, \
new/datum/stack_recipe("empty magazine box (M16)", /obj/item/ammo_box/magazine/M16/empty), \
new/datum/stack_recipe("empty magazine box (M16 AP)", /obj/item/ammo_box/magazine/M16/ap/empty), \
null, \
+ new/datum/stack_recipe("empty magazine box (AR10)", /obj/item/ammo_box/magazine/ar10/empty), \
+ null, \
+ new/datum/stack_recipe("empty magazine box (MP5)", /obj/item/ammo_box/magazine/mp5/empty), \
+ null, \
+ new/datum/stack_recipe("empty magazine box (NSG 23)", /obj/item/ammo_box/magazine/nsg23/empty), \
+ new/datum/stack_recipe("empty magazine box (NSG 23 AP)", /obj/item/ammo_box/magazine/nsg23/ap/empty), \
+ new/datum/stack_recipe("empty magazine box (NSG 23 EX)", /obj/item/ammo_box/magazine/nsg23/ex/empty), \
+ null, \
new/datum/stack_recipe("empty magazine box (Type71)", /obj/item/ammo_box/magazine/type71/empty), \
new/datum/stack_recipe("empty magazine box (Type71 AP)", /obj/item/ammo_box/magazine/type71/ap/empty), \
null, \
+ new/datum/stack_recipe("empty magazine box (Type73)", /obj/item/ammo_box/magazine/type73/empty), \
+ new/datum/stack_recipe("empty magazine box (Type73 High-Impact)", /obj/item/ammo_box/magazine/type73/impact/empty), \
+ null, \
new/datum/stack_recipe("empty rifle ammo box (5.45x39mm)", /obj/item/ammo_box/rounds/type71/empty), \
new/datum/stack_recipe("empty rifle ammo box (5.45x39mm AP)", /obj/item/ammo_box/rounds/type71/ap/empty), \
)) \
-)
+))
/obj/item/stack/sheet/cardboard //BubbleWrap
name = "cardboard"
@@ -306,7 +350,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
stack_id = "cardboard"
/obj/item/stack/sheet/cardboard/New(loc, amount=null)
- recipes = cardboard_recipes
+ recipes = GLOB.cardboard_recipes
return ..()
/obj/item/stack/sheet/cardboard/small_stack
@@ -321,9 +365,9 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
/*
* Aluminum
*/
-var/global/list/datum/stack_recipe/aluminum_recipes = list ( \
+GLOBAL_LIST_INIT_TYPED(aluminium_recipes, /datum/stack_recipe, list ( \
new/datum/stack_recipe("flask", /obj/item/reagent_container/food/drinks/flask, 1)
- )
+ ))
/obj/item/stack/sheet/aluminum
name = "aluminum"
@@ -336,9 +380,9 @@ var/global/list/datum/stack_recipe/aluminum_recipes = list ( \
/*
* Copper
*/
-var/global/list/datum/stack_recipe/copper_recipes = list ( \
+GLOBAL_LIST_INIT_TYPED(copper_recipes, /datum/stack_recipe, list ( \
new/datum/stack_recipe("cable coil", /obj/item/stack/cable_coil, 2, 1, 20, time = 10, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_TRAINED)
- )
+ ))
/obj/item/stack/sheet/copper
name = "copper"
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 3912e2d64165..82e091be9008 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -313,6 +313,8 @@ Also change the icon to reflect the amount of sheets, if possible.*/
if(mods["alt"])
if(!CAN_PICKUP(user, src))
return
+ if(amount <= 1)
+ return
var/desired = tgui_input_number(user, "How much would you like to split off from this stack?", "How much?", 1, amount-1, 1)
if(!desired)
return
diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm
index 2fcff493482f..5b77b9149a53 100644
--- a/code/game/objects/items/storage/backpack.dm
+++ b/code/game/objects/items/storage/backpack.dm
@@ -72,9 +72,9 @@
return FALSE
// Create their vis object if needed
- if(!xeno.backpack_icon_carrier)
- xeno.backpack_icon_carrier = new(null, xeno)
- xeno.vis_contents += xeno.backpack_icon_carrier
+ if(!xeno.backpack_icon_holder)
+ xeno.backpack_icon_holder = new(null, xeno)
+ xeno.vis_contents += xeno.backpack_icon_holder
target_mob.put_in_back(src)
return FALSE
@@ -767,9 +767,9 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
H.FF_hit_evade = 1000
H.allow_gun_usage = allow_gun_usage
- var/datum/mob_hud/security/advanced/SA = huds[MOB_HUD_SECURITY_ADVANCED]
+ var/datum/mob_hud/security/advanced/SA = GLOB.huds[MOB_HUD_SECURITY_ADVANCED]
SA.remove_from_hud(H)
- var/datum/mob_hud/xeno_infection/XI = huds[MOB_HUD_XENO_INFECTION]
+ var/datum/mob_hud/xeno_infection/XI = GLOB.huds[MOB_HUD_XENO_INFECTION]
XI.remove_from_hud(H)
anim(H.loc, H, 'icons/mob/mob.dmi', null, "cloak", null, H.dir)
@@ -806,9 +806,9 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
H.alpha = initial(H.alpha)
H.FF_hit_evade = initial(H.FF_hit_evade)
- var/datum/mob_hud/security/advanced/SA = huds[MOB_HUD_SECURITY_ADVANCED]
+ var/datum/mob_hud/security/advanced/SA = GLOB.huds[MOB_HUD_SECURITY_ADVANCED]
SA.add_to_hud(H)
- var/datum/mob_hud/xeno_infection/XI = huds[MOB_HUD_XENO_INFECTION]
+ var/datum/mob_hud/xeno_infection/XI = GLOB.huds[MOB_HUD_XENO_INFECTION]
XI.add_to_hud(H)
if(anim)
@@ -1127,6 +1127,10 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
max_storage_space = 21
camo_alpha = 10
+/obj/item/storage/backpack/marine/satchel/scout_cloak/upp/weak
+ desc = "A thermo-optic camouflage cloak commonly used by UPP commando units. This one is less effective than normal."
+ actions_types = null
+
//----------TWE SECTION----------
/obj/item/storage/backpack/rmc
has_gamemode_skin = FALSE
diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm
index 71edc21e29f9..40953eb97395 100644
--- a/code/game/objects/items/storage/belt.dm
+++ b/code/game/objects/items/storage/belt.dm
@@ -648,7 +648,7 @@
/obj/item/storage/belt/shotgun/full/random/fill_preset_inventory()
for(var/i = 1 to storage_slots)
- var/random_shell_type = pick(shotgun_handfuls_12g)
+ var/random_shell_type = pick(GLOB.shotgun_handfuls_12g)
new random_shell_type(src)
/obj/item/storage/belt/shotgun/attackby(obj/item/W, mob/user)
diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm
index 4a3afa00f368..8e4ffb90d2bd 100644
--- a/code/game/objects/items/storage/boxes.dm
+++ b/code/game/objects/items/storage/boxes.dm
@@ -761,3 +761,211 @@
else if(!isopened)
isopened = 1
icon_state = "mealpackopened"
+
+//food boxes for storage in bulk
+
+//meat
+/obj/item/storage/box/meat
+ name = "box of meat"
+
+/obj/item/storage/box/meat/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/meat/monkey(src)
+
+//fish
+/obj/item/storage/box/fish
+ name = "box of fish"
+
+/obj/item/storage/box/fish/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/carpmeat(src)
+
+//grocery
+
+//milk
+/obj/item/storage/box/milk
+ name = "box of milk"
+
+/obj/item/storage/box/milk/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/drinks/milk(src)
+
+//soymilk
+/obj/item/storage/box/soymilk
+ name = "box of soymilk"
+
+/obj/item/storage/box/soymilk/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/drinks/soymilk(src)
+
+//enzyme
+/obj/item/storage/box/enzyme
+ name = "box of enzyme"
+
+/obj/item/storage/box/enzyme/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/condiment/enzyme(src)
+
+//dry storage
+
+//flour
+/obj/item/storage/box/flour
+ name = "box of flour"
+
+/obj/item/storage/box/flour/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/flour(src)
+
+//sugar
+/obj/item/storage/box/sugar
+ name = "box of sugar"
+
+/obj/item/storage/box/sugar/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/condiment/sugar(src)
+
+//saltshaker
+/obj/item/storage/box/saltshaker
+ name = "box of saltshakers"
+
+/obj/item/storage/box/saltshaker/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/condiment/saltshaker(src)
+
+//peppermill
+/obj/item/storage/box/peppermill
+ name = "box of peppermills"
+
+/obj/item/storage/box/peppermill/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/condiment/peppermill(src)
+
+//mint
+/obj/item/storage/box/mint
+ name = "box of mints"
+
+/obj/item/storage/box/mint/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/mint(src)
+
+// ORGANICS
+
+//apple
+/obj/item/storage/box/apple
+ name = "box of apples"
+
+/obj/item/storage/box/apple/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/apple(src)
+
+//banana
+/obj/item/storage/box/banana
+ name = "box of bananas"
+
+/obj/item/storage/box/banana/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/banana(src)
+
+//chanterelle
+/obj/item/storage/box/chanterelles
+ name = "box of chanterelle"
+
+/obj/item/storage/box/chanterelle/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/mushroom/chanterelle(src)
+
+//cherries
+/obj/item/storage/box/cherries
+ name = "box of cherries"
+
+/obj/item/storage/box/cherries/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/cherries(src)
+
+//chili
+/obj/item/storage/box/chili
+ name = "box of chili"
+
+/obj/item/storage/box/chili/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/chili(src)
+
+//cabbage
+/obj/item/storage/box/cabbage
+ name = "box of cabbages"
+
+/obj/item/storage/box/cabbage/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/cabbage(src)
+
+//carrot
+/obj/item/storage/box/carrot
+ name = "box of carrots"
+
+/obj/item/storage/box/carrot/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/carrot(src)
+
+//corn
+/obj/item/storage/box/corn
+ name = "box of corn"
+
+/obj/item/storage/box/corn/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/corn(src)
+
+//eggplant
+/obj/item/storage/box/eggplant
+ name = "box of eggplants"
+
+/obj/item/storage/box/eggplant/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/eggplant(src)
+
+//lemon
+/obj/item/storage/box/lemon
+ name = "box of lemons"
+
+/obj/item/storage/box/lemon/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/lemon(src)
+
+//lime
+/obj/item/storage/box/lime
+ name = "box of limes"
+
+/obj/item/storage/box/lime/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/lime(src)
+
+//orange
+/obj/item/storage/box/orange
+ name = "box of oranges"
+
+/obj/item/storage/box/orange/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/orange(src)
+
+//potato
+/obj/item/storage/box/potato
+ name = "box of potatoes"
+
+/obj/item/storage/box/potato/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/potato(src)
+
+//tomato
+/obj/item/storage/box/tomato
+ name = "box of tomatoes"
+
+/obj/item/storage/box/tomato/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/tomato(src)
+
+//whitebeet
+/obj/item/storage/box/whitebeet
+ name = "box of whitebeet"
+
+/obj/item/storage/box/whitebeet/fill_preset_inventory()
+ for(var/i in 1 to 7)
+ new /obj/item/reagent_container/food/snacks/grown/whitebeet(src)
diff --git a/code/game/objects/items/storage/large_holster.dm b/code/game/objects/items/storage/large_holster.dm
index 76f98c423974..b02dff1bdbcc 100644
--- a/code/game/objects/items/storage/large_holster.dm
+++ b/code/game/objects/items/storage/large_holster.dm
@@ -250,12 +250,12 @@
return FALSE
if(user.back != src)
- to_chat(user, "The [src] must be equipped before you can switch types")
+ to_chat(user, SPAN_WARNING("[src] must be equipped before you can switch types."))
return
var/obj/item/weapon/gun/flamer/M240T/flamer = user.get_active_hand()
if(!istype(flamer))
- to_chat(user, "You must be holding the M240-T incinerator unit to use [src]")
+ to_chat(user, SPAN_WARNING("You must be holding [flamer] to use [src]."))
return
if(!active_fuel)
diff --git a/code/game/objects/items/storage/pouch.dm b/code/game/objects/items/storage/pouch.dm
index 525909cb621d..acb87e988879 100644
--- a/code/game/objects/items/storage/pouch.dm
+++ b/code/game/objects/items/storage/pouch.dm
@@ -683,6 +683,18 @@
new /obj/item/reagent_container/hypospray/autoinjector/stimulant/redemption_stimulant(src)
new /obj/item/reagent_container/hypospray/autoinjector/stimulant/speed_stimulant(src)
+/obj/item/storage/pouch/medical/socmed/not_op/fill_preset_inventory()
+ new /obj/item/device/healthanalyzer(src)
+ new /obj/item/stack/medical/splint(src)
+ new /obj/item/stack/medical/advanced/bruise_pack(src)
+ new /obj/item/stack/medical/advanced/ointment(src)
+ new /obj/item/reagent_container/hypospray/autoinjector/bicaridine(src)
+ new /obj/item/reagent_container/hypospray/autoinjector/kelotane(src)
+ new /obj/item/reagent_container/hypospray/autoinjector/oxycodone(src)
+ new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
+ new /obj/item/reagent_container/hypospray/autoinjector/emergency(src)
+ new /obj/item/tool/extinguisher/mini(src)
+
/obj/item/storage/pouch/medical/socmed/dutch
name = "\improper Dutch's Medical Pouch"
desc = "A pouch bought from a black market trader by Dutch quite a few years ago. Rumoured to be stolen from secret USCM assets. Its contents have been slowly used up and replaced over the years."
diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm
index cfdb2f88b090..6e7e891d6ba8 100644
--- a/code/game/objects/items/storage/storage.dm
+++ b/code/game/objects/items/storage/storage.dm
@@ -852,6 +852,7 @@ W is always an item. stop_warning prevents messaging. user may be null.**/
return ..()
/obj/item/storage/emp_act(severity)
+ . = ..()
if(!istype(src.loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
diff --git a/code/game/objects/items/tools/flame_tools.dm b/code/game/objects/items/tools/flame_tools.dm
index 7681e74a1d88..82870f7ed8d1 100644
--- a/code/game/objects/items/tools/flame_tools.dm
+++ b/code/game/objects/items/tools/flame_tools.dm
@@ -233,12 +233,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
light(SPAN_NOTICE("[user] fiddles with [W], and manages to light their [name]."))
else if(istype(W, /obj/item/attachable/attached_gun/flamer))
- light(SPAN_NOTICE("[user] lights their [src] with the [W]."))
+ light(SPAN_NOTICE("[user] lights their [name] with [W]."))
else if(istype(W, /obj/item/weapon/gun/flamer))
var/obj/item/weapon/gun/flamer/F = W
if(!(F.flags_gun_features & GUN_TRIGGER_SAFETY))
- light(SPAN_NOTICE("[user] lights their [src] with the pilot light of the [F]."))
+ light(SPAN_NOTICE("[user] lights their [name] with the pilot light of [F]."))
else
to_chat(user, SPAN_WARNING("Turn on the pilot light first!"))
@@ -246,20 +246,20 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/obj/item/weapon/gun/G = W
for(var/slot in G.attachments)
if(istype(G.attachments[slot], /obj/item/attachable/attached_gun/flamer))
- light(SPAN_NOTICE("[user] lights their [src] with [G.attachments[slot]]."))
+ light(SPAN_NOTICE("[user] lights their [name] with [G.attachments[slot]]."))
break
else if(istype(W, /obj/item/tool/surgery/cautery))
- light(SPAN_NOTICE("[user] lights their [src] with the [W]."))
+ light(SPAN_NOTICE("[user] lights their [name] with [W]."))
else if(istype(W, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/C = W
if(C.item_state == icon_on)
- light(SPAN_NOTICE("[user] lights their [src] with the [C] after a few attempts."))
+ light(SPAN_NOTICE("[user] lights their [name] with [C] after a few attempts."))
else if(istype(W, /obj/item/tool/candle))
if(W.heat_source > 200)
- light(SPAN_NOTICE("[user] lights their [src] with the [W] after a few attempts."))
+ light(SPAN_NOTICE("[user] lights their [name] with [W] after a few attempts."))
return
@@ -529,12 +529,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
light(SPAN_NOTICE("[user] fiddles with [W], and manages to light their [name] with the power of science."))
else if(istype(W, /obj/item/attachable/attached_gun/flamer))
- light(SPAN_NOTICE("[user] lights their [src] with the [W], bet that would have looked cooler if it was attached to something first!"))
+ light(SPAN_NOTICE("[user] lights their [name] with [W], bet that would have looked cooler if it was attached to something first!"))
else if(istype(W, /obj/item/weapon/gun/flamer))
var/obj/item/weapon/gun/flamer/F = W
if(!(F.flags_gun_features & GUN_TRIGGER_SAFETY))
- light(SPAN_NOTICE("[user] lights their [src] with the pilot light of the [F], the glint of pyromania in their eye."))
+ light(SPAN_NOTICE("[user] lights their [name] with the pilot light of [F], the glint of pyromania in their eye."))
else
to_chat(user, SPAN_WARNING("Turn on the pilot light first!"))
@@ -546,16 +546,16 @@ CIGARETTE PACKETS ARE IN FANCY.DM
break
else if(istype(W, /obj/item/tool/surgery/cautery))
- light(SPAN_NOTICE("[user] lights their [src] with the [W], that can't be sterile!"))
+ light(SPAN_NOTICE("[user] lights their [name] with [W], that can't be sterile!"))
else if(istype(W, /obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/C = W
if(C.item_state == icon_on)
- light(SPAN_NOTICE("[user] lights their [src] with the [C] after a few attempts."))
+ light(SPAN_NOTICE("[user] lights their [name] with [C] after a few attempts."))
else if(istype(W, /obj/item/tool/candle))
if(W.heat_source > 200)
- light(SPAN_NOTICE("[user] lights their [src] with the [W] after a few attempts."))
+ light(SPAN_NOTICE("[user] lights their [name] with [W] after a few attempts."))
/////////////////
//SMOKING PIPES//
@@ -751,7 +751,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else
playsound(src.loc,"lighter",10, 1, 3)
if(prob(95))
- user.visible_message(SPAN_NOTICE("After a few attempts, [user] manages to light the [src]."))
+ user.visible_message(SPAN_NOTICE("After a few attempts, [user] manages to light [src]."))
else
to_chat(user, SPAN_WARNING("You burn yourself while lighting the lighter."))
@@ -759,7 +759,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.apply_damage(2,BURN,"l_hand")
else
user.apply_damage(2,BURN,"r_hand")
- user.visible_message(SPAN_NOTICE("After a few attempts, [user] manages to light the [src], they however burn their finger in the process."))
+ user.visible_message(SPAN_NOTICE("After a few attempts, [user] manages to light [src], they however burn their finger in the process."))
set_light_range(2)
set_light_on(TRUE)
@@ -777,10 +777,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = icon_off
if(!silent)
if(istype(src, /obj/item/tool/lighter/zippo) )
- bearer.visible_message("You hear a quiet click, as [bearer] shuts off [src] without even looking at what they're doing.")
+ bearer.visible_message(SPAN_ROSE("You hear a quiet click, as [bearer] shuts off [src] without even looking at what they're doing."))
playsound(src.loc,"zippo_close",10, 1, 3)
else
- bearer.visible_message(SPAN_NOTICE("[bearer] quietly shuts off the [src]."))
+ bearer.visible_message(SPAN_NOTICE("[bearer] quietly shuts off [src]."))
set_light_on(FALSE)
STOP_PROCESSING(SSobj, src)
@@ -805,4 +805,3 @@ CIGARETTE PACKETS ARE IN FANCY.DM
cig.light(SPAN_NOTICE("[user] holds the [name] out for [M], and lights the [cig.name]."))
else
..()
-
diff --git a/code/game/objects/items/tools/kitchen_tools.dm b/code/game/objects/items/tools/kitchen_tools.dm
index bb763ada9911..2cff941be8d6 100644
--- a/code/game/objects/items/tools/kitchen_tools.dm
+++ b/code/game/objects/items/tools/kitchen_tools.dm
@@ -218,7 +218,7 @@
var/cooldown = 0
/obj/item/tool/kitchen/tray/attack(mob/living/carbon/M, mob/living/carbon/user)
- to_chat(user, SPAN_WARNING("You accidentally slam yourself with the [src]!"))
+ to_chat(user, SPAN_WARNING("You accidentally slam yourself with [src]!"))
user.apply_effect(1, WEAKEN)
user.take_limb_damage(2)
diff --git a/code/game/objects/items/tools/maintenance_tools.dm b/code/game/objects/items/tools/maintenance_tools.dm
index a326808bf491..a02536800f15 100644
--- a/code/game/objects/items/tools/maintenance_tools.dm
+++ b/code/game/objects/items/tools/maintenance_tools.dm
@@ -96,8 +96,8 @@
if(E)
var/safety = H.get_eye_protection()
if(!safety)
- to_chat(user, SPAN_DANGER("You stab [H] in the eyes with the [src]!"))
- visible_message(SPAN_DANGER("[user] stabs [H] in the eyes with the [src]!"))
+ user.visible_message(SPAN_DANGER("[user] stabs [H] in the eyes with [src]!"),
+ SPAN_DANGER("You stab [H] in the eyes with [src]!"))
E.take_damage(rand(8,20))
return ..()
/obj/item/tool/screwdriver/tactical
diff --git a/code/game/objects/items/tools/misc_tools.dm b/code/game/objects/items/tools/misc_tools.dm
index 98dc89321d34..44aaab771db8 100644
--- a/code/game/objects/items/tools/misc_tools.dm
+++ b/code/game/objects/items/tools/misc_tools.dm
@@ -132,7 +132,7 @@
qdel(I) //delete the paper item
labels_left = initial(labels_left)
else
- to_chat(user, SPAN_NOTICE("The [src] is already full."))
+ to_chat(user, SPAN_NOTICE("[src] is already full."))
/*
Instead of updating labels_left to user every label used,
@@ -284,21 +284,24 @@
matter = list("metal" = 20, "gold" = 10)
var/static/list/colour_list = list("red", "blue", "green", "yellow", "purple", "pink", "brown", "black", "orange") // Can add more colors as required
var/current_colour_index = 1
- var/owner = "hard to read text"
+ var/owner_name
-/obj/item/tool/pen/fountain/Initialize(mapload, ...)
+/obj/item/tool/pen/fountain/pickup(mob/user, silent)
. = ..()
- if(!mapload)
- RegisterSignal(src, COMSIG_POST_SPAWN_UPDATE, PROC_REF(set_owner))
+ if(!owner_name)
+ RegisterSignal(user, COMSIG_POST_SPAWN_UPDATE, PROC_REF(set_owner), override = TRUE)
///Sets the owner of the pen to who it spawns with, requires var/source for signals
-/obj/item/tool/pen/fountain/proc/set_owner(source = src, mob/living/carbon/human/user)
- UnregisterSignal(src, COMSIG_POST_SPAWN_UPDATE)
- owner = user
+/obj/item/tool/pen/fountain/proc/set_owner(datum/source)
+ SIGNAL_HANDLER
+ UnregisterSignal(source, COMSIG_POST_SPAWN_UPDATE)
+ var/mob/living/carbon/human/user = source
+ owner_name = user.name
/obj/item/tool/pen/fountain/get_examine_text(mob/user)
. = ..()
- . += "There's a laser engraving of [owner] on it."
+ if(owner_name)
+ . += "There's a laser engraving of [owner_name] on it."
/obj/item/tool/pen/fountain/attack_self(mob/living/carbon/human/user)
if(on)
diff --git a/code/game/objects/items/tools/shovel_tools.dm b/code/game/objects/items/tools/shovel_tools.dm
index 008b37705fe3..ad74dca54e88 100644
--- a/code/game/objects/items/tools/shovel_tools.dm
+++ b/code/game/objects/items/tools/shovel_tools.dm
@@ -151,7 +151,7 @@
/obj/item/tool/shovel/proc/dump_shovel(atom/target, mob/user)
var/turf/T = target
- to_chat(user, SPAN_NOTICE("you dump the [dirt_type_to_name(dirt_type)]!"))
+ to_chat(user, SPAN_NOTICE("You dump the [dirt_type_to_name(dirt_type)]!"))
playsound(user.loc, "rustle", 30, 1, 6)
if(dirt_type == DIRT_TYPE_SNOW)
var/obj/item/stack/snow/S = locate() in T
diff --git a/code/game/objects/items/toys/cards.dm b/code/game/objects/items/toys/cards.dm
index b6e3bb558ec4..2debd83f9bab 100644
--- a/code/game/objects/items/toys/cards.dm
+++ b/code/game/objects/items/toys/cards.dm
@@ -21,7 +21,6 @@
icon = 'icons/obj/items/playing_cards.dmi'
icon_state = "deck"
w_class = SIZE_TINY
- flags_item = NOTABLEMERGE
var/base_icon = "deck"
var/max_cards = 52
@@ -262,7 +261,6 @@
icon = 'icons/obj/items/playing_cards.dmi'
icon_state = "empty"
w_class = SIZE_TINY
- flags_item = NOTABLEMERGE
var/concealed = FALSE
var/pile_state = FALSE
diff --git a/code/game/objects/items/toys/crayons.dm b/code/game/objects/items/toys/crayons.dm
index 5bd4d05f317f..c02b59289fa1 100644
--- a/code/game/objects/items/toys/crayons.dm
+++ b/code/game/objects/items/toys/crayons.dm
@@ -73,7 +73,7 @@
var/drawtype = tgui_input_list(usr, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter"))
switch(drawtype)
if("letter")
- drawtype = tgui_input_list(usr, "Choose the letter.", "Crayon scribbles", alphabet_lowercase)
+ drawtype = tgui_input_list(usr, "Choose the letter.", "Crayon scribbles", GLOB.alphabet_lowercase)
to_chat(user, "You start drawing a letter on the [target.name].")
if("graffiti")
to_chat(user, "You start drawing graffiti on the [target.name].")
diff --git a/code/game/objects/items/toys/toy_weapons.dm b/code/game/objects/items/toys/toy_weapons.dm
index 80f94cab8e2e..ce32cfdb67a9 100644
--- a/code/game/objects/items/toys/toy_weapons.dm
+++ b/code/game/objects/items/toys/toy_weapons.dm
@@ -130,7 +130,7 @@
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
- for(var/mob/O in viewers(world_view_size, D))
+ for(var/mob/O in viewers(GLOB.world_view_size, D))
O.show_message(SPAN_DANGER("[M] was hit by the foam dart!"), SHOW_MESSAGE_VISIBLE)
new /obj/item/toy/crossbow_ammo(M.loc)
qdel(D)
@@ -152,7 +152,7 @@
return
else if (bullets == 0)
user.apply_effect(5, WEAKEN)
- for(var/mob/O in viewers(world_view_size, user))
+ for(var/mob/O in viewers(GLOB.world_view_size, user))
O.show_message(SPAN_DANGER("[user] realized they were out of ammo and starting scrounging for some!"), SHOW_MESSAGE_VISIBLE)
diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm
index 7a17904635f0..65234c59b89b 100644
--- a/code/game/objects/items/toys/toys.dm
+++ b/code/game/objects/items/toys/toys.dm
@@ -44,7 +44,7 @@
if(!proximity) return
if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
A.reagents.trans_to(src, 10)
- to_chat(user, SPAN_NOTICE(" You fill the balloon with the contents of [A]."))
+ to_chat(user, SPAN_NOTICE("You fill the balloon with the contents of [A]."))
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
src.update_icon()
return
@@ -53,22 +53,22 @@
if(istype(O, /obj/item/reagent_container/glass))
if(O.reagents)
if(O.reagents.total_volume < 1)
- to_chat(user, "The [O] is empty.")
+ to_chat(user, SPAN_WARNING("[O] is empty."))
else if(O.reagents.total_volume >= 1)
if(O.reagents.has_reagent("pacid", 1))
- to_chat(user, "The acid chews through the balloon!")
+ to_chat(user, SPAN_WARNING("The acid chews through the balloon!"))
O.reagents.reaction(user)
qdel(src)
else
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
- to_chat(user, SPAN_NOTICE(" You fill the balloon with the contents of [O]."))
+ to_chat(user, SPAN_NOTICE("You fill the balloon with the contents of [O]."))
O.reagents.trans_to(src, 10)
src.update_icon()
return
/obj/item/toy/balloon/launch_impact(atom/hit_atom)
if(src.reagents.total_volume >= 1)
- src.visible_message(SPAN_DANGER("The [src] bursts!"),"You hear a pop and a splash.")
+ src.visible_message(SPAN_DANGER("[src] bursts!"),"You hear a pop and a splash.")
src.reagents.reaction(get_turf(hit_atom))
for(var/atom/A in get_turf(hit_atom))
src.reagents.reaction(A)
@@ -553,15 +553,15 @@
///Hexadecimal 0-F (0-15)
var/static/list/hexadecimal = list("0", "1", "2", "3" , "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
-/obj/item/toy/plush/therapy/random_color/New(loc, ...)
+/obj/item/toy/plush/therapy/random_color/Initialize(mapload, ...)
. = ..()
var/color_code = "#[pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)]" //This is dumb and I hope theres a better way I'm missing
color = color_code
- desc = "A custom therapy plush, in a unique color. This one is labeled with \"#[color_code]\"."
+ desc = "A custom therapy plush, in a unique color."
/obj/item/toy/plush/random_plushie //Not using an effect so it can fit into storage from loadout
name = "random plush"
- desc = "You should not be seeing this"
+ desc = "This plush looks awfully standard and bland. Is it actually yours?"
/// Standard plushies for the spawner to pick from
var/list/plush_list = list(
/obj/item/toy/plush/farwa,
@@ -587,22 +587,32 @@
. = ..()
if(mapload) //Placed in mapping, will be randomized instantly on spawn
create_plushie()
- return
- RegisterSignal(src, COMSIG_POST_SPAWN_UPDATE, PROC_REF(create_plushie))
+ return INITIALIZE_HINT_QDEL
+
+/obj/item/toy/plush/random_plushie/pickup(mob/user, silent)
+ . = ..()
+ RegisterSignal(user, COMSIG_POST_SPAWN_UPDATE, PROC_REF(create_plushie), override = TRUE)
///The randomizer picking and spawning a plushie on either the ground or in the humans backpack. Needs var/source due to signals
-/obj/item/toy/plush/random_plushie/proc/create_plushie(source = src, mob/living/user)
- UnregisterSignal(src, COMSIG_POST_SPAWN_UPDATE)
+/obj/item/toy/plush/random_plushie/proc/create_plushie(datum/source)
+ SIGNAL_HANDLER
+ if(source)
+ UnregisterSignal(source, COMSIG_POST_SPAWN_UPDATE)
+ var/turf/spawn_location = get_turf(src)
var/plush_list_variety = pick(60; plush_list, 40; therapy_plush_list)
var/random_plushie = pick(plush_list_variety)
- var/obj/item/toy/plush/plush = new random_plushie(get_turf(src)) //Starts on floor by default
+ var/obj/item/toy/plush/plush = new random_plushie(spawn_location) //Starts on floor by default
+ var/mob/living/carbon/human/user = source
if(!user) //If it didn't spawn on a humanoid
qdel(src)
return
+
var/obj/item/storage/backpack/storage = locate() in user //If the user has a backpack, put it there
if(storage?.can_be_inserted(plush, user, stop_messages = TRUE))
storage.attempt_item_insertion(plush, TRUE, user)
+ if(plush.loc == spawn_location) // Still on the ground
+ user.put_in_hands(plush, drop_on_fail = TRUE)
qdel(src)
//Admin plushies
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 6cb9f58aae37..310c53dd5d0f 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -106,7 +106,7 @@
bcell.update_icon()
bcell.forceMove(get_turf(src.loc))
bcell = null
- to_chat(user, SPAN_NOTICE("You remove the cell from the [src]."))
+ to_chat(user, SPAN_NOTICE("You remove the cell from [src]."))
status = 0
update_icon()
return
@@ -183,10 +183,10 @@
// Logging
if(user == L)
- user.attack_log += "\[[time_stamp()]\] [key_name(user)] stunned themselves with the [src] in [get_area(user)]"
+ user.attack_log += "\[[time_stamp()]\] [key_name(user)] stunned themselves with [src] in [get_area(user)]"
else
- msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src] in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z]).", user.loc.x, user.loc.y, user.loc.z)
- var/logentry = "\[[time_stamp()]\] [key_name(user)] stunned [key_name(L)] with the [src] in [get_area(user)]"
+ msg_admin_attack("[key_name(user)] stunned [key_name(L)] with [src] in [get_area(user)] ([user.loc.x],[user.loc.y],[user.loc.z]).", user.loc.x, user.loc.y, user.loc.z)
+ var/logentry = "\[[time_stamp()]\] [key_name(user)] stunned [key_name(L)] with [src] in [get_area(user)]"
L.attack_log += logentry
user.attack_log += logentry
@@ -197,9 +197,9 @@
return TRUE
/obj/item/weapon/baton/emp_act(severity)
+ . = ..()
if(bcell)
bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please.
- ..()
//secborg stun baton module
/obj/item/weapon/baton/robot/attack_self(mob/user)
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index efa898ba9937..f3c76bcff638 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -113,7 +113,7 @@
w_class = SIZE_MEDIUM
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
else
- to_chat(user, SPAN_NOTICE("The [src] can now be concealed."))
+ to_chat(user, SPAN_NOTICE("[src] can now be concealed."))
force = initial(force)
edge = 0
sharp = 0
@@ -260,7 +260,7 @@
M.apply_effect(kill_delay/15, STUN)
- for (var/mob/O in hearers(world_view_size, M))
+ for (var/mob/O in hearers(GLOB.world_view_size, M))
O << sound('sound/effects/Heart Beat.ogg', repeat = 1, wait = 0, volume = 100, channel = 2) //play on same channel as ambience
spawn(kill_delay)
O << sound(, , , , channel = 2) //cut sound
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 4304d4516e1b..cc9f1fe53fea 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -389,7 +389,7 @@
else if(LAZYISIN(item_icons, slot))
mob_icon = item_icons[slot]
else
- mob_icon = default_onmob_icons[slot]
+ mob_icon = GLOB.default_onmob_icons[slot]
var/image/overlay_img
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 95998d5de79a..2519ed2940d5 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -209,7 +209,7 @@
/obj/structure/proc/toggle_anchored(obj/item/W, mob/user)
if(!wrenchable)
- to_chat(user, SPAN_WARNING("The [src] cannot be [anchored ? "un" : ""]anchored."))
+ to_chat(user, SPAN_WARNING("[src] cannot be [anchored ? "un" : ""]anchored."))
return FALSE
else
// Wrenching is faster if we are better at engineering
diff --git a/code/game/objects/structures/barricade/metal.dm b/code/game/objects/structures/barricade/metal.dm
index 4056ac9021f8..4f250eed50e9 100644
--- a/code/game/objects/structures/barricade/metal.dm
+++ b/code/game/objects/structures/barricade/metal.dm
@@ -110,7 +110,7 @@
to_chat(user, SPAN_NOTICE("You lack the required metal."))
return
if((usr.get_active_hand()) != metal)
- to_chat(user, SPAN_WARNING("You must be holding the [metal] to upgrade \the [src]!"))
+ to_chat(user, SPAN_WARNING("You must be holding [metal] to upgrade [src]!"))
return
switch(choice)
@@ -150,7 +150,7 @@
to_chat(user, SPAN_NOTICE("You lack the required metal."))
return
if((usr.get_active_hand()) != metal)
- to_chat(user, SPAN_WARNING("You must be holding the [metal] to upgrade \the [src]!"))
+ to_chat(user, SPAN_WARNING("You must be holding [metal] to upgrade [src]!"))
return
switch(choice)
diff --git a/code/game/objects/structures/barricade/plasteel.dm b/code/game/objects/structures/barricade/plasteel.dm
index d1a42c9b61ab..dd95aa3f1baf 100644
--- a/code/game/objects/structures/barricade/plasteel.dm
+++ b/code/game/objects/structures/barricade/plasteel.dm
@@ -30,7 +30,7 @@
/obj/structure/barricade/plasteel/update_icon()
..()
if(linked)
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
for(var/obj/structure/barricade/plasteel/cade in get_step(src, direction))
if(((dir & (NORTH|SOUTH) && get_dir(src, cade) & (EAST|WEST)) || (dir & (EAST|WEST) && get_dir(src, cade) & (NORTH|SOUTH))) && dir == cade.dir && cade.linked && cade.closed == src.closed && hasconnectionoverlay)
if(closed)
@@ -125,10 +125,10 @@
user.visible_message(SPAN_NOTICE("[user] sets up [src] for linking."),
SPAN_NOTICE("You set up [src] for linking."))
else
- to_chat(user, SPAN_WARNING("The [src] has no linking points..."))
+ to_chat(user, SPAN_WARNING("[src] has no linking points..."))
return
linked = !linked
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
for(var/obj/structure/barricade/plasteel/cade in get_step(src, direction))
cade.update_icon()
update_icon()
@@ -210,7 +210,7 @@
if(closed)
if(recentlyflipped)
- to_chat(user, SPAN_NOTICE("The [src] has been flipped too recently!"))
+ to_chat(user, SPAN_NOTICE("[src] has been flipped too recently!"))
return
user.visible_message(SPAN_NOTICE("[user] flips [src] open."),
SPAN_NOTICE("You flip [src] open."))
@@ -222,7 +222,7 @@
else
if(recentlyflipped)
- to_chat(user, SPAN_NOTICE("The [src] has been flipped too recently!"))
+ to_chat(user, SPAN_NOTICE("[src] has been flipped too recently!"))
return
user.visible_message(SPAN_NOTICE("[user] flips [src] closed."),
SPAN_NOTICE("You flip [src] closed."))
@@ -239,7 +239,7 @@
closed = 0
density = TRUE
if(linked)
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
for(var/obj/structure/barricade/plasteel/cade in get_step(src, direction))
if(((dir & (NORTH|SOUTH) && get_dir(src, cade) & (EAST|WEST)) || (dir & (EAST|WEST) && get_dir(src, cade) & (NORTH|SOUTH))) && dir == cade.dir && cade != origin && cade.linked)
cade.open(src)
@@ -252,7 +252,7 @@
closed = 1
density = FALSE
if(linked)
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
for(var/obj/structure/barricade/plasteel/cade in get_step(src, direction))
if(((dir & (NORTH|SOUTH) && get_dir(src, cade) & (EAST|WEST)) || (dir & (EAST|WEST) && get_dir(src, cade) & (NORTH|SOUTH))) && dir == cade.dir && cade != origin && cade.linked)
cade.close(src)
diff --git a/code/game/objects/structures/blocker.dm b/code/game/objects/structures/blocker.dm
index 284daf0028aa..f85b1e65fff5 100644
--- a/code/game/objects/structures/blocker.dm
+++ b/code/game/objects/structures/blocker.dm
@@ -105,9 +105,21 @@
/obj/structure/blocker/forcefield/vehicles
types = list(/obj/vehicle/)
+
+/obj/structure/blocker/forcefield/vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
+ if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
+ return TRUE
+ return FALSE
+
/obj/structure/blocker/forcefield/multitile_vehicles
types = list(/obj/vehicle/multitile/)
+
+/obj/structure/blocker/forcefield/multitile_vehicles/handle_vehicle_bump(obj/vehicle/multitile/multitile_vehicle)
+ if(multitile_vehicle.vehicle_flags & VEHICLE_BYPASS_BLOCKERS)
+ return TRUE
+ return FALSE
+
/obj/structure/blocker/forcefield/human
types = list(/mob/living/carbon/human)
icon_state = "purple_line"
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index d6148b23b7f0..fa87cd6b2b71 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -158,10 +158,15 @@
/obj/structure/closet/proc/take_damage(damage)
+ if(health <= 0)
+ return
+
health = max(health - damage, 0)
if(health <= 0)
- for(var/atom/movable/A as anything in src)
- A.forceMove(src.loc)
+ for(var/atom/movable/movable as anything in src)
+ if(!loc)
+ break
+ movable.forceMove(loc)
playsound(loc, 'sound/effects/meteorimpact.ogg', 25, 1)
qdel(src)
@@ -195,7 +200,7 @@
/obj/structure/closet/attack_animal(mob/living/user)
if(user.wall_smash)
- visible_message(SPAN_DANGER("[user] destroys the [src]. "))
+ visible_message(SPAN_DANGER("[user] destroys [src]."))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
qdel(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/kitchen.dm b/code/game/objects/structures/crates_lockers/closets/secure/kitchen.dm
new file mode 100644
index 000000000000..d8b0c984d4b1
--- /dev/null
+++ b/code/game/objects/structures/crates_lockers/closets/secure/kitchen.dm
@@ -0,0 +1,143 @@
+//standart fridge
+
+/obj/structure/closet/secure_closet/fridge
+ name = "Refrigerator"
+ icon = 'icons/obj/structures/machinery/kitchen.dmi'
+ icon_state = "fridge1"
+ icon_closed = "fridge"
+ icon_locked = "fridge1"
+ icon_opened = "fridgeopen"
+ icon_broken = "fridgebroken"
+ icon_off = "fridge1"
+ storage_capacity = 60 //give extra storage capacity so that everything can fit.
+
+/obj/structure/closet/secure_closet/fridge/update_icon()
+ if(broken)
+ icon_state = icon_broken
+ else
+ if(!opened)
+ if(locked)
+ icon_state = icon_locked
+ else
+ icon_state = icon_closed
+ else
+ icon_state = icon_opened
+
+// for almayer.
+
+// Kitchen preparation room small quantity out of boxes...
+
+//standart organic storage.
+
+/obj/structure/closet/secure_closet/fridge/organic
+ name = "Organic"
+
+/obj/structure/closet/secure_closet/fridge/organic/Initialize()
+ . = ..()
+ for(var/i in 1 to 2)
+ new /obj/item/reagent_container/food/snacks/grown/apple(src)
+ new /obj/item/reagent_container/food/snacks/grown/cabbage(src)
+ new /obj/item/reagent_container/food/snacks/grown/carrot(src)
+ new /obj/item/reagent_container/food/snacks/grown/mushroom/chanterelle(src)
+ new /obj/item/reagent_container/food/snacks/grown/chili(src)
+ new /obj/item/reagent_container/food/snacks/grown/corn(src)
+ new /obj/item/reagent_container/food/snacks/grown/eggplant(src)
+ new /obj/item/reagent_container/food/snacks/grown/potato(src)
+ new /obj/item/reagent_container/food/snacks/grown/tomato(src)
+ new /obj/item/reagent_container/food/snacks/grown/whitebeet(src)
+ new /obj/item/reagent_container/food/snacks/grown/cherries(src)
+ new /obj/item/reagent_container/food/snacks/grown/lime(src)
+ new /obj/item/reagent_container/food/snacks/grown/lemon(src)
+ new /obj/item/reagent_container/food/snacks/grown/orange(src)
+ new /obj/item/reagent_container/food/snacks/grown/banana(src)
+
+//DRy
+
+/obj/structure/closet/secure_closet/fridge/dry
+ name = "dry"
+
+/obj/structure/closet/secure_closet/fridge/dry/Initialize()
+ . = ..()
+ for(var/i in 1 to 6)
+ new /obj/item/reagent_container/food/snacks/flour(src)
+ for(var/i in 1 to 2)
+ new /obj/item/reagent_container/food/condiment/sugar(src)
+
+//grocery
+
+/obj/structure/closet/secure_closet/fridge/groceries
+ name = "Groceries"
+
+/obj/structure/closet/secure_closet/fridge/groceries/Initialize()
+ . = ..()
+ for(var/i in 1 to 2)
+ new /obj/item/reagent_container/food/drinks/milk(src)
+ new /obj/item/reagent_container/food/drinks/soymilk(src)
+ new /obj/item/storage/fancy/egg_box(src)
+ new /obj/item/reagent_container/food/condiment/enzyme(src)
+
+// Kitchen Reserve big quantity stored in boxes
+
+//meat surplus
+/obj/structure/closet/secure_closet/fridge/meat/stock
+ name = "meat"
+
+/obj/structure/closet/secure_closet/fridge/meat/stock/Initialize()
+ . = ..()
+ for(var/i in 1 to 2)
+ new /obj/item/storage/box/meat(src)
+
+//fish surplus
+/obj/structure/closet/secure_closet/fridge/fish/stock
+ name = "fish"
+
+/obj/structure/closet/secure_closet/fridge/fish/stock/Initialize()
+ . = ..()
+ for(var/i in 1 to 2)
+ new /obj/item/storage/box/fish(src)
+
+//groceries to hold milk in bulk
+/obj/structure/closet/secure_closet/fridge/groceries/stock
+ name = "Groceries"
+
+/obj/structure/closet/secure_closet/fridge/groceries/stock/Initialize()
+ . = ..()
+ for(var/i in 1 to 2)
+ new /obj/item/storage/box/milk(src)
+ new /obj/item/storage/box/soymilk(src)
+ for(var/i in 1 to 7)
+ new /obj/item/storage/fancy/egg_box(src)
+ new /obj/item/storage/box/enzyme(src)
+
+//dry storage for dry food only... not a fridge
+/obj/structure/closet/secure_closet/fridge/dry/stock
+ name = "dry"
+
+/obj/structure/closet/secure_closet/fridge/dry/stock/Initialize()
+ . = ..()
+ for(var/i in 1 to 4)
+ new /obj/item/storage/box/flour(src)
+ new /obj/item/storage/box/sugar(src)
+
+// organic storage in bulk
+
+/obj/structure/closet/secure_closet/fridge/organic/stock
+ name = "Organic"
+
+/obj/structure/closet/secure_closet/fridge/organic/stock/Initialize()
+ . = ..()
+ new /obj/item/storage/box/apple(src)
+ new /obj/item/storage/box/banana(src)
+ new /obj/item/storage/box/chanterelle(src)
+ new /obj/item/storage/box/cherries(src)
+ new /obj/item/storage/box/chili(src)
+ new /obj/item/storage/box/cabbage(src)
+ new /obj/item/storage/box/carrot(src)
+ new /obj/item/storage/box/corn(src)
+ new /obj/item/storage/box/eggplant(src)
+ new /obj/item/storage/box/lemon(src)
+ new /obj/item/storage/box/lime(src)
+ new /obj/item/storage/box/orange(src)
+ new /obj/item/storage/box/potato(src)
+ new /obj/item/storage/box/tomato(src)
+ new /obj/item/storage/box/whitebeet(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index ed0b1ae05c08..ba974a8e722a 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -30,6 +30,7 @@
return 0
/obj/structure/closet/secure_closet/emp_act(severity)
+ . = ..()
for(var/obj/O in src)
O.emp_act(severity)
if(!broken)
@@ -42,7 +43,6 @@
else
src.req_access = list()
src.req_access += pick(get_access(ACCESS_LIST_MARINE_MAIN))
- ..()
/obj/structure/closet/secure_closet/proc/togglelock(mob/living/user)
if(src.opened)
diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm
index 2f2877ba7539..f1b58e6f657b 100644
--- a/code/game/objects/structures/crates_lockers/largecrate.dm
+++ b/code/game/objects/structures/crates_lockers/largecrate.dm
@@ -28,9 +28,8 @@
material_sheet = new parts_type(current_turf, 2)
// Move the objects back to the turf, above the crate material
- for(var/atom/movable/moving_atom in contents)
- var/atom/movable/current_atom = contents[1]
- current_atom.forceMove(current_turf)
+ for(var/atom/movable/moving_atom as anything in contents)
+ moving_atom.forceMove(current_turf)
deconstruct(TRUE)
diff --git a/code/game/objects/structures/crates_lockers/secure_crates.dm b/code/game/objects/structures/crates_lockers/secure_crates.dm
index f06a15da7115..6b025a57c78b 100644
--- a/code/game/objects/structures/crates_lockers/secure_crates.dm
+++ b/code/game/objects/structures/crates_lockers/secure_crates.dm
@@ -87,6 +87,7 @@
..()
/obj/structure/closet/crate/secure/emp_act(severity)
+ . = ..()
for(var/obj/O in src)
O.emp_act(severity)
if(!broken && !opened && prob(50/severity))
@@ -106,7 +107,6 @@
else
src.req_access = list()
src.req_access += pick(get_access(ACCESS_LIST_MARINE_MAIN))
- ..()
//------------------------------------
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index 7b54f0447fae..e4ee4a1b662b 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -5,13 +5,15 @@
icon_state = "extinguisher"
anchored = TRUE
density = FALSE
- var/obj/item/tool/extinguisher/has_extinguisher = new/obj/item/tool/extinguisher
+ var/obj/item/tool/extinguisher/has_extinguisher
var/opened = 0
var/base_icon
/obj/structure/extinguisher_cabinet/Initialize()
. = ..()
base_icon = initial(icon_state)
+ has_extinguisher = new /obj/item/tool/extinguisher()
+ has_extinguisher.forceMove(src)
/obj/structure/extinguisher_cabinet/lifeboat
name = "extinguisher cabinet"
@@ -21,15 +23,15 @@
/obj/structure/extinguisher_cabinet/alt
icon_state = "extinguisher_alt"
-/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
+/obj/structure/extinguisher_cabinet/attackby(obj/item/item, mob/user)
if(isrobot(user))
return
- if(istype(O, /obj/item/tool/extinguisher))
+ if(istype(item, /obj/item/tool/extinguisher))
if(!has_extinguisher && opened)
user.drop_held_item()
- contents += O
- has_extinguisher = O
- to_chat(user, SPAN_NOTICE("You place [O] in [src]."))
+ item.forceMove(src)
+ has_extinguisher = item
+ to_chat(user, SPAN_NOTICE("You place [item] in [src]."))
else
opened = !opened
else
@@ -45,7 +47,7 @@
user.put_in_hands(has_extinguisher)
to_chat(user, SPAN_NOTICE("You take [has_extinguisher] from [src]."))
has_extinguisher = null
- opened = 1
+ opened = TRUE
else
opened = !opened
update_icon()
diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm
index b29c69e8af18..db24dfdfebdd 100644
--- a/code/game/objects/structures/fence.dm
+++ b/code/game/objects/structures/fence.dm
@@ -209,7 +209,7 @@
//This proc is used to update the icons of nearby windows.
/obj/structure/fence/proc/update_nearby_icons()
update_icon()
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
for(var/obj/structure/fence/W in get_step(src, direction))
W.update_icon()
diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm
index b1e950dd18f0..0e4a20cf989a 100644
--- a/code/game/objects/structures/flora.dm
+++ b/code/game/objects/structures/flora.dm
@@ -73,7 +73,7 @@ PLANT_CUT_MACHETE = 3 = Needs at least a machete to be cut down
/obj/structure/flora/proc/spread_fire()
SIGNAL_HANDLER
- for(var/D in cardinal) //Spread fire
+ for(var/D in GLOB.cardinals) //Spread fire
var/turf/T = get_step(src.loc, D)
if(T)
for(var/obj/structure/flora/F in T)
@@ -725,7 +725,7 @@ ICEY GRASS. IT LOOKS LIKE IT'S MADE OF ICE.
//this bush marks the edge of the map, you can't destroy it
to_chat(user, SPAN_DANGER("You flail away at the undergrowth, but it's too thick here."))
else
- user.visible_message(SPAN_DANGER("[user] flails away at the [src] with [I]."),SPAN_DANGER("You flail away at the [src] with [I]."))
+ user.visible_message(SPAN_DANGER("[user] flails away at [src] with [I]."), SPAN_DANGER("You flail away at [src] with [I]."))
playsound(src.loc, 'sound/effects/vegetation_hit.ogg', 25, 1)
health -= damage
if(health < 0)
@@ -758,4 +758,3 @@ ICEY GRASS. IT LOOKS LIKE IT'S MADE OF ICE.
desc = "Looks like some of that fruit might be edible."
icon_tag = "plant"
variations = 7
-
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 0f864ee2f116..063f6a337290 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -166,7 +166,7 @@
if (ST.use(1))
var/obj/structure/window/WD = new wtype(loc)
WD.set_constructed_window(dir_to_set)
- to_chat(user, SPAN_NOTICE("You place the [WD] on [src]."))
+ to_chat(user, SPAN_NOTICE("You place [WD] on [src]."))
return
//window placing end
diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm
index d2b3d36b5920..dd427adfabb9 100644
--- a/code/game/objects/structures/lattice.dm
+++ b/code/game/objects/structures/lattice.dm
@@ -19,14 +19,14 @@
icon = 'icons/obj/structures/props/smoothlattice.dmi'
icon_state = "latticeblank"
updateOverlays()
- for (var/dir in cardinal)
+ for (var/dir in GLOB.cardinals)
var/obj/structure/lattice/L
if(locate(/obj/structure/lattice, get_step(src, dir)))
L = locate(/obj/structure/lattice, get_step(src, dir))
L.updateOverlays()
/obj/structure/lattice/Destroy()
- for (var/dir in cardinal)
+ for (var/dir in GLOB.cardinals)
var/obj/structure/lattice/L
if(locate(/obj/structure/lattice, get_step(src, dir)))
L = locate(/obj/structure/lattice, get_step(src, dir))
@@ -73,7 +73,7 @@
var/dir_sum = 0
- for (var/direction in cardinal)
+ for (var/direction in GLOB.cardinals)
if(locate(/obj/structure/lattice, get_step(src, direction)))
dir_sum += direction
else
diff --git a/code/game/objects/structures/props.dm b/code/game/objects/structures/props.dm
index bd5610487ea0..e14eee13b1dd 100644
--- a/code/game/objects/structures/props.dm
+++ b/code/game/objects/structures/props.dm
@@ -805,14 +805,14 @@
/obj/structure/prop/brazier/campfire/attackby(obj/item/attacking_item, mob/user)
if(!istype(attacking_item, /obj/item/stack/sheet/wood))
- to_chat(SPAN_NOTICE("You cannot fuel [src] with [attacking_item]."))
+ to_chat(user, SPAN_NOTICE("You cannot fuel [src] with [attacking_item]."))
return
var/obj/item/stack/sheet/wood/fuel = attacking_item
if(remaining_fuel >= initial(remaining_fuel))
to_chat(user, SPAN_NOTICE("You cannot fuel [src] further."))
return
if(!fuel.use(1))
- to_chat(SPAN_NOTICE("You do not have enough [attacking_item] to fuel [src]."))
+ to_chat(user, SPAN_NOTICE("You do not have enough [attacking_item] to fuel [src]."))
return
visible_message(SPAN_NOTICE("[user] fuels [src] with [fuel]."))
remaining_fuel++
@@ -1179,7 +1179,7 @@
new_info_tag.fallen_names = list(dogtag_name)
new_info_tag.fallen_assgns = list(dogtag_assign)
new_info_tag.fallen_blood_types = list(dogtag_blood)
- fallen_list_cross -= dogtag_name
+ GLOB.fallen_list_cross -= dogtag_name
return ..()
/obj/structure/prop/wooden_cross/attackby(obj/item/W, mob/living/user)
@@ -1187,18 +1187,18 @@
var/obj/item/dogtag/dog = W
if(!tagged)
tagged = TRUE
- user.visible_message(SPAN_NOTICE("[user] drapes the [W] around the [src]."))
+ user.visible_message(SPAN_NOTICE("[user] drapes [W] around [src]."))
dogtag_name = popleft(dog.fallen_names)
dogtag_assign = popleft(dog.fallen_assgns)
dogtag_blood = popleft(dog.fallen_blood_types)
- fallen_list_cross += dogtag_name
+ GLOB.fallen_list_cross += dogtag_name
update_icon()
if(!length(dog.fallen_names))
qdel(dog)
else
return
else
- to_chat(user, SPAN_WARNING("There's already a dog tag on the [src]!"))
+ to_chat(user, SPAN_WARNING("There's already a dog tag on [src]!"))
balloon_alert(user, "already a tag here!")
if(istype(W, /obj/item/clothing/head))
@@ -1372,4 +1372,3 @@
if(initial(emote.sound))
playsound(loc, initial(emote.sound), 50, FALSE)
return TRUE
-
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 24598e7460bb..34b0fb01e9d6 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -310,7 +310,7 @@
//////////////////////////////////////////////
//List of all activated medevac stretchers
-var/global/list/activated_medevac_stretchers = list()
+GLOBAL_LIST_EMPTY(activated_medevac_stretchers)
/obj/structure/bed/medevac_stretcher
name = "medevac stretcher"
@@ -328,7 +328,7 @@ var/global/list/activated_medevac_stretchers = list()
/obj/structure/bed/medevac_stretcher/Destroy()
if(stretcher_activated)
stretcher_activated = FALSE
- activated_medevac_stretchers -= src
+ GLOB.activated_medevac_stretchers -= src
if(linked_medevac)
linked_medevac.linked_stretcher = null
linked_medevac = null
@@ -366,7 +366,7 @@ var/global/list/activated_medevac_stretchers = list()
if(stretcher_activated)
stretcher_activated = FALSE
- activated_medevac_stretchers -= src
+ GLOB.activated_medevac_stretchers -= src
if(linked_medevac)
linked_medevac.linked_stretcher = null
linked_medevac = null
@@ -384,7 +384,7 @@ var/global/list/activated_medevac_stretchers = list()
return
stretcher_activated = TRUE
- activated_medevac_stretchers += src
+ GLOB.activated_medevac_stretchers += src
to_chat(user, SPAN_NOTICE("You activate [src]'s beacon."))
update_icon()
@@ -404,7 +404,17 @@ var/global/list/activated_medevac_stretchers = list()
//bedroll
/obj/structure/bed/bedroll
- name = "bedroll"
- desc = "bedroll"
+ name = "unfolded bedroll"
+ desc = "Perfect for those long missions, when there's nowhere else to sleep, you remembered to bring at least one thing of comfort."
+ icon = 'icons/monkey_icos.dmi'
icon_state = "bedroll_o"
+ buckling_y = 0
+ foldabletype = /obj/item/roller/bedroll
+ accepts_bodybag = FALSE
+
+/obj/item/roller/bedroll
+ name = "folded bedroll"
+ desc = "A standard issue USCMC bedroll, They've been in service for as long as you can remember. The tag on it states to unfold it before rest, but who needs rules anyway, right?"
icon = 'icons/monkey_icos.dmi'
+ icon_state = "bedroll"
+ rollertype = /obj/structure/bed/bedroll
diff --git a/code/game/objects/structures/surface.dm b/code/game/objects/structures/surface.dm
index efc69002424f..13a81af2dc3d 100644
--- a/code/game/objects/structures/surface.dm
+++ b/code/game/objects/structures/surface.dm
@@ -1,159 +1,20 @@
//Surface structures are structures that can have items placed on them
/obj/structure/surface
health = 100
- var/list/update_types = list(
- /obj/item/reagent_container/glass,
- /obj/item/storage,
- /obj/item/reagent_container/food/snacks
- )
- //add items there that behave like structures for whatever dumb reason
- var/list/blacklisted_item_types = list(
- /obj/item/device/radio/intercom,
- /obj/item/device/sentry_computer
- )
-/obj/structure/surface/Initialize()
- . = ..()
- return INITIALIZE_HINT_LATELOAD
-
-/obj/structure/surface/LateInitialize()
- attach_all()
- update_icon()
-
-/obj/structure/surface/Destroy()
- detach_all()
- . = ..()
-
-/obj/structure/surface/ex_act(severity, direction, datum/cause_data/cause_data)
- health -= severity
- if(health <= 0)
- var/location = get_turf(src)
- handle_debris(severity, direction)
- detach_all()
- for(var/obj/item/O in loc)
- O.explosion_throw(severity, direction)
- qdel(src)
- if(prob(66))
- create_shrapnel(location, rand(1,4), direction, , /datum/ammo/bullet/shrapnel/light, cause_data)
- return TRUE
-
-/obj/structure/surface/proc/attach_all()
- for(var/obj/item/O in loc)
- if(in_blacklist(O))
- continue
- attach_item(O, FALSE)
- draw_item_overlays()
-
-/obj/structure/surface/proc/in_blacklist(obj/item/O)
- for(var/allowed_type in blacklisted_item_types)
- if(istype(O, allowed_type))
- return TRUE
- return FALSE
-
-/obj/structure/surface/proc/attach_item(obj/item/O, update = TRUE)
- if(!O)
+/obj/structure/surface/attackby(obj/item/attacking_item, mob/user, click_data)
+ if(!user.drop_inv_item_to_loc(attacking_item, loc))
return
- if(O.luminosity) //it can't make light as an overlay
- return
- O.forceMove(src)
- RegisterSignal(O, COMSIG_ATOM_DECORATED, PROC_REF(decorate_update))
- if(update)
- draw_item_overlays()
-
-/obj/structure/surface/proc/detach_item(obj/item/O)
- O.scatter_item()
- UnregisterSignal(O, COMSIG_ATOM_DECORATED)
- draw_item_overlays()
- return
-
-/obj/structure/surface/proc/decorate_update(obj/item/O)
- SIGNAL_HANDLER
- draw_item_overlays()
-/obj/structure/surface/proc/detach_all()
- overlays.Cut()
- for(var/obj/item/O in contents)
- UnregisterSignal(O, COMSIG_ATOM_DECORATED)
- O.forceMove(loc)
+ auto_align(attacking_item, click_data)
+ user.next_move = world.time + 2
+ return TRUE
-/obj/structure/surface/proc/get_item(list/click_data)
- var/i = LAZYLEN(contents)
- if(!click_data)
- return
- if(i < 1)
- return FALSE
- for(i, i >= 1, i--)//starting from the end because that's where the topmost is
- var/obj/item/O = contents[i]
- var/bounds_x = text2num(click_data["icon-x"])-1 - O.pixel_x
- var/bounds_y = text2num(click_data["icon-y"])-1 - O.pixel_y
- if(bounds_x < 0 || bounds_y < 0)
- continue
- var/icon/I = icon(O.icon, O.icon_state)
- var/p = I.GetPixel(bounds_x, bounds_y)
- if(p)
- return O
- return FALSE
-
-/obj/structure/surface/proc/draw_item_overlays()
- overlays.Cut()
- for(var/obj/item/O in contents)
- var/image/I = image(O.icon)
- I.appearance = O.appearance
- I.appearance_flags |= RESET_COLOR
- I.overlays = O.overlays
- LAZYADD(overlays, I)
-
-/obj/structure/surface/clicked(mob/user, list/mods)
- if(mods["shift"] && !mods["middle"])
- var/obj/item/O = get_item(mods)
- if(!O)
- return ..()
- if(O.can_examine(user))
- O.examine(user)
- return TRUE
- ..()
-
-/obj/structure/surface/proc/try_to_open_container(mob/user, mods)
- if(!Adjacent(user))
- return
-
- if(ishuman(user) || isrobot(user))
- var/obj/item/O = get_item(mods)
- if(O && isstorage(O))
- var/obj/item/storage/S = O
- S.open(usr)
- return TRUE
-
-/obj/structure/surface/attack_hand(mob/user, click_data)
- . = ..()
- if(click_data && click_data["alt"])
- return
- var/obj/item/O = get_item(click_data)
- if(!O)
- return
- O.attack_hand(user)
- if(!LAZYISIN(contents, O))//in case attack_hand did not pick up the item
- detach_item(O)
-
-/obj/structure/surface/attackby(obj/item/W, mob/user, click_data)
- var/obj/item/O = get_item(click_data)
- if(!O || click_data["ctrl"])//holding the ctrl key will force it to place the object
- // Placing stuff on tables
- if(user.drop_inv_item_to_loc(W, loc))
- auto_align(W, click_data)
- user.next_move = world.time + 2
- return TRUE
- else if(!O.attackby(W, user))
- W.afterattack(O, user, TRUE)
- for(var/type in update_types)
- if(istype(O, type))
- draw_item_overlays()
-
-/obj/structure/surface/proc/auto_align(obj/item/W, click_data)
- if(!W.center_of_mass) // Clothing, material stacks, generally items with large sprites where exact placement would be unhandy.
- W.pixel_x = rand(-W.randpixel, W.randpixel)
- W.pixel_y = rand(-W.randpixel, W.randpixel)
- W.pixel_z = 0
+/obj/structure/surface/proc/auto_align(obj/item/new_item, click_data)
+ if(!new_item.center_of_mass) // Clothing, material stacks, generally items with large sprites where exact placement would be unhandy.
+ new_item.pixel_x = rand(-new_item.randpixel, new_item.randpixel)
+ new_item.pixel_y = rand(-new_item.randpixel, new_item.randpixel)
+ new_item.pixel_z = 0
return
if(!click_data)
@@ -169,16 +30,8 @@
var/cell_x = Clamp(round(mouse_x/CELLSIZE), 0, CELLS-1) // Ranging from 0 to CELLS-1
var/cell_y = Clamp(round(mouse_y/CELLSIZE), 0, CELLS-1)
- var/list/center = cached_key_number_decode(W.center_of_mass)
-
- W.pixel_x = (CELLSIZE * (cell_x + 0.5)) - center["x"]
- W.pixel_y = (CELLSIZE * (cell_y + 0.5)) - center["y"]
- W.pixel_z = 0
-
- if(!(W.flags_item & NOTABLEMERGE))
- attach_item(W)
+ var/list/center = cached_key_number_decode(new_item.center_of_mass)
-/obj/structure/surface/MouseDrop(atom/over)
- . = ..()
- if(over == usr && usr && usr.client && usr.client.lmb_last_mousedown_mods)
- return try_to_open_container(usr, usr.client.lmb_last_mousedown_mods)
+ new_item.pixel_x = (CELLSIZE * (cell_x + 0.5)) - center["x"]
+ new_item.pixel_y = (CELLSIZE * (cell_y + 0.5)) - center["y"]
+ new_item.pixel_z = 0
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index db3ce98339a3..f9f5105fbf2f 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -143,7 +143,7 @@
dir_sum += 128
var/table_type = 0 //stand_alone table
- if((dir_sum%16) in cardinal)
+ if((dir_sum%16) in GLOB.cardinals)
table_type = 1 //endtable
dir_sum %= 16
if((dir_sum%16) in list(3, 12))
@@ -274,7 +274,9 @@
var/mob/living/M = G.grabbed_thing
if(user.a_intent == INTENT_HARM)
if(user.grab_level > GRAB_AGGRESSIVE)
- if (prob(15)) M.apply_effect(5, WEAKEN)
+ if (prob(15))
+ M.KnockDown(5)
+ M.Stun(5)
M.apply_damage(8, def_zone = "head")
user.visible_message(SPAN_DANGER("[user] slams [M]'s face against [src]!"),
SPAN_DANGER("You slam [M]'s face against [src]!"))
@@ -284,7 +286,8 @@
return
else if(user.grab_level >= GRAB_AGGRESSIVE)
M.forceMove(loc)
- M.apply_effect(5, WEAKEN)
+ M.KnockDown(5)
+ M.Stun(5)
user.visible_message(SPAN_DANGER("[user] throws [M] on [src]."),
SPAN_DANGER("You throw [M] on [src]."))
return
@@ -434,8 +437,6 @@
verbs -= /obj/structure/surface/table/verb/do_flip
verbs += /obj/structure/surface/table/proc/do_put
- detach_all()
-
var/list/targets = list(get_step(src, dir), get_step(src, turn(dir, 45)), get_step(src, turn(dir, -45)))
for(var/atom/movable/movable_on_table in get_turf(src))
if(!movable_on_table.anchored)
@@ -479,7 +480,6 @@
var/obj/structure/surface/table/T = locate() in get_step(src.loc,D)
if(T && T.flipped && T.dir == src.dir)
T.unflip()
- attach_all()
update_icon()
update_adjacent()
diff --git a/code/game/objects/structures/vulture_spotter.dm b/code/game/objects/structures/vulture_spotter.dm
index ab23a8086759..d90a1ec1615a 100644
--- a/code/game/objects/structures/vulture_spotter.dm
+++ b/code/game/objects/structures/vulture_spotter.dm
@@ -108,7 +108,7 @@
REMOVE_TRAIT(user, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Vulture spotter"))
user.reset_view(null)
user.Move(get_step(src, reverse_direction(src.dir)))
- user.client?.change_view(world_view_size, src)
+ user.client?.change_view(GLOB.world_view_size, src)
user.setDir(dir) //set the direction of the player to the direction the gun is facing
update_pixels(FALSE)
remove_action(user, /datum/action/vulture_tripod_unscope)
@@ -238,7 +238,7 @@
user.pixel_x = 0
user.pixel_y = 0
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
UnregisterSignal(user.client, COMSIG_PARENT_QDELETING)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 60c37fcdc607..daf4a47a8ef6 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -151,7 +151,7 @@
GM.apply_damage(5, OXY)
swirlie = null
else
- user.visible_message(SPAN_DANGER("[user] slams [GM.name] into the [src]!"), SPAN_NOTICE("You slam [GM.name] into the [src]!"))
+ user.visible_message(SPAN_DANGER("[user] slams [GM.name] into [src]!"), SPAN_NOTICE("You slam [GM.name] into [src]!"))
GM.apply_damage(8, BRUTE)
else
to_chat(user, SPAN_NOTICE("You need a tighter grip."))
@@ -189,7 +189,7 @@
if(!GM.loc == get_turf(src))
to_chat(user, SPAN_NOTICE("[GM.name] needs to be on the urinal."))
return
- user.visible_message(SPAN_DANGER("[user] slams [GM.name] into the [src]!"), SPAN_NOTICE("You slam [GM.name] into the [src]!"))
+ user.visible_message(SPAN_DANGER("[user] slams [GM.name] into [src]!"), SPAN_NOTICE("You slam [GM.name] into [src]!"))
GM.apply_damage(8, BRUTE)
else
to_chat(user, SPAN_NOTICE("You need a tighter grip."))
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index d0651eb5e993..61552896f6f1 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -81,7 +81,7 @@
junction = 0
if(anchored)
var/turf/TU
- for(var/dirn in cardinal)
+ for(var/dirn in GLOB.cardinals)
TU = get_step(src, dirn)
var/obj/structure/window/W = locate() in TU
if(W && W.anchored && W.density && W.legacy_full) //Only counts anchored, non-destroyed, legacy full-tile windows.
@@ -353,7 +353,7 @@
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
update_icon()
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
for(var/obj/structure/window/W in get_step(src, direction))
W.update_icon()
@@ -865,7 +865,7 @@
return
triggered = TRUE
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
if(direction == from_dir)
continue //doesn't check backwards
for(var/obj/structure/window/framed/prison/reinforced/hull/W in get_step(src,direction) )
@@ -958,7 +958,7 @@
return
triggered = 1
- for(var/direction in cardinal)
+ for(var/direction in GLOB.cardinals)
if(direction == from_dir)
continue //doesn't check backwards
diff --git a/code/game/sim_manager/datums/simulator.dm b/code/game/sim_manager/datums/simulator.dm
index 04ddb7faa088..bf99c65ee66f 100644
--- a/code/game/sim_manager/datums/simulator.dm
+++ b/code/game/sim_manager/datums/simulator.dm
@@ -37,7 +37,7 @@
if(!sim_camera)
to_chat(user, SPAN_WARNING("GPU damaged! Unable to start simulation."))
return
- if(user.client.view != world_view_size)
+ if(user.client.view != GLOB.world_view_size)
to_chat(user, SPAN_WARNING("You're too busy looking at something else."))
return
user.reset_view(sim_camera)
diff --git a/code/game/smoothwall.dm b/code/game/smoothwall.dm
index eb81861a3b1f..b9284639976c 100644
--- a/code/game/smoothwall.dm
+++ b/code/game/smoothwall.dm
@@ -13,7 +13,7 @@
var/j //second iterator
var/k //third iterator (I know, that's a lot, but I'm trying to make this modular, so bear with me)
- for(i in cardinal) //For all cardinal dir turfs
+ for(i in GLOB.cardinals) //For all cardinal dir turfs
T = get_step(src, i)
if(!istype(T)) continue
for(j in tiles_with) //And for all types that we tile with
@@ -34,7 +34,7 @@
var/j //second iterator
var/atom/k //third iterator (I know, that's a lot, but I'm trying to make this modular, so bear with me)
- for(i in cardinal) //For all cardinal dir turfs
+ for(i in GLOB.cardinals) //For all cardinal dir turfs
T = get_step(src, i)
if(!istype(T)) continue
for(j in tiles_with) //And for all types that we tile with
@@ -61,7 +61,7 @@
var/j
var/k
- for(i in cardinal)
+ for(i in GLOB.cardinals)
T = get_step(src, i)
if(!istype(T)) continue
for(j in tiles_with)
@@ -93,7 +93,7 @@
var/j
var/k
- for(i in cardinal)
+ for(i in GLOB.cardinals)
T = get_step(src, i)
if(!istype(T)) continue
for(j in tiles_with)
@@ -227,7 +227,7 @@
var/j //second iterator
var/k //third iterator (I know, that's a lot, but I'm trying to make this modular, so bear with me)
- for(i in alldirs) //For all cardinal dir turfs
+ for(i in GLOB.alldirs) //For all cardinal dir turfs
T = get_step(src, i)
if(!istype(T)) continue
for(j in tiles_with) //And for all types that we tile with
@@ -249,7 +249,7 @@
var/j //second iterator
var/k //third iterator (I know, that's a lot, but I'm trying to make this modular, so bear with me)
- for(i in alldirs) //For all cardinal dir turfs
+ for(i in GLOB.alldirs) //For all cardinal dir turfs
T = get_step(src, i)
if(!istype(T)) continue
for(j in tiles_with) //And for all types that we tile with
diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm
index e8f40c1d52b3..e4e4923173bf 100644
--- a/code/game/supplyshuttle.dm
+++ b/code/game/supplyshuttle.dm
@@ -10,7 +10,7 @@
GLOBAL_LIST_EMPTY_TYPED(asrs_empty_space_tiles_list, /turf/open/floor/almayer/empty)
-var/datum/controller/supply/supply_controller = new()
+GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
/area/supply
ceiling = CEILING_METAL
@@ -113,11 +113,11 @@ var/datum/controller/supply/supply_controller = new()
/obj/structure/machinery/computer/supplycomp/Initialize()
. = ..()
- LAZYADD(supply_controller.bound_supply_computer_list, src)
+ LAZYADD(GLOB.supply_controller.bound_supply_computer_list, src)
/obj/structure/machinery/computer/supplycomp/Destroy()
. = ..()
- LAZYREMOVE(supply_controller.bound_supply_computer_list, src)
+ LAZYREMOVE(GLOB.supply_controller.bound_supply_computer_list, src)
/obj/structure/machinery/computer/supplycomp/attackby(obj/item/hit_item, mob/user)
if(istype(hit_item, /obj/item/spacecash))
@@ -127,7 +127,7 @@ var/datum/controller/supply/supply_controller = new()
to_chat(user, SPAN_NOTICE("You find a small horizontal slot at the bottom of the console. You try to feed \the [slotted_cash] into it, but it rejects it! Maybe it's counterfeit?"))
return
to_chat(user, SPAN_NOTICE("You find a small horizontal slot at the bottom of the console. You feed \the [slotted_cash] into it.."))
- supply_controller.black_market_points += slotted_cash.worth
+ GLOB.supply_controller.black_market_points += slotted_cash.worth
qdel(slotted_cash)
else
to_chat(user, SPAN_NOTICE("You find a small horizontal slot at the bottom of the console. You try to feed \the [hit_item] into it, but it's seemingly blocked off from the inside."))
@@ -136,17 +136,17 @@ var/datum/controller/supply/supply_controller = new()
/obj/structure/machinery/computer/supplycomp/proc/toggle_contraband(contraband_enabled = FALSE)
can_order_contraband = contraband_enabled
- for(var/obj/structure/machinery/computer/supplycomp/computer as anything in supply_controller.bound_supply_computer_list)
+ for(var/obj/structure/machinery/computer/supplycomp/computer as anything in GLOB.supply_controller.bound_supply_computer_list)
if(computer.can_order_contraband)
- supply_controller.black_market_enabled = TRUE
+ GLOB.supply_controller.black_market_enabled = TRUE
return
- supply_controller.black_market_enabled = FALSE
+ GLOB.supply_controller.black_market_enabled = FALSE
//If any computers are able to order contraband, it's enabled. Otherwise, it's disabled!
/// Prevents use of black market, even if it is otherwise enabled. If any computer has black market locked out, it applies across all of the currently established ones.
/obj/structure/machinery/computer/supplycomp/proc/lock_black_market(market_locked = FALSE)
- for(var/obj/structure/machinery/computer/supplycomp/computer as anything in supply_controller.bound_supply_computer_list)
+ for(var/obj/structure/machinery/computer/supplycomp/computer as anything in GLOB.supply_controller.bound_supply_computer_list)
if(market_locked)
computer.black_market_lockout = TRUE
@@ -194,7 +194,7 @@ var/datum/controller/supply/supply_controller = new()
var/list/data = list()
var/list/squad_list = list()
- for(var/datum/squad/current_squad in RoleAuthority.squads)
+ for(var/datum/squad/current_squad in GLOB.RoleAuthority.squads)
if(current_squad.active && current_squad.faction == faction && current_squad.equipment_color)
squad_list += list(list(
"squad_name" = current_squad.name,
@@ -327,7 +327,7 @@ var/datum/controller/supply/supply_controller = new()
M.count_niche_stat(STATISTICS_NICHE_CRATES)
playsound(C.loc,'sound/effects/bamf.ogg', 50, 1) //Ehh
- var/obj/structure/droppod/supply/pod = new()
+ var/obj/structure/droppod/supply/pod = new(null, C)
C.forceMove(pod)
pod.launch(T)
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[C.name]' supply drop launched! Another launch will be available in five minutes.")]")
@@ -453,7 +453,7 @@ var/datum/controller/supply/supply_controller = new()
if(processing)
iteration++
points += points_per_process
- if(iteration >= 20 && iteration % base_random_crate_interval == 0 && supply_controller.shoppinglist.len <= 20)
+ if(iteration >= 20 && iteration % base_random_crate_interval == 0 && GLOB.supply_controller.shoppinglist.len <= 20)
add_random_crates()
crate_iteration++
sleep(processing_interval)
@@ -480,18 +480,18 @@ var/datum/controller/supply/supply_controller = new()
//This is a weighted pick based upon their cost.
//Their cost will go up if the crate is picked
/datum/controller/supply/proc/add_random_crate()
- var/datum/supply_packs/C = supply_controller.pick_weighted_crate(random_supply_packs)
+ var/datum/supply_packs/C = GLOB.supply_controller.pick_weighted_crate(random_supply_packs)
if(C == null)
return
C.cost = round(C.cost * ASRS_COST_MULTIPLIER) //We still do this to raise the weight
//We have to create a supply order to make the system spawn it. Here we transform a crate into an order.
var/datum/supply_order/supply_order = new /datum/supply_order()
- supply_order.ordernum = supply_controller.ordernum
+ supply_order.ordernum = GLOB.supply_controller.ordernum
supply_order.object = C
supply_order.orderedby = "ASRS"
supply_order.approvedby = "ASRS"
//We add the order to the shopping list
- supply_controller.shoppinglist += supply_order
+ GLOB.supply_controller.shoppinglist += supply_order
//Here we weigh the crate based upon it's cost
/datum/controller/supply/proc/pick_weighted_crate(list/cratelist)
@@ -590,8 +590,8 @@ var/datum/controller/supply/supply_controller = new()
if(order.object.contraband == TRUE && prob(5))
// Mendoza loaded the wrong order in. What a dunce!
var/list/contraband_list
- 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(supply_pack.contraband == FALSE)
continue
LAZYADD(contraband_list, supply_pack)
@@ -711,10 +711,10 @@ var/datum/controller/supply/supply_controller = new()
if(temp)
dat = temp
else
- var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
+ var/datum/shuttle/ferry/supply/shuttle = GLOB.supply_controller.shuttle
if (shuttle)
dat += {"Location: [shuttle.has_arrive_time() ? "Raising platform":shuttle.at_station() ? "Raised":"Lowered"]
-
Supply budget: $[supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
+
Supply budget: $[GLOB.supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
\nRequest items
View approved orders
View requests
@@ -735,18 +735,18 @@ var/datum/controller/supply/supply_controller = new()
//all_supply_groups
//Request what?
last_viewed_group = "categories"
- temp = "Supply budget: $[supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
+ temp = "Supply budget: $[GLOB.supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
temp += "Main Menu
"
temp += "Select a category
"
- for(var/supply_group_name in supply_controller.all_supply_groups)
+ for(var/supply_group_name in GLOB.supply_controller.all_supply_groups)
temp += "[supply_group_name]
"
else
last_viewed_group = href_list["order"]
- temp = "Supply budget: $[supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
+ temp = "Supply budget: $[GLOB.supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
temp += "Back to all categories
"
temp += "Request from: [last_viewed_group]
"
- for(var/supply_name in supply_controller.supply_packs )
- var/datum/supply_packs/N = supply_controller.supply_packs[supply_name]
+ for(var/supply_name in GLOB.supply_controller.supply_packs )
+ var/datum/supply_packs/N = GLOB.supply_controller.supply_packs[supply_name]
if(N.contraband || N.group != last_viewed_group || !N.buyable) continue //Have to send the type instead of a reference to
temp += "[supply_name] Cost: $[round(N.cost) * SUPPLY_TO_MONEY_MUPLTIPLIER]
" //the obj because it would get caught by the garbage
@@ -757,7 +757,7 @@ var/datum/controller/supply/supply_controller = new()
return
//Find the correct supply_pack datum
- var/datum/supply_packs/supply_pack = supply_controller.supply_packs[href_list["doorder"]]
+ var/datum/supply_packs/supply_pack = GLOB.supply_controller.supply_packs[href_list["doorder"]]
if(!istype(supply_pack)) return
if(supply_pack.contraband || !supply_pack.buyable)
@@ -777,11 +777,11 @@ var/datum/controller/supply/supply_controller = new()
else if(ishighersilicon(usr))
idname = usr.real_name
- supply_controller.ordernum++
+ GLOB.supply_controller.ordernum++
var/obj/item/paper/reqform = new /obj/item/paper(loc)
reqform.name = "Requisition Form - [supply_pack.name]"
- reqform.info += "[station_name] Supply Requisition Form
"
- reqform.info += "INDEX: #[supply_controller.ordernum]
"
+ reqform.info += "[MAIN_SHIP_NAME] Supply Requisition Form
"
+ reqform.info += "INDEX: #[GLOB.supply_controller.ordernum]
"
reqform.info += "REQUESTED BY: [idname]
"
reqform.info += "RANK: [idrank]
"
reqform.info += "REASON: [reason]
"
@@ -797,24 +797,24 @@ var/datum/controller/supply/supply_controller = new()
//make our supply_order datum
var/datum/supply_order/supply_order = new /datum/supply_order()
- supply_order.ordernum = supply_controller.ordernum
+ supply_order.ordernum = GLOB.supply_controller.ordernum
supply_order.object = supply_pack
supply_order.orderedby = idname
- supply_controller.requestlist += supply_order
+ GLOB.supply_controller.requestlist += supply_order
temp = "Thanks for your request. The cargo team will process it as soon as possible.
"
temp += "
Back Main Menu"
else if (href_list["vieworders"])
temp = "Current approved orders:
"
- for(var/S in supply_controller.shoppinglist)
+ for(var/S in GLOB.supply_controller.shoppinglist)
var/datum/supply_order/SO = S
temp += "[SO.object.name] approved by [SO.approvedby]
"
temp += "
OK"
else if (href_list["viewrequests"])
temp = "Current requests:
"
- for(var/S in supply_controller.requestlist)
+ for(var/S in GLOB.supply_controller.requestlist)
var/datum/supply_order/SO = S
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]
"
temp += "
OK"
@@ -840,7 +840,7 @@ var/datum/controller/supply/supply_controller = new()
if (temp)
dat = temp
else
- var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
+ var/datum/shuttle/ferry/supply/shuttle = GLOB.supply_controller.shuttle
if (shuttle)
dat += "\nPlatform position: "
if (shuttle.has_arrive_time())
@@ -874,7 +874,7 @@ var/datum/controller/supply/supply_controller = new()
dat += "
\n
"
- dat += {"
\nSupply budget: $[supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
\n
+ dat += {"
\nSupply budget: $[GLOB.supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
\n
\nOrder items
\n
\nView requests
\n
\nView orders
\n
@@ -886,10 +886,10 @@ var/datum/controller/supply/supply_controller = new()
/obj/structure/machinery/computer/supplycomp/Topic(href, href_list)
if(!is_mainship_level(z)) 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
- var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
+ var/datum/shuttle/ferry/supply/shuttle = GLOB.supply_controller.shuttle
if (!shuttle)
world.log << "## ERROR: Eek. The supply/shuttle datum is missing somehow."
return
@@ -927,10 +927,10 @@ var/datum/controller/supply/supply_controller = new()
//all_supply_groups
//Request what?
last_viewed_group = "categories"
- temp = "Supply budget: $[supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
+ temp = "Supply budget: $[GLOB.supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
temp += "Main Menu
"
temp += "Select a category
"
- for(var/supply_group_name in supply_controller.all_supply_groups)
+ for(var/supply_group_name in GLOB.supply_controller.all_supply_groups)
temp += "[supply_group_name]
"
if(can_order_contraband)
temp += "[SPAN_DANGER("$E4RR301¿")]
"
@@ -938,14 +938,14 @@ var/datum/controller/supply/supply_controller = new()
last_viewed_group = href_list["order"]
if(last_viewed_group == "Black Market")
handle_black_market(temp)
- else if(last_viewed_group in supply_controller.contraband_supply_groups)
+ else if(last_viewed_group in GLOB.supply_controller.contraband_supply_groups)
handle_black_market_groups()
else
- temp = "Supply budget: $[supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
+ temp = "Supply budget: $[GLOB.supply_controller.points * SUPPLY_TO_MONEY_MUPLTIPLIER]
"
temp += "Back to all categories
"
temp += "Request 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.cost) * SUPPLY_TO_MONEY_MUPLTIPLIER]
" //the obj because it would get caught by the garbage
@@ -957,7 +957,7 @@ var/datum/controller/supply/supply_controller = new()
return
//Find the correct supply_pack datum
- var/datum/supply_packs/supply_pack = supply_controller.supply_packs[href_list["doorder"]]
+ var/datum/supply_packs/supply_pack = GLOB.supply_controller.supply_packs[href_list["doorder"]]
if(!istype(supply_pack))
return
@@ -980,11 +980,11 @@ var/datum/controller/supply/supply_controller = new()
else if(isSilicon(usr))
idname = usr.real_name
- supply_controller.ordernum++
+ GLOB.supply_controller.ordernum++
var/obj/item/paper/reqform = new /obj/item/paper(loc)
reqform.name = "Requisition Form - [supply_pack.name]"
- reqform.info += "[station_name] Supply Requisition Form
"
- reqform.info += "INDEX: #[supply_controller.ordernum]
"
+ reqform.info += "[MAIN_SHIP_NAME] Supply Requisition Form
"
+ reqform.info += "INDEX: #[GLOB.supply_controller.ordernum]
"
reqform.info += "REQUESTED BY: [idname]
"
reqform.info += "RANK: [idrank]
"
reqform.info += "REASON: [reason]
"
@@ -1000,10 +1000,10 @@ var/datum/controller/supply/supply_controller = new()
//make our supply_order datum
var/datum/supply_order/supply_order = new /datum/supply_order()
- supply_order.ordernum = supply_controller.ordernum
+ supply_order.ordernum = GLOB.supply_controller.ordernum
supply_order.object = supply_pack
supply_order.orderedby = idname
- supply_controller.requestlist += supply_order
+ GLOB.supply_controller.requestlist += supply_order
temp = "Order request placed.
"
temp += "
Back|Main Menu|Authorize Order"
@@ -1016,29 +1016,29 @@ var/datum/controller/supply/supply_controller = new()
temp = "Invalid Request"
temp += "
Back|Main Menu"
- if(supply_controller.shoppinglist.len > 20)
+ if(GLOB.supply_controller.shoppinglist.len > 20)
to_chat(usr, SPAN_DANGER("Current retrieval load has reached maximum capacity."))
return
- for(var/i=1, i<=supply_controller.requestlist.len, i++)
- var/datum/supply_order/SO = supply_controller.requestlist[i]
+ for(var/i=1, i<=GLOB.supply_controller.requestlist.len, i++)
+ var/datum/supply_order/SO = GLOB.supply_controller.requestlist[i]
if(SO.ordernum == ordernum)
supply_order = SO
supply_pack = supply_order.object
- if(supply_controller.points >= round(supply_pack.cost) && supply_controller.black_market_points >= supply_pack.dollar_cost)
- supply_controller.requestlist.Cut(i,i+1)
- supply_controller.points -= round(supply_pack.cost)
- supply_controller.black_market_points -= round(supply_pack.dollar_cost)
- if(supply_controller.black_market_heat != -1) //-1 Heat means heat is disabled
- supply_controller.black_market_heat = clamp(supply_controller.black_market_heat + supply_pack.crate_heat + (supply_pack.crate_heat * rand(rand(-0.25,0),0.25)), 0, 100) // black market heat added is crate heat +- up to 25% of crate heat
- supply_controller.shoppinglist += supply_order
+ if(GLOB.supply_controller.points >= round(supply_pack.cost) && GLOB.supply_controller.black_market_points >= supply_pack.dollar_cost)
+ GLOB.supply_controller.requestlist.Cut(i,i+1)
+ GLOB.supply_controller.points -= round(supply_pack.cost)
+ GLOB.supply_controller.black_market_points -= round(supply_pack.dollar_cost)
+ if(GLOB.supply_controller.black_market_heat != -1) //-1 Heat means heat is disabled
+ GLOB.supply_controller.black_market_heat = clamp(GLOB.supply_controller.black_market_heat + supply_pack.crate_heat + (supply_pack.crate_heat * rand(rand(-0.25,0),0.25)), 0, 100) // black market heat added is crate heat +- up to 25% of crate heat
+ GLOB.supply_controller.shoppinglist += supply_order
supply_pack.cost = supply_pack.cost * SUPPLY_COST_MULTIPLIER
temp = "Thank you for your order.
"
temp += "
Back Main Menu"
supply_order.approvedby = usr.name
msg_admin_niche("[usr] confirmed supply order of [supply_pack.name].")
- if(supply_controller.black_market_heat == 100)
- supply_controller.black_market_investigation()
+ if(GLOB.supply_controller.black_market_heat == 100)
+ GLOB.supply_controller.black_market_investigation()
var/pack_source = "Cargo Hold"
var/pack_name = supply_pack.name
if(supply_pack.dollar_cost)
@@ -1053,7 +1053,7 @@ var/datum/controller/supply/supply_controller = new()
else if (href_list["vieworders"])
temp = "Current approved orders:
"
- for(var/S in supply_controller.shoppinglist)
+ for(var/S in GLOB.supply_controller.shoppinglist)
var/datum/supply_order/SO = S
temp += "#[SO.ordernum] - [SO.object.name] approved by [SO.approvedby]
"// (Cancel)
"
temp += "
OK"
@@ -1071,7 +1071,7 @@ var/datum/controller/supply/supply_controller = new()
*/
else if (href_list["viewrequests"])
temp = "Current requests:
"
- for(var/S in supply_controller.requestlist)
+ for(var/S in GLOB.supply_controller.requestlist)
var/datum/supply_order/SO = S
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby] Approve Remove
"
@@ -1081,16 +1081,16 @@ var/datum/controller/supply/supply_controller = new()
else if (href_list["rreq"])
var/ordernum = text2num(href_list["rreq"])
temp = "Invalid Request.
"
- for(var/i=1, i<=supply_controller.requestlist.len, i++)
- var/datum/supply_order/SO = supply_controller.requestlist[i]
+ for(var/i=1, i<=GLOB.supply_controller.requestlist.len, i++)
+ var/datum/supply_order/SO = GLOB.supply_controller.requestlist[i]
if(SO.ordernum == ordernum)
- supply_controller.requestlist.Cut(i,i+1)
+ GLOB.supply_controller.requestlist.Cut(i,i+1)
temp = "Request removed.
"
break
temp += "
Back Main Menu"
else if (href_list["clearreq"])
- supply_controller.requestlist.Cut()
+ GLOB.supply_controller.requestlist.Cut()
temp = "List cleared.
"
temp += "
OK"
@@ -1103,28 +1103,28 @@ var/datum/controller/supply/supply_controller = new()
/obj/structure/machinery/computer/supplycomp/proc/handle_black_market()
- temp = "W-Y Dollars: $[supply_controller.black_market_points]
"
+ temp = "W-Y Dollars: $[GLOB.supply_controller.black_market_points]
"
temp += "Back to all categories
"
temp += SPAN_DANGER("ERR0R UNK7OWN C4T2G#!$0-
")
if(black_market_lockout)
temp += "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()
@@ -1315,6 +1315,14 @@ var/datum/controller/supply/supply_controller = new()
/datum/vehicle_order/tank/has_vehicle_lock()
return
+/datum/vehicle_order/tank/broken
+ name = "Smashed M34A2 Longstreet Light Tank"
+ ordered_vehicle = /obj/effect/vehicle_spawner/tank/hull/broken
+
+/datum/vehicle_order/tank/plain
+ name = "M34A2 Longstreet Light Tank"
+ ordered_vehicle = /obj/effect/vehicle_spawner/tank
+
/datum/vehicle_order/apc
name = "M577 Armored Personnel Carrier"
ordered_vehicle = /obj/effect/vehicle_spawner/apc/decrepit
@@ -1327,23 +1335,24 @@ var/datum/controller/supply/supply_controller = new()
name = "M577-CMD Armored Personnel Carrier"
ordered_vehicle = /obj/effect/vehicle_spawner/apc_cmd/decrepit
+/datum/vehicle_order/apc/empty
+ name = "Barebones M577 Armored Personal Carrier"
+ ordered_vehicle = /obj/effect/vehicle_spawner/apc/unarmed/broken
+
/obj/structure/machinery/computer/supplycomp/vehicle/Initialize()
. = ..()
vehicles = list(
- /datum/vehicle_order/apc,
- /datum/vehicle_order/apc/med,
- /datum/vehicle_order/apc/cmd,
+ new /datum/vehicle_order/apc(),
+ new /datum/vehicle_order/apc/med(),
+ new /datum/vehicle_order/apc/cmd(),
)
- for(var/order as anything in vehicles)
- new order
-
- 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)
@@ -1399,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)
@@ -1408,6 +1417,7 @@ var/datum/controller/supply/supply_controller = new()
return
if(!is_admin_level(SSshuttle.vehicle_elevator.z))
+ to_chat(usr, SPAN_WARNING("The elevator needs to be in the cargo bay dock to call a vehicle up. Ask someone to send it away."))
return
if(ismaintdrone(usr))
diff --git a/code/game/turfs/auto_turf.dm b/code/game/turfs/auto_turf.dm
index 45756c30bb9c..e07f7324bcc2 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()
@@ -169,7 +169,7 @@
if(istype(I, /obj/item/lightstick))
var/obj/item/lightstick/L = I
if(locate(/obj/item/lightstick) in get_turf(src))
- to_chat(user, "There's already a [L] at this position!")
+ to_chat(user, "There's already \a [L] at this position!")
return
to_chat(user, "Now planting \the [L].")
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..7d9dd6303c64 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
@@ -292,7 +292,7 @@
if(istype(I, /obj/item/lightstick))
var/obj/item/lightstick/L = I
if(locate(/obj/item/lightstick) in get_turf(src))
- to_chat(user, "There's already a [L] at this position!")
+ to_chat(user, "There's already \a [L] at this position!")
return
to_chat(user, "Now planting \the [L].")
@@ -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"
@@ -787,7 +787,7 @@
if(istype(I, /obj/item/lightstick))
var/obj/item/lightstick/L = I
if(locate(/obj/item/lightstick) in get_turf(src))
- to_chat(user, "There's already a [L] at this position!")
+ to_chat(user, "There's already \a [L] at this position!")
return
to_chat(user, "Now planting \the [L].")
diff --git a/code/game/turfs/snow.dm b/code/game/turfs/snow.dm
index 72b1f35d0aff..f7fb746cfbbc 100644
--- a/code/game/turfs/snow.dm
+++ b/code/game/turfs/snow.dm
@@ -16,7 +16,7 @@
if(istype(I, /obj/item/lightstick))
var/obj/item/lightstick/L = I
if(locate(/obj/item/lightstick) in get_turf(src))
- to_chat(user, "There's already a [L] at this position!")
+ to_chat(user, "There's already \a [L] at this position!")
return
to_chat(user, "Now planting \the [L].")
@@ -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)
@@ -148,6 +148,3 @@
/turf/open/snow/layer3
icon_state = "snow_3"
bleed_layer = 3
-
-
-
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 1b4091eb2aab..3093f8c7771a 100644
--- a/code/game/turfs/walls/wall_types.dm
+++ b/code/game/turfs/walls/wall_types.dm
@@ -28,15 +28,23 @@
/obj/structure/machinery/cm_vending/sorted/cargo_guns/cargo/blend,
)
+ /// The type of wall decoration we use, to avoid the wall changing icon all the time
+ var/decoration_type
+
+/turf/closed/wall/almayer/Initialize(mapload, ...)
+ if(!special_icon && prob(20))
+ decoration_type = rand(0,3)
+ return ..()
+
/turf/closed/wall/almayer/update_icon()
- ..()
- if(special_icon)
- return
+ if(decoration_type == null)
+ return ..()
if(neighbors_list in list(EAST|WEST))
- var/r1 = rand(0,10) //Make a random chance for this to happen
- var/r2 = rand(0,3) // Which wall if we do choose it
- if(r1 >= 9)
- overlays += image(icon, icon_state = "almayer_deco_wall[r2]")
+ special_icon = TRUE
+ icon_state = "almayer_deco_wall[decoration_type]"
+ else // Wall connection was broken, return to normality
+ special_icon = FALSE
+ return ..()
/turf/closed/wall/almayer/take_damage(dam, mob/M)
var/damage_check = max(0, damage + dam)
@@ -255,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]
"))
@@ -814,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)
@@ -949,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
@@ -1003,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)
@@ -1060,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)
@@ -1234,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..303a9a7655e8 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
@@ -88,8 +88,6 @@
if(istype(found_object, /obj/structure/sign/poster))
var/obj/structure/sign/poster/found_poster = found_object
found_poster.roll_and_drop(src)
- if(istype(found_object, /obj/effect/alien/weeds))
- qdel(found_object)
var/list/turf/cardinal_neighbors = list(get_step(src, NORTH), get_step(src, SOUTH), get_step(src, EAST), get_step(src, WEST))
for(var/turf/cardinal_turf as anything in cardinal_neighbors)
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..9cad56cdabe8 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)
@@ -182,7 +182,7 @@
for(var/category in listings)
dat += "
Current [category] ([length(listings[category])]):
\n"
for(var/client/entry in listings[category])
- dat += "\t[entry.key] is a [entry.admin_holder.rank]"
+ dat += "\t[entry.key] is \a [entry.admin_holder.rank]"
if(entry.admin_holder.extra_titles?.len)
for(var/srank in entry.admin_holder.extra_titles)
dat += " & [srank]"
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 += "[t] (unban) |
"
@@ -138,8 +138,6 @@
var/dat = {"
Change Game Mode
"}
- if(master_mode == "secret")
- dat += "(Force Secret Mode)
"
dat += {"
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index cbeb1169c807..5bb9692b0368 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -1,8 +1,8 @@
-var/list/admin_ranks = list() //list of all ranks with associated rights
+GLOBAL_LIST_EMPTY(admin_ranks) //list of all ranks with associated rights
//load our rank - > rights associations
/proc/load_admin_ranks()
- admin_ranks.Cut()
+ GLOB.admin_ranks.Cut()
var/previous_rights = 0
@@ -46,19 +46,19 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if("host") rights |= RL_HOST
if("everything") rights |= RL_EVERYTHING
- admin_ranks[rank] = rights
+ GLOB.admin_ranks[rank] = rights
previous_rights = rights
#ifdef TESTING
var/msg = "Permission Sets Built:\n"
- for(var/rank in admin_ranks)
- msg += "\t[rank] - [admin_ranks[rank]]\n"
+ for(var/rank in GLOB.admin_ranks)
+ msg += "\t[rank] - [GLOB.admin_ranks[rank]]\n"
testing(msg)
#endif
/proc/load_admins()
//clear the datums references
- admin_datums.Cut()
+ GLOB.admin_datums.Cut()
for(var/client/C in GLOB.admins)
C.remove_admin_verbs()
C.admin_holder = null
@@ -78,9 +78,9 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
#ifdef TESTING
var/msg = "Admins Built:\n"
- for(var/ckey in admin_datums)
+ for(var/ckey in GLOB.admin_datums)
var/rank
- var/datum/admins/D = admin_datums[ckey]
+ var/datum/admins/D = GLOB.admin_datums[ckey]
if(D) rank = D.rank
msg += "\t[ckey] - [rank]\n"
testing(msg)
@@ -115,7 +115,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
return
//load permissions associated with this rank
- var/rights = admin_ranks[rank]
+ var/rights = GLOB.admin_ranks[rank]
//create the admin datum and store it for later use
var/datum/admins/D = new /datum/admins(rank, rights, ckey, extra_titles)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 7d9127313094..07d7d4e89623 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1,5 +1,5 @@
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
-var/list/admin_verbs_default = list(
+GLOBAL_LIST_INIT(admin_verbs_default, list(
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
/client/proc/becomelarva, /*lets you forgo your larva protection as staff member. */
@@ -36,6 +36,7 @@ var/list/admin_verbs_default = list(
/client/proc/togglenichelogs,
/datum/admins/proc/display_tags,
/datum/admins/proc/player_notes_show,
+ /datum/admins/proc/check_ckey,
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/togglelooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
@@ -69,9 +70,10 @@ var/list/admin_verbs_default = list(
/client/proc/toggle_ares_ping,
/client/proc/cmd_admin_say, /*staff-only ooc chat*/
/client/proc/cmd_mod_say, /* alternate way of typing asay, no different than cmd_admin_say */
- )
+ /client/proc/cmd_admin_tacmaps_panel,
+ ))
-var/list/admin_verbs_admin = list(
+GLOBAL_LIST_INIT(admin_verbs_admin, list(
/datum/admins/proc/togglejoin, /*toggles whether people can join the current game*/
/datum/admins/proc/announce, /*priority announce something to all clients.*/
/datum/admins/proc/view_game_log, /*shows the server game log (diary) for this round*/
@@ -91,22 +93,20 @@ var/list/admin_verbs_admin = list(
/client/proc/force_teleporter,
/client/proc/matrix_editor,
/datum/admins/proc/open_shuttlepanel
-)
+))
-var/list/admin_verbs_ban = list(
+GLOBAL_LIST_INIT(admin_verbs_ban, list(
/client/proc/unban_panel
// /client/proc/jobbans // Disabled temporarily due to 15-30 second lag spikes. Don't forget the comma in the line above when uncommenting this!
-)
+))
-var/list/admin_verbs_sounds = list(
- /client/proc/play_web_sound,
- /client/proc/play_sound,
- /client/proc/stop_web_sound,
- /client/proc/stop_sound,
+GLOBAL_LIST_INIT(admin_verbs_sounds, list(
+ /client/proc/play_admin_sound,
+ /client/proc/stop_admin_sound,
/client/proc/cmd_admin_vox_panel
-)
+))
-var/list/admin_verbs_minor_event = list(
+GLOBAL_LIST_INIT(admin_verbs_minor_event, list(
/client/proc/cmd_admin_change_custom_event,
/datum/admins/proc/admin_force_distress,
/datum/admins/proc/admin_force_ERT_shuttle,
@@ -137,9 +137,9 @@ var/list/admin_verbs_minor_event = list(
/client/proc/admin_biohazard_alert,
/client/proc/toggle_hardcore_perma,
/client/proc/toggle_bypass_joe_restriction,
-)
+))
-var/list/admin_verbs_major_event = list(
+GLOBAL_LIST_INIT(admin_verbs_major_event, list(
/client/proc/enable_event_mob_verbs,
/client/proc/cmd_admin_dress_all,
/client/proc/free_all_mobs_in_view,
@@ -158,16 +158,16 @@ var/list/admin_verbs_major_event = list(
/client/proc/change_taskbar_icon,
/client/proc/change_weather,
/client/proc/admin_blurb
-)
+))
-var/list/admin_verbs_spawn = list(
+GLOBAL_LIST_INIT(admin_verbs_spawn, list(
/datum/admins/proc/spawn_atom,
/client/proc/game_panel,
/client/proc/create_humans,
/client/proc/create_xenos
-)
+))
-var/list/admin_verbs_server = list(
+GLOBAL_LIST_INIT(admin_verbs_server, list(
/datum/admins/proc/startnow,
/datum/admins/proc/restart,
/datum/admins/proc/delay,
@@ -181,9 +181,9 @@ var/list/admin_verbs_server = list(
/client/proc/cmd_debug_del_all,
/datum/admins/proc/togglejoin,
/client/proc/toggle_cdn,
-)
+))
-var/list/admin_verbs_debug = list(
+GLOBAL_LIST_INIT(admin_verbs_debug, list(
/client/proc/debug_role_authority,
/client/proc/cmd_debug_make_powernets,
/client/proc/cmd_debug_list_processing_items,
@@ -215,19 +215,19 @@ var/list/admin_verbs_debug = list(
/datum/admins/proc/view_href_log, /*shows the server HREF log for this round*/
/datum/admins/proc/view_tgui_log, /*shows the server TGUI log for this round*/
/client/proc/admin_blurb,
-)
+))
-var/list/admin_verbs_debug_advanced = list(
+GLOBAL_LIST_INIT(admin_verbs_debug_advanced, list(
/client/proc/callproc_datum,
/client/proc/callproc,
/client/proc/SDQL2_query,
-)
+))
-var/list/clan_verbs = list(
+GLOBAL_LIST_INIT(clan_verbs, list(
/client/proc/usr_create_new_clan
-)
+))
-var/list/debug_verbs = list(
+GLOBAL_LIST_INIT(debug_verbs, list(
/client/proc/Cell,
/client/proc/cmd_assume_direct_control,
/client/proc/ticklag,
@@ -236,22 +236,22 @@ var/list/debug_verbs = list(
/client/proc/view_power_update_stats_machines,
/client/proc/toggle_power_update_profiling,
/client/proc/nanomapgen_DumpImage,
-)
+))
-var/list/admin_verbs_possess = list(
+GLOBAL_LIST_INIT(admin_verbs_possess, list(
/client/proc/possess,
/client/proc/release
-)
+))
-var/list/admin_verbs_permissions = list(
+GLOBAL_LIST_INIT(admin_verbs_permissions, list(
/client/proc/ToRban
-)
+))
-var/list/admin_verbs_color = list(
+GLOBAL_LIST_INIT(admin_verbs_color, list(
/client/proc/set_ooc_color_self
-)
+))
-var/list/admin_mob_event_verbs_hideable = list(
+GLOBAL_LIST_INIT(admin_mob_event_verbs_hideable, list(
/client/proc/hide_event_mob_verbs,
/client/proc/cmd_admin_select_mob_rank,
/client/proc/cmd_admin_dress,
@@ -266,10 +266,10 @@ var/list/admin_mob_event_verbs_hideable = list(
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_grantallskills,
/client/proc/admin_create_account
-)
+))
//verbs which can be hidden - needs work
-var/list/admin_verbs_hideable = list(
+GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/release,
/client/proc/possess,
/client/proc/callproc_datum,
@@ -288,9 +288,9 @@ var/list/admin_verbs_hideable = list(
/datum/admins/proc/togglesleep,
/client/proc/debug_variables,
/client/proc/debug_global_variables
-)
+))
-var/list/admin_verbs_teleport = list(
+GLOBAL_LIST_INIT(admin_verbs_teleport, list(
/client/proc/teleport_panel, /*teleport panel, for jumping to things/places and getting things/places */
/client/proc/jumptocoord,
/client/proc/jumptooffsetcoord,
@@ -302,75 +302,75 @@ var/list/admin_verbs_teleport = list(
/client/proc/Getmob,
/client/proc/Getkey,
/client/proc/toggle_noclip
-)
+))
-var/list/roundstart_mod_verbs = list(
+GLOBAL_LIST_INIT(roundstart_mod_verbs, list(
/client/proc/toggle_ob_spawn
-)
+))
/client/proc/add_admin_verbs()
if(!admin_holder)
return
if(CLIENT_IS_STAFF(src))
- add_verb(src, admin_verbs_default)
+ add_verb(src, GLOB.admin_verbs_default)
if(CLIENT_HAS_RIGHTS(src, R_MOD))
- add_verb(src, admin_verbs_ban)
- add_verb(src, admin_verbs_teleport)
+ add_verb(src, GLOB.admin_verbs_ban)
+ add_verb(src, GLOB.admin_verbs_teleport)
if(CLIENT_HAS_RIGHTS(src, R_EVENT))
- add_verb(src, admin_verbs_minor_event)
+ add_verb(src, GLOB.admin_verbs_minor_event)
if(CLIENT_HAS_RIGHTS(src, R_ADMIN))
- add_verb(src, admin_verbs_admin)
- add_verb(src, admin_verbs_major_event)
+ add_verb(src, GLOB.admin_verbs_admin)
+ add_verb(src, GLOB.admin_verbs_major_event)
if(CLIENT_HAS_RIGHTS(src, R_MENTOR))
add_verb(src, /client/proc/cmd_mentor_say)
add_verb(src, /datum/admins/proc/imaginary_friend)
if(CLIENT_HAS_RIGHTS(src, R_BUILDMODE))
add_verb(src, /client/proc/togglebuildmodeself)
if(CLIENT_HAS_RIGHTS(src, R_SERVER))
- add_verb(src, admin_verbs_server)
+ add_verb(src, GLOB.admin_verbs_server)
if(CLIENT_HAS_RIGHTS(src, R_DEBUG))
- add_verb(src, admin_verbs_debug)
+ add_verb(src, GLOB.admin_verbs_debug)
if(!CONFIG_GET(flag/debugparanoid) || CLIENT_HAS_RIGHTS(src, R_ADMIN))
- add_verb(src, admin_verbs_debug_advanced) // Right now it's just callproc but we can easily add others later on.
+ add_verb(src, GLOB.admin_verbs_debug_advanced) // Right now it's just callproc but we can easily add others later on.
if(CLIENT_HAS_RIGHTS(src, R_POSSESS))
- add_verb(src, admin_verbs_possess)
+ add_verb(src, GLOB.admin_verbs_possess)
if(CLIENT_HAS_RIGHTS(src, R_PERMISSIONS))
- add_verb(src, admin_verbs_permissions)
+ add_verb(src, GLOB.admin_verbs_permissions)
if(CLIENT_HAS_RIGHTS(src, R_COLOR))
- add_verb(src, admin_verbs_color)
+ add_verb(src, GLOB.admin_verbs_color)
if(CLIENT_HAS_RIGHTS(src, R_SOUNDS))
- add_verb(src, admin_verbs_sounds)
+ add_verb(src, GLOB.admin_verbs_sounds)
if(CLIENT_HAS_RIGHTS(src, R_SPAWN))
- add_verb(src, admin_verbs_spawn)
- if(RoleAuthority && (RoleAuthority.roles_whitelist[ckey] & WHITELIST_YAUTJA_LEADER))
- add_verb(src, clan_verbs)
+ add_verb(src, GLOB.admin_verbs_spawn)
+ if(GLOB.RoleAuthority && (GLOB.RoleAuthority.roles_whitelist[ckey] & WHITELIST_YAUTJA_LEADER))
+ add_verb(src, GLOB.clan_verbs)
/client/proc/add_admin_whitelists()
if(CLIENT_IS_MENTOR(src))
- RoleAuthority.roles_whitelist[ckey] |= WHITELIST_MENTOR
+ GLOB.RoleAuthority.roles_whitelist[ckey] |= WHITELIST_MENTOR
if(CLIENT_IS_STAFF(src))
- RoleAuthority.roles_whitelist[ckey] |= WHITELIST_JOE
+ GLOB.RoleAuthority.roles_whitelist[ckey] |= WHITELIST_JOE
/client/proc/remove_admin_verbs()
remove_verb(src, list(
- admin_verbs_default,
+ GLOB.admin_verbs_default,
/client/proc/togglebuildmodeself,
- admin_verbs_admin,
- admin_verbs_ban,
- admin_verbs_minor_event,
- admin_verbs_major_event,
- admin_verbs_server,
- admin_verbs_debug,
- admin_verbs_debug_advanced,
- admin_verbs_possess,
- admin_verbs_permissions,
- admin_verbs_color,
- admin_verbs_sounds,
- admin_verbs_spawn,
- admin_verbs_teleport,
- admin_mob_event_verbs_hideable,
- admin_verbs_hideable,
- debug_verbs,
+ GLOB.admin_verbs_admin,
+ GLOB.admin_verbs_ban,
+ GLOB.admin_verbs_minor_event,
+ GLOB.admin_verbs_major_event,
+ GLOB.admin_verbs_server,
+ GLOB.admin_verbs_debug,
+ GLOB.admin_verbs_debug_advanced,
+ GLOB.admin_verbs_possess,
+ GLOB.admin_verbs_permissions,
+ GLOB.admin_verbs_color,
+ GLOB.admin_verbs_sounds,
+ GLOB.admin_verbs_spawn,
+ GLOB.admin_verbs_teleport,
+ GLOB.admin_mob_event_verbs_hideable,
+ GLOB.admin_verbs_hideable,
+ GLOB.debug_verbs,
))
/client/proc/jobbans()
@@ -405,7 +405,7 @@ var/list/roundstart_mod_verbs = list(
if(!check_rights(R_ADMIN)) return
if(!warned_ckey || !istext(warned_ckey)) return
- if(warned_ckey in admin_datums)
+ if(warned_ckey in GLOB.admin_datums)
to_chat(usr, "Error: warn(): You can't warn admins.")
return
@@ -436,7 +436,7 @@ var/list/roundstart_mod_verbs = list(
set name = "Give Disease (old)"
set desc = "Gives a (tg-style) Disease to a mob."
var/list/disease_names = list()
- for(var/v in diseases)
+ for(var/v in GLOB.diseases)
disease_names.Add(copytext("[v]", 16, 0))
var/datum/disease/D = tgui_input_list(usr, "Choose the disease to give to that guy", "ACHOO", disease_names)
if(!D) return
diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm
index 18f06e79a66a..13c3b4664a15 100644
--- a/code/modules/admin/banjob.dm
+++ b/code/modules/admin/banjob.dm
@@ -7,23 +7,23 @@ won't recognize the older one, as an example.
*/
-var/jobban_runonce // Updates legacy bans with new info
-var/jobban_keylist[0] //to store the keys & ranks
+GLOBAL_VAR(jobban_runonce) // Updates legacy bans with new info
+GLOBAL_LIST_EMPTY(jobban_keylist)
/proc/check_jobban_path(X)
. = ckey(X)
- if(!islist(jobban_keylist[.])) //If it's not a list, we're in trouble.
- jobban_keylist[.] = list()
+ if(!islist(GLOB.jobban_keylist[.])) //If it's not a list, we're in trouble.
+ GLOB.jobban_keylist[.] = list()
/proc/jobban_fullban(mob/M, rank, reason)
if (!M || !M.ckey) return
rank = check_jobban_path(rank)
- jobban_keylist[rank][M.ckey] = reason
+ GLOB.jobban_keylist[rank][M.ckey] = reason
/proc/jobban_client_fullban(ckey, rank)
if (!ckey || !rank) return
rank = check_jobban_path(rank)
- jobban_keylist[rank][ckey] = "Reason Unspecified"
+ GLOB.jobban_keylist[rank][ckey] = "Reason Unspecified"
//returns a reason if M is banned from rank, returns 0 otherwise
/proc/jobban_isbanned(mob/M, rank, datum/entity/player/P = null)
@@ -49,17 +49,17 @@ var/jobban_keylist[0] //to store the keys & ranks
/proc/jobban_loadbanfile()
var/savefile/S=new("data/job_new.ban")
- S["new_bans"] >> jobban_keylist
+ S["new_bans"] >> GLOB.jobban_keylist
log_admin("Loading jobban_rank")
- S["runonce"] >> jobban_runonce
+ S["runonce"] >> GLOB.jobban_runonce
- if (!length(jobban_keylist))
- jobban_keylist=list()
+ if (!length(GLOB.jobban_keylist))
+ GLOB.jobban_keylist=list()
log_admin("jobban_keylist was empty")
/proc/jobban_savebanfile()
var/savefile/S=new("data/job_new.ban")
- S["new_bans"] << jobban_keylist
+ S["new_bans"] << GLOB.jobban_keylist
/proc/jobban_unban(mob/M, rank)
jobban_remove("[M.ckey] - [ckey(rank)]")
@@ -70,7 +70,7 @@ var/jobban_keylist[0] //to store the keys & ranks
/proc/jobban_remove(X)
var/regex/r1 = new("(.*) - (.*)")
if(r1.Find(X))
- var/L[] = jobban_keylist[r1.group[2]]
+ var/L[] = GLOB.jobban_keylist[r1.group[2]]
L.Remove(r1.group[1])
return 1
@@ -89,7 +89,7 @@ var/jobban_keylist[0] //to store the keys & ranks
if(!M.ckey) //sanity
to_chat(usr, "This mob has no ckey")
return
- if(!RoleAuthority)
+ if(!GLOB.RoleAuthority)
to_chat(usr, "The Role Authority is not set up!")
return
@@ -109,31 +109,31 @@ var/jobban_keylist[0] //to store the keys & ranks
WARNING!*/
//Regular jobs
//Command (Blue)
- jobs += generate_job_ban_list(M, P, ROLES_CIC, "CIC", "ddddff")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_CIC, "CIC", "ddddff")
jobs += "
"
// SUPPORT
- jobs += generate_job_ban_list(M, P, ROLES_AUXIL_SUPPORT, "Support", "ccccff")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_AUXIL_SUPPORT, "Support", "ccccff")
jobs += "
"
// MPs
- jobs += generate_job_ban_list(M, P, ROLES_POLICE, "Police", "ffdddd")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_POLICE, "Police", "ffdddd")
jobs += "
"
//Engineering (Yellow)
- jobs += generate_job_ban_list(M, P, ROLES_ENGINEERING, "Engineering", "fff5cc")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_ENGINEERING, "Engineering", "fff5cc")
jobs += "
"
//Cargo (Yellow) //Copy paste, yada, yada. Hopefully Snail can rework this in the future.
- jobs += generate_job_ban_list(M, P, ROLES_REQUISITION, "Requisition", "fff5cc")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_REQUISITION, "Requisition", "fff5cc")
jobs += "
"
//Medical (White)
- jobs += generate_job_ban_list(M, P, ROLES_MEDICAL, "Medical", "ffeef0")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_MEDICAL, "Medical", "ffeef0")
jobs += "
"
//Marines
- jobs += generate_job_ban_list(M, P, ROLES_MARINES, "Marines", "ffeeee")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_MARINES, "Marines", "ffeeee")
jobs += "
"
// MISC
- jobs += generate_job_ban_list(M, P, ROLES_MISC, "Misc", "aaee55")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_MISC, "Misc", "aaee55")
jobs += "
"
// Xenos (Orange)
- jobs += generate_job_ban_list(M, P, ROLES_XENO, "Xenos", "a268b1")
+ jobs += generate_job_ban_list(M, P, GLOB.ROLES_XENO, "Xenos", "a268b1")
jobs += "
"
//Extra (Orange)
var/isbanned_dept = jobban_isbanned(M, "Syndicate", P)
diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm
index 644165be0fa0..910bafd50a9b 100644
--- a/code/modules/admin/create_mob.dm
+++ b/code/modules/admin/create_mob.dm
@@ -1,4 +1,5 @@
-/var/create_mob_html = null
+/datum/admins/var/static/create_mob_html = null
+
/datum/admins/proc/create_mob(mob/user)
if (!create_mob_html)
var/mobjs = null
@@ -7,4 +8,4 @@
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
create_mob_html = replacetext(create_mob_html, "/* href token */", RawHrefToken(forceGlobal = TRUE))
- show_browser(user, replacetext(create_mob_html, "/* ref src */", "\ref[src]"), "Create Mob", "create_mob", "size=425x475")
+ show_browser(user, replacetext(create_mob_html, "/* ref src */", "\ref[src]"), "Create Mob", "create_mob", "size=450x525")
diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm
index 9d344a1f551c..054fc20aef5e 100644
--- a/code/modules/admin/create_object.dm
+++ b/code/modules/admin/create_object.dm
@@ -1,4 +1,4 @@
-/var/create_object_html = null
+/datum/admins/var/static/create_object_html = null
/datum/admins/proc/create_object(mob/user)
if (!create_object_html)
@@ -8,7 +8,7 @@
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
create_object_html = replacetext(create_object_html, "/* href token */", RawHrefToken(forceGlobal = TRUE))
- show_browser(user, replacetext(create_object_html, "/* ref src */", "\ref[src]"), "Create Object", "create_object", "size=425x475")
+ show_browser(user, replacetext(create_object_html, "/* ref src */", "\ref[src]"), "Create Object", "create_object", "size=450x525")
/datum/admins/proc/quick_create_object(mob/user)
@@ -46,4 +46,4 @@
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
quick_create_object_html = replacetext(quick_create_object_html, "/* href token */", RawHrefToken(forceGlobal = TRUE))
- show_browser(user, replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "Quick Create Object", "quick_create_object", "size=425x475")
+ show_browser(user, replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "Quick Create Object", "quick_create_object", "size=450x525")
diff --git a/code/modules/admin/create_turf.dm b/code/modules/admin/create_turf.dm
index c87034ecfd9f..cc8bd1a5ec77 100644
--- a/code/modules/admin/create_turf.dm
+++ b/code/modules/admin/create_turf.dm
@@ -1,4 +1,5 @@
-/var/create_turf_html = null
+/datum/admins/var/static/create_turf_html = null
+
/datum/admins/proc/create_turf(mob/user)
if (!create_turf_html)
var/turfjs = null
@@ -7,4 +8,4 @@
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
create_turf_html = replacetext(create_turf_html, "/* href token */", RawHrefToken(forceGlobal = TRUE))
- show_browser(usr, replacetext(create_turf_html, "/* ref src */", "\ref[src]"), "Create Turf", "create_turf", "size=425x475")
+ show_browser(usr, replacetext(create_turf_html, "/* ref src */", "\ref[src]"), "Create Turf", "create_turf", "size=450x525")
diff --git a/code/modules/admin/fax_templates.dm b/code/modules/admin/fax_templates.dm
index 459ab675d3a3..2522acf92b3b 100644
--- a/code/modules/admin/fax_templates.dm
+++ b/code/modules/admin/fax_templates.dm
@@ -70,7 +70,7 @@
dat += " "
dat += ""
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index e7559f3aa4fd..e31d372743c5 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -1,4 +1,4 @@
-var/list/datum/admins/admin_datums = list()
+GLOBAL_LIST_INIT_TYPED(admin_datums, /datum/admins, list())
GLOBAL_VAR_INIT(href_token, GenerateToken())
GLOBAL_PROTECT(href_token)
@@ -35,7 +35,7 @@ GLOBAL_PROTECT(href_token)
rank = initial_rank
rights = initial_rights
href_token = GenerateToken()
- admin_datums[ckey] = src
+ GLOB.admin_datums[ckey] = src
extra_titles = new_extra_titles
// Letting admins edit their own permission giver is a poor idea
@@ -138,8 +138,8 @@ you will have to do something like if(client.admin_holder.rights & R_ADMIN) your
return TRUE
/client/proc/readmin()
- if(admin_datums[ckey])
- admin_datums[ckey].associate(src)
+ if(GLOB.admin_datums[ckey])
+ GLOB.admin_datums[ckey].associate(src)
return TRUE
/datum/admins/proc/check_for_rights(rights_required)
diff --git a/code/modules/admin/player_panel/actions/physical.dm b/code/modules/admin/player_panel/actions/physical.dm
index a48f39e81a5e..eb43fe5d2aa8 100644
--- a/code/modules/admin/player_panel/actions/physical.dm
+++ b/code/modules/admin/player_panel/actions/physical.dm
@@ -90,15 +90,15 @@
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
S.forget_marine_in_squad(H)
message_admins("[key_name_admin(user)] sent [key_name_admin(target)] ([H.job]) to cryogenics.")
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(RoleAuthority.roles_for_mode[target.job], TRUE)
+ GLOB.RoleAuthority.free_role(GLOB.RoleAuthority.roles_for_mode[target.job], TRUE)
//Delete them from datacore.
var/target_ref = WEAKREF(target)
@@ -200,7 +200,7 @@
/datum/player_action/set_squad/act(client/user, mob/living/carbon/human/target, list/params)
var/list/squads = list()
- for(var/datum/squad/S in RoleAuthority.squads)
+ for(var/datum/squad/S in GLOB.RoleAuthority.squads)
squads[S.name] = S
var/selected_squad = tgui_input_list(user, "Select a squad.", "Squad Selection", squads)
diff --git a/code/modules/admin/player_panel/player_panel.dm b/code/modules/admin/player_panel/player_panel.dm
index e29ea83ef5ce..bead55f994ab 100644
--- a/code/modules/admin/player_panel/player_panel.dm
+++ b/code/modules/admin/player_panel/player_panel.dm
@@ -389,7 +389,7 @@
dat += "Round Duration:
[round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]"
if(check_rights(R_DEBUG, 0))
- dat += "
VV Shuttle Controller"
+ dat += "
VV Shuttle Controller"
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..8dce41ac8235 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)
@@ -185,6 +185,29 @@
dat += "