mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Saycode rewrite initial commit.
Create structure for modular saycode Regular chat: specific_paths/say() -> living/say() -> specific_paths/hear_say() Radio chat: specific_paths/say() -> Telecoms shit -> specific_paths/hear_radio() Humans done. Todo: AI, Robot, simple_animal, and ghosts. Conflicts: code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/telecomunications.dm code/modules/mob/living/carbon/human/human_defines.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/say.dm
This commit is contained in:
@@ -219,7 +219,11 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
del(A)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel)
|
||||
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel, var/verb = "says", var/datum/language/speaking = null)
|
||||
if(speaking)
|
||||
world << "radio talk_into language = [speaking.name]"
|
||||
else
|
||||
world << "radio talk_into language = null"
|
||||
if(!on) return // the device has to be on
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
if(!M || !message) return
|
||||
@@ -351,7 +355,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = position.z // The source's z level
|
||||
"level" = position.z, // The source's z level
|
||||
"language" = speaking,
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
@@ -404,7 +410,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = position.z
|
||||
"level" = position.z,
|
||||
"language" = speaking,
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
@@ -424,14 +432,16 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
//THIS IS TEMPORARY.
|
||||
if(!connection) return //~Carn
|
||||
|
||||
world << "WTF, WE'RE JUST DOING A STRAIGHT BROADCAST"
|
||||
Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], list(position.z), connection.frequency)
|
||||
filter_type, signal.data["compression"], list(position.z), connection.frequency,verb,speaking)
|
||||
|
||||
|
||||
|
||||
else // OLD RADIO SYSTEMS: By Goons?
|
||||
|
||||
world << "WTF we're in old system"
|
||||
var/datum/radio_frequency/connection = null
|
||||
if(channel && channels && channels.len > 0)
|
||||
if (channel == "department")
|
||||
@@ -599,11 +609,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
|
||||
|
||||
if (broadcasting)
|
||||
if(get_dist(src, M) <= canhear_range)
|
||||
talk_into(M, msg)
|
||||
talk_into(M, msg,null,verb,speaking)
|
||||
|
||||
|
||||
/*
|
||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user