mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
File standardisation (#13131)
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
This commit is contained in:
@@ -1,106 +1,106 @@
|
||||
/obj/item/radio/beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A beacon used by a teleporter."
|
||||
icon_state = "beacon"
|
||||
item_state = "signaler"
|
||||
var/code = "Beacon"
|
||||
origin_tech = "bluespace=1"
|
||||
var/emagged = 0
|
||||
var/syndicate = 0
|
||||
var/area_bypass = FALSE
|
||||
var/cc_beacon = FALSE //set if allowed to teleport to even if on zlevel2
|
||||
|
||||
/obj/item/radio/beacon/New()
|
||||
..()
|
||||
code = "[code] ([GLOB.beacons.len + 1])"
|
||||
GLOB.beacons += src
|
||||
|
||||
/obj/item/radio/beacon/Destroy()
|
||||
GLOB.beacons -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/beacon/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
syndicate = 1
|
||||
to_chat(user, "<span class='notice'>The This beacon now only be locked on to by emagged teleporters!</span>")
|
||||
|
||||
/obj/item/radio/beacon/hear_talk()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/radio/beacon/send_hear()
|
||||
return null
|
||||
|
||||
/obj/item/radio/beacon/verb/alter_signal(t as text)
|
||||
set name = "Alter Beacon's Signal"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
code = t
|
||||
if(isnull(code))
|
||||
code = initial(code)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
|
||||
|
||||
/obj/item/radio/beacon/bacon/proc/digest_delay()
|
||||
QDEL_IN(src, 600)
|
||||
|
||||
// SINGULO BEACON SPAWNER
|
||||
/obj/item/radio/beacon/syndicate
|
||||
name = "suspicious beacon"
|
||||
desc = "A label on it reads: <i>Activate to have a singularity beacon teleported to your location</i>."
|
||||
origin_tech = "bluespace=6;syndicate=5"
|
||||
syndicate = TRUE
|
||||
var/obj/machinery/computer/syndicate_depot/teleporter/mycomputer
|
||||
|
||||
/obj/item/radio/beacon/syndicate/Destroy()
|
||||
if(mycomputer)
|
||||
mycomputer.mybeacon = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/beacon/syndicate/attack_self(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>Locked In</span>")
|
||||
new /obj/machinery/power/singularity_beacon/syndicate( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/radio/beacon/syndicate/bomb
|
||||
name = "suspicious beacon"
|
||||
desc = "A label on it reads: <i>Warning: Activating this device will send a high-ordinance explosive to your location</i>."
|
||||
origin_tech = "bluespace=5;syndicate=5"
|
||||
|
||||
/obj/item/radio/beacon/syndicate/bomb/attack_self(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>Locked In</span>")
|
||||
new /obj/machinery/syndicatebomb( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/radio/beacon/engine
|
||||
desc = "A label on it reads: <i>Warning: This device is used for transportation of high-density objects used for high-yield power generation. Stay away!</i>."
|
||||
anchored = 1 //Let's not move these around. Some folk might get the idea to use these for assassinations
|
||||
var/list/enginetype = list()
|
||||
|
||||
/obj/item/radio/beacon/engine/Initialize()
|
||||
LAZYADD(GLOB.engine_beacon_list, src)
|
||||
|
||||
/obj/item/radio/beacon/engine/tesling
|
||||
name = "Engine Beacon for Tesla and Singularity"
|
||||
enginetype = list(ENGTYPE_TESLA, ENGTYPE_SING)
|
||||
|
||||
/obj/item/radio/beacon/engine/tesla
|
||||
name = "Engine Beacon for Tesla"
|
||||
enginetype = list(ENGTYPE_TESLA)
|
||||
|
||||
/obj/item/radio/beacon/engine/sing
|
||||
name = "Engine Beacon for Singularity"
|
||||
enginetype = list(ENGTYPE_SING)
|
||||
/obj/item/radio/beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A beacon used by a teleporter."
|
||||
icon_state = "beacon"
|
||||
item_state = "signaler"
|
||||
var/code = "Beacon"
|
||||
origin_tech = "bluespace=1"
|
||||
var/emagged = 0
|
||||
var/syndicate = 0
|
||||
var/area_bypass = FALSE
|
||||
var/cc_beacon = FALSE //set if allowed to teleport to even if on zlevel2
|
||||
|
||||
/obj/item/radio/beacon/New()
|
||||
..()
|
||||
code = "[code] ([GLOB.beacons.len + 1])"
|
||||
GLOB.beacons += src
|
||||
|
||||
/obj/item/radio/beacon/Destroy()
|
||||
GLOB.beacons -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/beacon/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
syndicate = 1
|
||||
to_chat(user, "<span class='notice'>The This beacon now only be locked on to by emagged teleporters!</span>")
|
||||
|
||||
/obj/item/radio/beacon/hear_talk()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/radio/beacon/send_hear()
|
||||
return null
|
||||
|
||||
/obj/item/radio/beacon/verb/alter_signal(t as text)
|
||||
set name = "Alter Beacon's Signal"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
code = t
|
||||
if(isnull(code))
|
||||
code = initial(code)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
|
||||
|
||||
/obj/item/radio/beacon/bacon/proc/digest_delay()
|
||||
QDEL_IN(src, 600)
|
||||
|
||||
// SINGULO BEACON SPAWNER
|
||||
/obj/item/radio/beacon/syndicate
|
||||
name = "suspicious beacon"
|
||||
desc = "A label on it reads: <i>Activate to have a singularity beacon teleported to your location</i>."
|
||||
origin_tech = "bluespace=6;syndicate=5"
|
||||
syndicate = TRUE
|
||||
var/obj/machinery/computer/syndicate_depot/teleporter/mycomputer
|
||||
|
||||
/obj/item/radio/beacon/syndicate/Destroy()
|
||||
if(mycomputer)
|
||||
mycomputer.mybeacon = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/beacon/syndicate/attack_self(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>Locked In</span>")
|
||||
new /obj/machinery/power/singularity_beacon/syndicate( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/radio/beacon/syndicate/bomb
|
||||
name = "suspicious beacon"
|
||||
desc = "A label on it reads: <i>Warning: Activating this device will send a high-ordinance explosive to your location</i>."
|
||||
origin_tech = "bluespace=5;syndicate=5"
|
||||
|
||||
/obj/item/radio/beacon/syndicate/bomb/attack_self(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>Locked In</span>")
|
||||
new /obj/machinery/syndicatebomb( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/radio/beacon/engine
|
||||
desc = "A label on it reads: <i>Warning: This device is used for transportation of high-density objects used for high-yield power generation. Stay away!</i>."
|
||||
anchored = 1 //Let's not move these around. Some folk might get the idea to use these for assassinations
|
||||
var/list/enginetype = list()
|
||||
|
||||
/obj/item/radio/beacon/engine/Initialize()
|
||||
LAZYADD(GLOB.engine_beacon_list, src)
|
||||
|
||||
/obj/item/radio/beacon/engine/tesling
|
||||
name = "Engine Beacon for Tesla and Singularity"
|
||||
enginetype = list(ENGTYPE_TESLA, ENGTYPE_SING)
|
||||
|
||||
/obj/item/radio/beacon/engine/tesla
|
||||
name = "Engine Beacon for Tesla"
|
||||
enginetype = list(ENGTYPE_TESLA)
|
||||
|
||||
/obj/item/radio/beacon/engine/sing
|
||||
name = "Engine Beacon for Singularity"
|
||||
enginetype = list(ENGTYPE_SING)
|
||||
|
||||
@@ -1,113 +1,113 @@
|
||||
/obj/item/radio/electropack
|
||||
name = "electropack"
|
||||
desc = "Dance my monkeys! DANCE!!!"
|
||||
icon_state = "electropack0"
|
||||
item_state = "electropack"
|
||||
frequency = AIRLOCK_FREQ
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/code = 2
|
||||
|
||||
is_special = 1
|
||||
|
||||
/obj/item/radio/electropack/attack_hand(mob/user as mob)
|
||||
if(src == user.back)
|
||||
to_chat(user, "<span class='notice'>You need help taking this off!</span>")
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/item/radio/electropack/Destroy()
|
||||
if(istype(src.loc, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/S = src.loc
|
||||
if(S.part1 == src)
|
||||
S.part1 = null
|
||||
else if(S.part2 == src)
|
||||
S.part2 = null
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/electropack/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
if(!b_stat)
|
||||
to_chat(user, "<span class='notice'>[src] is not ready to be attached!</span>")
|
||||
return
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user, "<span class='notice'>\the [W] is stuck to your hand, you cannot attach it to \the [src]!</span>")
|
||||
return
|
||||
W.loc = A
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
|
||||
user.unEquip(src)
|
||||
loc = A
|
||||
master = A
|
||||
A.part2 = src
|
||||
|
||||
user.put_in_hands(A)
|
||||
A.add_fingerprint(user)
|
||||
if(src.flags & NODROP)
|
||||
A.flags |= NODROP
|
||||
|
||||
/obj/item/radio/electropack/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
set_frequency(new_frequency)
|
||||
|
||||
else if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = Clamp(code, 1, 100)
|
||||
|
||||
else if(href_list["power"])
|
||||
on = !on
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/radio/electropack/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption != code)
|
||||
return
|
||||
|
||||
if(ismob(loc) && on)
|
||||
var/mob/M = loc
|
||||
var/turf/T = M.loc
|
||||
if(istype(T, /turf))
|
||||
if(!M.moved_recently && M.last_move)
|
||||
M.moved_recently = 1
|
||||
step(M, M.last_move)
|
||||
sleep(50)
|
||||
if(M)
|
||||
M.moved_recently = 0
|
||||
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
do_sparks(3, 1, M)
|
||||
|
||||
M.Weaken(5)
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/item/radio/electropack/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["power"] = on
|
||||
data["freq"] = format_frequency(frequency)
|
||||
data["code"] = code
|
||||
|
||||
return data
|
||||
/obj/item/radio/electropack
|
||||
name = "electropack"
|
||||
desc = "Dance my monkeys! DANCE!!!"
|
||||
icon_state = "electropack0"
|
||||
item_state = "electropack"
|
||||
frequency = AIRLOCK_FREQ
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/code = 2
|
||||
|
||||
is_special = 1
|
||||
|
||||
/obj/item/radio/electropack/attack_hand(mob/user as mob)
|
||||
if(src == user.back)
|
||||
to_chat(user, "<span class='notice'>You need help taking this off!</span>")
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/item/radio/electropack/Destroy()
|
||||
if(istype(src.loc, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/S = src.loc
|
||||
if(S.part1 == src)
|
||||
S.part1 = null
|
||||
else if(S.part2 == src)
|
||||
S.part2 = null
|
||||
master = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/electropack/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
if(!b_stat)
|
||||
to_chat(user, "<span class='notice'>[src] is not ready to be attached!</span>")
|
||||
return
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user, "<span class='notice'>\the [W] is stuck to your hand, you cannot attach it to \the [src]!</span>")
|
||||
return
|
||||
W.loc = A
|
||||
W.master = A
|
||||
A.part1 = W
|
||||
|
||||
user.unEquip(src)
|
||||
loc = A
|
||||
master = A
|
||||
A.part2 = src
|
||||
|
||||
user.put_in_hands(A)
|
||||
A.add_fingerprint(user)
|
||||
if(src.flags & NODROP)
|
||||
A.flags |= NODROP
|
||||
|
||||
/obj/item/radio/electropack/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
set_frequency(new_frequency)
|
||||
|
||||
else if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = Clamp(code, 1, 100)
|
||||
|
||||
else if(href_list["power"])
|
||||
on = !on
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/radio/electropack/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption != code)
|
||||
return
|
||||
|
||||
if(ismob(loc) && on)
|
||||
var/mob/M = loc
|
||||
var/turf/T = M.loc
|
||||
if(istype(T, /turf))
|
||||
if(!M.moved_recently && M.last_move)
|
||||
M.moved_recently = 1
|
||||
step(M, M.last_move)
|
||||
sleep(50)
|
||||
if(M)
|
||||
M.moved_recently = 0
|
||||
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
|
||||
do_sparks(3, 1, M)
|
||||
|
||||
M.Weaken(5)
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/radio/electropack/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "radio_electro.tmpl", "[name]", 400, 500)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/item/radio/electropack/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["power"] = on
|
||||
data["freq"] = format_frequency(frequency)
|
||||
data["code"] = code
|
||||
|
||||
return data
|
||||
|
||||
@@ -1,426 +1,426 @@
|
||||
/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/species/vox/ears.dmi',
|
||||
"Vox Armalis" = 'icons/mob/species/armalis/ears.dmi'
|
||||
) //We read you loud and skree-er.
|
||||
materials = list(MAT_METAL=75)
|
||||
subspace_transmission = TRUE
|
||||
canhear_range = 0 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_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
|
||||
|
||||
/obj/item/radio/headset/New()
|
||||
..()
|
||||
internal_channels.Cut()
|
||||
|
||||
/obj/item/radio/headset/Initialize()
|
||||
..()
|
||||
|
||||
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)
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/list_channels(var/mob/user)
|
||||
return list_secure_channels()
|
||||
|
||||
/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/syndicate
|
||||
origin_tech = "syndicate=3"
|
||||
ks1type = /obj/item/encryptionkey/syndicate/nukeops
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt //undisguised bowman with flash protection
|
||||
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/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_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_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 = "\proper the 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 = "\proper the 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/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_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 = "\proper 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 = "\proper 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
|
||||
|
||||
/obj/item/radio/headset/ert/alt
|
||||
name = "\proper 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/centcom
|
||||
name = "\proper centcom officer's bowman headset"
|
||||
desc = "The headset of final authority. Protects ears from flashbangs."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
ks2type = /obj/item/encryptionkey/centcom
|
||||
|
||||
/obj/item/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
|
||||
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 = 0 // 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/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
if(keyslot1 && keyslot2)
|
||||
to_chat(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()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = 0))
|
||||
return
|
||||
user.set_machine(src)
|
||||
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/proc/recalculateChannels(var/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 channels.len)
|
||||
var/channel = channels[i]
|
||||
var/key = get_radio_key_from_channel(channel)
|
||||
radio_text += "[key] - [channel]"
|
||||
if(i != channels.len)
|
||||
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()
|
||||
/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/species/vox/ears.dmi',
|
||||
"Vox Armalis" = 'icons/mob/species/armalis/ears.dmi'
|
||||
) //We read you loud and skree-er.
|
||||
materials = list(MAT_METAL=75)
|
||||
subspace_transmission = TRUE
|
||||
canhear_range = 0 // can't hear headsets from very far away
|
||||
|
||||
slot_flags = SLOT_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
|
||||
|
||||
/obj/item/radio/headset/New()
|
||||
..()
|
||||
internal_channels.Cut()
|
||||
|
||||
/obj/item/radio/headset/Initialize()
|
||||
..()
|
||||
|
||||
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)
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/list_channels(var/mob/user)
|
||||
return list_secure_channels()
|
||||
|
||||
/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/syndicate
|
||||
origin_tech = "syndicate=3"
|
||||
ks1type = /obj/item/encryptionkey/syndicate/nukeops
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt //undisguised bowman with flash protection
|
||||
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/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_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_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 = "\proper the 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 = "\proper the 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/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_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 = "\proper 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 = "\proper 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
|
||||
|
||||
/obj/item/radio/headset/ert/alt
|
||||
name = "\proper 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/centcom
|
||||
name = "\proper centcom officer's bowman headset"
|
||||
desc = "The headset of final authority. Protects ears from flashbangs."
|
||||
flags = EARBANGPROTECT
|
||||
icon_state = "com_headset_alt"
|
||||
item_state = "com_headset_alt"
|
||||
ks2type = /obj/item/encryptionkey/centcom
|
||||
|
||||
/obj/item/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
|
||||
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 = 0 // 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/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
if(keyslot1 && keyslot2)
|
||||
to_chat(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()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = 0))
|
||||
return
|
||||
user.set_machine(src)
|
||||
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/proc/recalculateChannels(var/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 channels.len)
|
||||
var/channel = channels[i]
|
||||
var/key = get_radio_key_from_channel(channel)
|
||||
radio_text += "[key] - [channel]"
|
||||
if(i != channels.len)
|
||||
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()
|
||||
|
||||
@@ -1,274 +1,274 @@
|
||||
/obj/item/radio/intercom
|
||||
name = "station intercom (General)"
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
canhear_range = 2
|
||||
flags = CONDUCT
|
||||
var/number = 0
|
||||
var/circuitry_installed = 1
|
||||
var/last_tick //used to delay the powercheck
|
||||
var/buildstage = 0
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/radio/intercom/custom
|
||||
name = "station intercom (Custom)"
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
|
||||
/obj/item/radio/intercom/interrogation
|
||||
name = "station intercom (Interrogation)"
|
||||
frequency = AIRLOCK_FREQ
|
||||
|
||||
/obj/item/radio/intercom/private
|
||||
name = "station intercom (Private)"
|
||||
frequency = AI_FREQ
|
||||
|
||||
/obj/item/radio/intercom/command
|
||||
name = "station intercom (Command)"
|
||||
frequency = COMM_FREQ
|
||||
|
||||
/obj/item/radio/intercom/specops
|
||||
name = "\improper Special Operations intercom"
|
||||
frequency = ERT_FREQ
|
||||
|
||||
/obj/item/radio/intercom/department
|
||||
canhear_range = 5
|
||||
broadcasting = 0
|
||||
listening = 1
|
||||
|
||||
/obj/item/radio/intercom/department/medbay
|
||||
name = "station intercom (Medbay)"
|
||||
frequency = MED_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/department/security
|
||||
name = "station intercom (Security)"
|
||||
frequency = SEC_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
|
||||
..()
|
||||
buildstage = building
|
||||
if(buildstage)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
|
||||
dir=ndir
|
||||
b_stat=1
|
||||
on = 0
|
||||
GLOB.global_intercoms.Add(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/radio/intercom/department/medbay/New()
|
||||
..()
|
||||
internal_channels = default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/radio/intercom/department/security/New()
|
||||
..()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(SEC_I_FREQ) = list(ACCESS_SECURITY)
|
||||
)
|
||||
|
||||
/obj/item/radio/intercom/syndicate
|
||||
name = "illicit intercom"
|
||||
desc = "Talk through this. Evilly"
|
||||
frequency = SYND_FREQ
|
||||
subspace_transmission = TRUE
|
||||
syndiekey = new /obj/item/encryptionkey/syndicate/nukeops
|
||||
|
||||
/obj/item/radio/intercom/syndicate/New()
|
||||
..()
|
||||
internal_channels[num2text(SYND_FREQ)] = list(ACCESS_SYNDICATE)
|
||||
|
||||
/obj/item/radio/intercom/pirate
|
||||
name = "pirate radio intercom"
|
||||
desc = "You wouldn't steal a space shuttle. Piracy. It's a crime!"
|
||||
subspace_transmission = 1
|
||||
|
||||
/obj/item/radio/intercom/pirate/New()
|
||||
..()
|
||||
internal_channels.Cut()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(AI_FREQ) = list(),
|
||||
num2text(COMM_FREQ)= list(),
|
||||
num2text(ENG_FREQ) = list(),
|
||||
num2text(MED_FREQ) = list(),
|
||||
num2text(MED_I_FREQ)=list(),
|
||||
num2text(SEC_FREQ) = list(),
|
||||
num2text(SEC_I_FREQ)=list(),
|
||||
num2text(SCI_FREQ) = list(),
|
||||
num2text(SUP_FREQ) = list(),
|
||||
num2text(SRV_FREQ) = list()
|
||||
)
|
||||
|
||||
/obj/item/radio/intercom/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
GLOB.global_intercoms.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/intercom/attack_ai(mob/user as mob)
|
||||
add_hiddenprint(user)
|
||||
add_fingerprint(user)
|
||||
spawn(0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/radio/intercom/attack_hand(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
spawn(0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/radio/intercom/receive_range(freq, level)
|
||||
if(!is_listening())
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
// TODO: Integrate radio with the space manager
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if(freq in SSradio.ANTAG_FREQS)
|
||||
if(!(syndiekey))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
|
||||
/obj/item/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/stack/tape_roll)) //eww
|
||||
return
|
||||
else if(iscoil(W) && buildstage == 1)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
|
||||
return
|
||||
if(do_after(user, 10 * coil.toolspeed, target = src) && buildstage == 1)
|
||||
coil.use(5)
|
||||
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
|
||||
buildstage = 2
|
||||
return 1
|
||||
else if(istype(W,/obj/item/intercom_electronics) && buildstage == 0)
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src) && buildstage == 0)
|
||||
qdel(W)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
|
||||
buildstage = 1
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/intercom/crowbar_act(mob/user, obj/item/I)
|
||||
if(buildstage != 1)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 1)
|
||||
return
|
||||
new /obj/item/intercom_electronics(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>The circuit board pops out!</span>")
|
||||
buildstage = 0
|
||||
|
||||
/obj/item/radio/intercom/screwdriver_act(mob/user, obj/item/I)
|
||||
if(buildstage != 2)
|
||||
return ..()
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 2)
|
||||
return
|
||||
update_icon()
|
||||
on = 1
|
||||
b_stat = 0
|
||||
buildstage = 3
|
||||
to_chat(user, "<span class='notice'>You secure the electronics!</span>")
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
for(var/i, i<= 5, i++)
|
||||
wires.UpdateCut(i,1)
|
||||
|
||||
/obj/item/radio/intercom/wirecutter_act(mob/user, obj/item/I)
|
||||
if(!(buildstage == 3 && b_stat && wires.IsAllCut()))
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
WIRECUTTER_SNIP_MESSAGE
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
on = 0
|
||||
b_stat = 1
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
if(!buildstage)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 3))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start slicing [src] from the wall...</span>")
|
||||
if(I.use_tool(src, user, 10, amount = 3, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the wall!</span>")
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/radio/intercom/update_icon()
|
||||
if(!circuitry_installed)
|
||||
icon_state="intercom-frame"
|
||||
return
|
||||
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
|
||||
|
||||
/obj/item/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
else
|
||||
var/area/A = get_area(src)
|
||||
if(!A)
|
||||
on = 0
|
||||
else
|
||||
on = A.powered(EQUIP) // set "on" to the power status
|
||||
update_icon()
|
||||
|
||||
/obj/item/intercom_electronics
|
||||
name = "intercom electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
origin_tech = "engineering=2;programming=1"
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/item/radio/intercom/locked
|
||||
var/locked_frequency
|
||||
|
||||
/obj/item/radio/intercom/locked/set_frequency(var/frequency)
|
||||
if(frequency == locked_frequency)
|
||||
..(locked_frequency)
|
||||
|
||||
/obj/item/radio/intercom/locked/list_channels()
|
||||
return ""
|
||||
|
||||
/obj/item/radio/intercom/locked/ai_private
|
||||
name = "\improper AI intercom"
|
||||
frequency = AI_FREQ
|
||||
|
||||
/obj/item/radio/intercom/locked/confessional
|
||||
name = "confessional intercom"
|
||||
frequency = 1480
|
||||
|
||||
/obj/item/radio/intercom/locked/prison
|
||||
name = "\improper prison intercom"
|
||||
desc = "Talk through this. It looks like it has been modified to not broadcast."
|
||||
|
||||
/obj/item/radio/intercom/locked/prison/New()
|
||||
..()
|
||||
wires.CutWireIndex(RADIO_WIRE_TRANSMIT)
|
||||
/obj/item/radio/intercom
|
||||
name = "station intercom (General)"
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
canhear_range = 2
|
||||
flags = CONDUCT
|
||||
var/number = 0
|
||||
var/circuitry_installed = 1
|
||||
var/last_tick //used to delay the powercheck
|
||||
var/buildstage = 0
|
||||
dog_fashion = null
|
||||
|
||||
/obj/item/radio/intercom/custom
|
||||
name = "station intercom (Custom)"
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
|
||||
/obj/item/radio/intercom/interrogation
|
||||
name = "station intercom (Interrogation)"
|
||||
frequency = AIRLOCK_FREQ
|
||||
|
||||
/obj/item/radio/intercom/private
|
||||
name = "station intercom (Private)"
|
||||
frequency = AI_FREQ
|
||||
|
||||
/obj/item/radio/intercom/command
|
||||
name = "station intercom (Command)"
|
||||
frequency = COMM_FREQ
|
||||
|
||||
/obj/item/radio/intercom/specops
|
||||
name = "\improper Special Operations intercom"
|
||||
frequency = ERT_FREQ
|
||||
|
||||
/obj/item/radio/intercom/department
|
||||
canhear_range = 5
|
||||
broadcasting = 0
|
||||
listening = 1
|
||||
|
||||
/obj/item/radio/intercom/department/medbay
|
||||
name = "station intercom (Medbay)"
|
||||
frequency = MED_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/department/security
|
||||
name = "station intercom (Security)"
|
||||
frequency = SEC_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
|
||||
..()
|
||||
buildstage = building
|
||||
if(buildstage)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
|
||||
dir=ndir
|
||||
b_stat=1
|
||||
on = 0
|
||||
GLOB.global_intercoms.Add(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/radio/intercom/department/medbay/New()
|
||||
..()
|
||||
internal_channels = default_medbay_channels.Copy()
|
||||
|
||||
/obj/item/radio/intercom/department/security/New()
|
||||
..()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(SEC_I_FREQ) = list(ACCESS_SECURITY)
|
||||
)
|
||||
|
||||
/obj/item/radio/intercom/syndicate
|
||||
name = "illicit intercom"
|
||||
desc = "Talk through this. Evilly"
|
||||
frequency = SYND_FREQ
|
||||
subspace_transmission = TRUE
|
||||
syndiekey = new /obj/item/encryptionkey/syndicate/nukeops
|
||||
|
||||
/obj/item/radio/intercom/syndicate/New()
|
||||
..()
|
||||
internal_channels[num2text(SYND_FREQ)] = list(ACCESS_SYNDICATE)
|
||||
|
||||
/obj/item/radio/intercom/pirate
|
||||
name = "pirate radio intercom"
|
||||
desc = "You wouldn't steal a space shuttle. Piracy. It's a crime!"
|
||||
subspace_transmission = 1
|
||||
|
||||
/obj/item/radio/intercom/pirate/New()
|
||||
..()
|
||||
internal_channels.Cut()
|
||||
internal_channels = list(
|
||||
num2text(PUB_FREQ) = list(),
|
||||
num2text(AI_FREQ) = list(),
|
||||
num2text(COMM_FREQ)= list(),
|
||||
num2text(ENG_FREQ) = list(),
|
||||
num2text(MED_FREQ) = list(),
|
||||
num2text(MED_I_FREQ)=list(),
|
||||
num2text(SEC_FREQ) = list(),
|
||||
num2text(SEC_I_FREQ)=list(),
|
||||
num2text(SCI_FREQ) = list(),
|
||||
num2text(SUP_FREQ) = list(),
|
||||
num2text(SRV_FREQ) = list()
|
||||
)
|
||||
|
||||
/obj/item/radio/intercom/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
GLOB.global_intercoms.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/intercom/attack_ai(mob/user as mob)
|
||||
add_hiddenprint(user)
|
||||
add_fingerprint(user)
|
||||
spawn(0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/radio/intercom/attack_hand(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
spawn(0)
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/radio/intercom/receive_range(freq, level)
|
||||
if(!is_listening())
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
// TODO: Integrate radio with the space manager
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if(freq in SSradio.ANTAG_FREQS)
|
||||
if(!(syndiekey))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
|
||||
return canhear_range
|
||||
|
||||
/obj/item/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/stack/tape_roll)) //eww
|
||||
return
|
||||
else if(iscoil(W) && buildstage == 1)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
|
||||
return
|
||||
if(do_after(user, 10 * coil.toolspeed, target = src) && buildstage == 1)
|
||||
coil.use(5)
|
||||
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
|
||||
buildstage = 2
|
||||
return 1
|
||||
else if(istype(W,/obj/item/intercom_electronics) && buildstage == 0)
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src) && buildstage == 0)
|
||||
qdel(W)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
|
||||
buildstage = 1
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/intercom/crowbar_act(mob/user, obj/item/I)
|
||||
if(buildstage != 1)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 1)
|
||||
return
|
||||
new /obj/item/intercom_electronics(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>The circuit board pops out!</span>")
|
||||
buildstage = 0
|
||||
|
||||
/obj/item/radio/intercom/screwdriver_act(mob/user, obj/item/I)
|
||||
if(buildstage != 2)
|
||||
return ..()
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 2)
|
||||
return
|
||||
update_icon()
|
||||
on = 1
|
||||
b_stat = 0
|
||||
buildstage = 3
|
||||
to_chat(user, "<span class='notice'>You secure the electronics!</span>")
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
for(var/i, i<= 5, i++)
|
||||
wires.UpdateCut(i,1)
|
||||
|
||||
/obj/item/radio/intercom/wirecutter_act(mob/user, obj/item/I)
|
||||
if(!(buildstage == 3 && b_stat && wires.IsAllCut()))
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
WIRECUTTER_SNIP_MESSAGE
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
on = 0
|
||||
b_stat = 1
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
if(!buildstage)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 3))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start slicing [src] from the wall...</span>")
|
||||
if(I.use_tool(src, user, 10, amount = 3, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the wall!</span>")
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/radio/intercom/update_icon()
|
||||
if(!circuitry_installed)
|
||||
icon_state="intercom-frame"
|
||||
return
|
||||
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
|
||||
|
||||
/obj/item/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
else
|
||||
var/area/A = get_area(src)
|
||||
if(!A)
|
||||
on = 0
|
||||
else
|
||||
on = A.powered(EQUIP) // set "on" to the power status
|
||||
update_icon()
|
||||
|
||||
/obj/item/intercom_electronics
|
||||
name = "intercom electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
origin_tech = "engineering=2;programming=1"
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/item/radio/intercom/locked
|
||||
var/locked_frequency
|
||||
|
||||
/obj/item/radio/intercom/locked/set_frequency(var/frequency)
|
||||
if(frequency == locked_frequency)
|
||||
..(locked_frequency)
|
||||
|
||||
/obj/item/radio/intercom/locked/list_channels()
|
||||
return ""
|
||||
|
||||
/obj/item/radio/intercom/locked/ai_private
|
||||
name = "\improper AI intercom"
|
||||
frequency = AI_FREQ
|
||||
|
||||
/obj/item/radio/intercom/locked/confessional
|
||||
name = "confessional intercom"
|
||||
frequency = 1480
|
||||
|
||||
/obj/item/radio/intercom/locked/prison
|
||||
name = "\improper prison intercom"
|
||||
desc = "Talk through this. It looks like it has been modified to not broadcast."
|
||||
|
||||
/obj/item/radio/intercom/locked/prison/New()
|
||||
..()
|
||||
wires.CutWireIndex(RADIO_WIRE_TRANSMIT)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user