Skip to content

Commit

Permalink
headset fixes (#4131)
Browse files Browse the repository at this point in the history
## About The Pull Request

refactors headset code a lil
clip bowmans now have the proper sprite
pgf headsets are now soundproofed

## Why It's Good For The Game

you, the viewer decide.

## Changelog

:cl:
fix: CLIP bowman sprites, PGF bowman sound protection.
/:cl:
  • Loading branch information
Erikafox authored Feb 7, 2025
1 parent 88795c5 commit ff52b0a
Showing 1 changed file with 21 additions and 56 deletions.
77 changes: 21 additions & 56 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
var/obj/item/encryptionkey/keyslot2 = null
dog_fashion = null
supports_variations = VOX_VARIATION
var/hearing_protection = FALSE

/obj/item/radio/headset/examine(mob/user)
. = ..()
Expand All @@ -54,6 +55,11 @@ GLOBAL_LIST_INIT(channel_tokens, list(
. = ..()
recalculateChannels()

/obj/item/radio/headset/ComponentInitialize()
. = ..()
if(hearing_protection)
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

/obj/item/radio/headset/Destroy()
QDEL_NULL(keyslot2)
return ..()
Expand All @@ -80,10 +86,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "bowman headset"
desc = "An updated, modular intercom that fits over the head. Protects ears from flashbangs."
icon_state = "headset_alt"

/obj/item/radio/headset/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

//syndicate
/obj/item/radio/headset/syndicate
Expand All @@ -102,17 +105,14 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "syndicate bowman headset"
desc = "A headset worn by members of the various Syndicate splinters on the frontier. Protects ears from flashbangs."
icon_state = "syndie_headset_alt"
hearing_protection = TRUE

/obj/item/radio/headset/syndicate/alt/captain
name = "syndicate leader bowman headset"
desc = "A headset worn by officers of the various Syndicate splinters on the frontier. Protects ears from flashbangs."
command = TRUE
keyslot2 = new /obj/item/encryptionkey/heads/captain

/obj/item/radio/headset/syndicate/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

/obj/item/radio/headset/syndicate/alt/leader
name = "team leader headset"
command = TRUE
Expand Down Expand Up @@ -154,17 +154,14 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "nanotrasen bowman headset"
desc = "Worn proudly by the battered remnants of Nanotrasen's frontier holdings. Protects ears from flashbangs."
icon_state = "nanotrasen_headset_alt"
hearing_protection = TRUE

/obj/item/radio/headset/nanotrasen/alt/captain
name = "nanotrasen captain's bowman headset"
desc = "Worn proudly by Nanotrasen's remaining captains on the frontier. Protects ears from flashbangs."
keyslot2 = new /obj/item/encryptionkey/heads/captain
command = TRUE

/obj/item/radio/headset/nanotrasen/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

//clip
/obj/item/radio/headset/clip
name = "minutemen radio headset"
Expand All @@ -181,18 +178,16 @@ GLOBAL_LIST_INIT(channel_tokens, list(
/obj/item/radio/headset/clip/alt
name = "minutemen bowman headset"
desc = "Used by militias flying the five stars of the Colonial Minutemen. Protects ears from flashbangs."
icon_state = "clip_headset_alt"
mob_overlay_state = "cmm_headset_alt"
hearing_protection = TRUE

/obj/item/radio/headset/clip/alt/captain
name = "minuteman officer bowman headset"
desc = "Used by the CLIP Minutemen's enlisted officers. Protects ears from flashbangs."
keyslot2 = new /obj/item/encryptionkey/heads/captain
command = TRUE

/obj/item/radio/headset/clip/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

//inteq
/obj/item/radio/headset/inteq
name = "inteq radio headset"
Expand All @@ -210,21 +205,14 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "inteq bowman headset"
desc = "This is used by Inteq Risk Management Group's mercenaries. Protects ears from flashbangs."
icon_state = "inteq_headset_alt"

/obj/item/radio/headset/inteq/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

/obj/item/radio/headset/inteq/alt/captain
name = "vanguard bowman headset"
desc = "Used by Inteq Risk Management Group's elite vanguards. Protects ears from flashbangs."
keyslot2 = new /obj/item/encryptionkey/heads/captain
command = TRUE

/obj/item/radio/headset/inteq/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

//pirate
/obj/item/radio/headset/pirate
name = "pirate radio headset"
Expand All @@ -242,17 +230,14 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "pirate bowman headset"
desc = "Used to sing shanties across the vast emptiness of space, and complain about Minuteman patrols. Protects ears from flashbangs."
icon_state = "pirate_headset_alt"
hearing_protection = TRUE

/obj/item/radio/headset/pirate/alt/captain
name = "pirate captain bowman headset"
desc = "The headset of a bloodthirsty pirate captain. Protects ears from flashbangs."
keyslot2 = new /obj/item/encryptionkey/heads/captain
command = TRUE

/obj/item/radio/headset/pirate/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

//PGF
/obj/item/radio/headset/pgf
name = "\improper PGF headset"
Expand All @@ -269,6 +254,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "\improper PGF bowman headset"
desc = "A headset often worn by members of the PGFN and PGFMC. Protects ears from flashbangs."
icon_state = "solgov_headset_alt"
hearing_protection = TRUE

/obj/item/radio/headset/pgf/alt/captain
name = "\improper PGF official bowman headset"
Expand All @@ -293,17 +279,14 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "\improper SolGov bowman headset"
desc = "Worn by bureaucrats and, occasionally, Sonnensoldneren. Protects ears from flashbangs."
icon_state = "solgov_headset_alt"
hearing_protection = TRUE

/obj/item/radio/headset/solgov/alt/captain
name = "\improper SolGov official bowman headset"
desc = "Worn by various officials and leaders from SolGov. Fancy hat not included. Protects ears from flashbangs."
keyslot2 = new /obj/item/encryptionkey/heads/captain
command = TRUE

/obj/item/radio/headset/solgov/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))

//independent
/obj/item/radio/headset/headset_com
name = "command radio headset"
Expand All @@ -315,10 +298,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "command bowman headset"
desc = "An officer's headset. Protects ears from flashbangs."
icon_state = "headset_alt"

/obj/item/radio/headset/headset_com/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

/obj/item/radio/headset/heads
command = TRUE
Expand All @@ -334,10 +314,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "captain's bowman headset"
desc = "Dresses the ears of independent ship captains across the frontier. Protects ears from flashbangs."
icon_state = "headset_alt"

/obj/item/radio/headset/heads/captain/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

//special headsets
/obj/item/radio/headset/binary
Expand Down Expand Up @@ -366,10 +343,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
desc = "A headset especially for emergency response personnel. Protects ears from flashbangs."
icon_state = "cent_headset_alt"
keyslot = null

/obj/item/radio/headset/headset_cent/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

/obj/item/radio/headset/silicon/pai
name = "\proper mini Integrated Subspace Transceiver "
Expand All @@ -392,10 +366,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "security bowman headset"
desc = "This is used by your elite security force. Protects ears from flashbangs."
icon_state = "sec_headset_alt"

/obj/item/radio/headset/headset_sec/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

/obj/item/radio/headset/headset_medsec
name = "medical-security radio headset"
Expand All @@ -406,10 +377,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "medical-security bowman headset"
desc = "Used to hear how many security officers need to be stiched back together. Protects ears from flashbangs."
icon_state = "medsec_headset_alt"

/obj/item/radio/headset/headset_medsec/alt/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

/obj/item/radio/headset/headset_eng
name = "engineering radio headset"
Expand Down Expand Up @@ -460,10 +428,7 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "\proper the head of security's bowman headset"
desc = "The headset of the man in charge of keeping order and protecting the innocent. Protects ears from flashbangs."
icon_state = "headset_alt"

/obj/item/radio/headset/heads/hos/ComponentInitialize()
. = ..()
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
hearing_protection = TRUE

/obj/item/radio/headset/heads/ce
name = "\proper the chief engineer's headset"
Expand Down

0 comments on commit ff52b0a

Please sign in to comment.