diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm
index 58655abb234..f295e73d101 100644
--- a/code/controllers/subsystems/job.dm
+++ b/code/controllers/subsystems/job.dm
@@ -688,27 +688,21 @@
if(G.augment) //augments are handled somewhere else
continue
- var/permitted = !G.allowed_roles || (job.title in G.allowed_roles)
- permitted = permitted && G.check_species_whitelist(H)
- permitted = permitted && (!G.faction || (G.faction == H.employer_faction || H.employer_faction == "Stellar Corporate Conglomerate"))
- var/our_culture = text2path(prefs.culture)
- permitted = permitted && (!G.culture_restriction || (our_culture in G.culture_restriction))
- var/our_origin = text2path(prefs.origin)
- permitted = permitted && (!G.origin_restriction || (our_origin in G.origin_restriction))
+ var/metadata
+ var/list/gear_test = prefs.gear[G.display_name]
+ if(gear_test?.len)
+ metadata = gear_test
+ else
+ metadata = list()
- if(!permitted)
- to_chat(H, "Your current job, culture, origin or whitelist status does not permit you to spawn with [thing]!")
+ var/cant_spawn_reason = G.cant_spawn_item_reason(null, metadata, H, job, prefs)
+ if(cant_spawn_reason)
+ to_chat(H, SPAN_WARNING(cant_spawn_reason))
continue
if(G.slot && !(G.slot in custom_equip_slots))
// This is a miserable way to fix the loadout overwrite bug, but the alternative requires
// adding an arg to a bunch of different procs. Will look into it after this merge. ~ Z
- var/metadata
- var/list/gear_test = prefs.gear[G.display_name]
- if(gear_test?.len)
- metadata = gear_test
- else
- metadata = list()
var/obj/item/CI = G.spawn_item(null,metadata, H)
if (H.equip_to_slot_or_del(CI, G.slot))
to_chat(H, "Equipping you with [thing]!")
diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks.dm b/code/modules/client/preference_setup/loadout/gear_tweaks.dm
index ace54e037c3..99aedeff199 100644
--- a/code/modules/client/preference_setup/loadout/gear_tweaks.dm
+++ b/code/modules/client/preference_setup/loadout/gear_tweaks.dm
@@ -107,6 +107,17 @@ Path adjustment
return
gear_data.path = valid_paths[metadata]
+/*
+Faction-based Path adjustment
+Same as the adjustment above, but the associated value is a list with the first value containing the path and the second the faction requirement
+*/
+
+/datum/gear_tweak/path/faction/tweak_gear_data(var/metadata, var/datum/gear_data/gear_data)
+ if(!(metadata in valid_paths))
+ return
+ gear_data.path = valid_paths[metadata][1]
+ gear_data.faction_requirement = valid_paths[metadata][2]
+
/*
Content adjustment
*/
diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm
index 3802ad1edb4..f660ff74e82 100644
--- a/code/modules/client/preference_setup/loadout/loadout.dm
+++ b/code/modules/client/preference_setup/loadout/loadout.dm
@@ -400,13 +400,38 @@ var/list/gear_datums = list()
/datum/gear_data
var/path
var/location
+ var/faction_requirement
-/datum/gear_data/New(var/path, var/location)
+/datum/gear_data/New(var/path, var/location, var/faction)
src.path = path
src.location = location
+ src.faction_requirement = faction
+
+/datum/gear/proc/cant_spawn_item_reason(var/location, var/metadata, var/mob/living/carbon/human/human, var/datum/job/job, var/datum/preferences/prefs)
+ var/datum/gear_data/gd = new(path, location, faction)
+ for(var/datum/gear_tweak/gt in gear_tweaks)
+ if(metadata["[gt]"])
+ gt.tweak_gear_data(metadata["[gt]"], gd, human)
+ else
+ gt.tweak_gear_data(gt.get_default(), gd, human)
+
+ var/obj/spawning_item = gd.path
+ if(length(allowed_roles) && !(job.title in allowed_roles))
+ return "You cannot spawn with the [initial(spawning_item.name)] with your current job!"
+ if(!check_species_whitelist(human))
+ return "You cannot spawn with the [initial(spawning_item.name)] with your current species!"
+ if(gd.faction_requirement && (human.employer_faction != "Stellar Corporate Conglomerate" && gd.faction_requirement != human.employer_faction))
+ return "You cannot spawn with the [initial(spawning_item.name)] with your current faction!"
+ var/our_culture = text2path(prefs.culture)
+ if(culture_restriction && !(our_culture in culture_restriction))
+ return "You cannot spawn with the [initial(spawning_item.name)] with your current culture!"
+ var/our_origin = text2path(prefs.origin)
+ if(origin_restriction && !(our_origin in origin_restriction))
+ return "You cannot spawn with the [initial(spawning_item.name)] with your current origin!"
+ return null
/datum/gear/proc/spawn_item(var/location, var/metadata, var/mob/living/carbon/human/H)
- var/datum/gear_data/gd = new(path, location)
+ var/datum/gear_data/gd = new(path, location, faction)
for(var/datum/gear_tweak/gt in gear_tweaks)
if(metadata["[gt]"])
gt.tweak_gear_data(metadata["[gt]"], gd, H)
diff --git a/code/modules/client/preference_setup/loadout/loadout_eyes.dm b/code/modules/client/preference_setup/loadout/loadout_eyes.dm
index f975dac4d87..5e1d7488303 100644
--- a/code/modules/client/preference_setup/loadout/loadout_eyes.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_eyes.dm
@@ -132,3 +132,18 @@
blindfold["blindfold"] = /obj/item/clothing/glasses/sunglasses/blindfold/white
blindfold["blindfold, transparent"] = /obj/item/clothing/glasses/sunglasses/blindfold/white/seethrough
gear_tweaks += new /datum/gear_tweak/path(blindfold)
+
+/datum/gear/eyes/goon_goggles
+ display_name = "tactical goggles selection"
+ description = "A selection of tactical eyewear. Note that factional ones can only be taken by members of that faction."
+ path = /obj/item/clothing/glasses/safety/goggles/goon
+
+/datum/gear/eyes/goon_goggles/New()
+ allowed_roles = security_positions
+ ..()
+ var/list/goggles = list()
+ goggles["goggles, tactical"] = list(/obj/item/clothing/glasses/safety/goggles/goon, null)
+ goggles["goggles, tactical (PMCG)"] = list(/obj/item/clothing/glasses/safety/goggles/goon/pmc, "Private Military Contracting Group")
+ goggles["goggles, tactical (Zavodskoi)"] = list(/obj/item/clothing/glasses/safety/goggles/goon/zavod, "Zavodskoi Interstellar")
+ goggles["goggles, tactical (Idris)"] = list(/obj/item/clothing/glasses/safety/goggles/goon/idris, "Idris Incorporated")
+ gear_tweaks += new /datum/gear_tweak/path/faction(goggles)
diff --git a/code/modules/client/preference_setup/loadout/loadout_mask.dm b/code/modules/client/preference_setup/loadout/loadout_mask.dm
index e03d4c186b1..9d46993528d 100644
--- a/code/modules/client/preference_setup/loadout/loadout_mask.dm
+++ b/code/modules/client/preference_setup/loadout/loadout_mask.dm
@@ -19,4 +19,4 @@
/datum/gear/mask/cloth
display_name = "cloth mask"
path = /obj/item/clothing/mask/cloth
- flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
\ No newline at end of file
+ flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index 49914ad63f5..0071676382a 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -234,11 +234,17 @@ BLIND // can't see anything
icon_state = "goggles_standard"
item_state = "goggles_standard"
off_state = "goggles_standard"
+ var/base_icon_state
action_button_name = "Flip Goggles"
+ var/change_item_state_on_flip = FALSE
var/flip_down = "down to protect your eyes."
var/flip_up = "up out of your face."
var/up = 0
+/obj/item/clothing/glasses/safety/goggles/Initialize(mapload, material_key)
+ . = ..()
+ base_icon_state = icon_state
+
/obj/item/clothing/glasses/safety/goggles/attack_self()
toggle()
@@ -253,18 +259,24 @@ BLIND // can't see anything
src.up = !src.up
flags_inv |= HIDEEYES
body_parts_covered |= EYES
- icon_state = initial(item_state)
+ icon_state = base_icon_state
+ if(change_item_state_on_flip) item_state = icon_state
to_chat(usr, SPAN_NOTICE("You flip \the [src] [flip_down]"))
else
src.up = !src.up
flags_inv &= ~HIDEEYES
body_parts_covered &= ~EYES
- icon_state = "[initial(icon_state)]_up"
+ icon_state = "[base_icon_state]_up"
+ if(change_item_state_on_flip) item_state = icon_state
to_chat(usr, SPAN_NOTICE("You push \the [src] [flip_up]"))
- update_clothing_icon()
+ handle_additional_changes()
+ update_worn_icon()
update_icon()
usr.update_action_buttons()
+/obj/item/clothing/glasses/safety/goggles/proc/handle_additional_changes()
+ return
+
/obj/item/clothing/glasses/safety/goggles/prescription
name = "prescription safety goggles"
desc = "A simple pair of safety goggles. It's general chemistry all over again. Comes with a prescription overlay."
@@ -279,19 +291,48 @@ BLIND // can't see anything
item_state = "wasteland_goggles"
off_state = "wasteland_goggles"
contained_sprite = TRUE
+ change_item_state_on_flip = TRUE
flip_down = "up to protect your eyes."
flip_up = "and let it hang around your neck."
-/obj/item/clothing/glasses/safety/goggles/wasteland/toggle()
- ..()
- icon_state = initial(icon_state)
- if(up)
- item_state = "[initial(item_state)]_up"
- else
- item_state = initial(icon_state)
- update_worn_icon()
- update_clothing_icon()
- update_icon()
+/obj/item/clothing/glasses/safety/goggles/goon
+ name = "tactical goggles"
+ desc = "A stylish pair of tactical goggles that protect the eyes from aerosolized chemicals."
+ var/brand_name
+ icon = 'icons/clothing/eyes/goon_goggles.dmi'
+ var/sprite_state = "security_goggles"
+ contained_sprite = TRUE
+ change_item_state_on_flip = TRUE
+
+/obj/item/clothing/glasses/safety/goggles/goon/Initialize(mapload, material_key)
+ icon_state = sprite_state
+ item_state = sprite_state
+ off_state = sprite_state
+ . = ..()
+ if(brand_name)
+ desc += " This pair has been made in [brand_name] colors."
+
+/obj/item/clothing/glasses/safety/goggles/goon/security/process_hud(var/mob/M)
+ if(!up)
+ process_sec_hud(M, TRUE)
+
+/obj/item/clothing/glasses/safety/goggles/goon/is_sec_hud()
+ return !up
+
+/obj/item/clothing/glasses/safety/goggles/goon/handle_additional_changes()
+ flash_protection = up ? FLASH_PROTECTION_NONE : FLASH_PROTECTION_MODERATE
+
+/obj/item/clothing/glasses/safety/goggles/goon/pmc
+ sprite_state = "pmc_goggles"
+ brand_name = "PMCG"
+
+/obj/item/clothing/glasses/safety/goggles/goon/zavod
+ sprite_state = "zavod_goggles"
+ brand_name = "Zavodskoi"
+
+/obj/item/clothing/glasses/safety/goggles/goon/idris
+ sprite_state = "idris_goggles"
+ brand_name = "Idris"
/obj/item/clothing/glasses/eyepatch
name = "eyepatch"
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
index c288801791c..d4d8ab924da 100644
--- a/code/modules/clothing/under/accessories/accessory.dm
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -1034,3 +1034,19 @@
contained_sprite = TRUE
icon_override = null
body_parts_covered = UPPER_TORSO
+
+/obj/item/clothing/accessory/goon_coif
+ name = "tactical coif"
+ desc = "A comfortable tactical coif that goes around the head."
+ icon = 'icons/clothing/accessories/goon_coif.dmi'
+ body_parts_covered = HEAD
+ icon_state = "goon_coif"
+ item_state = "goon_coif"
+ contained_sprite = TRUE
+ slot_flags = SLOT_MASK | SLOT_EARS | SLOT_TIE
+
+/obj/item/clothing/accessory/goon_coif/get_ear_examine_text(var/mob/user, var/ear_text = "left")
+ return "on [user.get_pronoun("his")] head"
+
+/obj/item/clothing/accessory/goon_coif/get_mask_examine_text(var/mob/user)
+ return "on [user.get_pronoun("his")] head"
diff --git a/html/changelogs/geeves-goon_coifs.yml b/html/changelogs/geeves-goon_coifs.yml
new file mode 100644
index 00000000000..bc9437b233b
--- /dev/null
+++ b/html/changelogs/geeves-goon_coifs.yml
@@ -0,0 +1,7 @@
+author: HappyFox, Geeves
+
+delete-after: True
+
+changes:
+ - rscadd: "Added tactical goggles to the loadout for Security roles, they have integrated security HUDs and flash protection."
+ - rscadd: "Added tactical coifs to the Security armory, they can go in the mask, ear, or clothing accessory slots."
\ No newline at end of file
diff --git a/icons/clothing/accessories/goon_coif.dmi b/icons/clothing/accessories/goon_coif.dmi
new file mode 100644
index 00000000000..820b30523e3
Binary files /dev/null and b/icons/clothing/accessories/goon_coif.dmi differ
diff --git a/icons/clothing/eyes/goon_goggles.dmi b/icons/clothing/eyes/goon_goggles.dmi
new file mode 100644
index 00000000000..3541e7d9aa2
Binary files /dev/null and b/icons/clothing/eyes/goon_goggles.dmi differ
diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm
index 1f0c442486e..850f49eda39 100644
--- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm
+++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm
@@ -4107,9 +4107,9 @@
name = "Machinist Workshop Desk"
},
/obj/machinery/door/blast/shutters{
+ dir = 8;
id = "shutters_deck2_workshopdesk";
- name = "Machinist Workshop Desk Shutter";
- dir = 8
+ name = "Machinist Workshop Desk Shutter"
},
/turf/simulated/floor/tiled/dark/full,
/area/operations/lower/machinist)
@@ -9998,8 +9998,8 @@
/area/horizon/security/brig)
"fai" = (
/obj/structure/bed/handrail{
- dir = 8;
buckle_dir = 8;
+ dir = 8;
pixel_x = 5
},
/turf/simulated/floor/tiled/white,
@@ -10305,7 +10305,6 @@
},
/obj/machinery/station_map{
dir = 1;
- pixel_x = 0;
pixel_y = -32
},
/turf/simulated/floor/tiled,
@@ -17014,8 +17013,8 @@
},
/obj/machinery/camera/motion{
c_tag = "Secure Ammunition Storage";
- network = list("Command","Security");
- dir = 8
+ dir = 8;
+ network = list("Command","Security")
},
/turf/simulated/floor/reinforced,
/area/horizon/secure_ammunition_storage)
@@ -22400,7 +22399,6 @@
},
/obj/machinery/station_map{
dir = 1;
- pixel_x = 0;
pixel_y = -32
},
/turf/simulated/floor/tiled,
@@ -24568,7 +24566,6 @@
},
/obj/machinery/station_map{
dir = 1;
- pixel_x = 0;
pixel_y = -32
},
/turf/simulated/floor/tiled,
@@ -26696,8 +26693,8 @@
/obj/structure/lattice/catwalk/indoor/grate,
/obj/machinery/camera/motion{
c_tag = "ZTA Access Aft";
- network = list("Command","Security");
- dir = 4
+ dir = 4;
+ network = list("Command","Security")
},
/turf/simulated/floor/plating,
/area/horizon/zta)
@@ -29229,7 +29226,6 @@
},
/obj/machinery/station_map{
dir = 1;
- pixel_x = 0;
pixel_y = -32
},
/turf/simulated/floor/tiled,
@@ -30445,8 +30441,8 @@
/area/medical/pharmacy)
"paL" = (
/obj/structure/bed/handrail{
- dir = 4;
buckle_dir = 4;
+ dir = 4;
pixel_x = -5
},
/turf/simulated/floor/tiled/white,
@@ -37981,10 +37977,10 @@
"sRC" = (
/obj/effect/floor_decal/spline/plain,
/obj/machinery/button/switch/windowtint{
- pixel_x = -25;
dir = 4;
- pixel_y = -4;
- id = "polarized_deck2_workshop"
+ id = "polarized_deck2_workshop";
+ pixel_x = -25;
+ pixel_y = -4
},
/turf/simulated/floor/tiled/white,
/area/operations/lower/machinist)
@@ -39649,8 +39645,8 @@
},
/obj/machinery/camera/motion{
c_tag = "Operations - Secure Storage";
- network = list("Command","Security","Operations");
- dir = 4
+ dir = 4;
+ network = list("Command","Security","Operations")
},
/turf/simulated/floor/reinforced,
/area/storage/secure)
@@ -39855,8 +39851,8 @@
},
/obj/machinery/camera/motion{
c_tag = "Grauwolf";
- network = list("Command","Security");
- dir = 8
+ dir = 8;
+ network = list("Command","Security")
},
/turf/simulated/floor/tiled/dark,
/area/horizon/grauwolf)
@@ -40519,8 +40515,6 @@
dir = 5
},
/obj/machinery/station_map{
- dir = 2;
- pixel_x = 0;
pixel_y = 32
},
/turf/simulated/floor/tiled,
@@ -42836,6 +42830,30 @@
pixel_x = -6;
pixel_y = -6
},
+/obj/item/clothing/accessory/goon_coif{
+ pixel_x = 6;
+ pixel_y = -4
+ },
+/obj/item/clothing/accessory/goon_coif{
+ pixel_x = 6;
+ pixel_y = -4
+ },
+/obj/item/clothing/accessory/goon_coif{
+ pixel_x = 6;
+ pixel_y = -4
+ },
+/obj/item/clothing/accessory/goon_coif{
+ pixel_x = 6;
+ pixel_y = -4
+ },
+/obj/item/clothing/accessory/goon_coif{
+ pixel_x = 6;
+ pixel_y = -4
+ },
+/obj/item/clothing/accessory/goon_coif{
+ pixel_x = 6;
+ pixel_y = -4
+ },
/turf/simulated/floor/tiled,
/area/horizon/security/armoury)
"vgZ" = (