mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-16 08:37:41 +01:00
* WE'RE SO BACK * LET THERE BE SOUND * More bugs * fixes * sound * hmm * clothing sprites + minor code changes to clothes * meestake * spritening * YARR * hiss * Cyberiad explorer remap * hand telover * delta days * rooms done * VENDOR * Mapping done * Salvage mapped * qol * Forgot the hivelord. * woops * oops redux * reviews and more * consistency * Update code/game/jobs/job_globals.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * character * Update code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/effects/spawners/random_spawners.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/hostile/pirate.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/clothing/head/job_hats.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/effects/spawners/random_spawners.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/boxes.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/research/designs/machine_designs.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * some reviews * Update code/game/machinery/constructable_frame.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * supply * area repathing and ambience * mapping * metamapping * Update code/game/objects/items/weapons/storage/belt.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * the doorening * redooring * modsuit * more reviews * the plasmamamninigngg * add random salvage generation across space ruins * add blackbox tracking for salvage sold * gun * deconflicts and reviews * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/clothing/head/job_hats.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/weapons/storage/garment.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * all conversations resolved * maybe work now? * please no more, too many apcs * Update code/modules/mob/living/simple_animal/corpse.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mining/machine_vending.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/clothing/suits/misc_suits.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/game/objects/items/sellable.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * henri review + action figure * Update code/game/objects/items/toys.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * PDA * conflicts * more conflicts * maybe all conflcits? * wait fuck * maybe fixed??? * KIDAN SPRITES * MAYBE? * access fixes * explorer hotfixes 1: - fixes space pirates dying in space - gives explorers ORM access - box: fixes access on NTR airlock - box: fixes naming on BS airlock - box: adds expedition access to mail sorting room * add salvage selling back * NOT FOR SALE * oh my god actually sell the fucking salvage this time * maybe fine now? * carpover * NO MORE CABLE * balance tweaks * some depot loot updates * merge conflict * deconflicted??? * woops more oversights * skirts, bombers, exploredrobe code + sprites * woops (again) * deconflicting * remove old explorer room again * Hat fix * minor changes to sprites and code for hats * yarrr fix 1 * first fixes * don't drop loot from syndies gibbed by depot destruction * add selling back with new signal based system * speedmerge this shit * minor changes to collars/bomber resprite * docking port in * ruins * WE DON'T NEED CONFIG CHANGES WE NEED PICTURES PICTURES OF SPIDERMAN * no more murder hallway on whiteship * undelete meson sunglasses, redelete uristrunes * BOOTY BAGS * don't drop ashdrake loot from crusher kills * box: fix ntrep fax, add explorer access to ORMroom * add meson sunglasses item icon back * fix cere handtele, meta shutter control, death sound arg * cleaning up * she mosins on my russian till i dj station * Update code/modules/clothing/head/soft_caps.dm Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com> Signed-off-by: Marm <85680653+ItsMarmite@users.noreply.github.com> * Update code/modules/clothing/suits/misc_suits.dm Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com> Signed-off-by: Marm <85680653+ItsMarmite@users.noreply.github.com> * Update code/modules/mining/machine_vending.dm Co-authored-by: Matt <116982774+Burzah@users.noreply.github.com> Signed-off-by: Marm <85680653+ItsMarmite@users.noreply.github.com> * Update code/game/gamemodes/game_mode.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Marm <85680653+ItsMarmite@users.noreply.github.com> * mapping * Cleaning up * revert changes in tools/{bootstrap,ci} --------- Signed-off-by: Marm <85680653+ItsMarmite@users.noreply.github.com> Co-authored-by: Christasmurf <25437893+Christasmurf@users.noreply.github.com> Co-authored-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
512 lines
15 KiB
Plaintext
512 lines
15 KiB
Plaintext
/obj/item/radio/headset
|
|
name = "radio headset"
|
|
desc = "An updated, modular intercom that fits over the head. Takes encryption keys."
|
|
var/radio_desc = ""
|
|
icon_state = "headset"
|
|
item_state = "headset"
|
|
sprite_sheets = list(
|
|
"Vox" = 'icons/mob/clothing/species/vox/ears.dmi', //We read you loud and skree-er.
|
|
"Kidan" = 'icons/mob/clothing/species/kidan/ears.dmi'
|
|
)
|
|
materials = list(MAT_METAL = 200)
|
|
canhear_range = 0 // can't hear headsets from very far away
|
|
|
|
slot_flags = SLOT_FLAG_EARS
|
|
var/translate_binary = FALSE
|
|
var/translate_hive = FALSE
|
|
var/obj/item/encryptionkey/keyslot1 = null
|
|
var/obj/item/encryptionkey/keyslot2 = null
|
|
|
|
var/ks1type = null
|
|
var/ks2type = null
|
|
dog_fashion = null
|
|
requires_tcomms = TRUE
|
|
|
|
/obj/item/radio/headset/New()
|
|
..()
|
|
internal_channels.Cut()
|
|
|
|
/obj/item/radio/headset/Initialize(mapload)
|
|
. = ..()
|
|
|
|
if(ks1type)
|
|
keyslot1 = new ks1type(src)
|
|
if(keyslot1.syndie)
|
|
syndiekey = keyslot1
|
|
if(ks2type)
|
|
keyslot2 = new ks2type(src)
|
|
if(keyslot2.syndie)
|
|
syndiekey = keyslot2
|
|
|
|
recalculateChannels(TRUE)
|
|
|
|
/obj/item/radio/headset/Destroy()
|
|
QDEL_NULL(keyslot1)
|
|
QDEL_NULL(keyslot2)
|
|
QDEL_NULL(syndiekey)
|
|
return ..()
|
|
|
|
/obj/item/radio/headset/examine(mob/user)
|
|
. = ..()
|
|
if(in_range(src, user) && radio_desc)
|
|
. += "The following channels are available:"
|
|
. += radio_desc
|
|
|
|
/obj/item/radio/headset/handle_message_mode(mob/living/M as mob, list/message_pieces, channel)
|
|
if(channel == "special")
|
|
if(translate_binary)
|
|
var/datum/language/binary = GLOB.all_languages["Robot Talk"]
|
|
binary.broadcast(M, strip_prefixes(multilingual_to_message(message_pieces)))
|
|
return RADIO_CONNECTION_NON_SUBSPACE
|
|
if(translate_hive)
|
|
var/datum/language/hivemind = GLOB.all_languages["Hivemind"]
|
|
hivemind.broadcast(M, strip_prefixes(multilingual_to_message(message_pieces)))
|
|
return RADIO_CONNECTION_NON_SUBSPACE
|
|
return RADIO_CONNECTION_FAIL
|
|
|
|
return ..()
|
|
|
|
/obj/item/radio/headset/is_listening()
|
|
if(ishuman(loc))
|
|
var/mob/living/carbon/human/H = loc
|
|
if(H.l_ear == src || H.r_ear == src)
|
|
return ..()
|
|
else if(isanimal(loc) || isAI(loc))
|
|
return ..()
|
|
|
|
return FALSE
|
|
|
|
/obj/item/radio/headset/alt
|
|
name = "bowman headset"
|
|
desc = "An updated, modular intercom that fits over the head. Takes encryption keys. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
|
|
/obj/item/radio/headset/alt/deathsquad
|
|
name = "Deathsquad headset"
|
|
desc = "Special Operations only. Protects ears from flashbangs."
|
|
requires_tcomms = FALSE
|
|
instant = TRUE
|
|
freqlock = TRUE
|
|
|
|
/obj/item/radio/headset/alt/deathsquad/Initialize()
|
|
. = ..()
|
|
set_frequency(DTH_FREQ)
|
|
|
|
/obj/item/radio/headset/syndicate
|
|
origin_tech = "syndicate=3"
|
|
ks1type = /obj/item/encryptionkey/syndicate/nukeops
|
|
requires_tcomms = FALSE
|
|
instant = TRUE // Work instantly if there are no comms
|
|
freqlock = TRUE
|
|
|
|
/// undisguised bowman with flash protection
|
|
/obj/item/radio/headset/syndicate/alt
|
|
name = "syndicate headset"
|
|
desc = "A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
origin_tech = "syndicate=3"
|
|
icon_state = "syndie_headset"
|
|
item_state = "syndie_headset"
|
|
|
|
/obj/item/radio/headset/syndicate/syndteam
|
|
ks1type = /obj/item/encryptionkey/syndteam
|
|
|
|
/obj/item/radio/headset/syndicate/alt/syndteam
|
|
ks1type = /obj/item/encryptionkey/syndteam
|
|
|
|
/obj/item/radio/headset/syndicate/alt/nocommon
|
|
name = "syndicate researcher headset"
|
|
|
|
/obj/item/radio/headset/syndicate/alt/nocommon/New()
|
|
. = ..()
|
|
set_frequency(SYND_FREQ)
|
|
|
|
/obj/item/radio/headset/soviet
|
|
name = "soviet bowman headset"
|
|
desc = "Used by U.S.S.P forces. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
origin_tech = "syndicate=3"
|
|
icon_state = "soviet_headset"
|
|
item_state = "soviet_headset"
|
|
ks1type = /obj/item/encryptionkey/soviet
|
|
requires_tcomms = FALSE
|
|
|
|
/obj/item/radio/headset/binary
|
|
origin_tech = "syndicate=3"
|
|
ks1type = /obj/item/encryptionkey/binary
|
|
|
|
/obj/item/radio/headset/headset_sec
|
|
name = "security radio headset"
|
|
desc = "This is used by your elite security force."
|
|
icon_state = "sec_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_sec
|
|
|
|
/obj/item/radio/headset/headset_sec/alt
|
|
name = "security bowman headset"
|
|
desc = "This is used by your elite security force. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "sec_headset_alt"
|
|
item_state = "sec_headset_alt"
|
|
|
|
/obj/item/radio/headset/headset_iaa
|
|
name = "internal affairs radio headset"
|
|
desc = "This is used by your elite legal team."
|
|
icon_state = "sec_headset"
|
|
item_state = "sec_headset"
|
|
ks2type = /obj/item/encryptionkey/headset_iaa
|
|
|
|
/obj/item/radio/headset/headset_iaa/alt
|
|
name = "internal affairs bowman headset"
|
|
desc = "This is used by your elite legal team. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "sec_headset_alt"
|
|
item_state = "sec_headset_alt"
|
|
|
|
/obj/item/radio/headset/headset_eng
|
|
name = "engineering radio headset"
|
|
desc = "When the engineers wish to chat like girls."
|
|
icon_state = "eng_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_eng
|
|
|
|
/obj/item/radio/headset/headset_rob
|
|
name = "robotics radio headset"
|
|
desc = "Made specifically for the roboticists who cannot decide between departments."
|
|
icon_state = "rob_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_rob
|
|
|
|
/obj/item/radio/headset/headset_med
|
|
name = "medical radio headset"
|
|
desc = "A headset for the trained staff of the medbay."
|
|
icon_state = "med_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_med
|
|
|
|
/obj/item/radio/headset/headset_med/para
|
|
name = "paramedic radio headset"
|
|
desc = "A headset for the trusty paramedic, Nanotrasen search and rescue."
|
|
icon_state = "para_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_med/para
|
|
|
|
/obj/item/radio/headset/headset_sci
|
|
name = "science radio headset"
|
|
desc = "A sciency headset. Like usual."
|
|
icon_state = "sci_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_sci
|
|
|
|
/obj/item/radio/headset/headset_medsci
|
|
name = "medical research radio headset"
|
|
desc = "A headset that is a result of the mating between medical and science."
|
|
icon_state = "medsci_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_medsci
|
|
|
|
/obj/item/radio/headset/headset_com
|
|
name = "command radio headset"
|
|
desc = "A headset with a commanding channel."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_com
|
|
|
|
/obj/item/radio/headset/heads/captain
|
|
name = "captain's headset"
|
|
desc = "The headset of the boss."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/captain
|
|
|
|
/obj/item/radio/headset/heads/captain/alt
|
|
name = "captain's bowman headset"
|
|
desc = "The headset of the boss. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
|
|
/obj/item/radio/headset/heads/rd
|
|
name = "research director's headset"
|
|
desc = "Headset of the researching God."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/rd
|
|
|
|
/obj/item/radio/headset/heads/hos
|
|
name = "head of security's headset"
|
|
desc = "The headset of the man who protects your worthless lives."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/hos
|
|
|
|
/obj/item/radio/headset/heads/hos/alt
|
|
name = "head of security's bowman headset"
|
|
desc = "The headset of the man in charge of keeping order and protecting the station. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
|
|
/obj/item/radio/headset/heads/ce
|
|
name = "chief engineer's headset"
|
|
desc = "The headset of the guy who is in charge of morons."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/ce
|
|
|
|
/obj/item/radio/headset/heads/cmo
|
|
name = "chief medical officer's headset"
|
|
desc = "The headset of the highly trained medical chief."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/cmo
|
|
|
|
/obj/item/radio/headset/heads/hop
|
|
name = "head of personnel's headset"
|
|
desc = "The headset of the guy who will one day be captain."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/hop
|
|
|
|
/obj/item/radio/headset/heads/qm
|
|
name = "quartermaster's headset"
|
|
desc = "Smelling of tobacco and gunpowder, this headset has likely seen many backroom deals."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/qm
|
|
|
|
/obj/item/radio/headset/headset_cargo
|
|
name = "supply radio headset"
|
|
desc = "A headset used by the cargo department."
|
|
icon_state = "cargo_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_cargo
|
|
|
|
/obj/item/radio/headset/headset_cargo/mining
|
|
name = "mining radio headset"
|
|
desc = "Headset used by shaft miners."
|
|
icon_state = "mine_headset"
|
|
|
|
/obj/item/radio/headset/headset_cargo/expedition
|
|
name = "expedition radio headset"
|
|
desc = "Headset used by space explorers."
|
|
icon_state = "mine_headset"
|
|
|
|
/obj/item/radio/headset/headset_service
|
|
name = "service radio headset"
|
|
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean."
|
|
icon_state = "srv_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/headset_service
|
|
|
|
/obj/item/radio/headset/heads/ntrep
|
|
name = "nanotrasen representative's headset"
|
|
desc = "The headset of the Nanotrasen Representative."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/ntrep
|
|
|
|
/obj/item/radio/headset/heads/magistrate
|
|
name = "magistrate's headset"
|
|
desc = "The headset of the Magistrate."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/magistrate
|
|
|
|
/obj/item/radio/headset/heads/magistrate/alt
|
|
name = "magistrate's bowman headset"
|
|
desc = "The headset of the Magistrate. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
|
|
/obj/item/radio/headset/heads/blueshield
|
|
name = "blueshield's headset"
|
|
desc = "The headset of the Blueshield."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/blueshield
|
|
|
|
/obj/item/radio/headset/heads/blueshield/alt
|
|
name = "blueshield's bowman headset"
|
|
desc = "The headset of the Blueshield. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
|
|
/obj/item/radio/headset/ert
|
|
name = "emergency response team headset"
|
|
desc = "The headset of the boss's boss."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/ert
|
|
freqlock = TRUE
|
|
|
|
/obj/item/radio/headset/ert/alt
|
|
name = "emergency response team's bowman headset"
|
|
desc = "The headset of the boss. Protects ears from flashbangs."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
|
|
/obj/item/radio/headset/ert/alt/solgov
|
|
name = "\improper Trans-Solar Federation Marine's bowman headset"
|
|
|
|
/obj/item/radio/headset/ert/alt/solgovviper
|
|
name = "\improper Trans-Solar Federation Infiltrator's bowman headset"
|
|
|
|
/obj/item/radio/headset/ert/alt/commander
|
|
name = "ERT commander's bowman headset"
|
|
desc = "The headset of the boss. Protects ears from flashbangs. Can transmit even if telecomms are down."
|
|
requires_tcomms = FALSE
|
|
instant = TRUE
|
|
|
|
/obj/item/radio/headset/ert/alt/commander/solgov
|
|
name = "\improper Trans-Solar Federation Lieutenant's bowman headset"
|
|
|
|
/obj/item/radio/headset/centcom
|
|
name = "centcom officer's bowman headset"
|
|
desc = "The headset of final authority. Protects ears from flashbangs. Can transmit even if telecomms are down."
|
|
flags = EARBANGPROTECT
|
|
icon_state = "com_headset_alt"
|
|
item_state = "com_headset_alt"
|
|
ks2type = /obj/item/encryptionkey/centcom
|
|
requires_tcomms = FALSE
|
|
instant = TRUE
|
|
|
|
/// No need to care about icons, it should be hidden inside the AI anyway.
|
|
/obj/item/radio/headset/heads/ai_integrated
|
|
name = "\improper AI subspace transceiver"
|
|
desc = "Integrated AI radio transceiver."
|
|
icon = 'icons/obj/robot_component.dmi'
|
|
icon_state = "radio"
|
|
item_state = "headset"
|
|
ks2type = /obj/item/encryptionkey/heads/ai_integrated
|
|
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
|
|
var/disabledAi = FALSE // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
|
|
|
|
/obj/item/radio/headset/heads/ai_integrated/is_listening()
|
|
if(disabledAi)
|
|
return FALSE
|
|
return ..()
|
|
|
|
/obj/item/radio/headset/attackby(obj/item/key, mob/user)
|
|
if(istype(key, /obj/item/encryptionkey/))
|
|
|
|
if(keyslot1 && keyslot2)
|
|
to_chat(user, "The headset can't hold another key!")
|
|
return
|
|
|
|
if(!user.unEquip(key))
|
|
to_chat(user, "<span class='warning'>[key] is stuck to your hand, you can't insert it in [src].</span>")
|
|
return
|
|
|
|
key.forceMove(src)
|
|
if(!keyslot1)
|
|
keyslot1 = key
|
|
else
|
|
keyslot2 = key
|
|
|
|
recalculateChannels()
|
|
return
|
|
|
|
return ..()
|
|
|
|
/obj/item/radio/headset/screwdriver_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(!I.use_tool(src, user, 0, volume = 0))
|
|
return
|
|
|
|
if(keyslot1 || keyslot2)
|
|
|
|
for(var/ch_name in channels)
|
|
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
|
|
secure_radio_connections[ch_name] = null
|
|
|
|
if(keyslot1)
|
|
var/turf/T = get_turf(user)
|
|
if(T)
|
|
keyslot1.loc = T
|
|
keyslot1 = null
|
|
if(keyslot2)
|
|
var/turf/T = get_turf(user)
|
|
if(T)
|
|
keyslot2.loc = T
|
|
keyslot2 = null
|
|
|
|
recalculateChannels()
|
|
to_chat(user, "You pop out the encryption keys in the headset!")
|
|
I.play_tool_sound(user, I.tool_volume)
|
|
else
|
|
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
|
|
|
|
/obj/item/radio/headset/recalculateChannels(setDescription = FALSE)
|
|
channels = list()
|
|
translate_binary = FALSE
|
|
translate_hive = FALSE
|
|
syndiekey = null
|
|
|
|
if(keyslot1)
|
|
for(var/ch_name in keyslot1.channels)
|
|
if(ch_name in channels)
|
|
continue
|
|
channels += ch_name
|
|
channels[ch_name] = keyslot1.channels[ch_name]
|
|
|
|
if(keyslot1.translate_binary)
|
|
translate_binary = TRUE
|
|
|
|
if(keyslot1.translate_hive)
|
|
translate_hive = TRUE
|
|
|
|
if(keyslot1.syndie)
|
|
syndiekey = keyslot1
|
|
|
|
if(keyslot2)
|
|
for(var/ch_name in keyslot2.channels)
|
|
if(ch_name in channels)
|
|
continue
|
|
channels += ch_name
|
|
channels[ch_name] = keyslot2.channels[ch_name]
|
|
|
|
if(keyslot2.translate_binary)
|
|
translate_binary = TRUE
|
|
|
|
if(keyslot2.translate_hive)
|
|
translate_hive = TRUE
|
|
|
|
if(keyslot2.syndie)
|
|
syndiekey = keyslot2
|
|
|
|
|
|
for(var/ch_name in channels)
|
|
if(!SSradio)
|
|
name = "broken radio headset"
|
|
return
|
|
|
|
secure_radio_connections[ch_name] = SSradio.add_object(src, SSradio.radiochannels[ch_name], RADIO_CHAT)
|
|
|
|
if(setDescription)
|
|
setupRadioDescription()
|
|
|
|
return
|
|
|
|
/obj/item/radio/headset/proc/setupRadioDescription()
|
|
var/radio_text = ""
|
|
for(var/i = 1 to length(channels))
|
|
var/channel = channels[i]
|
|
var/key = get_radio_key_from_channel(channel)
|
|
radio_text += "[key] - [channel]"
|
|
if(i != length(channels))
|
|
radio_text += ", "
|
|
|
|
radio_desc = radio_text
|
|
|
|
/obj/item/radio/headset/proc/make_syndie() // Turns normal radios into Syndicate radios!
|
|
qdel(keyslot1)
|
|
keyslot1 = new /obj/item/encryptionkey/syndicate
|
|
syndiekey = keyslot1
|
|
recalculateChannels()
|