Skip to content

Commit

Permalink
TGS Test Merge (#8096)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Jan 19, 2025
2 parents fa6c66b + 4435999 commit 27d5db1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/game/machinery/vending/vendor_types/crew/sea.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Expand Down
24 changes: 22 additions & 2 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -315,13 +323,19 @@
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)
SStracking.start_misc_tracking(user)
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)
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down Expand Up @@ -1019,6 +1034,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"
Expand Down Expand Up @@ -1063,10 +1079,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"
Expand Down Expand Up @@ -1178,6 +1196,7 @@
initial_keys = list(/obj/item/device/encryptionkey/cmb)
has_hud = TRUE
hud_type = MOB_HUD_FACTION_CMB
additional_hud_types = list(MOB_HUD_FACTION_MARINE)

/obj/item/device/radio/headset/distress/CMB/limited
name = "\improper Damaged CMB Earpiece"
Expand All @@ -1198,6 +1217,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 = list(MOB_HUD_FACTION_TWE)
volume = RADIO_VOLUME_IMPORTANT

/obj/item/device/radio/headset/almayer/highcom
Expand Down

0 comments on commit 27d5db1

Please sign in to comment.