mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-15 18:06:57 +01:00
Merge pull request #825 from ArchieBeepBoop/updatesaycode
Saycode Update Package, durathread golems, loom updates, new traumas, science powergaming inc
This commit is contained in:
+2991
-2991
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -98,7 +98,7 @@
|
||||
else
|
||||
to_chat(M, message)
|
||||
|
||||
/mob/camera/eminence/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
/mob/camera/eminence/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
if(is_reebe(z) || is_servant_of_ratvar(speaker) || GLOB.ratvar_approaches || GLOB.ratvar_awakens) //Away from Reebe, the Eminence can't hear anything
|
||||
to_chat(src, message)
|
||||
|
||||
@@ -118,7 +118,7 @@ the new instance inside the host to be updated to the template's stats.
|
||||
follow_next(Dir & NORTHWEST)
|
||||
last_move_tick = world.time
|
||||
|
||||
/mob/camera/disease/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
/mob/camera/disease/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
var/atom/movable/to_follow = speaker
|
||||
if(radio_freq)
|
||||
@@ -130,7 +130,7 @@ the new instance inside the host to be updated to the template's stats.
|
||||
else
|
||||
link = ""
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source)
|
||||
to_chat(src, "[link] [message]")
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,12 @@
|
||||
A.malf_picker.remove_malf_verbs(A)
|
||||
qdel(A.malf_picker)
|
||||
|
||||
/datum/antagonist/traitor/proc/handle_hearing(datum/source, list/hearing_args)
|
||||
var/message = hearing_args[HEARING_MESSAGE]
|
||||
message = GLOB.syndicate_code_phrase_regex.Replace(message, "<span class='blue'>$1</span>")
|
||||
message = GLOB.syndicate_code_response_regex.Replace(message, "<span class='red'>$1</span>")
|
||||
hearing_args[HEARING_MESSAGE] = message
|
||||
|
||||
SSticker.mode.traitors -= owner
|
||||
if(!silent && owner.current)
|
||||
to_chat(owner.current,"<span class='userdanger'> You are no longer the [special_role]! </span>")
|
||||
|
||||
+101
-101
@@ -1,101 +1,101 @@
|
||||
#define INCLUSIVE_MODE 1
|
||||
#define EXCLUSIVE_MODE 2
|
||||
#define RECOGNIZER_MODE 3
|
||||
#define VOICE_SENSOR_MODE 4
|
||||
|
||||
/obj/item/assembly/voice
|
||||
name = "voice analyzer"
|
||||
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
||||
icon_state = "voice"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
flags_1 = HEAR_1
|
||||
attachable = TRUE
|
||||
verb_say = "beeps"
|
||||
verb_ask = "beeps"
|
||||
verb_exclaim = "beeps"
|
||||
var/listening = FALSE
|
||||
var/recorded = "" //the activation message
|
||||
var/mode = 1
|
||||
var/static/list/modes = list("inclusive",
|
||||
"exclusive",
|
||||
"recognizer",
|
||||
"voice sensor")
|
||||
|
||||
/obj/item/assembly/voice/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use a multitool to swap between \"inclusive\", \"exclusive\", \"recognizer\", and \"voice sensor\" mode.</span>"
|
||||
|
||||
/obj/item/assembly/voice/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
. = ..()
|
||||
if(speaker == src)
|
||||
return
|
||||
|
||||
if(listening && !radio_freq)
|
||||
record_speech(speaker, raw_message, message_language)
|
||||
else
|
||||
if(check_activation(speaker, raw_message))
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
|
||||
/obj/item/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message, datum/language/message_language)
|
||||
switch(mode)
|
||||
if(INCLUSIVE_MODE)
|
||||
recorded = raw_message
|
||||
listening = FALSE
|
||||
say("Activation message is '[recorded]'.", message_language)
|
||||
if(EXCLUSIVE_MODE)
|
||||
recorded = raw_message
|
||||
listening = FALSE
|
||||
say("Activation message is '[recorded]'.", message_language)
|
||||
if(RECOGNIZER_MODE)
|
||||
recorded = speaker.GetVoice()
|
||||
listening = FALSE
|
||||
say("Your voice pattern is saved.", message_language)
|
||||
if(VOICE_SENSOR_MODE)
|
||||
if(length(raw_message))
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
|
||||
/obj/item/assembly/voice/proc/check_activation(atom/movable/speaker, raw_message)
|
||||
. = FALSE
|
||||
switch(mode)
|
||||
if(INCLUSIVE_MODE)
|
||||
if(findtext(raw_message, recorded))
|
||||
. = TRUE
|
||||
if(EXCLUSIVE_MODE)
|
||||
if(raw_message == recorded)
|
||||
. = TRUE
|
||||
if(RECOGNIZER_MODE)
|
||||
if(speaker.GetVoice() == recorded)
|
||||
. = TRUE
|
||||
if(VOICE_SENSOR_MODE)
|
||||
if(length(raw_message))
|
||||
. = TRUE
|
||||
|
||||
/obj/item/assembly/voice/multitool_act(mob/living/user, obj/item/I)
|
||||
mode %= modes.len
|
||||
mode++
|
||||
to_chat(user, "<span class='notice'>You set [src] into [modes[mode]] mode.</span>")
|
||||
listening = FALSE
|
||||
recorded = ""
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/voice/activate()
|
||||
if(!secured || holder)
|
||||
return FALSE
|
||||
listening = !listening
|
||||
say("[listening ? "Now" : "No longer"] recording input.")
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/voice/attack_self(mob/user)
|
||||
if(!user)
|
||||
return FALSE
|
||||
activate()
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/voice/toggle_secure()
|
||||
. = ..()
|
||||
listening = FALSE
|
||||
|
||||
#undef INCLUSIVE_MODE
|
||||
#undef EXCLUSIVE_MODE
|
||||
#undef RECOGNIZER_MODE
|
||||
#undef VOICE_SENSOR_MODE
|
||||
#define INCLUSIVE_MODE 1
|
||||
#define EXCLUSIVE_MODE 2
|
||||
#define RECOGNIZER_MODE 3
|
||||
#define VOICE_SENSOR_MODE 4
|
||||
|
||||
/obj/item/assembly/voice
|
||||
name = "voice analyzer"
|
||||
desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated."
|
||||
icon_state = "voice"
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
||||
flags_1 = HEAR_1
|
||||
attachable = TRUE
|
||||
verb_say = "beeps"
|
||||
verb_ask = "beeps"
|
||||
verb_exclaim = "beeps"
|
||||
var/listening = FALSE
|
||||
var/recorded = "" //the activation message
|
||||
var/mode = 1
|
||||
var/static/list/modes = list("inclusive",
|
||||
"exclusive",
|
||||
"recognizer",
|
||||
"voice sensor")
|
||||
|
||||
/obj/item/assembly/voice/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Use a multitool to swap between \"inclusive\", \"exclusive\", \"recognizer\", and \"voice sensor\" mode.</span>"
|
||||
|
||||
/obj/item/assembly/voice/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
if(speaker == src)
|
||||
return
|
||||
|
||||
if(listening && !radio_freq)
|
||||
record_speech(speaker, raw_message, message_language)
|
||||
else
|
||||
if(check_activation(speaker, raw_message))
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
|
||||
/obj/item/assembly/voice/proc/record_speech(atom/movable/speaker, raw_message, datum/language/message_language)
|
||||
switch(mode)
|
||||
if(INCLUSIVE_MODE)
|
||||
recorded = raw_message
|
||||
listening = FALSE
|
||||
say("Activation message is '[recorded]'.", message_language)
|
||||
if(EXCLUSIVE_MODE)
|
||||
recorded = raw_message
|
||||
listening = FALSE
|
||||
say("Activation message is '[recorded]'.", message_language)
|
||||
if(RECOGNIZER_MODE)
|
||||
recorded = speaker.GetVoice()
|
||||
listening = FALSE
|
||||
say("Your voice pattern is saved.", message_language)
|
||||
if(VOICE_SENSOR_MODE)
|
||||
if(length(raw_message))
|
||||
addtimer(CALLBACK(src, .proc/pulse, 0), 10)
|
||||
|
||||
/obj/item/assembly/voice/proc/check_activation(atom/movable/speaker, raw_message)
|
||||
. = FALSE
|
||||
switch(mode)
|
||||
if(INCLUSIVE_MODE)
|
||||
if(findtext(raw_message, recorded))
|
||||
. = TRUE
|
||||
if(EXCLUSIVE_MODE)
|
||||
if(raw_message == recorded)
|
||||
. = TRUE
|
||||
if(RECOGNIZER_MODE)
|
||||
if(speaker.GetVoice() == recorded)
|
||||
. = TRUE
|
||||
if(VOICE_SENSOR_MODE)
|
||||
if(length(raw_message))
|
||||
. = TRUE
|
||||
|
||||
/obj/item/assembly/voice/multitool_act(mob/living/user, obj/item/I)
|
||||
mode %= modes.len
|
||||
mode++
|
||||
to_chat(user, "<span class='notice'>You set [src] into [modes[mode]] mode.</span>")
|
||||
listening = FALSE
|
||||
recorded = ""
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/voice/activate()
|
||||
if(!secured || holder)
|
||||
return FALSE
|
||||
listening = !listening
|
||||
say("[listening ? "Now" : "No longer"] recording input.")
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/voice/attack_self(mob/user)
|
||||
if(!user)
|
||||
return FALSE
|
||||
activate()
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/voice/toggle_secure()
|
||||
. = ..()
|
||||
listening = FALSE
|
||||
|
||||
#undef INCLUSIVE_MODE
|
||||
#undef EXCLUSIVE_MODE
|
||||
#undef RECOGNIZER_MODE
|
||||
#undef VOICE_SENSOR_MODE
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
name = "Loom"
|
||||
desc = "A large pre-made loom."
|
||||
cost = 1000
|
||||
contains = list(/obj/structure/loom)
|
||||
contains = list(/obj/structure/loom/unanchored)
|
||||
crate_name = "loom crate"
|
||||
crate_type = /obj/structure/closet/crate/large
|
||||
|
||||
|
||||
@@ -111,3 +111,6 @@
|
||||
/datum/client_colour/monochrome
|
||||
colour = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
priority = INFINITY //we can't see colors anyway!
|
||||
|
||||
/datum/client_colour/monochrome/trance
|
||||
priority = 1
|
||||
@@ -65,7 +65,7 @@
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/proc/display_visor_message(var/msg)
|
||||
var/mob/wearer = loc
|
||||
if(msg && ishuman(wearer))
|
||||
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></b>", 1)
|
||||
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></b>", MSG_VISUAL)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
|
||||
. = ..()
|
||||
|
||||
@@ -160,6 +160,28 @@
|
||||
tastes = list("brains" = 1, "meat" = 1)
|
||||
foodtype = RAW | MEAT | TOXIC
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/carpmeat/aquatic
|
||||
name = "fillet"
|
||||
desc = "A fillet of one of the local water dwelling species."
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
|
||||
icon_state = "ipcmeat"
|
||||
desc = "Gross robot meat."
|
||||
filling_color = "#000000"
|
||||
tastes = list("metal" = 1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/avian
|
||||
desc = "Tastes like chicken, that's because it is!"
|
||||
icon_state = "birdmeat"
|
||||
filling_color = "#BF896B"
|
||||
tastes = list("chicken" = 1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/mammal
|
||||
desc = "Tastes sweet... reminds you vaguely of chicken."
|
||||
filling_color = "#6B8E23"
|
||||
tastes = list("brains" = 1, "meat" = 1)
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////// OTHER MEATS ////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/cotton_name = "raw cotton"
|
||||
|
||||
/obj/item/grown/cotton/attack_self(mob/user)
|
||||
user.show_message("<span class='notice'>You pull some [cotton_name] out of the [name]!</span>", 1)
|
||||
user.show_message("<span class='notice'>You pull some [cotton_name] out of the [name]!</span>", MSG_VISUAL)
|
||||
var/seed_modifier = 0
|
||||
if(seed)
|
||||
seed_modifier = round(seed.potency / 25)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
wine_power = 20
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(W.is_sharp())
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", 1)
|
||||
if(W.get_sharpness())
|
||||
user.show_message("<span class='notice'>You carve a face into [src]!</span>", MSG_VISUAL)
|
||||
new /obj/item/clothing/head/hardhat/pumpkinhead(user.loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/obj/item/grown/log/attackby(obj/item/W, mob/user, params)
|
||||
if(W.sharpness)
|
||||
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", 1)
|
||||
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", MSG_VISUAL)
|
||||
var/seed_modifier = 0
|
||||
if(seed)
|
||||
seed_modifier = round(seed.potency / 25)
|
||||
|
||||
@@ -859,7 +859,7 @@
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 5
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
/obj/item/integrated_circuit/input/microphone/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
var/translated = FALSE
|
||||
if(speaker && message)
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
/mob/dead/observer/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/message_mode = get_message_mode(message)
|
||||
if(client && (message_mode == MODE_ADMIN || message_mode == MODE_DEADMIN))
|
||||
message = copytext(message, 3)
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
|
||||
if(message_mode == MODE_ADMIN)
|
||||
client.cmd_admin_say(message)
|
||||
else if(message_mode == MODE_DEADMIN)
|
||||
client.dsay(message)
|
||||
return
|
||||
|
||||
src.log_talk(message, LOG_SAY, tag="ghost")
|
||||
|
||||
if(check_emote(message))
|
||||
return
|
||||
|
||||
. = say_dead(message)
|
||||
|
||||
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
. = ..()
|
||||
var/atom/movable/to_follow = speaker
|
||||
if(radio_freq)
|
||||
var/atom/movable/virtualspeaker/V = speaker
|
||||
|
||||
if(isAI(V.source))
|
||||
var/mob/living/silicon/ai/S = V.source
|
||||
to_follow = S.eyeobj
|
||||
else
|
||||
to_follow = V.source
|
||||
var/link = FOLLOW_LINK(src, to_follow)
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && (client.prefs.see_chat_non_mob || ismob(speaker)))
|
||||
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
to_chat(src, "[link] [message]")
|
||||
|
||||
/mob/dead/observer/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/message_mode = get_message_mode(message)
|
||||
if(client && (message_mode == MODE_ADMIN || message_mode == MODE_DEADMIN))
|
||||
message = copytext(message, 3)
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
|
||||
if(message_mode == MODE_ADMIN)
|
||||
client.cmd_admin_say(message)
|
||||
else if(message_mode == MODE_DEADMIN)
|
||||
client.dsay(message)
|
||||
return
|
||||
|
||||
src.log_talk(message, LOG_SAY, tag="ghost")
|
||||
|
||||
if(check_emote(message))
|
||||
return
|
||||
|
||||
. = say_dead(message)
|
||||
|
||||
/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
var/atom/movable/to_follow = speaker
|
||||
if(radio_freq)
|
||||
var/atom/movable/virtualspeaker/V = speaker
|
||||
|
||||
if(isAI(V.source))
|
||||
var/mob/living/silicon/ai/S = V.source
|
||||
to_follow = S.eyeobj
|
||||
else
|
||||
to_follow = V.source
|
||||
var/link = FOLLOW_LINK(src, to_follow)
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && (client.prefs.see_chat_non_mob || ismob(speaker)))
|
||||
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source)
|
||||
to_chat(src, "[link] [message]")
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,116 +1,116 @@
|
||||
/mob/living/carbon/human/say_mod(input, message_mode)
|
||||
verb_say = dna.species.say_mod
|
||||
switch(slurring)
|
||||
if(10 to 25)
|
||||
return "jumbles"
|
||||
if(25 to 50)
|
||||
return "slurs"
|
||||
if(50 to INFINITY)
|
||||
return "garbles"
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/chameleon))
|
||||
var/obj/item/clothing/mask/chameleon/V = wear_mask
|
||||
if(V.vchange && wear_id)
|
||||
var/obj/item/card/id/idcard = wear_id.GetID()
|
||||
if(istype(idcard))
|
||||
return idcard.registered_name
|
||||
else
|
||||
return real_name
|
||||
else
|
||||
return real_name
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling && changeling.mimicing )
|
||||
return changeling.mimicing
|
||||
if(GetSpecialVoice())
|
||||
return GetSpecialVoice()
|
||||
return real_name
|
||||
|
||||
/mob/living/carbon/human/IsVocal()
|
||||
// how do species that don't breathe talk? magic, that's what.
|
||||
if(!HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS))
|
||||
return FALSE
|
||||
if(mind)
|
||||
return !mind.miming
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/SetSpecialVoice(new_voice)
|
||||
if(new_voice)
|
||||
special_voice = new_voice
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/UnsetSpecialVoice()
|
||||
special_voice = ""
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/GetSpecialVoice()
|
||||
return special_voice
|
||||
|
||||
/mob/living/carbon/human/binarycheck()
|
||||
if(ears)
|
||||
var/obj/item/radio/headset/dongle = ears
|
||||
if(!istype(dongle))
|
||||
return FALSE
|
||||
if(dongle.translate_binary)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/radio(message, message_mode, list/spans, language)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(message_mode)
|
||||
if(MODE_HEADSET)
|
||||
if (ears)
|
||||
ears.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_DEPARTMENT)
|
||||
if (ears)
|
||||
ears.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(message_mode in GLOB.radiochannels)
|
||||
if(ears)
|
||||
ears.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/get_alt_name()
|
||||
if(name != GetVoice())
|
||||
return " (as [get_id_name("Unknown")])"
|
||||
|
||||
/mob/living/carbon/human/proc/forcesay(list/append) //this proc is at the bottom of the file because quote fuckery makes notepad++ cri
|
||||
if(stat == CONSCIOUS)
|
||||
if(client)
|
||||
var/virgin = 1 //has the text been modified yet?
|
||||
var/temp = winget(client, "input", "text")
|
||||
if(findtextEx(temp, "Say \"", 1, 7) && length(temp) > 5) //"case sensitive means
|
||||
|
||||
temp = replacetext(temp, ";", "") //general radio
|
||||
|
||||
if(findtext(trim_left(temp), ":", 6, 7)) //dept radio
|
||||
temp = copytext(trim_left(temp), 8)
|
||||
virgin = 0
|
||||
|
||||
if(virgin)
|
||||
temp = copytext(trim_left(temp), 6) //normal speech
|
||||
virgin = 0
|
||||
|
||||
while(findtext(trim_left(temp), ":", 1, 2)) //dept radio again (necessary)
|
||||
temp = copytext(trim_left(temp), 3)
|
||||
|
||||
if(findtext(temp, "*", 1, 2)) //emotes
|
||||
return
|
||||
|
||||
var/trimmed = trim_left(temp)
|
||||
if(length(trimmed))
|
||||
if(append)
|
||||
temp += pick(append)
|
||||
|
||||
say(temp)
|
||||
winset(client, "input", "text=[null]")
|
||||
/mob/living/carbon/human/say_mod(input, message_mode)
|
||||
verb_say = dna.species.say_mod
|
||||
. = ..()
|
||||
if(message_mode != MODE_CUSTOM_SAY && message_mode != MODE_WHISPER_CRIT)
|
||||
switch(slurring)
|
||||
if(10 to 25)
|
||||
return "jumbles"
|
||||
if(25 to 50)
|
||||
return "slurs"
|
||||
if(50 to INFINITY)
|
||||
return "garbles"
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
if(istype(wear_mask, /obj/item/clothing/mask/chameleon))
|
||||
var/obj/item/clothing/mask/chameleon/V = wear_mask
|
||||
if(V.vchange && wear_id)
|
||||
var/obj/item/card/id/idcard = wear_id.GetID()
|
||||
if(istype(idcard))
|
||||
return idcard.registered_name
|
||||
else
|
||||
return real_name
|
||||
else
|
||||
return real_name
|
||||
if(mind)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling && changeling.mimicing )
|
||||
return changeling.mimicing
|
||||
if(GetSpecialVoice())
|
||||
return GetSpecialVoice()
|
||||
return real_name
|
||||
|
||||
/mob/living/carbon/human/IsVocal()
|
||||
// how do species that don't breathe talk? magic, that's what.
|
||||
if(!HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS))
|
||||
return FALSE
|
||||
if(mind)
|
||||
return !mind.miming
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/SetSpecialVoice(new_voice)
|
||||
if(new_voice)
|
||||
special_voice = new_voice
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/UnsetSpecialVoice()
|
||||
special_voice = ""
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/GetSpecialVoice()
|
||||
return special_voice
|
||||
|
||||
/mob/living/carbon/human/binarycheck()
|
||||
if(ears)
|
||||
var/obj/item/radio/headset/dongle = ears
|
||||
if(!istype(dongle))
|
||||
return FALSE
|
||||
if(dongle.translate_binary)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/radio(message, message_mode, list/spans, language)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(message_mode)
|
||||
if(MODE_HEADSET)
|
||||
if (ears)
|
||||
ears.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_DEPARTMENT)
|
||||
if (ears)
|
||||
ears.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(message_mode in GLOB.radiochannels)
|
||||
if(ears)
|
||||
ears.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/get_alt_name()
|
||||
if(name != GetVoice())
|
||||
return " (as [get_id_name("Unknown")])"
|
||||
|
||||
/mob/living/carbon/human/proc/forcesay(list/append) //this proc is at the bottom of the file because quote fuckery makes notepad++ cri
|
||||
if(stat == CONSCIOUS)
|
||||
if(client)
|
||||
var/virgin = 1 //has the text been modified yet?
|
||||
var/temp = winget(client, "input", "text")
|
||||
if(findtextEx(temp, "Say \"", 1, 7) && length(temp) > 5) //"case sensitive means
|
||||
|
||||
temp = replacetext(temp, ";", "") //general radio
|
||||
|
||||
if(findtext(trim_left(temp), ":", 6, 7)) //dept radio
|
||||
temp = copytext(trim_left(temp), 8)
|
||||
virgin = 0
|
||||
|
||||
if(virgin)
|
||||
temp = copytext(trim_left(temp), 6) //normal speech
|
||||
virgin = 0
|
||||
|
||||
while(findtext(trim_left(temp), ":", 1, 2)) //dept radio again (necessary)
|
||||
temp = copytext(trim_left(temp), 3)
|
||||
|
||||
if(findtext(temp, "*", 1, 2)) //emotes
|
||||
return
|
||||
|
||||
var/trimmed = trim_left(temp)
|
||||
if(length(trimmed))
|
||||
if(append)
|
||||
temp += pick(append)
|
||||
|
||||
say(temp)
|
||||
winset(client, "input", "text=[null]")
|
||||
|
||||
@@ -1519,6 +1519,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
target.lastattacker = user.real_name
|
||||
target.lastattackerckey = user.ckey
|
||||
user.dna.species.spec_unarmedattacked(user, target)
|
||||
|
||||
if(user.limb_destroyer)
|
||||
target.dismembering_strike(user, affecting.body_zone)
|
||||
@@ -1532,6 +1533,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
else if(target.lying)
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
|
||||
/datum/species/proc/spec_unarmedattacked(mob/living/carbon/human/user, mob/living/carbon/human/target)
|
||||
return
|
||||
|
||||
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
// CITADEL EDIT slap mouthy gits and booty
|
||||
var/aim_for_mouth = user.zone_selected == "mouth"
|
||||
|
||||
@@ -861,27 +861,27 @@
|
||||
if(M.stat == DEAD) //F
|
||||
return
|
||||
if(M == H)
|
||||
H.show_message("<span class='narsiesmall'>You cringe with pain as your body rings around you!</span>", 2)
|
||||
H.show_message("<span class='narsiesmall'>You cringe with pain as your body rings around you!</span>", MSG_AUDIBLE)
|
||||
H.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
|
||||
H.soundbang_act(2, 0, 100, 1)
|
||||
H.jitteriness += 7
|
||||
var/distance = max(0,get_dist(get_turf(H),get_turf(M)))
|
||||
switch(distance)
|
||||
if(0 to 1)
|
||||
M.show_message("<span class='narsiesmall'>GONG!</span>", 2)
|
||||
M.show_message("<span class='narsiesmall'>GONG!</span>", MSG_AUDIBLE)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
|
||||
M.soundbang_act(1, 0, 30, 3)
|
||||
M.confused += 10
|
||||
M.jitteriness += 4
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
|
||||
if(2 to 3)
|
||||
M.show_message("<span class='cult'>GONG!</span>", 2)
|
||||
M.show_message("<span class='cult'>GONG!</span>", MSG_AUDIBLE)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 75, TRUE)
|
||||
M.soundbang_act(1, 0, 15, 2)
|
||||
M.jitteriness += 3
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
|
||||
else
|
||||
M.show_message("<span class='warning'>GONG!</span>", 2)
|
||||
M.show_message("<span class='warning'>GONG!</span>", MSG_AUDIBLE)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 50, TRUE)
|
||||
|
||||
|
||||
@@ -943,6 +943,21 @@
|
||||
grab_sound = 'sound/weapons/whipgrab.ogg'
|
||||
attack_sound = 'sound/weapons/whip.ogg'
|
||||
|
||||
/datum/species/golem/durathread
|
||||
name = "Durathread Golem"
|
||||
id = "durathread golem"
|
||||
prefix = "Durathread"
|
||||
limbs_id = "d_golem"
|
||||
special_names = list("Boll","Weave")
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NOEYES)
|
||||
fixed_mut_color = null
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER)
|
||||
info_text = "As a <span class='danger'>Durathread Golem</span>, your strikes will cause those your targets to start choking, but your woven body won't withstand fire as well."
|
||||
|
||||
/datum/species/golem/durathread/spec_unarmedattacked(mob/living/carbon/human/user, mob/living/carbon/human/target)
|
||||
. = ..()
|
||||
target.apply_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
|
||||
|
||||
/datum/species/golem/bone
|
||||
name = "Bone Golem"
|
||||
id = "bone golem"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL) || lungs.organ_flags & ORGAN_FAILING)
|
||||
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL) || HAS_TRAIT(src, TRAIT_MAGIC_CHOKE) || (lungs && lungs.organ_flags & ORGAN_FAILING))
|
||||
losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath
|
||||
|
||||
else if(health <= crit_threshold)
|
||||
|
||||
@@ -17,18 +17,4 @@
|
||||
if(T)
|
||||
. = T.could_speak_in_language(dt)
|
||||
else
|
||||
. = initial(dt.flags) & TONGUELESS_SPEECH
|
||||
|
||||
/mob/living/carbon/hear_intercept(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
. = ..()
|
||||
if(!client)
|
||||
return
|
||||
for(var/T in get_traumas())
|
||||
var/datum/brain_trauma/trauma = T
|
||||
message = trauma.on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
|
||||
if (src.mind.has_antag_datum(/datum/antagonist/traitor))
|
||||
message = GLOB.syndicate_code_phrase_regex.Replace(message, "<span class='blue'>$1</span>")
|
||||
message = GLOB.syndicate_code_response_regex.Replace(message, "<span class='red'>$1</span>")
|
||||
|
||||
return message
|
||||
. = initial(dt.flags) & TONGUELESS_SPEECH
|
||||
+519
-519
File diff suppressed because it is too large
Load Diff
+437
-431
@@ -1,431 +1,437 @@
|
||||
GLOBAL_LIST_INIT(department_radio_prefixes, list(":", "."))
|
||||
|
||||
GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
// Location
|
||||
MODE_KEY_R_HAND = MODE_R_HAND,
|
||||
MODE_KEY_L_HAND = MODE_L_HAND,
|
||||
MODE_KEY_INTERCOM = MODE_INTERCOM,
|
||||
|
||||
// Department
|
||||
MODE_KEY_DEPARTMENT = MODE_DEPARTMENT,
|
||||
RADIO_KEY_COMMAND = RADIO_CHANNEL_COMMAND,
|
||||
RADIO_KEY_SCIENCE = RADIO_CHANNEL_SCIENCE,
|
||||
RADIO_KEY_MEDICAL = RADIO_CHANNEL_MEDICAL,
|
||||
RADIO_KEY_ENGINEERING = RADIO_CHANNEL_ENGINEERING,
|
||||
RADIO_KEY_SECURITY = RADIO_CHANNEL_SECURITY,
|
||||
RADIO_KEY_SUPPLY = RADIO_CHANNEL_SUPPLY,
|
||||
RADIO_KEY_SERVICE = RADIO_CHANNEL_SERVICE,
|
||||
|
||||
// Faction
|
||||
RADIO_KEY_SYNDICATE = RADIO_CHANNEL_SYNDICATE,
|
||||
RADIO_KEY_CENTCOM = RADIO_CHANNEL_CENTCOM,
|
||||
|
||||
// Admin
|
||||
MODE_KEY_ADMIN = MODE_ADMIN,
|
||||
MODE_KEY_DEADMIN = MODE_DEADMIN,
|
||||
|
||||
// Misc
|
||||
RADIO_KEY_AI_PRIVATE = RADIO_CHANNEL_AI_PRIVATE, // AI Upload channel
|
||||
MODE_KEY_VOCALCORDS = MODE_VOCALCORDS, // vocal cords, used by Voice of God
|
||||
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
// Location
|
||||
"ê" = MODE_R_HAND,
|
||||
"ä" = MODE_L_HAND,
|
||||
"ø" = MODE_INTERCOM,
|
||||
|
||||
// Department
|
||||
"ð" = MODE_DEPARTMENT,
|
||||
"ñ" = RADIO_CHANNEL_COMMAND,
|
||||
"ò" = RADIO_CHANNEL_SCIENCE,
|
||||
"ü" = RADIO_CHANNEL_MEDICAL,
|
||||
"ó" = RADIO_CHANNEL_ENGINEERING,
|
||||
"û" = RADIO_CHANNEL_SECURITY,
|
||||
"ã" = RADIO_CHANNEL_SUPPLY,
|
||||
"ì" = RADIO_CHANNEL_SERVICE,
|
||||
|
||||
// Faction
|
||||
"å" = RADIO_CHANNEL_SYNDICATE,
|
||||
"í" = RADIO_CHANNEL_CENTCOM,
|
||||
|
||||
// Admin
|
||||
"ç" = MODE_ADMIN,
|
||||
"â" = MODE_ADMIN,
|
||||
|
||||
// Misc
|
||||
"ù" = RADIO_CHANNEL_AI_PRIVATE,
|
||||
"÷" = MODE_VOCALCORDS
|
||||
))
|
||||
|
||||
/mob/living/proc/Ellipsis(original_msg, chance = 50, keep_words)
|
||||
if(chance <= 0)
|
||||
return "..."
|
||||
if(chance >= 100)
|
||||
return original_msg
|
||||
|
||||
var/list/words = splittext(original_msg," ")
|
||||
var/list/new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
for(var/w in words)
|
||||
if(prob(chance))
|
||||
new_words += "..."
|
||||
if(!keep_words)
|
||||
continue
|
||||
new_words += w
|
||||
|
||||
new_msg = jointext(new_words," ")
|
||||
|
||||
return new_msg
|
||||
|
||||
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/talk_key = get_key(message)
|
||||
|
||||
var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE, MODE_SING = TRUE)
|
||||
|
||||
if(sanitize)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
var/datum/saymode/saymode = SSradio.saymodes[talk_key]
|
||||
var/message_mode = get_message_mode(message)
|
||||
var/original_message = message
|
||||
var/in_critical = InCritical()
|
||||
|
||||
if(one_character_prefix[message_mode])
|
||||
message = copytext(message, 2)
|
||||
else if(message_mode || saymode)
|
||||
message = copytext(message, 3)
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
|
||||
if(message_mode == MODE_ADMIN)
|
||||
if(client)
|
||||
client.cmd_admin_say(message)
|
||||
return
|
||||
|
||||
if(message_mode == MODE_DEADMIN)
|
||||
if(client)
|
||||
client.dsay(message)
|
||||
return
|
||||
|
||||
if(stat == DEAD)
|
||||
say_dead(original_message)
|
||||
return
|
||||
|
||||
if(check_emote(original_message) || !can_speak_basic(original_message, ignore_spam))
|
||||
return
|
||||
|
||||
if(in_critical)
|
||||
if(!(crit_allowed_modes[message_mode]))
|
||||
return
|
||||
else if(stat == UNCONSCIOUS)
|
||||
if(!(unconscious_allowed_modes[message_mode]))
|
||||
return
|
||||
|
||||
// language comma detection.
|
||||
var/datum/language/message_language = get_message_language(message)
|
||||
if(message_language)
|
||||
// No, you cannot speak in xenocommon just because you know the key
|
||||
if(can_speak_in_language(message_language))
|
||||
language = message_language
|
||||
message = copytext(message, 3)
|
||||
|
||||
// Trim the space if they said ",0 I LOVE LANGUAGES"
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
|
||||
if(!language)
|
||||
language = get_default_language()
|
||||
|
||||
// Detection of language needs to be before inherent channels, because
|
||||
// AIs use inherent channels for the holopad. Most inherent channels
|
||||
// ignore the language argument however.
|
||||
|
||||
if(saymode && !saymode.handle_message(src, message, language))
|
||||
return
|
||||
|
||||
if(!can_speak_vocal(message))
|
||||
to_chat(src, "<span class='warning'>You find yourself unable to speak!</span>")
|
||||
return
|
||||
|
||||
var/message_range = 7
|
||||
|
||||
var/succumbed = FALSE
|
||||
|
||||
var/fullcrit = InFullCritical()
|
||||
if((InCritical() && !fullcrit) || message_mode == MODE_WHISPER)
|
||||
message_range = 1
|
||||
message_mode = MODE_WHISPER
|
||||
src.log_talk(message, LOG_WHISPER)
|
||||
if(fullcrit)
|
||||
var/health_diff = round(-HEALTH_THRESHOLD_DEAD + health)
|
||||
// If we cut our message short, abruptly end it with a-..
|
||||
var/message_len = length(message)
|
||||
message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
|
||||
message = Ellipsis(message, 10, 1)
|
||||
message_mode = MODE_WHISPER_CRIT
|
||||
succumbed = TRUE
|
||||
else
|
||||
src.log_talk(message, LOG_SAY, forced_by=forced)
|
||||
|
||||
message = treat_message(message) // unfortunately we still need this
|
||||
var/sigreturn = SEND_SIGNAL(src, COMSIG_MOB_SAY, args)
|
||||
if (sigreturn & COMPONENT_UPPERCASE_SPEECH)
|
||||
message = uppertext(message)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
last_words = message
|
||||
|
||||
spans |= speech_span
|
||||
|
||||
if(language)
|
||||
var/datum/language/L = GLOB.language_datum_instances[language]
|
||||
spans |= L.spans
|
||||
|
||||
if(message_mode == MODE_SING)
|
||||
#if DM_VERSION < 513
|
||||
var/randomnote = "~"
|
||||
#else
|
||||
var/randomnote = pick("\u2669", "\u266A", "\u266B")
|
||||
#endif
|
||||
spans |= SPAN_SINGING
|
||||
message = "[randomnote] [message] [randomnote]"
|
||||
|
||||
var/radio_return = radio(message, message_mode, spans, language)
|
||||
if(radio_return & ITALICS)
|
||||
spans |= SPAN_ITALICS
|
||||
if(radio_return & REDUCE_RANGE)
|
||||
message_range = 1
|
||||
if(radio_return & NOPASS)
|
||||
return 1
|
||||
|
||||
//No screams in space, unless you're next to someone.
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/pressure = (environment)? environment.return_pressure() : 0
|
||||
if(pressure < SOUND_MINIMUM_PRESSURE)
|
||||
message_range = 1
|
||||
|
||||
if(pressure < ONE_ATMOSPHERE*0.4) //Thin air, let's italicise the message
|
||||
spans |= SPAN_ITALICS
|
||||
|
||||
send_speech(message, message_range, src, bubble_type, spans, language, message_mode)
|
||||
|
||||
if(succumbed)
|
||||
succumb()
|
||||
to_chat(src, compose_message(src, language, message, , spans, message_mode))
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
. = ..()
|
||||
if(!client)
|
||||
return
|
||||
var/deaf_message
|
||||
var/deaf_type
|
||||
if(speaker != src)
|
||||
if(!radio_freq) //These checks have to be seperate, else people talking on the radio will make "You can't hear yourself!" appear when hearing people over the radio while deaf.
|
||||
deaf_message = "<span class='name'>[speaker]</span> [speaker.verb_say] something but you cannot hear [speaker.p_them()]."
|
||||
deaf_type = 1
|
||||
else
|
||||
deaf_message = "<span class='notice'>You can't hear yourself!</span>"
|
||||
deaf_type = 2 // Since you should be able to hear yourself without looking
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && stat != UNCONSCIOUS && (client.prefs.see_chat_non_mob || ismob(speaker)) && can_hear())
|
||||
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
|
||||
if (client?.prefs.radiosounds && stat != UNCONSCIOUS && can_hear() && radio_freq)
|
||||
playsound_local(src,'sound/voice/radio.ogg', 30, 1)
|
||||
|
||||
// Recompose message for AI hrefs, language incomprehension.
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
message = hear_intercept(message, speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
|
||||
show_message(message, 2, deaf_message, deaf_type)
|
||||
return message
|
||||
|
||||
/mob/living/proc/hear_intercept(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
return message
|
||||
|
||||
/mob/living/send_speech(message, message_range = 6, obj/source = src, bubble_type = bubble_icon, list/spans, datum/language/message_language=null, message_mode)
|
||||
var/static/list/eavesdropping_modes = list(MODE_WHISPER = TRUE, MODE_WHISPER_CRIT = TRUE)
|
||||
var/eavesdrop_range = 0
|
||||
if(eavesdropping_modes[message_mode])
|
||||
eavesdrop_range = EAVESDROP_EXTRA_RANGE
|
||||
var/list/listening = get_hearers_in_view(message_range+eavesdrop_range, source)
|
||||
var/list/the_dead = list()
|
||||
var/list/yellareas //CIT CHANGE - adds the ability for yelling to penetrate walls and echo throughout areas
|
||||
if(say_test(message) == "2") //CIT CHANGE - ditto
|
||||
yellareas = get_areas_in_range(message_range*0.5,src) //CIT CHANGE - ditto
|
||||
for(var/_M in GLOB.player_list)
|
||||
var/mob/M = _M
|
||||
if(M.stat != DEAD) //not dead, not important
|
||||
if(yellareas) //CIT CHANGE - see above. makes yelling penetrate walls
|
||||
var/area/A = get_area(M) //CIT CHANGE - ditto
|
||||
if(istype(A) && A.ambientsounds != SPACE && A in yellareas) //CIT CHANGE - ditto
|
||||
listening |= M //CIT CHANGE - ditto
|
||||
continue
|
||||
if(!M.client || !client) //client is so that ghosts don't have to listen to mice
|
||||
continue
|
||||
if(get_dist(M, src) > 7 || M.z != z) //they're out of range of normal hearing
|
||||
if(eavesdropping_modes[message_mode] && !(M.client.prefs.chat_toggles & CHAT_GHOSTWHISPER)) //they're whispering and we have hearing whispers at any range off
|
||||
continue
|
||||
if(!(M.client.prefs.chat_toggles & CHAT_GHOSTEARS)) //they're talking normally and we have hearing at any range off
|
||||
continue
|
||||
listening |= M
|
||||
the_dead[M] = TRUE
|
||||
|
||||
var/eavesdropping
|
||||
var/eavesrendered
|
||||
if(eavesdrop_range)
|
||||
eavesdropping = stars(message)
|
||||
eavesrendered = compose_message(src, message_language, eavesdropping, , spans, message_mode)
|
||||
|
||||
var/rendered = compose_message(src, message_language, message, , spans, message_mode)
|
||||
for(var/_AM in listening)
|
||||
var/atom/movable/AM = _AM
|
||||
if(eavesdrop_range && get_dist(source, AM) > message_range && !(the_dead[AM]))
|
||||
AM.Hear(eavesrendered, src, message_language, eavesdropping, , spans, message_mode)
|
||||
else
|
||||
AM.Hear(rendered, src, message_language, message, , spans, message_mode)
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LIVING_SAY_SPECIAL, src, message)
|
||||
|
||||
//speech bubble
|
||||
var/list/speech_bubble_recipients = list()
|
||||
for(var/mob/M in listening)
|
||||
if(M.client && !M.client.prefs.chat_on_map)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
var/image/I = image('icons/mob/talk.dmi', src, "[bubble_type][say_test(message)]", FLY_LAYER)
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_recipients, 30)
|
||||
|
||||
/mob/proc/binarycheck()
|
||||
return FALSE
|
||||
|
||||
/mob/living/can_speak(message) //For use outside of Say()
|
||||
if(can_speak_basic(message) && can_speak_vocal(message))
|
||||
return 1
|
||||
|
||||
/mob/living/proc/can_speak_basic(message, ignore_spam = FALSE) //Check BEFORE handling of xeno and ling channels
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot speak in IC (muted).</span>")
|
||||
return 0
|
||||
if(!ignore_spam && client.handle_spam_prevention(message,MUTE_IC))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
|
||||
if(HAS_TRAIT(src, TRAIT_MUTE))
|
||||
return 0
|
||||
|
||||
if(is_muzzled())
|
||||
return 0
|
||||
|
||||
if(!IsVocal())
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/get_key(message)
|
||||
var/key = copytext(message, 1, 2)
|
||||
if(key in GLOB.department_radio_prefixes)
|
||||
return lowertext(copytext(message, 2, 3))
|
||||
|
||||
/mob/living/proc/get_message_language(message)
|
||||
if(copytext(message, 1, 2) == ",")
|
||||
var/key = copytext(message, 2, 3)
|
||||
for(var/ld in GLOB.all_languages)
|
||||
var/datum/language/LD = ld
|
||||
if(initial(LD.key) == key)
|
||||
return LD
|
||||
return null
|
||||
|
||||
/mob/living/proc/treat_message(message)
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_UNINTELLIGIBLE_SPEECH))
|
||||
message = unintelligize(message)
|
||||
|
||||
if(derpspeech)
|
||||
message = derpspeech(message, stuttering)
|
||||
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
if(slurring)
|
||||
message = slur(message,slurring)
|
||||
|
||||
if(cultslurring)
|
||||
message = cultslur(message)
|
||||
|
||||
message = capitalize(message)
|
||||
|
||||
return message
|
||||
|
||||
/mob/living/proc/radio(message, message_mode, list/spans, language)
|
||||
var/obj/item/implant/radio/imp = locate() in implants
|
||||
if(imp?.radio.on)
|
||||
if(message_mode == MODE_HEADSET)
|
||||
imp.radio.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
if(message_mode == MODE_DEPARTMENT || message_mode in GLOB.radiochannels)
|
||||
imp.radio.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
switch(message_mode)
|
||||
if(MODE_WHISPER)
|
||||
return ITALICS
|
||||
if(MODE_R_HAND)
|
||||
for(var/obj/item/r_hand in get_held_items_for_side("r", all = TRUE))
|
||||
if (r_hand)
|
||||
return r_hand.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
if(MODE_L_HAND)
|
||||
for(var/obj/item/l_hand in get_held_items_for_side("l", all = TRUE))
|
||||
if (l_hand)
|
||||
return l_hand.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_INTERCOM)
|
||||
for (var/obj/item/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_BINARY)
|
||||
return ITALICS | REDUCE_RANGE //Does not return 0 since this is only reached by humans, not borgs or AIs.
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/say_mod(input, message_mode)
|
||||
if(message_mode == MODE_WHISPER)
|
||||
. = verb_whisper
|
||||
else if(message_mode == MODE_WHISPER_CRIT)
|
||||
. = "[verb_whisper] in [p_their()] last breath"
|
||||
else if(stuttering)
|
||||
. = "stammers"
|
||||
else if(derpspeech)
|
||||
. = "gibbers"
|
||||
else if(message_mode == MODE_SING)
|
||||
. = verb_sing
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/mob/living/whisper(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
say("#[message]", bubble_type, spans, sanitize, language, ignore_spam, forced)
|
||||
|
||||
/mob/living/get_language_holder(shadow=TRUE)
|
||||
if(mind && shadow)
|
||||
// Mind language holders shadow mob holders.
|
||||
. = mind.get_language_holder()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
. = ..()
|
||||
GLOBAL_LIST_INIT(department_radio_prefixes, list(":", "."))
|
||||
|
||||
GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
// Location
|
||||
MODE_KEY_R_HAND = MODE_R_HAND,
|
||||
MODE_KEY_L_HAND = MODE_L_HAND,
|
||||
MODE_KEY_INTERCOM = MODE_INTERCOM,
|
||||
|
||||
// Department
|
||||
MODE_KEY_DEPARTMENT = MODE_DEPARTMENT,
|
||||
RADIO_KEY_COMMAND = RADIO_CHANNEL_COMMAND,
|
||||
RADIO_KEY_SCIENCE = RADIO_CHANNEL_SCIENCE,
|
||||
RADIO_KEY_MEDICAL = RADIO_CHANNEL_MEDICAL,
|
||||
RADIO_KEY_ENGINEERING = RADIO_CHANNEL_ENGINEERING,
|
||||
RADIO_KEY_SECURITY = RADIO_CHANNEL_SECURITY,
|
||||
RADIO_KEY_SUPPLY = RADIO_CHANNEL_SUPPLY,
|
||||
RADIO_KEY_SERVICE = RADIO_CHANNEL_SERVICE,
|
||||
|
||||
// Faction
|
||||
RADIO_KEY_SYNDICATE = RADIO_CHANNEL_SYNDICATE,
|
||||
RADIO_KEY_CENTCOM = RADIO_CHANNEL_CENTCOM,
|
||||
|
||||
// Admin
|
||||
MODE_KEY_ADMIN = MODE_ADMIN,
|
||||
MODE_KEY_DEADMIN = MODE_DEADMIN,
|
||||
|
||||
// Misc
|
||||
RADIO_KEY_AI_PRIVATE = RADIO_CHANNEL_AI_PRIVATE, // AI Upload channel
|
||||
MODE_KEY_VOCALCORDS = MODE_VOCALCORDS, // vocal cords, used by Voice of God
|
||||
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
// Location
|
||||
"ê" = MODE_R_HAND,
|
||||
"ä" = MODE_L_HAND,
|
||||
"ø" = MODE_INTERCOM,
|
||||
|
||||
// Department
|
||||
"ð" = MODE_DEPARTMENT,
|
||||
"ñ" = RADIO_CHANNEL_COMMAND,
|
||||
"ò" = RADIO_CHANNEL_SCIENCE,
|
||||
"ü" = RADIO_CHANNEL_MEDICAL,
|
||||
"ó" = RADIO_CHANNEL_ENGINEERING,
|
||||
"û" = RADIO_CHANNEL_SECURITY,
|
||||
"ã" = RADIO_CHANNEL_SUPPLY,
|
||||
"ì" = RADIO_CHANNEL_SERVICE,
|
||||
|
||||
// Faction
|
||||
"å" = RADIO_CHANNEL_SYNDICATE,
|
||||
"í" = RADIO_CHANNEL_CENTCOM,
|
||||
|
||||
// Admin
|
||||
"ç" = MODE_ADMIN,
|
||||
"â" = MODE_ADMIN,
|
||||
|
||||
// Misc
|
||||
"ù" = RADIO_CHANNEL_AI_PRIVATE,
|
||||
"÷" = MODE_VOCALCORDS
|
||||
))
|
||||
|
||||
/mob/living/proc/Ellipsis(original_msg, chance = 50, keep_words)
|
||||
if(chance <= 0)
|
||||
return "..."
|
||||
if(chance >= 100)
|
||||
return original_msg
|
||||
|
||||
var/list/words = splittext(original_msg," ")
|
||||
var/list/new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
for(var/w in words)
|
||||
if(prob(chance))
|
||||
new_words += "..."
|
||||
if(!keep_words)
|
||||
continue
|
||||
new_words += w
|
||||
|
||||
new_msg = jointext(new_words," ")
|
||||
|
||||
return new_msg
|
||||
|
||||
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/talk_key = get_key(message)
|
||||
|
||||
var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE, MODE_SING = TRUE)
|
||||
|
||||
if(sanitize)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
var/datum/saymode/saymode = SSradio.saymodes[talk_key]
|
||||
var/message_mode = get_message_mode(message)
|
||||
var/original_message = message
|
||||
var/in_critical = InCritical()
|
||||
|
||||
if(one_character_prefix[message_mode])
|
||||
message = copytext(message, 2)
|
||||
else if(message_mode || saymode)
|
||||
message = copytext(message, 3)
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
|
||||
if(message_mode == MODE_ADMIN)
|
||||
if(client)
|
||||
client.cmd_admin_say(message)
|
||||
return
|
||||
|
||||
if(message_mode == MODE_DEADMIN)
|
||||
if(client)
|
||||
client.dsay(message)
|
||||
return
|
||||
|
||||
if(stat == DEAD)
|
||||
say_dead(original_message)
|
||||
return
|
||||
|
||||
if(check_emote(original_message) || !can_speak_basic(original_message, ignore_spam))
|
||||
return
|
||||
|
||||
if(in_critical)
|
||||
if(!(crit_allowed_modes[message_mode]))
|
||||
return
|
||||
else if(stat == UNCONSCIOUS)
|
||||
if(!(unconscious_allowed_modes[message_mode]))
|
||||
return
|
||||
|
||||
// language comma detection.
|
||||
var/datum/language/message_language = get_message_language(message)
|
||||
if(message_language)
|
||||
// No, you cannot speak in xenocommon just because you know the key
|
||||
if(can_speak_in_language(message_language))
|
||||
language = message_language
|
||||
message = copytext(message, 3)
|
||||
|
||||
// Trim the space if they said ",0 I LOVE LANGUAGES"
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
|
||||
if(!language)
|
||||
language = get_default_language()
|
||||
|
||||
// Detection of language needs to be before inherent channels, because
|
||||
// AIs use inherent channels for the holopad. Most inherent channels
|
||||
// ignore the language argument however.
|
||||
|
||||
if(saymode && !saymode.handle_message(src, message, language))
|
||||
return
|
||||
|
||||
if(!can_speak_vocal(message))
|
||||
to_chat(src, "<span class='warning'>You find yourself unable to speak!</span>")
|
||||
return
|
||||
|
||||
var/message_range = 7
|
||||
|
||||
var/succumbed = FALSE
|
||||
|
||||
var/fullcrit = InFullCritical()
|
||||
if((InCritical() && !fullcrit) || message_mode == MODE_WHISPER)
|
||||
message_range = 1
|
||||
message_mode = MODE_WHISPER
|
||||
src.log_talk(message, LOG_WHISPER)
|
||||
if(fullcrit)
|
||||
var/health_diff = round(-HEALTH_THRESHOLD_DEAD + health)
|
||||
// If we cut our message short, abruptly end it with a-..
|
||||
var/message_len = length(message)
|
||||
message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
|
||||
message = Ellipsis(message, 10, 1)
|
||||
message_mode = MODE_WHISPER_CRIT
|
||||
succumbed = TRUE
|
||||
else
|
||||
src.log_talk(message, LOG_SAY, forced_by=forced)
|
||||
|
||||
message = treat_message(message) // unfortunately we still need this
|
||||
var/sigreturn = SEND_SIGNAL(src, COMSIG_MOB_SAY, args)
|
||||
if (sigreturn & COMPONENT_UPPERCASE_SPEECH)
|
||||
message = uppertext(message)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
last_words = message
|
||||
|
||||
spans |= speech_span
|
||||
|
||||
if(language)
|
||||
var/datum/language/L = GLOB.language_datum_instances[language]
|
||||
spans |= L.spans
|
||||
|
||||
if(message_mode == MODE_SING)
|
||||
#if DM_VERSION < 513
|
||||
var/randomnote = "~"
|
||||
#else
|
||||
var/randomnote = pick("\u2669", "\u266A", "\u266B")
|
||||
#endif
|
||||
spans |= SPAN_SINGING
|
||||
message = "[randomnote] [message] [randomnote]"
|
||||
|
||||
var/radio_return = radio(message, message_mode, spans, language)
|
||||
if(radio_return & ITALICS)
|
||||
spans |= SPAN_ITALICS
|
||||
if(radio_return & REDUCE_RANGE)
|
||||
message_range = 1
|
||||
if(radio_return & NOPASS)
|
||||
return 1
|
||||
|
||||
//No screams in space, unless you're next to someone.
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/pressure = (environment)? environment.return_pressure() : 0
|
||||
if(pressure < SOUND_MINIMUM_PRESSURE)
|
||||
message_range = 1
|
||||
|
||||
if(pressure < ONE_ATMOSPHERE*0.4) //Thin air, let's italicise the message
|
||||
spans |= SPAN_ITALICS
|
||||
|
||||
send_speech(message, message_range, src, bubble_type, spans, language, message_mode)
|
||||
|
||||
if(succumbed)
|
||||
succumb()
|
||||
to_chat(src, compose_message(src, language, message, null, spans, message_mode))
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE, atom/movable/source)
|
||||
. = ..()
|
||||
if(isliving(speaker))
|
||||
var/turf/sourceturf = get_turf(source)
|
||||
var/turf/T = get_turf(src)
|
||||
if(sourceturf && T && !(sourceturf in get_hear(5, T)))
|
||||
. = "<span class='small'>[.]</span>"
|
||||
|
||||
/mob/living/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
if(!client)
|
||||
return
|
||||
var/deaf_message
|
||||
var/deaf_type
|
||||
if(speaker != src)
|
||||
if(!radio_freq) //These checks have to be seperate, else people talking on the radio will make "You can't hear yourself!" appear when hearing people over the radio while deaf.
|
||||
deaf_message = "<span class='name'>[speaker]</span> [speaker.verb_say] something but you cannot hear [speaker.p_them()]."
|
||||
deaf_type = 1
|
||||
else
|
||||
deaf_message = "<span class='notice'>You can't hear yourself!</span>"
|
||||
deaf_type = 2 // Since you should be able to hear yourself without looking
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && stat != UNCONSCIOUS && (client.prefs.see_chat_non_mob || ismob(speaker)) && can_hear())
|
||||
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
|
||||
if (client?.prefs.radiosounds && stat != UNCONSCIOUS && can_hear() && radio_freq)
|
||||
playsound_local(src,'sound/voice/radio.ogg', 30, 1)
|
||||
|
||||
// Recompose message for AI hrefs, language incomprehension.
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source)
|
||||
message = hear_intercept(message, speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source)
|
||||
|
||||
show_message(message, MSG_AUDIBLE, deaf_message, deaf_type)
|
||||
return message
|
||||
|
||||
/mob/living/proc/hear_intercept(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
return message
|
||||
|
||||
/mob/living/send_speech(message, message_range = 6, obj/source = src, bubble_type = bubble_icon, list/spans, datum/language/message_language=null, message_mode)
|
||||
var/static/list/eavesdropping_modes = list(MODE_WHISPER = TRUE, MODE_WHISPER_CRIT = TRUE)
|
||||
var/eavesdrop_range = 0
|
||||
if(eavesdropping_modes[message_mode])
|
||||
eavesdrop_range = EAVESDROP_EXTRA_RANGE
|
||||
var/list/listening = get_hearers_in_view(message_range+eavesdrop_range, source)
|
||||
var/list/the_dead = list()
|
||||
var/list/yellareas //CIT CHANGE - adds the ability for yelling to penetrate walls and echo throughout areas
|
||||
if(!eavesdrop_range && say_test(message) == "2") //CIT CHANGE - ditto
|
||||
yellareas = get_areas_in_range(message_range*0.5, source) //CIT CHANGE - ditto
|
||||
for(var/_M in GLOB.player_list)
|
||||
var/mob/M = _M
|
||||
if(M.stat != DEAD) //not dead, not important
|
||||
if(yellareas) //CIT CHANGE - see above. makes yelling penetrate walls
|
||||
var/area/A = get_area(M) //CIT CHANGE - ditto
|
||||
if(istype(A) && A.ambientsounds != SPACE && A in yellareas) //CIT CHANGE - ditto
|
||||
listening |= M //CIT CHANGE - ditto
|
||||
continue
|
||||
if(!M.client || !client) //client is so that ghosts don't have to listen to mice
|
||||
continue
|
||||
if(get_dist(M, source) > 7 || M.z != z) //they're out of range of normal hearing
|
||||
if(eavesdropping_modes[message_mode] && !(M.client.prefs.chat_toggles & CHAT_GHOSTWHISPER)) //they're whispering and we have hearing whispers at any range off
|
||||
continue
|
||||
if(!(M.client.prefs.chat_toggles & CHAT_GHOSTEARS)) //they're talking normally and we have hearing at any range off
|
||||
continue
|
||||
listening |= M
|
||||
the_dead[M] = TRUE
|
||||
|
||||
var/eavesdropping
|
||||
var/eavesrendered
|
||||
if(eavesdrop_range)
|
||||
eavesdropping = stars(message)
|
||||
eavesrendered = compose_message(src, message_language, eavesdropping, null, spans, message_mode, FALSE, source)
|
||||
|
||||
var/rendered = compose_message(src, message_language, message, null, spans, message_mode, FALSE, source)
|
||||
for(var/_AM in listening)
|
||||
var/atom/movable/AM = _AM
|
||||
if(eavesdrop_range && get_dist(source, AM) > message_range && !(the_dead[AM]))
|
||||
AM.Hear(eavesrendered, src, message_language, eavesdropping, null, spans, message_mode, source)
|
||||
else
|
||||
AM.Hear(rendered, src, message_language, message, null, spans, message_mode, source)
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LIVING_SAY_SPECIAL, src, message)
|
||||
|
||||
//speech bubble
|
||||
var/list/speech_bubble_recipients = list()
|
||||
for(var/mob/M in listening)
|
||||
if(M.client && !M.client.prefs.chat_on_map)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
var/image/I = image('icons/mob/talk.dmi', src, "[bubble_type][say_test(message)]", FLY_LAYER)
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_recipients, 30)
|
||||
|
||||
/mob/proc/binarycheck()
|
||||
return FALSE
|
||||
|
||||
/mob/living/can_speak(message) //For use outside of Say()
|
||||
if(can_speak_basic(message) && can_speak_vocal(message))
|
||||
return 1
|
||||
|
||||
/mob/living/proc/can_speak_basic(message, ignore_spam = FALSE) //Check BEFORE handling of xeno and ling channels
|
||||
if(client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='danger'>You cannot speak in IC (muted).</span>")
|
||||
return 0
|
||||
if(!ignore_spam && client.handle_spam_prevention(message,MUTE_IC))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
|
||||
if(HAS_TRAIT(src, TRAIT_MUTE))
|
||||
return 0
|
||||
|
||||
if(is_muzzled())
|
||||
return 0
|
||||
|
||||
if(!IsVocal())
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/get_key(message)
|
||||
var/key = copytext(message, 1, 2)
|
||||
if(key in GLOB.department_radio_prefixes)
|
||||
return lowertext(copytext(message, 2, 3))
|
||||
|
||||
/mob/living/proc/get_message_language(message)
|
||||
if(copytext(message, 1, 2) == ",")
|
||||
var/key = copytext(message, 2, 3)
|
||||
for(var/ld in GLOB.all_languages)
|
||||
var/datum/language/LD = ld
|
||||
if(initial(LD.key) == key)
|
||||
return LD
|
||||
return null
|
||||
|
||||
/mob/living/proc/treat_message(message)
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_UNINTELLIGIBLE_SPEECH))
|
||||
message = unintelligize(message)
|
||||
|
||||
if(derpspeech)
|
||||
message = derpspeech(message, stuttering)
|
||||
|
||||
if(stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
if(slurring)
|
||||
message = slur(message,slurring)
|
||||
|
||||
if(cultslurring)
|
||||
message = cultslur(message)
|
||||
|
||||
message = capitalize(message)
|
||||
|
||||
return message
|
||||
|
||||
/mob/living/proc/radio(message, message_mode, list/spans, language)
|
||||
var/obj/item/implant/radio/imp = locate() in implants
|
||||
if(imp?.radio.on)
|
||||
if(message_mode == MODE_HEADSET)
|
||||
imp.radio.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
if(message_mode == MODE_DEPARTMENT || message_mode in GLOB.radiochannels)
|
||||
imp.radio.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
switch(message_mode)
|
||||
if(MODE_WHISPER)
|
||||
return ITALICS
|
||||
if(MODE_R_HAND)
|
||||
for(var/obj/item/r_hand in get_held_items_for_side("r", all = TRUE))
|
||||
if (r_hand)
|
||||
return r_hand.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
if(MODE_L_HAND)
|
||||
for(var/obj/item/l_hand in get_held_items_for_side("l", all = TRUE))
|
||||
if (l_hand)
|
||||
return l_hand.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_INTERCOM)
|
||||
for (var/obj/item/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_BINARY)
|
||||
return ITALICS | REDUCE_RANGE //Does not return 0 since this is only reached by humans, not borgs or AIs.
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/say_mod(input, message_mode)
|
||||
. = ..()
|
||||
if(message_mode == MODE_WHISPER_CRIT)
|
||||
. = "[verb_whisper] in [p_their()] last breath"
|
||||
else if(message_mode != MODE_CUSTOM_SAY)
|
||||
if(message_mode == MODE_WHISPER)
|
||||
. = verb_whisper
|
||||
else if(stuttering)
|
||||
. = "stammers"
|
||||
else if(derpspeech)
|
||||
. = "gibbers"
|
||||
|
||||
/mob/living/whisper(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
say("#[message]", bubble_type, spans, sanitize, language, ignore_spam, forced)
|
||||
|
||||
/mob/living/get_language_holder(shadow=TRUE)
|
||||
if(mind && shadow)
|
||||
// Mind language holders shadow mob holders.
|
||||
. = mind.get_language_holder()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
. = ..()
|
||||
|
||||
+1001
-1001
File diff suppressed because it is too large
Load Diff
@@ -1,197 +1,197 @@
|
||||
// AI EYE
|
||||
//
|
||||
// An invisible (no icon) mob that the AI controls to look around the station with.
|
||||
// It streams chunks as it moves around, which will show it what the AI can and cannot see.
|
||||
|
||||
/mob/camera/aiEye
|
||||
name = "Inactive AI Eye"
|
||||
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
hud_possible = list(ANTAG_HUD, AI_DETECT_HUD = HUD_LIST_LIST)
|
||||
var/list/visibleCameraChunks = list()
|
||||
var/mob/living/silicon/ai/ai = null
|
||||
var/relay_speech = FALSE
|
||||
var/use_static = USE_STATIC_OPAQUE
|
||||
var/static_visibility_range = 16
|
||||
var/ai_detector_visible = TRUE
|
||||
var/ai_detector_color = COLOR_RED
|
||||
|
||||
/mob/camera/aiEye/Initialize()
|
||||
. = ..()
|
||||
GLOB.aiEyes += src
|
||||
update_ai_detect_hud()
|
||||
setLoc(loc, TRUE)
|
||||
|
||||
/mob/camera/aiEye/proc/update_ai_detect_hud()
|
||||
var/datum/atom_hud/ai_detector/hud = GLOB.huds[DATA_HUD_AI_DETECT]
|
||||
var/list/old_images = hud_list[AI_DETECT_HUD]
|
||||
if(!ai_detector_visible)
|
||||
hud.remove_from_hud(src)
|
||||
QDEL_LIST(old_images)
|
||||
return
|
||||
|
||||
if(!hud.hudusers.len)
|
||||
//no one is watching, do not bother updating anything
|
||||
return
|
||||
hud.remove_from_hud(src)
|
||||
|
||||
var/static/list/vis_contents_objects = list()
|
||||
var/obj/effect/overlay/ai_detect_hud/hud_obj = vis_contents_objects[ai_detector_color]
|
||||
if(!hud_obj)
|
||||
hud_obj = new /obj/effect/overlay/ai_detect_hud()
|
||||
hud_obj.color = ai_detector_color
|
||||
vis_contents_objects[ai_detector_color] = hud_obj
|
||||
|
||||
var/list/new_images = list()
|
||||
var/list/turfs = get_visible_turfs()
|
||||
for(var/T in turfs)
|
||||
var/image/I = (old_images.len > new_images.len) ? old_images[new_images.len + 1] : image(null, T)
|
||||
I.loc = T
|
||||
I.vis_contents += hud_obj
|
||||
new_images += I
|
||||
for(var/i in (new_images.len + 1) to old_images.len)
|
||||
qdel(old_images[i])
|
||||
hud_list[AI_DETECT_HUD] = new_images
|
||||
hud.add_to_hud(src)
|
||||
|
||||
/mob/camera/aiEye/proc/get_visible_turfs()
|
||||
if(!isturf(loc))
|
||||
return list()
|
||||
var/client/C = GetViewerClient()
|
||||
var/view = C ? getviewsize(C.view) : getviewsize(world.view)
|
||||
var/turf/lowerleft = locate(max(1, x - (view[1] - 1)/2), max(1, y - (view[2] - 1)/2), z)
|
||||
var/turf/upperright = locate(min(world.maxx, lowerleft.x + (view[1] - 1)), min(world.maxy, lowerleft.y + (view[2] - 1)), lowerleft.z)
|
||||
return block(lowerleft, upperright)
|
||||
|
||||
// Use this when setting the aiEye's location.
|
||||
// It will also stream the chunk that the new loc is in.
|
||||
|
||||
/mob/camera/aiEye/proc/setLoc(T, force_update = FALSE)
|
||||
if(ai)
|
||||
if(!isturf(ai.loc))
|
||||
return
|
||||
T = get_turf(T)
|
||||
if(!force_update && (T == get_turf(src)) )
|
||||
return //we are already here!
|
||||
if (T)
|
||||
forceMove(T)
|
||||
else
|
||||
moveToNullspace()
|
||||
if(use_static != USE_STATIC_NONE)
|
||||
ai.camera_visibility(src)
|
||||
if(ai.client && !ai.multicam_on)
|
||||
ai.client.eye = src
|
||||
update_ai_detect_hud()
|
||||
update_parallax_contents()
|
||||
//Holopad
|
||||
if(istype(ai.current, /obj/machinery/holopad))
|
||||
var/obj/machinery/holopad/H = ai.current
|
||||
H.move_hologram(ai, T)
|
||||
if(ai.camera_light_on)
|
||||
ai.light_cameras()
|
||||
if(ai.master_multicam)
|
||||
ai.master_multicam.refresh_view()
|
||||
|
||||
/mob/camera/aiEye/Move()
|
||||
return 0
|
||||
|
||||
/mob/camera/aiEye/proc/GetViewerClient()
|
||||
if(ai)
|
||||
return ai.client
|
||||
return null
|
||||
|
||||
/mob/camera/aiEye/Destroy()
|
||||
if(ai)
|
||||
ai.all_eyes -= src
|
||||
ai = null
|
||||
for(var/V in visibleCameraChunks)
|
||||
var/datum/camerachunk/c = V
|
||||
c.remove(src)
|
||||
GLOB.aiEyes -= src
|
||||
if(ai_detector_visible)
|
||||
var/datum/atom_hud/ai_detector/hud = GLOB.huds[DATA_HUD_AI_DETECT]
|
||||
hud.remove_from_hud(src)
|
||||
var/list/L = hud_list[AI_DETECT_HUD]
|
||||
QDEL_LIST(L)
|
||||
return ..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
if(AI.eyeobj && (AI.multicam_on || (AI.client.eye == AI.eyeobj)) && (AI.eyeobj.z == z))
|
||||
AI.cameraFollow = null
|
||||
if (isturf(loc) || isturf(src))
|
||||
AI.eyeobj.setLoc(src)
|
||||
|
||||
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
|
||||
// This is handled in the proc below this one.
|
||||
|
||||
/client/proc/AIMove(n, direct, mob/living/silicon/ai/user)
|
||||
|
||||
var/initial = initial(user.sprint)
|
||||
var/max_sprint = 50
|
||||
|
||||
if(user.cooldown && user.cooldown < world.timeofday) // 3 seconds
|
||||
user.sprint = initial
|
||||
|
||||
for(var/i = 0; i < max(user.sprint, initial); i += 20)
|
||||
var/turf/step = get_turf(get_step(user.eyeobj, direct))
|
||||
if(step)
|
||||
user.eyeobj.setLoc(step)
|
||||
|
||||
user.cooldown = world.timeofday + 5
|
||||
if(user.acceleration)
|
||||
user.sprint = min(user.sprint + 0.5, max_sprint)
|
||||
else
|
||||
user.sprint = initial
|
||||
|
||||
if(!user.tracking)
|
||||
user.cameraFollow = null
|
||||
|
||||
// Return to the Core.
|
||||
/mob/living/silicon/ai/proc/view_core()
|
||||
if(istype(current,/obj/machinery/holopad))
|
||||
var/obj/machinery/holopad/H = current
|
||||
H.clear_holo(src)
|
||||
else
|
||||
current = null
|
||||
cameraFollow = null
|
||||
unset_machine()
|
||||
|
||||
if(!eyeobj || !eyeobj.loc || QDELETED(eyeobj))
|
||||
to_chat(src, "ERROR: Eyeobj not found. Creating new eye...")
|
||||
create_eye()
|
||||
|
||||
eyeobj.setLoc(loc)
|
||||
|
||||
/mob/living/silicon/ai/proc/create_eye()
|
||||
if(eyeobj)
|
||||
return
|
||||
eyeobj = new /mob/camera/aiEye()
|
||||
all_eyes += eyeobj
|
||||
eyeobj.ai = src
|
||||
eyeobj.setLoc(loc)
|
||||
eyeobj.name = "[name] (AI Eye)"
|
||||
|
||||
/mob/living/silicon/ai/verb/toggle_acceleration()
|
||||
set category = "AI Commands"
|
||||
set name = "Toggle Camera Acceleration"
|
||||
|
||||
if(incapacitated())
|
||||
return
|
||||
acceleration = !acceleration
|
||||
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
|
||||
|
||||
/mob/camera/aiEye/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
. = ..()
|
||||
if(relay_speech && speaker && ai && !radio_freq && speaker != ai && near_camera(speaker))
|
||||
ai.relay_speech(message, speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
|
||||
/obj/effect/overlay/ai_detect_hud
|
||||
name = ""
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
icon = 'icons/effects/alphacolors.dmi'
|
||||
icon_state = ""
|
||||
alpha = 100
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
// AI EYE
|
||||
//
|
||||
// An invisible (no icon) mob that the AI controls to look around the station with.
|
||||
// It streams chunks as it moves around, which will show it what the AI can and cannot see.
|
||||
|
||||
/mob/camera/aiEye
|
||||
name = "Inactive AI Eye"
|
||||
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
hud_possible = list(ANTAG_HUD, AI_DETECT_HUD = HUD_LIST_LIST)
|
||||
var/list/visibleCameraChunks = list()
|
||||
var/mob/living/silicon/ai/ai = null
|
||||
var/relay_speech = FALSE
|
||||
var/use_static = USE_STATIC_OPAQUE
|
||||
var/static_visibility_range = 16
|
||||
var/ai_detector_visible = TRUE
|
||||
var/ai_detector_color = COLOR_RED
|
||||
|
||||
/mob/camera/aiEye/Initialize()
|
||||
. = ..()
|
||||
GLOB.aiEyes += src
|
||||
update_ai_detect_hud()
|
||||
setLoc(loc, TRUE)
|
||||
|
||||
/mob/camera/aiEye/proc/update_ai_detect_hud()
|
||||
var/datum/atom_hud/ai_detector/hud = GLOB.huds[DATA_HUD_AI_DETECT]
|
||||
var/list/old_images = hud_list[AI_DETECT_HUD]
|
||||
if(!ai_detector_visible)
|
||||
hud.remove_from_hud(src)
|
||||
QDEL_LIST(old_images)
|
||||
return
|
||||
|
||||
if(!hud.hudusers.len)
|
||||
//no one is watching, do not bother updating anything
|
||||
return
|
||||
hud.remove_from_hud(src)
|
||||
|
||||
var/static/list/vis_contents_objects = list()
|
||||
var/obj/effect/overlay/ai_detect_hud/hud_obj = vis_contents_objects[ai_detector_color]
|
||||
if(!hud_obj)
|
||||
hud_obj = new /obj/effect/overlay/ai_detect_hud()
|
||||
hud_obj.color = ai_detector_color
|
||||
vis_contents_objects[ai_detector_color] = hud_obj
|
||||
|
||||
var/list/new_images = list()
|
||||
var/list/turfs = get_visible_turfs()
|
||||
for(var/T in turfs)
|
||||
var/image/I = (old_images.len > new_images.len) ? old_images[new_images.len + 1] : image(null, T)
|
||||
I.loc = T
|
||||
I.vis_contents += hud_obj
|
||||
new_images += I
|
||||
for(var/i in (new_images.len + 1) to old_images.len)
|
||||
qdel(old_images[i])
|
||||
hud_list[AI_DETECT_HUD] = new_images
|
||||
hud.add_to_hud(src)
|
||||
|
||||
/mob/camera/aiEye/proc/get_visible_turfs()
|
||||
if(!isturf(loc))
|
||||
return list()
|
||||
var/client/C = GetViewerClient()
|
||||
var/view = C ? getviewsize(C.view) : getviewsize(world.view)
|
||||
var/turf/lowerleft = locate(max(1, x - (view[1] - 1)/2), max(1, y - (view[2] - 1)/2), z)
|
||||
var/turf/upperright = locate(min(world.maxx, lowerleft.x + (view[1] - 1)), min(world.maxy, lowerleft.y + (view[2] - 1)), lowerleft.z)
|
||||
return block(lowerleft, upperright)
|
||||
|
||||
// Use this when setting the aiEye's location.
|
||||
// It will also stream the chunk that the new loc is in.
|
||||
|
||||
/mob/camera/aiEye/proc/setLoc(T, force_update = FALSE)
|
||||
if(ai)
|
||||
if(!isturf(ai.loc))
|
||||
return
|
||||
T = get_turf(T)
|
||||
if(!force_update && (T == get_turf(src)) )
|
||||
return //we are already here!
|
||||
if (T)
|
||||
forceMove(T)
|
||||
else
|
||||
moveToNullspace()
|
||||
if(use_static != USE_STATIC_NONE)
|
||||
ai.camera_visibility(src)
|
||||
if(ai.client && !ai.multicam_on)
|
||||
ai.client.eye = src
|
||||
update_ai_detect_hud()
|
||||
update_parallax_contents()
|
||||
//Holopad
|
||||
if(istype(ai.current, /obj/machinery/holopad))
|
||||
var/obj/machinery/holopad/H = ai.current
|
||||
H.move_hologram(ai, T)
|
||||
if(ai.camera_light_on)
|
||||
ai.light_cameras()
|
||||
if(ai.master_multicam)
|
||||
ai.master_multicam.refresh_view()
|
||||
|
||||
/mob/camera/aiEye/Move()
|
||||
return 0
|
||||
|
||||
/mob/camera/aiEye/proc/GetViewerClient()
|
||||
if(ai)
|
||||
return ai.client
|
||||
return null
|
||||
|
||||
/mob/camera/aiEye/Destroy()
|
||||
if(ai)
|
||||
ai.all_eyes -= src
|
||||
ai = null
|
||||
for(var/V in visibleCameraChunks)
|
||||
var/datum/camerachunk/c = V
|
||||
c.remove(src)
|
||||
GLOB.aiEyes -= src
|
||||
if(ai_detector_visible)
|
||||
var/datum/atom_hud/ai_detector/hud = GLOB.huds[DATA_HUD_AI_DETECT]
|
||||
hud.remove_from_hud(src)
|
||||
var/list/L = hud_list[AI_DETECT_HUD]
|
||||
QDEL_LIST(L)
|
||||
return ..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
if(AI.eyeobj && (AI.multicam_on || (AI.client.eye == AI.eyeobj)) && (AI.eyeobj.z == z))
|
||||
AI.cameraFollow = null
|
||||
if (isturf(loc) || isturf(src))
|
||||
AI.eyeobj.setLoc(src)
|
||||
|
||||
// This will move the AIEye. It will also cause lights near the eye to light up, if toggled.
|
||||
// This is handled in the proc below this one.
|
||||
|
||||
/client/proc/AIMove(n, direct, mob/living/silicon/ai/user)
|
||||
|
||||
var/initial = initial(user.sprint)
|
||||
var/max_sprint = 50
|
||||
|
||||
if(user.cooldown && user.cooldown < world.timeofday) // 3 seconds
|
||||
user.sprint = initial
|
||||
|
||||
for(var/i = 0; i < max(user.sprint, initial); i += 20)
|
||||
var/turf/step = get_turf(get_step(user.eyeobj, direct))
|
||||
if(step)
|
||||
user.eyeobj.setLoc(step)
|
||||
|
||||
user.cooldown = world.timeofday + 5
|
||||
if(user.acceleration)
|
||||
user.sprint = min(user.sprint + 0.5, max_sprint)
|
||||
else
|
||||
user.sprint = initial
|
||||
|
||||
if(!user.tracking)
|
||||
user.cameraFollow = null
|
||||
|
||||
// Return to the Core.
|
||||
/mob/living/silicon/ai/proc/view_core()
|
||||
if(istype(current,/obj/machinery/holopad))
|
||||
var/obj/machinery/holopad/H = current
|
||||
H.clear_holo(src)
|
||||
else
|
||||
current = null
|
||||
cameraFollow = null
|
||||
unset_machine()
|
||||
|
||||
if(!eyeobj || !eyeobj.loc || QDELETED(eyeobj))
|
||||
to_chat(src, "ERROR: Eyeobj not found. Creating new eye...")
|
||||
create_eye()
|
||||
|
||||
eyeobj.setLoc(loc)
|
||||
|
||||
/mob/living/silicon/ai/proc/create_eye()
|
||||
if(eyeobj)
|
||||
return
|
||||
eyeobj = new /mob/camera/aiEye()
|
||||
all_eyes += eyeobj
|
||||
eyeobj.ai = src
|
||||
eyeobj.setLoc(loc)
|
||||
eyeobj.name = "[name] (AI Eye)"
|
||||
|
||||
/mob/living/silicon/ai/verb/toggle_acceleration()
|
||||
set category = "AI Commands"
|
||||
set name = "Toggle Camera Acceleration"
|
||||
|
||||
if(incapacitated())
|
||||
return
|
||||
acceleration = !acceleration
|
||||
to_chat(usr, "Camera acceleration has been toggled [acceleration ? "on" : "off"].")
|
||||
|
||||
/mob/camera/aiEye/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
if(relay_speech && speaker && ai && !radio_freq && speaker != ai && near_camera(speaker))
|
||||
ai.relay_speech(message, speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
|
||||
/obj/effect/overlay/ai_detect_hud
|
||||
name = ""
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
icon = 'icons/effects/alphacolors.dmi'
|
||||
icon_state = ""
|
||||
alpha = 100
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
plane = GAME_PLANE
|
||||
|
||||
@@ -378,7 +378,7 @@ Difficulty: Very Hard
|
||||
. += observer_desc
|
||||
. += "It is activated by [activation_method]."
|
||||
|
||||
/obj/machinery/anomalous_crystal/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
/obj/machinery/anomalous_crystal/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode, atom/movable/source)
|
||||
..()
|
||||
if(isliving(speaker))
|
||||
ActivationReaction(speaker, ACTIVATE_SPEECH)
|
||||
|
||||
@@ -80,7 +80,7 @@ Difficulty: Medium
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/visible_message()
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs)
|
||||
if(swooping & SWOOP_INVULNERABLE) //to suppress attack messages without overriding every single proc that could send a message saying we got hit
|
||||
return
|
||||
return ..()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/mob/living/simple_animal/slime/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
/mob/living/simple_animal/slime/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode, atom/movable/source)
|
||||
. = ..()
|
||||
if(speaker != src && !radio_freq && !stat)
|
||||
if (speaker in Friends)
|
||||
|
||||
+118
-75
@@ -87,106 +87,120 @@
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
|
||||
if(type)
|
||||
if(type & 1 && eye_blind )//Vision related
|
||||
if(type & MSG_VISUAL && eye_blind )//Vision related
|
||||
if(!alt_msg)
|
||||
return
|
||||
else
|
||||
msg = alt_msg
|
||||
type = alt_type
|
||||
|
||||
if(type & 2 && !can_hear())//Hearing related
|
||||
if(type & MSG_AUDIBLE && !can_hear())//Hearing related
|
||||
if(!alt_msg)
|
||||
return
|
||||
else
|
||||
msg = alt_msg
|
||||
type = alt_type
|
||||
if(type & 1 && eye_blind)
|
||||
if(type & MSG_VISUAL && eye_blind)
|
||||
return
|
||||
// voice muffling
|
||||
if(stat == UNCONSCIOUS)
|
||||
if(type & 2) //audio
|
||||
if(type & MSG_AUDIBLE) //audio
|
||||
to_chat(src, "<I>... You can almost hear something ...</I>")
|
||||
else
|
||||
to_chat(src, msg)
|
||||
return
|
||||
to_chat(src, msg)
|
||||
|
||||
// Show a message to all player mobs who sees this atom
|
||||
// Show a message to the src mob (if the src is a mob)
|
||||
// Use for atoms performing visible actions
|
||||
// message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
// self_message (optional) is what the src mob sees e.g. "You do something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
// vision_distance (optional) define how many tiles away the message can be seen.
|
||||
// ignored_mob (optional) doesn't show any message to a given mob if TRUE.
|
||||
|
||||
/atom/proc/visible_message(message, self_message, blind_message, vision_distance, list/ignored_mobs, no_ghosts = FALSE)
|
||||
/**
|
||||
* Generate a visible message from this atom
|
||||
*
|
||||
* Show a message to all player mobs who sees this atom
|
||||
*
|
||||
* Show a message to the src mob (if the src is a mob)
|
||||
*
|
||||
* Use for atoms performing visible actions
|
||||
*
|
||||
* message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
*
|
||||
* Vars:
|
||||
* * self_message (optional) is what the src mob sees e.g. "You do something!"
|
||||
* * blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
* * vision_distance (optional) define how many tiles away the message can be seen.
|
||||
* * ignored_mobs (optional) doesn't show any message to any given mob in the list.
|
||||
*/
|
||||
/atom/proc/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
var/list/hearers = get_hearers_in_view(vision_distance, src) //caches the hearers and then removes ignored mobs.
|
||||
if(!length(hearers))
|
||||
return
|
||||
if(!islist(ignored_mobs))
|
||||
ignored_mobs = list(ignored_mobs)
|
||||
var/range = 7
|
||||
if(vision_distance)
|
||||
range = vision_distance
|
||||
for(var/mob/M in get_hearers_in_view(range, src))
|
||||
hearers -= ignored_mobs
|
||||
if(self_message)
|
||||
hearers -= src
|
||||
for(var/mob/M in hearers)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M in ignored_mobs)
|
||||
continue
|
||||
//This entire if/else chain could be in two lines but isn't for readibilties sake.
|
||||
var/msg = message
|
||||
if(isobserver(M) && no_ghosts)
|
||||
//CITADEL EDIT, required for vore code to remove (T != loc && T != src)) as a check
|
||||
if(M.see_invisible<invisibility) //if src is invisible to us,
|
||||
msg = blind_message
|
||||
else if(T.lighting_object && T.lighting_object.invisibility <= M.see_invisible && T.is_softly_lit()) //the light object is dark and not invisible to us
|
||||
msg = blind_message
|
||||
|
||||
if(!msg)
|
||||
continue
|
||||
if(M == src) //the src always see the main message or self message
|
||||
if(self_message)
|
||||
msg = self_message
|
||||
else //CITADEL EDIT, required for vore code to remove (T != loc && T != src)) as a check
|
||||
if(M.see_invisible<invisibility) //if src is invisible to us,
|
||||
if(blind_message) // then people see blind message if there is one, otherwise nothing.
|
||||
msg = blind_message
|
||||
else
|
||||
continue
|
||||
M.show_message(msg, MSG_VISUAL,blind_message, MSG_AUDIBLE)
|
||||
|
||||
else if(T.lighting_object)
|
||||
if(T.lighting_object.invisibility <= M.see_invisible && T.is_softly_lit()) //the light object is dark and not invisible to us
|
||||
if(blind_message)
|
||||
msg = blind_message
|
||||
else
|
||||
continue
|
||||
///Adds the functionality to self_message.
|
||||
mob/visible_message(message, self_message, blind_message, vision_distance = DEFAULT_MESSAGE_RANGE, list/ignored_mobs)
|
||||
. = ..()
|
||||
if(self_message)
|
||||
show_message(self_message, MSG_VISUAL, blind_message, MSG_AUDIBLE)
|
||||
|
||||
M.show_message(msg,1,blind_message,2)
|
||||
/**
|
||||
* Show a message to all mobs in earshot of this atom
|
||||
*
|
||||
* Use for objects performing audible actions
|
||||
*
|
||||
* vars:
|
||||
* * message is the message output to anyone who can hear.
|
||||
* * deaf_message (optional) is what deaf people will see.
|
||||
* * hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
* * ignored_mobs (optional) doesn't show any message to any given mob in the list.
|
||||
*/
|
||||
/atom/proc/audible_message(message, deaf_message, hearing_distance = DEFAULT_MESSAGE_RANGE, self_message, list/ignored_mobs)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
var/list/hearers = get_hearers_in_view(hearing_distance, src)
|
||||
if(!length(hearers))
|
||||
return
|
||||
if(!islist(ignored_mobs))
|
||||
ignored_mobs = list(ignored_mobs)
|
||||
hearers -= ignored_mobs
|
||||
if(self_message)
|
||||
hearers -= src
|
||||
for(var/mob/M in hearers)
|
||||
M.show_message(message, MSG_AUDIBLE, deaf_message, MSG_VISUAL)
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
// This would be for audible actions by the src mob
|
||||
// message is the message output to anyone who can hear.
|
||||
// self_message (optional) is what the src mob hears.
|
||||
// deaf_message (optional) is what deaf people will see.
|
||||
// hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
|
||||
/mob/audible_message(message, deaf_message, hearing_distance, self_message, no_ghosts = FALSE)
|
||||
var/range = 7
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
for(var/mob/M in get_hearers_in_view(range, src))
|
||||
var/msg = message
|
||||
if(self_message && M==src)
|
||||
msg = self_message
|
||||
if(no_ghosts && isobserver(M))
|
||||
continue
|
||||
M.show_message( msg, 2, deaf_message, 1)
|
||||
|
||||
// Show a message to all mobs in earshot of this atom
|
||||
// Use for objects performing audible actions
|
||||
// message is the message output to anyone who can hear.
|
||||
// deaf_message (optional) is what deaf people will see.
|
||||
// hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
|
||||
/atom/proc/audible_message(message, deaf_message, hearing_distance, no_ghosts = FALSE)
|
||||
var/range = 7
|
||||
if(hearing_distance)
|
||||
range = hearing_distance
|
||||
for(var/mob/M in get_hearers_in_view(range, src))
|
||||
if(no_ghosts && isobserver(M))
|
||||
continue
|
||||
M.show_message( message, 2, deaf_message, 1)
|
||||
/**
|
||||
* Show a message to all mobs in earshot of this one
|
||||
*
|
||||
* This would be for audible actions by the src mob
|
||||
*
|
||||
* vars:
|
||||
* * message is the message output to anyone who can hear.
|
||||
* * self_message (optional) is what the src mob hears.
|
||||
* * deaf_message (optional) is what deaf people will see.
|
||||
* * hearing_distance (optional) is the range, how many tiles away the message can be heard.
|
||||
* * ignored_mobs (optional) doesn't show any message to any given mob in the list.
|
||||
*/
|
||||
/mob/audible_message(message, deaf_message, hearing_distance = DEFAULT_MESSAGE_RANGE, self_message, list/ignored_mobs)
|
||||
. = ..()
|
||||
if(self_message)
|
||||
show_message(self_message, MSG_AUDIBLE, deaf_message, MSG_VISUAL)
|
||||
|
||||
/mob/proc/Life()
|
||||
set waitfor = FALSE
|
||||
@@ -390,9 +404,6 @@
|
||||
if(I)
|
||||
I.attack_self(src)
|
||||
update_inv_hands()
|
||||
if(!I)//CIT CHANGE - allows "using" empty hands
|
||||
use_that_empty_hand() //CIT CHANGE - ditto
|
||||
update_inv_hands() // CIT CHANGE - ditto.
|
||||
|
||||
/mob/verb/memory()
|
||||
set name = "Notes"
|
||||
@@ -712,6 +723,38 @@
|
||||
client.last_turn = world.time + MOB_FACE_DIRECTION_DELAY
|
||||
return TRUE
|
||||
|
||||
/mob/verb/eastshift()
|
||||
set hidden = TRUE
|
||||
if(!canface())
|
||||
return FALSE
|
||||
if(pixel_x <= 16)
|
||||
pixel_x++
|
||||
is_shifted = TRUE
|
||||
|
||||
/mob/verb/westshift()
|
||||
set hidden = TRUE
|
||||
if(!canface())
|
||||
return FALSE
|
||||
if(pixel_x >= -16)
|
||||
pixel_x--
|
||||
is_shifted = TRUE
|
||||
|
||||
/mob/verb/northshift()
|
||||
set hidden = TRUE
|
||||
if(!canface())
|
||||
return FALSE
|
||||
if(pixel_y <= 16)
|
||||
pixel_y++
|
||||
is_shifted = TRUE
|
||||
|
||||
/mob/verb/southshift()
|
||||
set hidden = TRUE
|
||||
if(!canface())
|
||||
return FALSE
|
||||
if(pixel_y >= -16)
|
||||
pixel_y--
|
||||
is_shifted = TRUE
|
||||
|
||||
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(newletter==" ")
|
||||
newletter="...huuuhhh..."
|
||||
if(newletter==".")
|
||||
newletter=" *BURP*."
|
||||
newletter=" BURP!"
|
||||
if(rand(1,100) <= strength*0.5)
|
||||
if(rand(1,5) == 1)
|
||||
newletter+="'"
|
||||
|
||||
+138
-130
@@ -1,130 +1,138 @@
|
||||
//Speech verbs.
|
||||
// the _keybind verbs uses "as text" versus "as text|null" to force a popup when pressed by a keybind.
|
||||
/mob/verb/say_typing_indicator()
|
||||
set name = "say_indicator"
|
||||
set hidden = TRUE
|
||||
set category = "IC"
|
||||
display_typing_indicator()
|
||||
var/message = input(usr, "", "say") as text|null
|
||||
// If they don't type anything just drop the message.
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
if(!length(message))
|
||||
return
|
||||
return say_verb(message)
|
||||
|
||||
/mob/verb/say_verb(message as text)
|
||||
set name = "say"
|
||||
set category = "IC"
|
||||
if(!length(message))
|
||||
return
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
say(message)
|
||||
|
||||
/mob/verb/me_typing_indicator()
|
||||
set name = "me_indicator"
|
||||
set hidden = TRUE
|
||||
set category = "IC"
|
||||
display_typing_indicator()
|
||||
var/message = input(usr, "", "me") as message|null
|
||||
// If they don't type anything just drop the message.
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
if(!length(message))
|
||||
return
|
||||
return me_verb(message)
|
||||
|
||||
/mob/verb/me_verb(message as message)
|
||||
set name = "me"
|
||||
set category = "IC"
|
||||
if(!length(message))
|
||||
return
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
message = trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
|
||||
usr.emote("me",1,message,TRUE)
|
||||
|
||||
|
||||
/mob/verb/whisper_verb(message as text)
|
||||
set name = "Whisper"
|
||||
set category = "IC"
|
||||
if(!length(message))
|
||||
return
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
whisper(message)
|
||||
|
||||
/mob/proc/whisper(message, datum/language/language=null)
|
||||
say(message, language) //only living mobs actually whisper, everything else just talks
|
||||
|
||||
/mob/proc/say_dead(var/message)
|
||||
var/name = real_name
|
||||
var/alt_name = ""
|
||||
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
var/jb = jobban_isbanned(src, "OOC")
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
if(jb)
|
||||
to_chat(src, "<span class='danger'>You have been banned from deadchat.</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
if (src.client)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<span class='danger'>You cannot talk in deadchat (muted).</span>")
|
||||
return
|
||||
|
||||
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
var/mob/dead/observer/O = src
|
||||
if(isobserver(src) && O.deadchat_name)
|
||||
name = "[O.deadchat_name]"
|
||||
else
|
||||
if(mind && mind.name)
|
||||
name = "[mind.name]"
|
||||
else
|
||||
name = real_name
|
||||
if(name != real_name)
|
||||
alt_name = " (died as [real_name])"
|
||||
|
||||
var/spanned = say_quote(say_emphasis(message))
|
||||
message = emoji_parse(message)
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[emoji_parse(spanned)]</span></span>"
|
||||
log_talk(message, LOG_SAY, tag="DEAD")
|
||||
deadchat_broadcast(rendered, follow_target = src, speaker_key = key)
|
||||
|
||||
/mob/proc/check_emote(message)
|
||||
if(copytext(message, 1, 2) == "*")
|
||||
emote(copytext(message, 2), intentional = TRUE)
|
||||
return 1
|
||||
|
||||
/mob/proc/hivecheck()
|
||||
return 0
|
||||
|
||||
/mob/proc/lingcheck()
|
||||
return LINGHIVE_NONE
|
||||
|
||||
/mob/proc/get_message_mode(message)
|
||||
var/key = copytext(message, 1, 2)
|
||||
if(key == "#")
|
||||
return MODE_WHISPER
|
||||
else if(key == "%")
|
||||
return MODE_SING
|
||||
else if(key == ";")
|
||||
return MODE_HEADSET
|
||||
else if(length(message) > 2 && (key in GLOB.department_radio_prefixes))
|
||||
var/key_symbol = lowertext(copytext(message, 2, 3))
|
||||
return GLOB.department_radio_keys[key_symbol]
|
||||
//Speech verbs.
|
||||
// the _keybind verbs uses "as text" versus "as text|null" to force a popup when pressed by a keybind.
|
||||
/mob/verb/say_typing_indicator()
|
||||
set name = "say_indicator"
|
||||
set hidden = TRUE
|
||||
set category = "IC"
|
||||
display_typing_indicator()
|
||||
var/message = input(usr, "", "say") as text|null
|
||||
// If they don't type anything just drop the message.
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
if(!length(message))
|
||||
return
|
||||
return say_verb(message)
|
||||
|
||||
/mob/verb/say_verb(message as text)
|
||||
set name = "say"
|
||||
set category = "IC"
|
||||
if(!length(message))
|
||||
return
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
say(message)
|
||||
|
||||
/mob/say_mod(input, message_mode)
|
||||
var/customsayverb = findtext(input, "*")
|
||||
if(customsayverb && message_mode != MODE_WHISPER_CRIT)
|
||||
message_mode = MODE_CUSTOM_SAY
|
||||
return lowertext(copytext(input, 1, customsayverb))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/verb/me_typing_indicator()
|
||||
set name = "me_indicator"
|
||||
set hidden = TRUE
|
||||
set category = "IC"
|
||||
display_typing_indicator()
|
||||
var/message = input(usr, "", "me") as message|null
|
||||
// If they don't type anything just drop the message.
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
if(!length(message))
|
||||
return
|
||||
return me_verb(message)
|
||||
|
||||
/mob/verb/me_verb(message as message)
|
||||
set name = "me"
|
||||
set category = "IC"
|
||||
if(!length(message))
|
||||
return
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
message = trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
clear_typing_indicator() // clear it immediately!
|
||||
|
||||
usr.emote("me",1,message,TRUE)
|
||||
|
||||
|
||||
/mob/verb/whisper_verb(message as text)
|
||||
set name = "Whisper"
|
||||
set category = "IC"
|
||||
if(!length(message))
|
||||
return
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
whisper(message)
|
||||
|
||||
/mob/proc/whisper(message, datum/language/language=null)
|
||||
say(message, language) //only living mobs actually whisper, everything else just talks
|
||||
|
||||
/mob/proc/say_dead(var/message)
|
||||
var/name = real_name
|
||||
var/alt_name = ""
|
||||
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
var/jb = jobban_isbanned(src, "OOC")
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
if(jb)
|
||||
to_chat(src, "<span class='danger'>You have been banned from deadchat.</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
if (src.client)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<span class='danger'>You cannot talk in deadchat (muted).</span>")
|
||||
return
|
||||
|
||||
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
|
||||
return
|
||||
|
||||
var/mob/dead/observer/O = src
|
||||
if(isobserver(src) && O.deadchat_name)
|
||||
name = "[O.deadchat_name]"
|
||||
else
|
||||
if(mind && mind.name)
|
||||
name = "[mind.name]"
|
||||
else
|
||||
name = real_name
|
||||
if(name != real_name)
|
||||
alt_name = " (died as [real_name])"
|
||||
|
||||
var/spanned = say_quote(say_emphasis(message))
|
||||
message = emoji_parse(message)
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[emoji_parse(spanned)]</span></span>"
|
||||
log_talk(message, LOG_SAY, tag="DEAD")
|
||||
deadchat_broadcast(rendered, follow_target = src, speaker_key = key)
|
||||
|
||||
/mob/proc/check_emote(message)
|
||||
if(copytext(message, 1, 2) == "*")
|
||||
emote(copytext(message, 2), intentional = TRUE)
|
||||
return 1
|
||||
|
||||
/mob/proc/hivecheck()
|
||||
return 0
|
||||
|
||||
/mob/proc/lingcheck()
|
||||
return LINGHIVE_NONE
|
||||
|
||||
/mob/proc/get_message_mode(message)
|
||||
var/key = copytext(message, 1, 2)
|
||||
if(key == "#")
|
||||
return MODE_WHISPER
|
||||
else if(key == "%")
|
||||
return MODE_SING
|
||||
else if(key == ";")
|
||||
return MODE_HEADSET
|
||||
else if(length(message) > 2 && (key in GLOB.department_radio_prefixes))
|
||||
var/key_symbol = lowertext(copytext(message, 2, 3))
|
||||
return GLOB.department_radio_keys[key_symbol]
|
||||
|
||||
@@ -170,9 +170,9 @@ proc/get_top_level_mob(var/mob/S)
|
||||
message = "<b>[user]</b> " + "<i>[user.say_emphasis(message)]</i>"
|
||||
|
||||
if(emote_type == EMOTE_AUDIBLE)
|
||||
user.audible_message(message=message,hearing_distance=1, no_ghosts = TRUE)
|
||||
user.audible_message(message=message,hearing_distance=1, ignored_mobs = GLOB.dead_mob_list)
|
||||
else
|
||||
user.visible_message(message=message,self_message=message,vision_distance=1, no_ghosts = TRUE)
|
||||
user.visible_message(message=message,self_message=message,vision_distance=1, ignored_mobs = GLOB.dead_mob_list)
|
||||
log_emote("[key_name(user)] : (SUBTLER) [message]")
|
||||
|
||||
message = null
|
||||
|
||||
@@ -719,10 +719,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
for(var/mob/living/L in range(10))
|
||||
investigate_log("has irradiated [key_name(L)] after consuming [AM].", INVESTIGATE_SUPERMATTER)
|
||||
if(L in view())
|
||||
L.show_message("<span class='danger'>As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.</span>", 1,\
|
||||
"<span class='danger'>The unearthly ringing subsides and you notice you have new radiation burns.</span>", 2)
|
||||
L.show_message("<span class='danger'>As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.</span>", MSG_VISUAL,\
|
||||
"<span class='danger'>The unearthly ringing subsides and you notice you have new radiation burns.</span>", MSG_AUDIBLE)
|
||||
else
|
||||
L.show_message("<span class='italics'>You hear an unearthly ringing and notice your skin is covered in fresh radiation burns.</span>", 2)
|
||||
L.show_message("<span class='italics'>You hear an unearthly ringing and notice your skin is covered in fresh radiation burns.</span>", MSG_AUDIBLE)
|
||||
|
||||
//Do not blow up our internal radio
|
||||
/obj/machinery/power/supermatter_crystal/contents_explosion(severity, target)
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
|
||||
/obj/item/firing_pin/proc/auth_fail(mob/living/user)
|
||||
if(user)
|
||||
user.show_message(fail_message, 1)
|
||||
user.show_message(fail_message, MSG_VISUAL)
|
||||
if(selfdestruct)
|
||||
if(user)
|
||||
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", 1)
|
||||
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", MSG_VISUAL)
|
||||
to_chat(user, "<span class='userdanger'>[gun] explodes!</span>")
|
||||
explosion(get_turf(gun), -1, 0, 2, 3)
|
||||
if(gun)
|
||||
|
||||
@@ -1743,6 +1743,7 @@ datum/reagent/consumable/ethanol/creme_de_coconut
|
||||
value = 2
|
||||
|
||||
/datum/reagent/consumable/ethanol/peppermint_patty/on_mob_life(mob/living/carbon/M)
|
||||
M.apply_status_effect(/datum/status_effect/throat_soothed)
|
||||
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
|
||||
@@ -760,6 +760,10 @@
|
||||
glass_name = "glass of menthol"
|
||||
glass_desc = "Tastes naturally minty, and imparts a very mild numbing sensation."
|
||||
|
||||
/datum/reagent/consumable/menthol/on_mob_life(mob/living/L)
|
||||
L.apply_status_effect(/datum/status_effect/throat_soothed)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/grenadine
|
||||
name = "Grenadine"
|
||||
description = "Not cherry flavored!"
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
if(user.incapacitated())
|
||||
return
|
||||
for(var/mob/M in range(5, get_turf(src)))
|
||||
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>CLONG, clong!</FONT>", 2)
|
||||
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>CLONG, clong!</FONT>", MSG_AUDIBLE)
|
||||
playsound(src.loc, 'sound/effects/clang.ogg', 50, 0, 0)
|
||||
|
||||
// called to vent all gas in holder to a location
|
||||
|
||||
@@ -1,76 +1,86 @@
|
||||
|
||||
/////////////////////////////////////////
|
||||
//////////////Blue Space/////////////////
|
||||
/////////////////////////////////////////
|
||||
|
||||
/datum/design/beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A blue space tracking beacon."
|
||||
id = "beacon"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 150, MAT_GLASS = 100)
|
||||
build_path = /obj/item/beacon
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SECURITY
|
||||
|
||||
/datum/design/bag_holding
|
||||
name = "Bag of Holding"
|
||||
desc = "A backpack that opens into a localized pocket of bluespace."
|
||||
id = "bag_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
|
||||
build_path = /obj/item/storage/backpack/holding
|
||||
category = list("Bluespace Designs")
|
||||
dangerous_construction = TRUE
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/satchel_holding
|
||||
name = "Satchel of Holding"
|
||||
desc = "A satchel that opens into a localized pocket of bluespace."
|
||||
id = "satchel_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
|
||||
build_path = /obj/item/storage/backpack/holding/satchel
|
||||
category = list("Bluespace Designs")
|
||||
dangerous_construction = TRUE
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/biobag_holding
|
||||
name = "Bio Bag of Holding"
|
||||
desc = "A chemical holding thingy. Mostly used for xenobiology."
|
||||
id = "biobag_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 1500, MAT_DIAMOND = 750, MAT_URANIUM = 250, MAT_BLUESPACE = 1000)
|
||||
build_path = /obj/item/storage/bag/bio/holding
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/bluespace_crystal
|
||||
name = "Artificial Bluespace Crystal"
|
||||
desc = "A small blue crystal with mystical properties."
|
||||
id = "bluespace_crystal"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
|
||||
build_path = /obj/item/stack/ore/bluespace_crystal/artificial
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/telesci_gps
|
||||
name = "GPS Device"
|
||||
desc = "Little thingie that can track its position at all times."
|
||||
id = "telesci_gps"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 1000)
|
||||
build_path = /obj/item/gps
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/datum/design/miningsatchel_holding
|
||||
name = "Mining Satchel of Holding"
|
||||
desc = "A mining satchel that can hold an infinite amount of ores."
|
||||
id = "minerbag_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 250, MAT_URANIUM = 500) //quite cheap, for more convenience
|
||||
build_path = /obj/item/storage/bag/ore/holding
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/////////////////////////////////////////
|
||||
//////////////Blue Space/////////////////
|
||||
/////////////////////////////////////////
|
||||
|
||||
/datum/design/beacon
|
||||
name = "Tracking Beacon"
|
||||
desc = "A blue space tracking beacon."
|
||||
id = "beacon"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 150, MAT_GLASS = 100)
|
||||
build_path = /obj/item/beacon
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SECURITY
|
||||
|
||||
/datum/design/bag_holding
|
||||
name = "Bag of Holding"
|
||||
desc = "A backpack that opens into a localized pocket of bluespace."
|
||||
id = "bag_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
|
||||
build_path = /obj/item/storage/backpack/holding
|
||||
category = list("Bluespace Designs")
|
||||
dangerous_construction = TRUE
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/satchel_holding
|
||||
name = "Satchel of Holding"
|
||||
desc = "A satchel that opens into a localized pocket of bluespace."
|
||||
id = "satchel_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250, MAT_BLUESPACE = 2000)
|
||||
build_path = /obj/item/storage/backpack/holding/satchel
|
||||
category = list("Bluespace Designs")
|
||||
dangerous_construction = TRUE
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/biobag_holding
|
||||
name = "Bio Bag of Holding"
|
||||
desc = "A chemical holding thingy. Mostly used for xenobiology."
|
||||
id = "biobag_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 1500, MAT_DIAMOND = 750, MAT_URANIUM = 250, MAT_BLUESPACE = 1000)
|
||||
build_path = /obj/item/storage/bag/bio/holding
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/bluespace_crystal
|
||||
name = "Artificial Bluespace Crystal"
|
||||
desc = "A small blue crystal with mystical properties."
|
||||
id = "bluespace_crystal"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
|
||||
build_path = /obj/item/stack/ore/bluespace_crystal/artificial
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/telesci_gps
|
||||
name = "GPS Device"
|
||||
desc = "Little thingie that can track its position at all times."
|
||||
id = "telesci_gps"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 1000)
|
||||
build_path = /obj/item/gps
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/datum/design/desynchronizer
|
||||
name = "Desynchronizer"
|
||||
desc = "A device that can desynchronize the user from spacetime."
|
||||
id = "desynchronizer"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 1000, MAT_GLASS = 500, MAT_SILVER = 1500, MAT_BLUESPACE = 1000)
|
||||
build_path = /obj/item/desynchronizer
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/miningsatchel_holding
|
||||
name = "Mining Satchel of Holding"
|
||||
desc = "A mining satchel that can hold an infinite amount of ores."
|
||||
id = "minerbag_holding"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_GOLD = 250, MAT_URANIUM = 500) //quite cheap, for more convenience
|
||||
build_path = /obj/item/storage/bag/ore/holding
|
||||
category = list("Bluespace Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
@@ -208,9 +208,6 @@ datum/nanite_program/proc/on_mob_remove()
|
||||
/datum/nanite_program/proc/on_death()
|
||||
return
|
||||
|
||||
/datum/nanite_program/proc/on_hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
return
|
||||
|
||||
/datum/nanite_program/proc/software_error(type)
|
||||
if(!type)
|
||||
type = rand(1,5)
|
||||
|
||||
@@ -345,6 +345,14 @@
|
||||
var/sentence = ""
|
||||
var/inclusive = TRUE
|
||||
|
||||
|
||||
/datum/nanite_program/sensor/voice/on_mob_add()
|
||||
. = ..()
|
||||
RegisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear)
|
||||
|
||||
/datum/nanite_program/sensor/voice/on_mob_remove()
|
||||
UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear)
|
||||
|
||||
/datum/nanite_program/sensor/voice/set_extra_setting(user, setting)
|
||||
if(setting == "Sent Code")
|
||||
var/new_code = input(user, "Set the sent code (1-9999):", name, null) as null|num
|
||||
@@ -378,15 +386,12 @@
|
||||
target.sentence = sentence
|
||||
target.inclusive = inclusive
|
||||
|
||||
/datum/nanite_program/sensor/voice/on_hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
/datum/nanite_program/sensor/voice/proc/on_hear(datum/source, list/hearing_args)
|
||||
if(!sentence)
|
||||
return
|
||||
//To make it not case sensitive
|
||||
var/low_message = lowertext(raw_message)
|
||||
var/low_sentence = lowertext(sentence)
|
||||
if(inclusive)
|
||||
if(findtext(low_message, low_sentence))
|
||||
if(findtextEx(hearing_args[HEARING_RAW_MESSAGE], sentence))
|
||||
send_code()
|
||||
else
|
||||
if(low_message == low_sentence)
|
||||
if(hearing_args[HEARING_RAW_MESSAGE] == sentence)
|
||||
send_code()
|
||||
@@ -323,6 +323,15 @@
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
export_price = 5000
|
||||
|
||||
/datum/techweb_node/unregulated_bluespace
|
||||
id = "unregulated_bluespace"
|
||||
display_name = "Unregulated Bluespace Research"
|
||||
description = "Bluespace technology using unstable or unbalanced procedures, prone to damaging the fabric of bluespace. Outlawed by galactic conventions."
|
||||
prereq_ids = list("bluespace_warping", "syndicate_basic")
|
||||
design_ids = list("desynchronizer")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
export_price = 2500
|
||||
|
||||
/////////////////////////plasma tech/////////////////////////
|
||||
/datum/techweb_node/basic_plasma
|
||||
id = "basic_plasma"
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
/obj/item/stack/tile/bronze = /datum/species/golem/bronze,
|
||||
/obj/item/stack/sheet/cardboard = /datum/species/golem/cardboard,
|
||||
/obj/item/stack/sheet/leather = /datum/species/golem/leather,
|
||||
/obj/item/stack/sheet/bone = /datum/species/golem/bone)
|
||||
/obj/item/stack/sheet/bone = /datum/species/golem/bone,
|
||||
/obj/item/stack/sheet/cotton/durathread = /datum/species/golem/durathread)
|
||||
|
||||
if(istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/O = I
|
||||
|
||||
Reference in New Issue
Block a user