mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Ports Beestation's radio uplink (#71210)
## About The Pull Request A port of https://github.com/BeeStation/BeeStation-Hornet/pull/7363 The radio uplink is now reworked to require saying a codeword over the secret .d channel. This means that you can do it hands free, but people around you can hear you whispering the codeword ## Why It's Good For The Game Current radio uplink is dumb, it has a lot of drawbacks (losing common radio, fiddling with the tgui slider, having to reset the frequency after) that its almost unusable. This new uplink has a more unique trigger method with its own ups and downs ## Changelog 🆑 add: New radio uplink! Simply speak your codeword into the :d channel to unlock it code: new COMSIG_RADIO_NEW_MESSAGE signal /🆑 Co-authored-by: Candycaneannihalator <candycane@thisisnotarealaddr.com> Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
co-authored by
Candycaneannihalator
Zephyr
Mothblocks
parent
8e086ebe3b
commit
d9998c8167
@@ -62,7 +62,7 @@
|
||||
RegisterSignal(parent, COMSIG_TABLET_CHANGE_ID, PROC_REF(new_ringtone))
|
||||
RegisterSignal(parent, COMSIG_TABLET_CHECK_DETONATE, PROC_REF(check_detonate))
|
||||
else if(istype(parent, /obj/item/radio))
|
||||
RegisterSignal(parent, COMSIG_RADIO_NEW_FREQUENCY, PROC_REF(new_frequency))
|
||||
RegisterSignal(parent, COMSIG_RADIO_NEW_MESSAGE, PROC_REF(new_message))
|
||||
else if(istype(parent, /obj/item/pen))
|
||||
RegisterSignal(parent, COMSIG_PEN_ROTATED, PROC_REF(pen_rotation))
|
||||
|
||||
@@ -359,6 +359,21 @@
|
||||
if(ismob(master.loc))
|
||||
interact(null, master.loc)
|
||||
|
||||
/datum/component/uplink/proc/new_message(datum/source, user, message, channel)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(channel != RADIO_CHANNEL_UPLINK)
|
||||
return
|
||||
|
||||
if(!findtext(lowertext(message), lowertext(unlock_code)))
|
||||
if(failsafe_code && findtext(lowertext(message), lowertext(failsafe_code)))
|
||||
failsafe() // no point returning cannot radio, youre probably ded
|
||||
return
|
||||
locked = FALSE
|
||||
interact(null, user)
|
||||
to_chat(user, "As you whisper the code into your headset, a soft chime fills your ears.")
|
||||
return COMPONENT_CANNOT_USE_RADIO
|
||||
|
||||
// Pen signal responses
|
||||
|
||||
/datum/component/uplink/proc/pen_rotation(datum/source, degrees, mob/living/carbon/user)
|
||||
@@ -385,7 +400,7 @@
|
||||
if(istype(parent,/obj/item/modular_computer/tablet))
|
||||
unlock_note = "<B>Uplink Passcode:</B> [unlock_code] ([P.name])."
|
||||
else if(istype(parent,/obj/item/radio))
|
||||
unlock_note = "<B>Radio Frequency:</B> [format_frequency(unlock_code)] ([P.name])."
|
||||
unlock_note = "<B>Radio Passcode:</B> [unlock_code] ([P.name], :d channel)."
|
||||
else if(istype(parent,/obj/item/pen))
|
||||
unlock_note = "<B>Uplink Degrees:</B> [english_list(unlock_code)] ([P.name])."
|
||||
|
||||
@@ -393,7 +408,7 @@
|
||||
if(istype(parent,/obj/item/modular_computer/tablet))
|
||||
return "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
else if(istype(parent,/obj/item/radio))
|
||||
return return_unused_frequency()
|
||||
return pick(GLOB.phonetic_alphabet)
|
||||
else if(istype(parent,/obj/item/pen))
|
||||
var/list/L = list()
|
||||
for(var/i in 1 to PEN_ROTATIONS)
|
||||
|
||||
@@ -126,6 +126,11 @@
|
||||
var/implant = FALSE
|
||||
|
||||
var/uplink_spawn_location = traitor_mob.client?.prefs?.read_preference(/datum/preference/choiced/uplink_location)
|
||||
var/cant_speak = (HAS_TRAIT(traitor_mob, TRAIT_MUTE) || traitor_mob.mind?.assigned_role.title == JOB_MIME)
|
||||
if(uplink_spawn_location == UPLINK_RADIO && cant_speak)
|
||||
if(!silent)
|
||||
to_chat(traitor_mob, span_warning("You have been deemed ineligible for a radio uplink. Supplying standard uplink instead."))
|
||||
uplink_spawn_location = UPLINK_PDA
|
||||
switch (uplink_spawn_location)
|
||||
if(UPLINK_PDA)
|
||||
uplink_loc = PDA
|
||||
@@ -164,7 +169,7 @@
|
||||
new_uplink.uplink_handler.assigned_role = traitor_mob.mind.assigned_role.title
|
||||
new_uplink.uplink_handler.assigned_species = traitor_mob.dna.species.id
|
||||
if(uplink_loc == R)
|
||||
unlock_text = "Your Uplink is cunningly disguised as your [R.name]. Simply dial the frequency [format_frequency(new_uplink.unlock_code)] to unlock its hidden features."
|
||||
unlock_text = "Your Uplink is cunningly disguised as your [R.name]. Simply speak \"[new_uplink.unlock_code]\" into frequency :d to unlock its hidden features."
|
||||
else if(uplink_loc == PDA)
|
||||
unlock_text = "Your Uplink is cunningly disguised as your [PDA.name]. Simply enter the code \"[new_uplink.unlock_code]\" into the ring tone selection to unlock its hidden features."
|
||||
else if(uplink_loc == P)
|
||||
|
||||
Reference in New Issue
Block a user