mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-08 00:21:43 +00:00
Conflicts: baystation12.dme code/ATMOSPHERICS/components/unary/vent_pump.dm code/ATMOSPHERICS/components/unary/vent_scrubber.dm code/__HELPERS/game.dm code/controllers/shuttle_controller.dm code/datums/datumvars.dm code/datums/supplypacks.dm code/defines/obj/storage.dm code/defines/obj/vending.dm code/defines/obj/weapon.dm code/defines/procs/command_alert.dm code/game/area/Space Station 13 areas.dm code/game/atoms.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/cult/runes.dm code/game/gamemodes/events.dm code/game/gamemodes/events/dust.dm code/game/gamemodes/events/miniblob.dm code/game/gamemodes/events/ninja_equipment.dm code/game/gamemodes/factions.dm code/game/gamemodes/game_mode.dm code/game/gamemodes/gameticker.dm code/game/jobs/access.dm code/game/jobs/job/assistant.dm code/game/jobs/job/captain.dm code/game/jobs/job/civilian.dm code/game/jobs/job/engineering.dm code/game/jobs/job/medical.dm code/game/jobs/job/science.dm code/game/jobs/job/security.dm code/game/jobs/job_controller.dm code/game/machinery/alarm.dm code/game/machinery/atmo_control.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/bots/medbot.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/computer/ai_core.dm code/game/machinery/computer/atmos_alert.dm code/game/machinery/computer/card.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/computer.dm code/game/machinery/computer/message.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/prisoner.dm code/game/machinery/computer/syndicate_shuttle.dm code/game/machinery/constructable_frame.dm code/game/machinery/doors/door.dm code/game/machinery/doors/firedoor.dm code/game/machinery/newscaster.dm code/game/machinery/recharger.dm code/game/machinery/spaceheater.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/logbrowser.dm code/game/machinery/telecomms/machine_interactions.dm code/game/machinery/teleporter.dm code/game/machinery/wishgranter.dm code/game/mecha/mech_fabricator.dm code/game/mecha/working/ripley.dm code/game/objects/items.dm code/game/objects/items/blueprints.dm code/game/objects/items/devices/flashlight.dm code/game/objects/items/devices/radio/encryptionkey.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/stacks/medical.dm code/game/objects/items/weapons/cards_ids.dm code/game/objects/items/weapons/gift_wrappaper.dm code/game/objects/items/weapons/hydroponics.dm code/game/objects/items/weapons/manuals.dm code/game/objects/items/weapons/secstorage/secstorage.dm code/game/objects/items/weapons/storage/backpack.dm code/game/objects/items/weapons/storage/firstaid.dm code/game/objects/items/weapons/storage/kit.dm code/game/objects/items/weapons/storage/storage.dm code/game/objects/items/weapons/storage/toolbox.dm code/game/objects/items/weapons/storage/uplink_kits.dm code/game/objects/items/weapons/stunbaton.dm code/game/objects/items/weapons/surgery_tools.dm code/game/objects/items/weapons/tools.dm code/game/objects/structures/crates_lockers/closets/secure/cargo.dm code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm code/game/objects/structures/crates_lockers/closets/secure/scientist.dm code/game/objects/structures/crates_lockers/closets/secure/security.dm code/game/objects/structures/electricchair.dm code/game/objects/structures/extinguisher.dm code/game/objects/structures/watercloset.dm code/game/objects/weapons.dm code/game/turfs/turf.dm code/game/vehicles/airtight/airtight.dm code/game/vehicles/vehicle.dm code/global.dm code/modules/DetectiveWork/evidence.dm code/modules/admin/IsBanned.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/diagnostics.dm code/modules/admin/verbs/getlogs.dm code/modules/client/preferences.dm code/modules/clothing/masks/miscellaneous.dm code/modules/clothing/spacesuits/rig.dm code/modules/clothing/suits/miscellaneous.dm code/modules/critters/critter_defenses.dm code/modules/detectivework/scanner.dm code/modules/flufftext/Hallucination.dm code/modules/food/recipes_microwave.dm code/modules/mining/mine_items.dm code/modules/mining/mine_turfs.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/dead/observer/observer.dm code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm code/modules/mob/living/carbon/alien/special/facehugger.dm code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/carbon/carbon_defines.dm code/modules/mob/living/carbon/human/human.dm code/modules/mob/living/carbon/human/human_attackhand.dm code/modules/mob/living/carbon/human/life.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/carbon/metroid/metroid.dm code/modules/mob/living/living.dm code/modules/mob/living/silicon/ai/life.dm code/modules/mob/living/silicon/robot/robot.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_transformation_simple.dm code/modules/paperwork/clipboard.dm code/modules/paperwork/folders.dm code/modules/paperwork/paper.dm code/modules/paperwork/paperbin.dm code/modules/paperwork/pen.dm code/modules/power/cable.dm code/modules/projectiles/guns/energy/special.dm code/modules/projectiles/guns/projectile/revolver.dm code/modules/projectiles/projectile/change.dm code/modules/projectiles/projectile/special.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/reagent_containers/glass.dm code/modules/reagents/reagent_containers/hypospray.dm code/modules/recycling/sortingmachinery.dm code/modules/research/designs.dm config/config.txt html/changelog.html icons/mob/head.dmi icons/mob/hud.dmi icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/mask.dmi icons/mob/suit.dmi icons/mob/ties.dmi icons/mob/uniform.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/masks.dmi icons/obj/clothing/suits.dmi icons/obj/clothing/ties.dmi icons/obj/grenade.dmi icons/obj/projectiles.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
271 lines
8.7 KiB
Plaintext
271 lines
8.7 KiB
Plaintext
/obj/item/device/radio/headset
|
|
name = "radio headset"
|
|
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
|
|
icon_state = "headset"
|
|
item_state = "headset"
|
|
g_amt = 0
|
|
m_amt = 75
|
|
subspace_transmission = 1
|
|
canhear_range = 0 // can't hear headsets from very far away
|
|
|
|
slot_flags = SLOT_EARS
|
|
var/translate_binary = 0
|
|
var/translate_hive = 0
|
|
var/obj/item/device/encryptionkey/keyslot1 = null
|
|
var/obj/item/device/encryptionkey/keyslot2 = null
|
|
maxf = 1489
|
|
|
|
/obj/item/device/radio/headset/New()
|
|
..()
|
|
keyslot1 = new /obj/item/device/encryptionkey/
|
|
recalculateChannels()
|
|
|
|
/obj/item/device/radio/headset/receive_range(freq, level)
|
|
if(ishuman(src.loc))
|
|
var/mob/living/carbon/human/H = src.loc
|
|
if(H.ears == src)
|
|
return ..(freq, level)
|
|
return -1
|
|
|
|
/obj/item/device/radio/headset/syndicate
|
|
origin_tech = "syndicate=3"
|
|
/obj/item/device/radio/headset/syndicate/New()
|
|
..()
|
|
del(keyslot1)
|
|
keyslot1 = new /obj/item/device/encryptionkey/syndicate
|
|
syndie = 1
|
|
recalculateChannels()
|
|
|
|
/obj/item/device/radio/headset/binary
|
|
origin_tech = "syndicate=3"
|
|
/obj/item/device/radio/headset/binary/New()
|
|
..()
|
|
del(keyslot1)
|
|
keyslot1 = new /obj/item/device/encryptionkey/binary
|
|
recalculateChannels()
|
|
|
|
/obj/item/device/radio/headset/headset_sec
|
|
name = "security radio headset"
|
|
desc = "This is used by your elite security force. To access the security channel, use :s."
|
|
icon_state = "sec_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_sec
|
|
|
|
/obj/item/device/radio/headset/headset_eng
|
|
name = "engineering radio headset"
|
|
desc = "When the engineers wish to chat like girls. To access the engineering channel, use :e. "
|
|
icon_state = "eng_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_eng
|
|
|
|
/obj/item/device/radio/headset/headset_rob
|
|
name = "robotics radio headset"
|
|
desc = "Made specifically for the roboticists who cannot decide between departments. To access the engineering channel, use :e. For research, use :n."
|
|
icon_state = "rob_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_rob
|
|
|
|
/obj/item/device/radio/headset/headset_med
|
|
name = "medical radio headset"
|
|
desc = "A headset for the trained staff of the medbay. To access the medical channel, use :m."
|
|
icon_state = "med_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_med
|
|
|
|
/obj/item/device/radio/headset/headset_sci
|
|
name = "science radio headset"
|
|
desc = "A sciency headset. Like usual. To access the science channel, use :n."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_sci
|
|
|
|
/obj/item/device/radio/headset/headset_medsci
|
|
name = "medical research radio headset"
|
|
desc = "A headset that is a result of the mating between medical and science. To access the medical channel, use :m. For science, use :n."
|
|
icon_state = "med_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_medsci
|
|
|
|
/obj/item/device/radio/headset/headset_com
|
|
name = "command radio headset"
|
|
desc = "A headset with a commanding channel. To access the command channel, use :c."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_com
|
|
|
|
/obj/item/device/radio/headset/heads/captain
|
|
name = "captain's headset"
|
|
desc = "The headset of the boss. Channels are as follows: :c - command, :s - security, :e - engineering, :u - supply, :m - medical, :n - science."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
|
|
|
|
/obj/item/device/radio/headset/heads/rd
|
|
name = "Research Director's headset"
|
|
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/rd
|
|
|
|
/obj/item/device/radio/headset/heads/hos
|
|
name = "head of security's headset"
|
|
desc = "The headset of the man who protects your worthless lifes. To access the security channel, use :s. For command, use :c."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/hos
|
|
|
|
/obj/item/device/radio/headset/heads/ce
|
|
name = "chief engineer's headset"
|
|
desc = "The headset of the guy who is in charge of morons. To access the engineering channel, use :e. For command, use :c."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/ce
|
|
|
|
/obj/item/device/radio/headset/heads/cmo
|
|
name = "chief medical officer's headset"
|
|
desc = "The headset of the highly trained medical chief. To access the medical channel, use :m. For command, use :c."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/cmo
|
|
|
|
/obj/item/device/radio/headset/heads/hop
|
|
name = "head of personnel's headset"
|
|
desc = "The headset of the guy who will one day be captain. Channels are as follows: :u - supply, :c - command, :s - security"
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/hop
|
|
/*
|
|
/obj/item/device/radio/headset/headset_mine
|
|
name = "mining radio headset"
|
|
desc = "Headset used by miners. How useless. To access the mining channel, use :d."
|
|
icon_state = "mine_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_mine
|
|
|
|
/obj/item/device/radio/headset/heads/qm
|
|
name = "quartermaster's headset"
|
|
desc = "The headset of the man who control your toiletpaper supply. To access the cargo channel, use :q. For mining, use :d."
|
|
icon_state = "cargo_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/heads/qm
|
|
*/
|
|
/obj/item/device/radio/headset/headset_cargo
|
|
name = "supply radio headset"
|
|
desc = "A headset used by the QM and his slaves. To access the supply channel, use :u."
|
|
icon_state = "cargo_headset"
|
|
item_state = "headset"
|
|
keyslot2 = new /obj/item/device/encryptionkey/headset_cargo
|
|
|
|
/obj/item/device/radio/headset/ert
|
|
name = "CentCom Response Team headset"
|
|
desc = "The headset of the boss's boss. Channels are as follows: :h - Response Team :c - command, :s - security, :e - engineering, :d - mining, :q - cargo, :m - medical, :n - science."
|
|
icon_state = "com_headset"
|
|
item_state = "headset"
|
|
freerange = 1
|
|
keyslot2 = new /obj/item/device/encryptionkey/ert
|
|
|
|
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
// ..()
|
|
user.set_machine(src)
|
|
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
|
return
|
|
|
|
if(istype(W, /obj/item/weapon/screwdriver))
|
|
if(keyslot1 || keyslot2)
|
|
|
|
|
|
for(var/ch_name in channels)
|
|
radio_controller.remove_object(src, 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()
|
|
user << "You pop out the encryption keys in the headset!"
|
|
|
|
else
|
|
user << "This headset doesn't have any encryption keys! How useless..."
|
|
|
|
if(istype(W, /obj/item/device/encryptionkey/))
|
|
if(keyslot1 && keyslot2)
|
|
user << "The headset can't hold another key!"
|
|
return
|
|
|
|
if(!keyslot1)
|
|
user.drop_item()
|
|
W.loc = src
|
|
keyslot1 = W
|
|
|
|
else
|
|
user.drop_item()
|
|
W.loc = src
|
|
keyslot2 = W
|
|
|
|
|
|
recalculateChannels()
|
|
|
|
return
|
|
|
|
|
|
/obj/item/device/radio/headset/proc/recalculateChannels()
|
|
src.channels = list()
|
|
src.translate_binary = 0
|
|
src.translate_hive = 0
|
|
src.syndie = 0
|
|
|
|
if(keyslot1)
|
|
for(var/ch_name in keyslot1.channels)
|
|
if(ch_name in src.channels)
|
|
continue
|
|
src.channels += ch_name
|
|
src.channels[ch_name] = keyslot1.channels[ch_name]
|
|
|
|
if(keyslot1.translate_binary)
|
|
src.translate_binary = 1
|
|
|
|
if(keyslot1.translate_hive)
|
|
src.translate_hive = 1
|
|
|
|
if(keyslot1.syndie)
|
|
src.syndie = 1
|
|
|
|
if(keyslot2)
|
|
for(var/ch_name in keyslot2.channels)
|
|
if(ch_name in src.channels)
|
|
continue
|
|
src.channels += ch_name
|
|
src.channels[ch_name] = keyslot2.channels[ch_name]
|
|
|
|
if(keyslot2.translate_binary)
|
|
src.translate_binary = 1
|
|
|
|
if(keyslot2.translate_hive)
|
|
src.translate_hive = 1
|
|
|
|
if(keyslot2.syndie)
|
|
src.syndie = 1
|
|
|
|
|
|
for (var/ch_name in channels)
|
|
if(!radio_controller)
|
|
sleep(30) // Waiting for the radio_controller to be created.
|
|
if(!radio_controller)
|
|
src.name = "broken radio headset"
|
|
return
|
|
|
|
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
|
|
|
return |