Merge pull request #4727 from Ccomp5950/FUCK-say-code

Saycode rewrite.
This commit is contained in:
DJSnapshot
2014-04-10 22:42:38 -07:00
13 changed files with 448 additions and 489 deletions
+12 -6
View File
@@ -218,7 +218,7 @@ 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(!on) return // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
if(!M || !message) return
@@ -348,7 +348,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
@@ -401,7 +403,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
@@ -423,7 +427,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
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)
@@ -596,11 +600,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)