From 3c257cb2f3c3680392cdf22dbde91c059de029f5 Mon Sep 17 00:00:00 2001 From: Blundir <100090741+Blundir@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:26:45 +0200 Subject: [PATCH 1/2] initial --- .../vending/vendor_types/crew/sea.dm | 2 +- .../objects/items/devices/radio/headset.dm | 24 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/vending/vendor_types/crew/sea.dm b/code/game/machinery/vending/vendor_types/crew/sea.dm index 99daa1325b0e..4a7acf777b1e 100644 --- a/code/game/machinery/vending/vendor_types/crew/sea.dm +++ b/code/game/machinery/vending/vendor_types/crew/sea.dm @@ -32,7 +32,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_sea, list( list("Officer Uniform", 0, /obj/item/clothing/under/marine/dress, MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY), list("USCM Service Jacket", 0, /obj/item/clothing/suit/storage/jacket/marine/service, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR), list("Marine Combat Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY), - list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom/cdrcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY), + list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom/sea, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY), list("Satchel", 0, /obj/item/storage/backpack/satchel/lockable, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 75c0017eac29..156ce0bcde97 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -39,7 +39,8 @@ var/headset_hud_on = FALSE var/locate_setting = TRACKER_SL var/misc_tracking = FALSE - var/hud_type = MOB_HUD_FACTION_MARINE + var/hud_type = MOB_HUD_FACTION_MARINE //Main faction hud. This determines minimap icons and tracking stuff + var/list/additional_hud_types = list() //Additional faction huds, doesn't change minimap icon or similar var/default_freq ///The type of minimap this headset is added to @@ -263,6 +264,9 @@ if(headset_hud_on) var/datum/mob_hud/H = GLOB.huds[hud_type] H.add_hud_to(user, src) + for(var/per_faction_hud in additional_hud_types) + var/datum/mob_hud/alt_hud = GLOB.huds[per_faction_hud] + alt_hud.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) user.show_hud_tracker() @@ -282,6 +286,10 @@ if(istype(user) && user.has_item_in_ears(src)) //dropped() is called before the inventory reference is update. var/datum/mob_hud/H = GLOB.huds[hud_type] H.remove_hud_from(user, src) + for(var/per_faction_hud in additional_hud_types) + var/datum/mob_hud/alt_hud = GLOB.huds[per_faction_hud] + alt_hud.remove_hud_from(user, src) + //squad leader locator is invisible again if(user.hud_used && user.hud_used.locate_leader) user.hide_hud_tracker() @@ -315,6 +323,9 @@ var/datum/mob_hud/H = GLOB.huds[hud_type] if(headset_hud_on) H.add_hud_to(usr, src) + for(var/per_faction_hud in additional_hud_types) + var/datum/mob_hud/alt_hud = GLOB.huds[per_faction_hud] + alt_hud.add_hud_to(usr, src) if(user.mind && (misc_tracking || user.assigned_squad) && user.hud_used?.locate_leader) user.show_hud_tracker() if(misc_tracking) @@ -322,6 +333,9 @@ update_minimap_icon() else H.remove_hud_from(usr, src) + for(var/per_faction_hud in additional_hud_types) + var/datum/mob_hud/alt_hud = GLOB.huds[per_faction_hud] + alt_hud.remove_hud_from(usr, src) if(user.hud_used?.locate_leader) user.hide_hud_tracker() if(misc_tracking) @@ -583,7 +597,7 @@ icon_state = "wy_headset" maximum_keys = 5 initial_keys = list(/obj/item/device/encryptionkey/mcom/cl) - + additional_hud_types = list(MOB_HUD_FACTION_WY, MOB_HUD_FACTION_PMC) spy_bug_type = /obj/item/device/radio/listening_bug/radio_linked/fax/wy /obj/item/device/radio/headset/almayer/mcl/Initialize() @@ -606,6 +620,7 @@ desc = "Issued only to senior command staff. Channels are as follows: :v - marine command, :p - military police, :a - alpha squad, :b - bravo squad, :c - charlie squad, :d - delta squad, :n - engineering, :m - medbay, :u - requisitions, :j - JTAC, :t - intel" icon_state = "mco_headset" initial_keys = list(/obj/item/device/encryptionkey/cmpcom/cdrcom) + additional_hud_types = list(MOB_HUD_FACTION_WY, MOB_HUD_FACTION_CMB) volume = RADIO_VOLUME_CRITICAL /obj/item/device/radio/headset/almayer/mcom/sea @@ -1016,6 +1031,7 @@ inbuilt_tracking_options = list( "Corporate Liaison" = TRACKER_CL ) + additional_hud_types = list(MOB_HUD_FACTION_WY) /obj/item/device/radio/headset/distress/cbrn name = "\improper CBRN headset" @@ -1060,10 +1076,12 @@ name = "PMC-CMD headset" desc = "A special headset used by corporate personnel. Channels are as follows: :o - colony, #z - command, #f - medical, #e - engineering, #o - JTAC, #p - general" initial_keys = list(/obj/item/device/encryptionkey/colony, /obj/item/device/encryptionkey/pmc/command, /obj/item/device/encryptionkey/mcom/cl) + additional_hud_types = list(MOB_HUD_FACTION_MARINE, MOB_HUD_FACTION_WY) /obj/item/device/radio/headset/distress/pmc/command/hvh initial_keys = list(/obj/item/device/encryptionkey/colony, /obj/item/device/encryptionkey/pmc/command) misc_tracking = FALSE + additional_hud_types = list(MOB_HUD_FACTION_WY) /obj/item/device/radio/headset/distress/pmc/command/director name = "WY director headset" @@ -1175,6 +1193,7 @@ initial_keys = list(/obj/item/device/encryptionkey/cmb) has_hud = TRUE hud_type = MOB_HUD_FACTION_CMB + additional_hud_types = MOB_HUD_FACTION_MARINE /obj/item/device/radio/headset/distress/CMB/limited name = "\improper Damaged CMB Earpiece" @@ -1195,6 +1214,7 @@ initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/royal_marine) has_hud = TRUE hud_type = MOB_HUD_FACTION_NSPA + additional_hud_types = MOB_HUD_FACTION_TWE volume = RADIO_VOLUME_IMPORTANT /obj/item/device/radio/headset/almayer/highcom From 44359999a7d9cc259d8c68450569b1e4ff53d24d Mon Sep 17 00:00:00 2001 From: Blundir <100090741+Blundir@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:35:10 +0200 Subject: [PATCH 2/2] Update headset.dm --- code/game/objects/items/devices/radio/headset.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 156ce0bcde97..b0a6cd73b28c 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -1193,7 +1193,7 @@ initial_keys = list(/obj/item/device/encryptionkey/cmb) has_hud = TRUE hud_type = MOB_HUD_FACTION_CMB - additional_hud_types = MOB_HUD_FACTION_MARINE + additional_hud_types = list(MOB_HUD_FACTION_MARINE) /obj/item/device/radio/headset/distress/CMB/limited name = "\improper Damaged CMB Earpiece" @@ -1214,7 +1214,7 @@ initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/royal_marine) has_hud = TRUE hud_type = MOB_HUD_FACTION_NSPA - additional_hud_types = MOB_HUD_FACTION_TWE + additional_hud_types = list(MOB_HUD_FACTION_TWE) volume = RADIO_VOLUME_IMPORTANT /obj/item/device/radio/headset/almayer/highcom