mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into phoron
Conflicts: code/modules/mob/living/say.dm maps/tgstation2.dmm
This commit is contained in:
@@ -848,6 +848,7 @@
|
|||||||
#include "code\modules\mob\abilities.dm"
|
#include "code\modules\mob\abilities.dm"
|
||||||
#include "code\modules\mob\death.dm"
|
#include "code\modules\mob\death.dm"
|
||||||
#include "code\modules\mob\emote.dm"
|
#include "code\modules\mob\emote.dm"
|
||||||
|
#include "code\modules\mob\hear_say.dm"
|
||||||
#include "code\modules\mob\inventory.dm"
|
#include "code\modules\mob\inventory.dm"
|
||||||
#include "code\modules\mob\language.dm"
|
#include "code\modules\mob\language.dm"
|
||||||
#include "code\modules\mob\login.dm"
|
#include "code\modules\mob\login.dm"
|
||||||
|
|||||||
@@ -231,8 +231,6 @@ Auto Patrol: []"},
|
|||||||
continue
|
continue
|
||||||
if (istype(C, /mob/living/carbon/human))
|
if (istype(C, /mob/living/carbon/human))
|
||||||
threatlevel = src.assess_perp(C)
|
threatlevel = src.assess_perp(C)
|
||||||
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
|
|
||||||
threatlevel = 4
|
|
||||||
//src.speak(C.real_name + text(": threat: []", threatlevel))
|
//src.speak(C.real_name + text(": threat: []", threatlevel))
|
||||||
if (threatlevel < 4 )
|
if (threatlevel < 4 )
|
||||||
continue
|
continue
|
||||||
@@ -637,8 +635,6 @@ Auto Patrol: []"},
|
|||||||
|
|
||||||
if (istype(C, /mob/living/carbon/human))
|
if (istype(C, /mob/living/carbon/human))
|
||||||
src.threatlevel = src.assess_perp(C)
|
src.threatlevel = src.assess_perp(C)
|
||||||
else if ((istype(C, /mob/living/carbon/monkey)) && (C.client) && (ticker.mode.name == "monkey"))
|
|
||||||
src.threatlevel = 4
|
|
||||||
|
|
||||||
if (!src.threatlevel)
|
if (!src.threatlevel)
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
/obj/machinery/igniter/attack_paw(mob/user as mob)
|
/obj/machinery/igniter/attack_paw(mob/user as mob)
|
||||||
if ((ticker && ticker.mode.name == "monkey"))
|
|
||||||
return src.attack_hand(user)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/igniter/attack_hand(mob/user as mob)
|
/obj/machinery/igniter/attack_hand(mob/user as mob)
|
||||||
@@ -156,4 +154,4 @@
|
|||||||
icon_state = "launcherbtt"
|
icon_state = "launcherbtt"
|
||||||
active = 0
|
active = 0
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ Class Procs:
|
|||||||
return 1
|
return 1
|
||||||
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
||||||
istype(usr, /mob/living/silicon) || \
|
istype(usr, /mob/living/silicon) || \
|
||||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
istype(usr, /mob/living/carbon/monkey)) )
|
||||||
usr << "\red You don't have the dexterity to do this!"
|
usr << "\red You don't have the dexterity to do this!"
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ Class Procs:
|
|||||||
return 1
|
return 1
|
||||||
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
||||||
istype(usr, /mob/living/silicon) || \
|
istype(usr, /mob/living/silicon) || \
|
||||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
istype(usr, /mob/living/carbon/monkey)) )
|
||||||
usr << "\red You don't have the dexterity to do this!"
|
usr << "\red You don't have the dexterity to do this!"
|
||||||
return 1
|
return 1
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
|||||||
signal.data["vmask"], signal.data["vmessage"],
|
signal.data["vmask"], signal.data["vmessage"],
|
||||||
signal.data["radio"], signal.data["message"],
|
signal.data["radio"], signal.data["message"],
|
||||||
signal.data["name"], signal.data["job"],
|
signal.data["name"], signal.data["job"],
|
||||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], signal.data["level"], signal.frequency)
|
signal.data["realname"], signal.data["vname"],,
|
||||||
|
signal.data["compression"], signal.data["level"], signal.frequency,
|
||||||
|
signal.data["verb"], signal.data["language"] )
|
||||||
|
|
||||||
|
|
||||||
/** #### - Simple Broadcast - #### **/
|
/** #### - Simple Broadcast - #### **/
|
||||||
@@ -84,7 +86,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
|||||||
signal.data["vmask"], signal.data["vmessage"],
|
signal.data["vmask"], signal.data["vmessage"],
|
||||||
signal.data["radio"], signal.data["message"],
|
signal.data["radio"], signal.data["message"],
|
||||||
signal.data["name"], signal.data["job"],
|
signal.data["name"], signal.data["job"],
|
||||||
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], signal.data["level"], signal.frequency)
|
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], signal.data["level"], signal.frequency,
|
||||||
|
signal.data["verb"], signal.data["language"])
|
||||||
|
|
||||||
if(!message_delay)
|
if(!message_delay)
|
||||||
message_delay = 1
|
message_delay = 1
|
||||||
@@ -147,14 +150,16 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
|||||||
signal.data["vmask"], signal.data["vmessage"],
|
signal.data["vmask"], signal.data["vmessage"],
|
||||||
signal.data["radio"], signal.data["message"],
|
signal.data["radio"], signal.data["message"],
|
||||||
signal.data["name"], signal.data["job"],
|
signal.data["name"], signal.data["job"],
|
||||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency)
|
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency,
|
||||||
|
signal.data["verb"], signal.data["language"])
|
||||||
else
|
else
|
||||||
if(intercept)
|
if(intercept)
|
||||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||||
signal.data["vmask"], signal.data["vmessage"],
|
signal.data["vmask"], signal.data["vmessage"],
|
||||||
signal.data["radio"], signal.data["message"],
|
signal.data["radio"], signal.data["message"],
|
||||||
signal.data["name"], signal.data["job"],
|
signal.data["name"], signal.data["job"],
|
||||||
signal.data["realname"], signal.data["vname"], 3, signal.data["compression"], list(0), connection.frequency)
|
signal.data["realname"], signal.data["vname"], 3, signal.data["compression"], list(0), connection.frequency,
|
||||||
|
signal.data["verb"], signal.data["language"])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -218,7 +223,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
|||||||
/proc/Broadcast_Message(var/datum/radio_frequency/connection, var/mob/M,
|
/proc/Broadcast_Message(var/datum/radio_frequency/connection, var/mob/M,
|
||||||
var/vmask, var/vmessage, var/obj/item/device/radio/radio,
|
var/vmask, var/vmessage, var/obj/item/device/radio/radio,
|
||||||
var/message, var/name, var/job, var/realname, var/vname,
|
var/message, var/name, var/job, var/realname, var/vname,
|
||||||
var/data, var/compression, var/list/level, var/freq)
|
var/data, var/compression, var/list/level, var/freq, var/verbage = "says", var/datum/language/speaking = null)
|
||||||
|
|
||||||
|
|
||||||
/* ###### Prepare the radio connection ###### */
|
/* ###### Prepare the radio connection ###### */
|
||||||
|
|
||||||
@@ -371,7 +377,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
|||||||
// syndies!
|
// syndies!
|
||||||
if (display_freq == SYND_FREQ)
|
if (display_freq == SYND_FREQ)
|
||||||
part_a = "<span class='syndradio'><span class='name'>"
|
part_a = "<span class='syndradio'><span class='name'>"
|
||||||
|
|
||||||
// centcomm channels (deathsquid and ert)
|
// centcomm channels (deathsquid and ert)
|
||||||
else if (display_freq in CENT_FREQS)
|
else if (display_freq in CENT_FREQS)
|
||||||
part_a = "<span class='centradio'><span class='name'>"
|
part_a = "<span class='centradio'><span class='name'>"
|
||||||
@@ -445,102 +450,40 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
|||||||
|
|
||||||
//End of research and feedback code.
|
//End of research and feedback code.
|
||||||
|
|
||||||
var/aitrack = ""
|
|
||||||
|
|
||||||
/* ###### Send the message ###### */
|
/* ###### Send the message ###### */
|
||||||
|
|
||||||
|
|
||||||
/* --- Process all the mobs that heard a masked voice (understood) --- */
|
/* --- Process all the mobs that heard a masked voice (understood) --- */
|
||||||
|
|
||||||
if (length(heard_masked))
|
if (length(heard_masked))
|
||||||
var/N = name
|
|
||||||
var/J = job
|
|
||||||
var/rendered = "[part_a][N][part_b][quotedmsg][part_c]"
|
|
||||||
for (var/mob/R in heard_masked)
|
for (var/mob/R in heard_masked)
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
R.hear_radio(message,verbage, speaking, part_a, part_b, M)
|
||||||
if(data == 4)
|
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
|
||||||
|
|
||||||
if(istype(R, /mob/living/silicon/ai))
|
|
||||||
R.show_message("[part_a][aitrack][N] ([J]) </a>[part_b][quotedmsg][part_c]", 2)
|
|
||||||
else
|
|
||||||
R.show_message(rendered, 2)
|
|
||||||
|
|
||||||
/* --- Process all the mobs that heard the voice normally (understood) --- */
|
/* --- Process all the mobs that heard the voice normally (understood) --- */
|
||||||
|
|
||||||
if (length(heard_normal))
|
if (length(heard_normal))
|
||||||
var/rendered = "[part_a][realname][part_b][quotedmsg][part_c]"
|
|
||||||
|
|
||||||
for (var/mob/R in heard_normal)
|
for (var/mob/R in heard_normal)
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
R.hear_radio(message, verbage, speaking, part_a, part_b, M)
|
||||||
if(data == 4)
|
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
|
||||||
|
|
||||||
if(istype(R, /mob/living/silicon/ai))
|
|
||||||
R.show_message("[part_a][aitrack][realname] ([job]) </a>[part_b][quotedmsg][part_c]", 2)
|
|
||||||
else
|
|
||||||
R.show_message(rendered, 2)
|
|
||||||
|
|
||||||
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
|
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
|
||||||
|
|
||||||
if (length(heard_voice))
|
if (length(heard_voice))
|
||||||
var/rendered = "[part_a][vname][part_b][vmessage][part_c]"
|
|
||||||
|
|
||||||
for (var/mob/R in heard_voice)
|
for (var/mob/R in heard_voice)
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
R.hear_radio(message,verbage, speaking, part_a, part_b, M)
|
||||||
if(data == 4)
|
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
|
||||||
|
|
||||||
|
|
||||||
if(istype(R, /mob/living/silicon/ai))
|
|
||||||
R.show_message("[part_a][aitrack][vname] ([job]) </a>[part_b][vmessage]][part_c]", 2)
|
|
||||||
else
|
|
||||||
R.show_message(rendered, 2)
|
|
||||||
|
|
||||||
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
|
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
|
||||||
// Displays garbled message (ie "f*c* **u, **i*er!")
|
// Displays garbled message (ie "f*c* **u, **i*er!")
|
||||||
|
|
||||||
if (length(heard_garbled))
|
if (length(heard_garbled))
|
||||||
if(M)
|
|
||||||
quotedmsg = M.say_quote(stars(message))
|
|
||||||
else
|
|
||||||
quotedmsg = stars(quotedmsg)
|
|
||||||
|
|
||||||
var/rendered = "[part_a][vname][part_b][quotedmsg][part_c]"
|
|
||||||
|
|
||||||
for (var/mob/R in heard_garbled)
|
for (var/mob/R in heard_garbled)
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
R.hear_radio(message, verbage, speaking, part_a, part_b, M, 1)
|
||||||
if(data == 4)
|
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
|
||||||
|
|
||||||
|
|
||||||
if(istype(R, /mob/living/silicon/ai))
|
|
||||||
R.show_message("[part_a][aitrack][vname]</a>[part_b][quotedmsg][part_c]", 2)
|
|
||||||
else
|
|
||||||
R.show_message(rendered, 2)
|
|
||||||
|
|
||||||
|
|
||||||
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
|
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
|
||||||
|
|
||||||
if (length(heard_gibberish))
|
if (length(heard_gibberish))
|
||||||
if(M)
|
|
||||||
quotedmsg = M.say_quote(Gibberish(message, compression + 50))
|
|
||||||
else
|
|
||||||
quotedmsg = Gibberish(quotedmsg, compression + 50)
|
|
||||||
|
|
||||||
var/rendered = "[part_a][Gibberish(name, compression + 50)][part_b][quotedmsg][part_c]"
|
|
||||||
|
|
||||||
for (var/mob/R in heard_gibberish)
|
for (var/mob/R in heard_gibberish)
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
R.hear_radio(message, verbage, speaking, part_a, part_b, M, 1)
|
||||||
if(data == 4)
|
|
||||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
|
||||||
|
|
||||||
|
|
||||||
if(istype(R, /mob/living/silicon/ai))
|
|
||||||
R.show_message("[part_a][aitrack][Gibberish(realname, compression + 50)] ([Gibberish(job, compression + 50)]) </a>[part_b][quotedmsg][part_c]", 2)
|
|
||||||
else
|
|
||||||
R.show_message(rendered, 2)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
|
/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
|||||||
"type" = signal.data["type"],
|
"type" = signal.data["type"],
|
||||||
"server" = signal.data["server"],
|
"server" = signal.data["server"],
|
||||||
"reject" = signal.data["reject"],
|
"reject" = signal.data["reject"],
|
||||||
"level" = signal.data["level"]
|
"level" = signal.data["level"],
|
||||||
|
"verb" = signal.data["verb"],
|
||||||
|
"language" = signal.data["language"]
|
||||||
)
|
)
|
||||||
|
|
||||||
// Keep the "original" signal constant
|
// Keep the "original" signal constant
|
||||||
|
|||||||
@@ -7,9 +7,15 @@
|
|||||||
var/mode = "grey"
|
var/mode = "grey"
|
||||||
|
|
||||||
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
|
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob)
|
||||||
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated))
|
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
|
||||||
return
|
return
|
||||||
var/obj/machinery/atmospherics/pipe/P = A
|
var/obj/machinery/atmospherics/pipe/P = A
|
||||||
|
|
||||||
|
var/turf/T = P.loc
|
||||||
|
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
|
||||||
|
user << "\red You must remove the plating first."
|
||||||
|
return
|
||||||
|
|
||||||
P.pipe_color = mode
|
P.pipe_color = mode
|
||||||
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
user.visible_message("<span class='notice'>[user] paints \the [P] [mode].</span>","<span class='notice'>You paint \the [P] [mode].</span>")
|
||||||
P.update_icon()
|
P.update_icon()
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
|||||||
del(A)
|
del(A)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel)
|
/obj/item/device/radio/talk_into(mob/living/M as mob, message, channel, var/verb = "says", var/datum/language/speaking = null)
|
||||||
if(!on) return // the device has to be on
|
if(!on) return // the device has to be on
|
||||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||||
if(!M || !message) return
|
if(!M || !message) return
|
||||||
@@ -348,7 +348,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
|||||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||||
"server" = null, // the last server to log this signal
|
"server" = null, // the last server to log this signal
|
||||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||||
"level" = position.z // The source's z level
|
"level" = position.z, // The source's z level
|
||||||
|
"language" = speaking,
|
||||||
|
"verb" = verb
|
||||||
)
|
)
|
||||||
signal.frequency = connection.frequency // Quick frequency set
|
signal.frequency = connection.frequency // Quick frequency set
|
||||||
|
|
||||||
@@ -401,7 +403,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
|||||||
"type" = 0,
|
"type" = 0,
|
||||||
"server" = null,
|
"server" = null,
|
||||||
"reject" = 0,
|
"reject" = 0,
|
||||||
"level" = position.z
|
"level" = position.z,
|
||||||
|
"language" = speaking,
|
||||||
|
"verb" = verb
|
||||||
)
|
)
|
||||||
signal.frequency = connection.frequency // Quick frequency set
|
signal.frequency = connection.frequency // Quick frequency set
|
||||||
|
|
||||||
@@ -423,7 +427,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
|||||||
|
|
||||||
Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||||
src, message, displayname, jobname, real_name, M.voice_name,
|
src, message, displayname, jobname, real_name, M.voice_name,
|
||||||
filter_type, signal.data["compression"], list(position.z), connection.frequency)
|
filter_type, signal.data["compression"], list(position.z), connection.frequency,verb,speaking)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -596,11 +600,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
|||||||
else
|
else
|
||||||
R.show_message(rendered, 2)
|
R.show_message(rendered, 2)
|
||||||
|
|
||||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
|
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
|
||||||
|
|
||||||
if (broadcasting)
|
if (broadcasting)
|
||||||
if(get_dist(src, M) <= canhear_range)
|
if(get_dist(src, M) <= canhear_range)
|
||||||
talk_into(M, msg)
|
talk_into(M, msg,null,verb,speaking)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||||
istype(user, /mob/living/silicon) || \
|
istype(user, /mob/living/silicon) || \
|
||||||
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
istype(user, /mob/living/carbon/monkey)) )
|
||||||
user << "\red You don't have the dexterity to do this!"
|
user << "\red You don't have the dexterity to do this!"
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,15 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/mob/dead/observer/Topic(href, href_list)
|
||||||
|
if (href_list["track"])
|
||||||
|
var/mob/target = locate(href_list["track"]) in mob_list
|
||||||
|
if(target)
|
||||||
|
ManualFollow(target)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/dead/attackby(obj/item/W, mob/user)
|
/mob/dead/attackby(obj/item/W, mob/user)
|
||||||
if(istype(W,/obj/item/weapon/tome))
|
if(istype(W,/obj/item/weapon/tome))
|
||||||
var/mob/dead/M = src
|
var/mob/dead/M = src
|
||||||
|
|||||||
92
code/modules/mob/hear_say.dm
Normal file
92
code/modules/mob/hear_say.dm
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
// At minimum every mob has a hear_say proc.
|
||||||
|
|
||||||
|
/mob/proc/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "",var/italics = 0, var/mob/speaker = null)
|
||||||
|
if(!client)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/style = "body"
|
||||||
|
if(language)
|
||||||
|
if(!say_understands(speaker,language))
|
||||||
|
message = stars(message)
|
||||||
|
verb = language.speech_verb
|
||||||
|
style = language.colour
|
||||||
|
|
||||||
|
var/speaker_name = speaker.name
|
||||||
|
if(istype(speaker, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = speaker
|
||||||
|
speaker_name = H.GetVoice()
|
||||||
|
|
||||||
|
if(italics)
|
||||||
|
message = "<i>[message]</i>"
|
||||||
|
|
||||||
|
var/track = null
|
||||||
|
if(istype(src, /mob/dead/observer))
|
||||||
|
if(speaker_name != speaker.real_name)
|
||||||
|
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||||
|
track = "(<a href='byond://?src=\ref[src];track=\ref[speaker]'>follow</a>) "
|
||||||
|
if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src))
|
||||||
|
message = "<b>[message]</b>"
|
||||||
|
|
||||||
|
if(sdisabilities & DEAF || ear_deaf)
|
||||||
|
if(speaker == src)
|
||||||
|
src << "<span class='warning'>You cannot hear yourself speak!</span>"
|
||||||
|
else
|
||||||
|
src << "<span class='name'>[speaker_name]</span>[alt_name] talks but you cannot hear them."
|
||||||
|
else
|
||||||
|
src << "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track]<span class='[style]'>[verb], <span class='message'>\"[message]\"</span></span></span>"
|
||||||
|
|
||||||
|
|
||||||
|
/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0)
|
||||||
|
if(!client)
|
||||||
|
return
|
||||||
|
var/track = null
|
||||||
|
|
||||||
|
var/style = "body"
|
||||||
|
if(language)
|
||||||
|
if(!say_understands(speaker,language))
|
||||||
|
message = stars(message)
|
||||||
|
verb = language.speech_verb
|
||||||
|
style = language.colour
|
||||||
|
|
||||||
|
if(hard_to_hear)
|
||||||
|
message = stars(message)
|
||||||
|
|
||||||
|
var/speaker_name = speaker.name
|
||||||
|
if(istype(speaker, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = speaker
|
||||||
|
if(H.voice)
|
||||||
|
speaker_name = H.voice
|
||||||
|
|
||||||
|
if(hard_to_hear)
|
||||||
|
speaker_name = "unknown"
|
||||||
|
|
||||||
|
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
|
||||||
|
var/jobname // the mob's "job"
|
||||||
|
if (ishuman(speaker))
|
||||||
|
var/mob/living/carbon/human/H = speaker
|
||||||
|
jobname = H.get_assignment()
|
||||||
|
else if (iscarbon(speaker)) // Nonhuman carbon mob
|
||||||
|
jobname = "No id"
|
||||||
|
else if (isAI(speaker))
|
||||||
|
jobname = "AI"
|
||||||
|
else if (isrobot(speaker))
|
||||||
|
jobname = "Cyborg"
|
||||||
|
else if (istype(speaker, /mob/living/silicon/pai))
|
||||||
|
jobname = "Personal AI"
|
||||||
|
else
|
||||||
|
jobname = "Unknown"
|
||||||
|
|
||||||
|
track = "<a href='byond://?src=\ref[src];track=\ref[speaker]'>[speaker_name] ([jobname])</a>"
|
||||||
|
|
||||||
|
if(istype(src, /mob/dead/observer))
|
||||||
|
if(speaker_name != speaker.real_name)
|
||||||
|
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||||
|
track = "[speaker_name] (<a href='byond://?src=\ref[src];track=\ref[speaker]'>follow</a>)"
|
||||||
|
|
||||||
|
if(sdisabilities & DEAF || ear_deaf)
|
||||||
|
if(prob(20))
|
||||||
|
src << "<span class='warning'>You feel your headset vibrate but can hear nothing from it!</span>"
|
||||||
|
else if(track)
|
||||||
|
src << "[part_a][track][part_b]<span class=\"[style]\"> [verb], \"[message]\"</span></span></span>"
|
||||||
|
else
|
||||||
|
src << "[part_a][speaker_name][part_b]<span class=\"[style]\"> [verb], \"[message]\"</span></span></span>"
|
||||||
@@ -142,6 +142,7 @@
|
|||||||
UpdateDamageIcon()
|
UpdateDamageIcon()
|
||||||
hud_updateflag |= 1 << HEALTH_HUD
|
hud_updateflag |= 1 << HEALTH_HUD
|
||||||
updatehealth()
|
updatehealth()
|
||||||
|
speech_problem_flag = 1
|
||||||
|
|
||||||
|
|
||||||
//Heal MANY external organs, in random order
|
//Heal MANY external organs, in random order
|
||||||
@@ -163,6 +164,7 @@
|
|||||||
parts -= picked
|
parts -= picked
|
||||||
updatehealth()
|
updatehealth()
|
||||||
hud_updateflag |= 1 << HEALTH_HUD
|
hud_updateflag |= 1 << HEALTH_HUD
|
||||||
|
speech_problem_flag = 1
|
||||||
if(update) UpdateDamageIcon()
|
if(update) UpdateDamageIcon()
|
||||||
|
|
||||||
// damage MANY external organs, in random order
|
// damage MANY external organs, in random order
|
||||||
|
|||||||
@@ -48,6 +48,10 @@
|
|||||||
|
|
||||||
var/icon/stand_icon = null
|
var/icon/stand_icon = null
|
||||||
var/icon/lying_icon = null
|
var/icon/lying_icon = null
|
||||||
|
|
||||||
|
var/voice = "" //Instead of new say code calling GetVoice() over and over and over, we're just going to ask this variable, which gets updated in Life()
|
||||||
|
|
||||||
|
var/speech_problem_flag = 0
|
||||||
|
|
||||||
var/miming = null //Toggle for the mime's abilities.
|
var/miming = null //Toggle for the mime's abilities.
|
||||||
var/special_voice = "" // For changing our voice. Used by a symptom.
|
var/special_voice = "" // For changing our voice. Used by a symptom.
|
||||||
|
|||||||
@@ -66,6 +66,8 @@
|
|||||||
if(life_tick%30==15)
|
if(life_tick%30==15)
|
||||||
hud_updateflag = 1022
|
hud_updateflag = 1022
|
||||||
|
|
||||||
|
voice = GetVoice()
|
||||||
|
|
||||||
//No need to update all of these procs if the guy is dead.
|
//No need to update all of these procs if the guy is dead.
|
||||||
if(stat != DEAD && !in_stasis)
|
if(stat != DEAD && !in_stasis)
|
||||||
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
|
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
|
||||||
@@ -143,7 +145,6 @@
|
|||||||
return ONE_ATMOSPHERE - pressure_difference
|
return ONE_ATMOSPHERE - pressure_difference
|
||||||
|
|
||||||
/mob/living/carbon/human
|
/mob/living/carbon/human
|
||||||
|
|
||||||
proc/handle_disabilities()
|
proc/handle_disabilities()
|
||||||
if (disabilities & EPILEPSY)
|
if (disabilities & EPILEPSY)
|
||||||
if ((prob(1) && paralysis < 1))
|
if ((prob(1) && paralysis < 1))
|
||||||
@@ -161,6 +162,7 @@
|
|||||||
emote("cough")
|
emote("cough")
|
||||||
return
|
return
|
||||||
if (disabilities & TOURETTES)
|
if (disabilities & TOURETTES)
|
||||||
|
speech_problem_flag = 1
|
||||||
if ((prob(10) && paralysis <= 1))
|
if ((prob(10) && paralysis <= 1))
|
||||||
Stun(10)
|
Stun(10)
|
||||||
spawn( 0 )
|
spawn( 0 )
|
||||||
@@ -178,6 +180,7 @@
|
|||||||
pixel_y = old_y
|
pixel_y = old_y
|
||||||
return
|
return
|
||||||
if (disabilities & NERVOUS)
|
if (disabilities & NERVOUS)
|
||||||
|
speech_problem_flag = 1
|
||||||
if (prob(10))
|
if (prob(10))
|
||||||
stuttering = max(10, stuttering)
|
stuttering = max(10, stuttering)
|
||||||
// No. -- cib
|
// No. -- cib
|
||||||
@@ -232,6 +235,7 @@
|
|||||||
if(!gene.block)
|
if(!gene.block)
|
||||||
continue
|
continue
|
||||||
if(gene.is_active(src))
|
if(gene.is_active(src))
|
||||||
|
speech_problem_flag = 1
|
||||||
gene.OnMobLife(src)
|
gene.OnMobLife(src)
|
||||||
|
|
||||||
if (radiation)
|
if (radiation)
|
||||||
@@ -1052,6 +1056,7 @@
|
|||||||
if(halloss > 0)
|
if(halloss > 0)
|
||||||
adjustHalLoss(-3)
|
adjustHalLoss(-3)
|
||||||
else if(sleeping)
|
else if(sleeping)
|
||||||
|
speech_problem_flag = 1
|
||||||
handle_dreams()
|
handle_dreams()
|
||||||
adjustHalLoss(-3)
|
adjustHalLoss(-3)
|
||||||
if (mind)
|
if (mind)
|
||||||
@@ -1103,16 +1108,19 @@
|
|||||||
|
|
||||||
//Other
|
//Other
|
||||||
if(stunned)
|
if(stunned)
|
||||||
|
speech_problem_flag = 1
|
||||||
AdjustStunned(-1)
|
AdjustStunned(-1)
|
||||||
|
|
||||||
if(weakened)
|
if(weakened)
|
||||||
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
|
||||||
|
|
||||||
if(stuttering)
|
if(stuttering)
|
||||||
|
speech_problem_flag = 1
|
||||||
stuttering = max(stuttering-1, 0)
|
stuttering = max(stuttering-1, 0)
|
||||||
if (slurring)
|
if (slurring)
|
||||||
slurring = max(slurring-1, 0)
|
slurring = max(slurring-1, 0)
|
||||||
if(silent)
|
if(silent)
|
||||||
|
speech_problem_flag = 1
|
||||||
silent = max(silent-1, 0)
|
silent = max(silent-1, 0)
|
||||||
|
|
||||||
if(druggy)
|
if(druggy)
|
||||||
|
|||||||
@@ -1,39 +1,132 @@
|
|||||||
/mob/living/carbon/human/say(var/message)
|
/mob/living/carbon/human/say(var/message)
|
||||||
|
var/verb = "says"
|
||||||
|
var/alt_name = ""
|
||||||
|
var/message_range = world.view
|
||||||
|
var/italics = 0
|
||||||
|
|
||||||
if(wear_mask)
|
if(client)
|
||||||
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
|
if(client.prefs.muted & MUTE_IC)
|
||||||
if(copytext(message, 1, 2) != "*")
|
src << "\red You cannot speak in IC (Muted)."
|
||||||
var/list/temp_message = text2list(message, " ")
|
return
|
||||||
var/list/pick_list = list()
|
|
||||||
for(var/i = 1, i <= temp_message.len, i++)
|
if(stat == 2)
|
||||||
pick_list += i
|
return say_dead(message)
|
||||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
|
||||||
var/H = pick(pick_list)
|
|
||||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
|
||||||
temp_message[H] = ninjaspeak(temp_message[H])
|
|
||||||
pick_list -= H
|
|
||||||
message = list2text(temp_message, " ")
|
|
||||||
message = replacetext(message, "o", "<22>")
|
|
||||||
message = replacetext(message, "p", "<22>")
|
|
||||||
message = replacetext(message, "l", "<22>")
|
|
||||||
message = replacetext(message, "s", "<22>")
|
|
||||||
message = replacetext(message, "u", "<22>")
|
|
||||||
message = replacetext(message, "b", "<22>")
|
|
||||||
|
|
||||||
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
if(copytext(message,1,2) == "*")
|
||||||
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
return emote(copytext(message,2))
|
||||||
if(hoers.voicechange)
|
|
||||||
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")))
|
|
||||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
|
||||||
|
|
||||||
if ((HULK in mutations) && health >= 25 && length(message))
|
if(name != GetVoice())
|
||||||
if(copytext(message, 1, 2) != "*")
|
alt_name = "(as [get_id_name("Unknown")])"
|
||||||
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
|
|
||||||
|
var/message_mode = null
|
||||||
|
var/datum/language/speaking = null
|
||||||
|
|
||||||
|
if(copytext(message,1,2) == ";")
|
||||||
|
message_mode = "headset"
|
||||||
|
message = copytext(message,2)
|
||||||
|
|
||||||
if (src.slurring)
|
if(length(message) >= 2)
|
||||||
if(copytext(message, 1, 2) != "*")
|
var/channel_prefix = copytext(message, 1 ,3)
|
||||||
message = slur(message)
|
var/check_language_and_radio = copytext(message,3,5)
|
||||||
..(message)
|
if(languages.len)
|
||||||
|
for(var/datum/language/L in languages)
|
||||||
|
if(lowertext(channel_prefix) == ":[L.key]" || lowertext(check_language_and_radio) == ":[L.key]")
|
||||||
|
verb = L.speech_verb
|
||||||
|
speaking = L
|
||||||
|
break
|
||||||
|
if(!message_mode)
|
||||||
|
message_mode = department_radio_keys[channel_prefix]
|
||||||
|
|
||||||
|
if(speaking || copytext(message,1,2) == ":")
|
||||||
|
var/positioncut = 3
|
||||||
|
if(speaking && (message_mode && copytext(message,3,4)==":"))
|
||||||
|
positioncut += 2
|
||||||
|
message = trim(copytext(message,positioncut))
|
||||||
|
|
||||||
|
|
||||||
|
message = capitalize(trim_left(message))
|
||||||
|
|
||||||
|
if(speech_problem_flag)
|
||||||
|
var/list/handle_r = handle_speech_problems(message)
|
||||||
|
message = handle_r[1]
|
||||||
|
verb = handle_r[2]
|
||||||
|
speech_problem_flag = handle_r[3]
|
||||||
|
|
||||||
|
if(!message || stat)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/ending = copytext(message, length(message))
|
||||||
|
if(ending=="!")
|
||||||
|
verb=pick("exclaims","shouts","yells")
|
||||||
|
if(ending=="?")
|
||||||
|
verb="asks"
|
||||||
|
|
||||||
|
var/list/obj/item/used_radios = new
|
||||||
|
|
||||||
|
switch (message_mode)
|
||||||
|
if("headset")
|
||||||
|
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||||
|
var/obj/item/device/radio/R = l_ear
|
||||||
|
R.talk_into(src,message,null,verb,speaking)
|
||||||
|
used_radios += l_ear
|
||||||
|
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||||
|
var/obj/item/device/radio/R = r_ear
|
||||||
|
R.talk_into(src,message,null,verb,speaking)
|
||||||
|
used_radios += r_ear
|
||||||
|
|
||||||
|
if("right_ear")
|
||||||
|
if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||||
|
var/obj/item/device/radio/R = r_ear
|
||||||
|
R.talk_into(src,message,verb,speaking)
|
||||||
|
used_radios += r_ear
|
||||||
|
|
||||||
|
|
||||||
|
if("left_ear")
|
||||||
|
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||||
|
var/obj/item/device/radio/R = l_ear
|
||||||
|
R.talk_into(src,message,verb,speaking)
|
||||||
|
used_radios += l_ear
|
||||||
|
|
||||||
|
if("intercom")
|
||||||
|
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||||
|
I.talk_into(src, message, verb, speaking)
|
||||||
|
used_radios += I
|
||||||
|
if("whisper")
|
||||||
|
whisper(message)
|
||||||
|
return
|
||||||
|
if("binary")
|
||||||
|
if(robot_talk_understand || binarycheck())
|
||||||
|
robot_talk(message)
|
||||||
|
return
|
||||||
|
if("changeling")
|
||||||
|
if(mind && mind.changeling)
|
||||||
|
for(var/mob/Changeling in mob_list)
|
||||||
|
if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer))
|
||||||
|
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
|
||||||
|
return
|
||||||
|
else
|
||||||
|
if(message_mode)
|
||||||
|
if(message_mode in radiochannels)
|
||||||
|
if(l_ear && istype(l_ear,/obj/item/device/radio))
|
||||||
|
l_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||||
|
used_radios += l_ear
|
||||||
|
else if(r_ear && istype(r_ear,/obj/item/device/radio))
|
||||||
|
r_ear.talk_into(src,message, message_mode, verb, speaking)
|
||||||
|
used_radios += r_ear
|
||||||
|
|
||||||
|
|
||||||
|
if(used_radios.len)
|
||||||
|
italics = 1
|
||||||
|
message_range = 3
|
||||||
|
|
||||||
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
|
if(environment)
|
||||||
|
var/pressure = environment.return_pressure()
|
||||||
|
if(pressure < SAY_MINIMUM_PRESSURE)
|
||||||
|
italics = 1
|
||||||
|
message_range =1
|
||||||
|
|
||||||
|
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||||
|
|
||||||
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
|
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
|
||||||
|
|
||||||
@@ -71,3 +164,47 @@
|
|||||||
|
|
||||||
/mob/living/carbon/human/proc/GetSpecialVoice()
|
/mob/living/carbon/human/proc/GetSpecialVoice()
|
||||||
return special_voice
|
return special_voice
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
|
||||||
|
var/list/returns[3]
|
||||||
|
var/verb = "says"
|
||||||
|
var/handled = 0
|
||||||
|
if(silent)
|
||||||
|
message = ""
|
||||||
|
handled = 1
|
||||||
|
if(sdisabilities & MUTE)
|
||||||
|
message = ""
|
||||||
|
handled = 1
|
||||||
|
if(wear_mask)
|
||||||
|
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
|
||||||
|
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
|
||||||
|
if(hoers.voicechange)
|
||||||
|
if(mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")
|
||||||
|
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||||
|
verb = pick("whinnies","neighs", "says")
|
||||||
|
handled = 1
|
||||||
|
|
||||||
|
if((HULK in mutations) && health >= 25 && length(message))
|
||||||
|
message = "[uppertext(message)]!!!"
|
||||||
|
verb = pick("yells","roars","hollers")
|
||||||
|
handled = 1
|
||||||
|
if(slurring)
|
||||||
|
message = slur(message)
|
||||||
|
verb = pick("stammers","stutters")
|
||||||
|
handled = 1
|
||||||
|
|
||||||
|
var/braindam = getBrainLoss()
|
||||||
|
if(braindam >= 60)
|
||||||
|
handled = 1
|
||||||
|
if(prob(braindam/4))
|
||||||
|
message = stutter(message)
|
||||||
|
verb = pick("stammers", "stutters")
|
||||||
|
if(prob(braindam))
|
||||||
|
message = uppertext(message)
|
||||||
|
verb = pick("yells like an idiot","says rather loudly")
|
||||||
|
|
||||||
|
returns[1] = message
|
||||||
|
returns[2] = verb
|
||||||
|
returns[3] = handled
|
||||||
|
|
||||||
|
return returns
|
||||||
|
|||||||
@@ -513,7 +513,4 @@
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||||
if(!ticker) return 0
|
return 0
|
||||||
if(!ticker.mode.name == "monkey") return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|||||||
@@ -81,366 +81,52 @@ var/list/department_radio_keys = list(
|
|||||||
if(!istype(dongle)) return
|
if(!istype(dongle)) return
|
||||||
if(dongle.translate_binary) return 1
|
if(dongle.translate_binary) return 1
|
||||||
|
|
||||||
/mob/living/say(var/message)
|
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list())
|
||||||
|
|
||||||
/*
|
|
||||||
Formatting and sanitizing.
|
|
||||||
*/
|
|
||||||
|
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
|
||||||
|
|
||||||
/*
|
|
||||||
Sanity checking and speech failure.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!message)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(silent)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (stat == 2) // Dead.
|
|
||||||
return say_dead(message)
|
|
||||||
else if (stat) // Unconcious.
|
|
||||||
return
|
|
||||||
|
|
||||||
if (src.client)
|
|
||||||
if(client.prefs.muted & MUTE_IC)
|
|
||||||
src << "\red You cannot speak in IC (muted)."
|
|
||||||
return
|
|
||||||
if (src.client.handle_spam_prevention(message, MUTE_IC))
|
|
||||||
return
|
|
||||||
|
|
||||||
// Mute disability
|
|
||||||
if (sdisabilities & MUTE)
|
|
||||||
return
|
|
||||||
|
|
||||||
// Muzzled.
|
|
||||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
|
||||||
return
|
|
||||||
|
|
||||||
// Emotes.
|
|
||||||
if (copytext(message, 1, 2) == "*" && !stat)
|
|
||||||
return emote(copytext(message, 2))
|
|
||||||
|
|
||||||
/*
|
|
||||||
Identity hiding.
|
|
||||||
*/
|
|
||||||
var/alt_name = ""
|
|
||||||
if (istype(src, /mob/living/carbon/human) && name != GetVoice())
|
|
||||||
var/mob/living/carbon/human/H = src
|
|
||||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
|
||||||
|
|
||||||
/*
|
|
||||||
Now we get into the real meat of the say processing. Determining the message mode.
|
|
||||||
*/
|
|
||||||
|
|
||||||
var/italics = 0
|
|
||||||
var/message_range = null
|
|
||||||
var/message_mode = null
|
|
||||||
var/datum/language/speaking = null //For use if a specific language is being spoken.
|
|
||||||
|
|
||||||
var/braindam = getBrainLoss()
|
|
||||||
if (braindam >= 60)
|
|
||||||
if(prob(braindam/4))
|
|
||||||
message = stutter(message)
|
|
||||||
if(prob(braindam))
|
|
||||||
message = uppertext(message)
|
|
||||||
|
|
||||||
// General public key. Special message handling
|
|
||||||
else if (copytext(message, 1, 2) == ";" || prob(braindam/2))
|
|
||||||
if (ishuman(src))
|
|
||||||
message_mode = "headset"
|
|
||||||
else if(ispAI(src) || isrobot(src))
|
|
||||||
message_mode = "pAI"
|
|
||||||
message = copytext(message, 2)
|
|
||||||
// Begin checking for either a message mode or a language to speak.
|
|
||||||
else if (length(message) >= 2)
|
|
||||||
var/channel_prefix = copytext(message, 1, 3)
|
|
||||||
|
|
||||||
//Check if the person is speaking a language that they know.
|
|
||||||
if(languages.len)
|
|
||||||
for(var/datum/language/L in languages)
|
|
||||||
if(lowertext(channel_prefix) == ":[L.key]")
|
|
||||||
speaking = L
|
|
||||||
break
|
|
||||||
message_mode = department_radio_keys[channel_prefix]
|
|
||||||
if (message_mode || speaking || copytext(message,1,2) == ":")
|
|
||||||
message = trim(copytext(message, 3))
|
|
||||||
if (!(istype(src,/mob/living/carbon/human) || istype(src,/mob/living/carbon/monkey) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
|
|
||||||
message_mode = null //only humans can use headsets
|
|
||||||
|
|
||||||
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
|
|
||||||
message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
|
||||||
|
|
||||||
message = capitalize(trim_left(message))
|
|
||||||
|
|
||||||
if (!message)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (stuttering)
|
|
||||||
message = stutter(message)
|
|
||||||
|
|
||||||
var/list/obj/item/used_radios = new
|
|
||||||
var/is_speaking_radio = 0
|
|
||||||
|
|
||||||
switch (message_mode)
|
|
||||||
if ("headset")
|
|
||||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
|
||||||
src:l_ear.talk_into(src, message)
|
|
||||||
used_radios += src:l_ear
|
|
||||||
is_speaking_radio = 1
|
|
||||||
else if (src:r_ear)
|
|
||||||
src:r_ear.talk_into(src, message)
|
|
||||||
used_radios += src:r_ear
|
|
||||||
is_speaking_radio = 1
|
|
||||||
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
|
|
||||||
if ("right ear")
|
|
||||||
if (src:r_ear)
|
|
||||||
src:r_ear.talk_into(src, message)
|
|
||||||
used_radios += src:r_ear
|
|
||||||
is_speaking_radio = 1
|
|
||||||
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
|
|
||||||
if ("left ear")
|
|
||||||
if (src:l_ear)
|
|
||||||
src:l_ear.talk_into(src, message)
|
|
||||||
used_radios += src:l_ear
|
|
||||||
is_speaking_radio = 1
|
|
||||||
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
|
|
||||||
if ("intercom")
|
|
||||||
for (var/obj/item/device/radio/intercom/I in view(1, null))
|
|
||||||
I.talk_into(src, message)
|
|
||||||
used_radios += I
|
|
||||||
is_speaking_radio = 1
|
|
||||||
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
|
|
||||||
//I see no reason to restrict such way of whispering
|
|
||||||
if ("whisper")
|
|
||||||
whisper(message)
|
|
||||||
return
|
|
||||||
|
|
||||||
if ("binary")
|
|
||||||
if(robot_talk_understand || binarycheck())
|
|
||||||
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
|
|
||||||
robot_talk(message)
|
|
||||||
return
|
|
||||||
|
|
||||||
if ("alientalk")
|
|
||||||
if(alien_talk_understand || hivecheck())
|
|
||||||
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
|
|
||||||
alien_talk(message)
|
|
||||||
return
|
|
||||||
|
|
||||||
if ("department")
|
|
||||||
if(istype(src, /mob/living/carbon))
|
|
||||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
|
||||||
src:l_ear.talk_into(src, message, message_mode)
|
|
||||||
used_radios += src:l_ear
|
|
||||||
is_speaking_radio = 1
|
|
||||||
if (src:r_ear)
|
|
||||||
src:r_ear.talk_into(src, message, message_mode)
|
|
||||||
used_radios += src:r_ear
|
|
||||||
is_speaking_radio = 1
|
|
||||||
else if(istype(src, /mob/living/silicon/robot))
|
|
||||||
if (src:radio)
|
|
||||||
src:radio.talk_into(src, message, message_mode)
|
|
||||||
used_radios += src:radio
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
|
|
||||||
if ("pAI")
|
|
||||||
if (src:radio)
|
|
||||||
src:radio.talk_into(src, message)
|
|
||||||
used_radios += src:radio
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
|
|
||||||
if("changeling")
|
|
||||||
if(mind && mind.changeling)
|
|
||||||
for(var/mob/Changeling in mob_list)
|
|
||||||
if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer))
|
|
||||||
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
|
|
||||||
return
|
|
||||||
////SPECIAL HEADSETS START
|
|
||||||
else
|
|
||||||
//world << "SPECIAL HEADSETS"
|
|
||||||
if (message_mode in radiochannels)
|
|
||||||
if(isrobot(src))//Seperates robots to prevent runtimes from the ear stuff
|
|
||||||
var/mob/living/silicon/robot/R = src
|
|
||||||
if(R.radio)//Sanityyyy
|
|
||||||
R.radio.talk_into(src, message, message_mode)
|
|
||||||
used_radios += R.radio
|
|
||||||
else
|
|
||||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
|
||||||
src:l_ear.talk_into(src, message, message_mode)
|
|
||||||
used_radios += src:l_ear
|
|
||||||
else if (src:r_ear)
|
|
||||||
src:r_ear.talk_into(src, message, message_mode)
|
|
||||||
used_radios += src:r_ear
|
|
||||||
message_range = 1
|
|
||||||
italics = 1
|
|
||||||
/////SPECIAL HEADSETS END
|
|
||||||
|
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
|
||||||
if(environment)
|
|
||||||
var/pressure = environment.return_pressure()
|
|
||||||
if (pressure < SAY_MINIMUM_PRESSURE) //in space no one can hear you scream
|
|
||||||
italics = 1
|
|
||||||
message_range = 1
|
|
||||||
|
|
||||||
var/list/listening
|
|
||||||
|
|
||||||
listening = get_mobs_in_view(message_range, src)
|
|
||||||
var/list/onscreen = viewers()
|
|
||||||
for(var/mob/M in player_list)
|
|
||||||
if (!M.client)
|
|
||||||
continue //skip monkeys and leavers
|
|
||||||
if (istype(M, /mob/new_player))
|
|
||||||
continue
|
|
||||||
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && src.client) // src.client is so that ghosts don't have to listen to mice
|
|
||||||
listening|=M
|
|
||||||
|
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
var/list/W = hear(message_range, T)
|
|
||||||
|
var/list/listening = list()
|
||||||
|
if(T)
|
||||||
|
|
||||||
for (var/obj/O in ((W | contents)-used_radios))
|
var/list/hear = hear(message_range, T)
|
||||||
W |= O
|
var/list/hearturfs = list()
|
||||||
|
|
||||||
for (var/mob/M in W)
|
for(var/I in hear)
|
||||||
W |= M.contents
|
if(istype(I, /mob/))
|
||||||
|
var/mob/M = I
|
||||||
for (var/atom/A in W)
|
listening += M
|
||||||
if(istype(A, /mob/living/simple_animal/parrot)) //Parrot speech mimickry
|
hearturfs += M.locs[1]
|
||||||
if(A == src)
|
for(var/obj/item/device/radio/R in contents)
|
||||||
continue //Dont imitate ourselves
|
spawn(0)
|
||||||
|
R.hear_talk(src, message, verb, speaking)
|
||||||
var/mob/living/simple_animal/parrot/P = A
|
else if(istype(I, /obj/))
|
||||||
if(P.speech_buffer.len >= 10)
|
var/obj/O = I
|
||||||
P.speech_buffer.Remove(pick(P.speech_buffer))
|
hearturfs += O.locs[1]
|
||||||
P.speech_buffer.Add(message)
|
if(istype(O, /obj/item/device/radio))
|
||||||
|
spawn(0)
|
||||||
if(istype(A, /obj/)) //radios in pockets and backpacks work
|
O.hear_talk(src, message, verb, speaking)
|
||||||
var/obj/O = A
|
for(var/mob/M in player_list)
|
||||||
spawn (0)
|
if(M.stat == DEAD && client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
|
||||||
if(O)
|
listening |= M
|
||||||
O.hear_talk(src, message)
|
continue
|
||||||
|
if(M.locs[1] in hearturfs)
|
||||||
|
listening |= M
|
||||||
/* Commented out as replaced by code above from BS12
|
|
||||||
for (var/obj/O in ((V | contents)-used_radios)) //radio in pocket could work, radio in backpack wouldn't --rastaf0
|
|
||||||
spawn (0)
|
|
||||||
if (O)
|
|
||||||
O.hear_talk(src, message)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* if(isbrain(src))//For brains to properly talk if they are in an MMI..or in a brain. Could be extended to other mobs I guess.
|
|
||||||
for(var/obj/O in loc)//Kinda ugly but whatever.
|
|
||||||
if(O)
|
|
||||||
spawn(0)
|
|
||||||
O.hear_talk(src, message)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
var/list/heard_a = list() // understood us
|
|
||||||
var/list/heard_b = list() // didn't understand us
|
|
||||||
|
|
||||||
for (var/M in listening)
|
|
||||||
if(hascall(M,"say_understands"))
|
|
||||||
if (M:say_understands(src,speaking))
|
|
||||||
heard_a += M
|
|
||||||
else
|
|
||||||
heard_b += M
|
|
||||||
else
|
|
||||||
heard_a += M
|
|
||||||
|
|
||||||
var/speech_bubble_test = say_test(message)
|
var/speech_bubble_test = say_test(message)
|
||||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||||
spawn(30) del(speech_bubble)
|
spawn(30) del(speech_bubble)
|
||||||
|
|
||||||
for(var/mob/M in hearers(5, src))
|
if(used_radios.len)
|
||||||
if(M != src && is_speaking_radio)
|
for(var/mob/living/M in hearers(5, src))
|
||||||
M:show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
|
if(M != src)
|
||||||
|
M.show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
|
||||||
var/rendered = null
|
|
||||||
|
|
||||||
if (length(heard_a))
|
|
||||||
var/message_a = say_quote(message,speaking)
|
|
||||||
|
|
||||||
if (italics)
|
|
||||||
message_a = "<i>[message_a]</i>"
|
|
||||||
|
|
||||||
var/message_ghost = "<b>[message_a]</b>" // bold so ghosts know the person is in view.
|
|
||||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
|
||||||
var/rendered_ghost = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] <span class='message'>[message_ghost]</span></span>"
|
|
||||||
for (var/mob/M in heard_a)
|
|
||||||
if(M.client)
|
|
||||||
if(hascall(M,"show_message"))
|
|
||||||
var/deaf_message = ""
|
|
||||||
var/deaf_type = 1
|
|
||||||
if(M != src)
|
|
||||||
deaf_message = "<span class='name'>[name]</span>[alt_name] talks but you cannot hear them."
|
|
||||||
else
|
|
||||||
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
|
|
||||||
deaf_type = 2 // Since you should be able to hear yourself without looking
|
|
||||||
if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen)
|
|
||||||
M:show_message(rendered_ghost, 2, deaf_message, deaf_type)
|
|
||||||
else
|
|
||||||
M:show_message(rendered, 2, deaf_message, deaf_type)
|
|
||||||
M << speech_bubble
|
|
||||||
|
|
||||||
if (length(heard_b))
|
|
||||||
|
|
||||||
var/message_b
|
|
||||||
message_b = stars(message)
|
|
||||||
message_b = say_quote(message_b,speaking)
|
|
||||||
|
|
||||||
if (italics)
|
|
||||||
message_b = "<i>[message_b]</i>"
|
|
||||||
|
|
||||||
rendered = "<span class='game say'><span class='name'>[name]</span>[alt_name] <span class='message'>[message_b]</span></span>" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
|
|
||||||
|
|
||||||
|
|
||||||
for (var/M in heard_b)
|
for(var/mob/M in listening)
|
||||||
if(hascall(M,"show_message"))
|
if(M.client)
|
||||||
M:show_message(rendered, 2)
|
M << speech_bubble
|
||||||
M << speech_bubble
|
M.hear_say(message,verb,speaking,alt_name, italics, src)
|
||||||
|
|
||||||
/*
|
|
||||||
if(M.client)
|
|
||||||
|
|
||||||
if(!M.client.bubbles || M == src)
|
|
||||||
var/image/I = image('icons/effects/speechbubble.dmi', B, "override")
|
|
||||||
I.override = 1
|
|
||||||
M << I
|
|
||||||
*/ /*
|
|
||||||
|
|
||||||
flick("[presay]say", B)
|
|
||||||
|
|
||||||
if(istype(loc, /turf))
|
|
||||||
B.loc = loc
|
|
||||||
else
|
|
||||||
B.loc = loc.loc
|
|
||||||
|
|
||||||
spawn()
|
|
||||||
sleep(11)
|
|
||||||
del(B)
|
|
||||||
*/
|
|
||||||
|
|
||||||
//talking items
|
|
||||||
for(var/obj/item/weapon/O in view(3,src))
|
|
||||||
if(O.listening_to_players)
|
|
||||||
O.catchMessage(message, src)
|
|
||||||
|
|
||||||
log_say("[name]/[key] : [message]")
|
log_say("[name]/[key] : [message]")
|
||||||
|
|
||||||
@@ -449,5 +135,3 @@ var/list/department_radio_keys = list(
|
|||||||
|
|
||||||
/mob/living/proc/GetVoice()
|
/mob/living/proc/GetVoice()
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -405,9 +405,13 @@ var/list/ai_list = list()
|
|||||||
|
|
||||||
if (href_list["track"])
|
if (href_list["track"])
|
||||||
var/mob/target = locate(href_list["track"]) in mob_list
|
var/mob/target = locate(href_list["track"]) in mob_list
|
||||||
|
/*
|
||||||
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
|
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
|
||||||
if(A && target)
|
if(A && target)
|
||||||
A.ai_actual_track(target)
|
A.ai_actual_track(target)
|
||||||
|
*/
|
||||||
|
if(target)
|
||||||
|
ai_actual_track(target)
|
||||||
return
|
return
|
||||||
|
|
||||||
else if (href_list["faketrack"])
|
else if (href_list["faketrack"])
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
var/ending = copytext(text, length(text))
|
var/ending = copytext(text, length(text))
|
||||||
|
|
||||||
if (ending == "?")
|
if (ending == "?")
|
||||||
return "queries, \"[text]\"";
|
return "queries"
|
||||||
else if (ending == "!")
|
else if (ending == "!")
|
||||||
return "declares, \"[text]\"";
|
return "declares"
|
||||||
|
|
||||||
return "states, \"[text]\"";
|
return "states"
|
||||||
|
|
||||||
|
#define IS_AI 1
|
||||||
|
#define IS_ROBOT 2
|
||||||
|
#define IS_PAI 3
|
||||||
|
|
||||||
/mob/living/silicon/say(var/message)
|
/mob/living/silicon/say(var/message)
|
||||||
if (!message)
|
if (!message)
|
||||||
@@ -23,39 +27,98 @@
|
|||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||||
return say_dead(message)
|
return say_dead(message)
|
||||||
|
|
||||||
|
var/bot_type = 0 //Let's not do a fuck ton of type checks, thanks.
|
||||||
|
if(istype(src, /mob/living/silicon/ai))
|
||||||
|
bot_type = IS_AI
|
||||||
|
else if(istype(src, /mob/living/silicon/robot))
|
||||||
|
bot_type = IS_ROBOT
|
||||||
|
else if(istype(src, /mob/living/silicon/pai))
|
||||||
|
bot_type = IS_PAI
|
||||||
|
|
||||||
|
var/mob/living/silicon/ai/AI = src //and let's not declare vars over and over and over for these guys.
|
||||||
|
var/mob/living/silicon/robot/R = src
|
||||||
|
var/mob/living/silicon/pai/P = src
|
||||||
|
|
||||||
|
|
||||||
//Must be concious to speak
|
//Must be concious to speak
|
||||||
if (stat)
|
if (stat)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (length(message) >= 2)
|
var/verb = say_quote(message)
|
||||||
var/prefix = copytext(message, 1, 3)
|
var/message_mode = null
|
||||||
if (department_radio_keys[prefix] == "binary")
|
|
||||||
if(istype(src, /mob/living/silicon/pai))
|
|
||||||
return ..(message)
|
|
||||||
message = copytext(message, 3)
|
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
|
||||||
|
|
||||||
// TODO: move the component system up to silicon so we don't have to use this ugly hack..
|
|
||||||
if(istype(src, /mob/living/silicon/robot))
|
if(copytext(message,1,2) == ";")
|
||||||
var/mob/living/silicon/robot/R = src
|
message_mode = "general" // I don't know why but regular radio = fuck you we ain't broadcasting, pAI mode was what was in old say code.
|
||||||
if(!R.is_component_functioning("comms"))
|
message = trim(copytext(message,2))
|
||||||
src << "\red Your binary communications component isn't functional."
|
|
||||||
|
else if(length(message) >= 2)
|
||||||
|
var/channel_prefix = copytext(message, 1 ,3)
|
||||||
|
if(!message_mode)
|
||||||
|
message_mode = department_radio_keys[channel_prefix]
|
||||||
|
|
||||||
|
if(message_mode && bot_type == IS_ROBOT)
|
||||||
|
if(message_mode != "binary" && !R.is_component_functioning("radio"))
|
||||||
|
src << "\red Your radio isn't functional at this time."
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
if(message_mode && message_mode != "general")
|
||||||
|
message = trim(copytext(message,3))
|
||||||
|
|
||||||
|
switch(message_mode)
|
||||||
|
if("department")
|
||||||
|
switch(bot_type)
|
||||||
|
if(IS_AI)
|
||||||
|
AI.holopad_talk(message)
|
||||||
|
if(IS_ROBOT)
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
R.radio.talk_into(src,message,message_mode,verb)
|
||||||
|
if(IS_PAI)
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
P.radio.talk_into(src,message,message_mode,verb)
|
||||||
|
return
|
||||||
|
|
||||||
|
if("binary")
|
||||||
|
switch(bot_type)
|
||||||
|
if(IS_ROBOT)
|
||||||
|
if(!R.is_component_functioning("comms"))
|
||||||
|
src << "\red Your binary communications component isn't functional."
|
||||||
|
return
|
||||||
|
if(IS_PAI)
|
||||||
|
src << "You do not appear to have that function"
|
||||||
return
|
return
|
||||||
|
|
||||||
robot_talk(message)
|
robot_talk(message)
|
||||||
else if (department_radio_keys[prefix] == "department")
|
return
|
||||||
if(isAI(src)&&client)//For patching directly into AI holopads.
|
if("general")
|
||||||
var/mob/living/silicon/ai/U = src
|
switch(bot_type)
|
||||||
message = copytext(message, 3)
|
if(IS_AI)
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
src << "Yeah, not yet, sorry"
|
||||||
U.holopad_talk(message)
|
if(IS_ROBOT)
|
||||||
else//Will not allow anyone by an active AI to use this function.
|
log_say("[key_name(src)] : [message]")
|
||||||
src << "This function is not available to you."
|
R.radio.talk_into(src,message,null,verb)
|
||||||
return
|
if(IS_PAI)
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
P.radio.talk_into(src,message,null,verb)
|
||||||
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
return ..(message)
|
if(message_mode && message_mode in radiochannels)
|
||||||
else
|
switch(bot_type)
|
||||||
return ..(message)
|
if(IS_AI)
|
||||||
|
src << "You don't have this function yet, I'm working on it"
|
||||||
|
return
|
||||||
|
if(IS_ROBOT)
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
R.radio.talk_into(src,message,message_mode,verb)
|
||||||
|
if(IS_PAI)
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
P.radio.talk_into(src,message,message_mode,verb)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
return ..(message,null,verb)
|
||||||
|
|
||||||
//For holopads only. Usable by AI.
|
//For holopads only. Usable by AI.
|
||||||
/mob/living/silicon/ai/proc/holopad_talk(var/message)
|
/mob/living/silicon/ai/proc/holopad_talk(var/message)
|
||||||
@@ -146,4 +209,8 @@
|
|||||||
|
|
||||||
for (var/mob/M in dead_mob_list)
|
for (var/mob/M in dead_mob_list)
|
||||||
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping
|
||||||
M.show_message(rendered, 2)
|
M.show_message(rendered, 2)
|
||||||
|
|
||||||
|
#undef IS_AI
|
||||||
|
#undef IS_ROBOT
|
||||||
|
#undef IS_PAI
|
||||||
|
|||||||
@@ -331,6 +331,61 @@
|
|||||||
icon_state = "ipc_blue"
|
icon_state = "ipc_blue"
|
||||||
species_allowed = list("Machine")
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_breakout
|
||||||
|
name = "breakout IPC screen"
|
||||||
|
icon_state = "ipc_breakout"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_eight
|
||||||
|
name = "eight IPC screen"
|
||||||
|
icon_state = "ipc_eight"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_goggles
|
||||||
|
name = "goggles IPC screen"
|
||||||
|
icon_state = "ipc_goggles"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_heart
|
||||||
|
name = "heart IPC screen"
|
||||||
|
icon_state = "ipc_heart"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_monoeye
|
||||||
|
name = "monoeye IPC screen"
|
||||||
|
icon_state = "ipc_monoeye"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_nature
|
||||||
|
name = "nature IPC screen"
|
||||||
|
icon_state = "ipc_nature"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_orange
|
||||||
|
name = "orange IPC screen"
|
||||||
|
icon_state = "ipc_orange"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_purple
|
||||||
|
name = "purple IPC screen"
|
||||||
|
icon_state = "ipc_purple"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_shower
|
||||||
|
name = "shower IPC screen"
|
||||||
|
icon_state = "ipc_shower"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_static
|
||||||
|
name = "static IPC screen"
|
||||||
|
icon_state = "ipc_static"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
|
icp_screen_yellow
|
||||||
|
name = "yellow IPC screen"
|
||||||
|
icon_state = "ipc_yellow"
|
||||||
|
species_allowed = list("Machine")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
/ =---------------------------= /
|
/ =---------------------------= /
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
|
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
|
||||||
|
|
||||||
if((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
|
if((istype(usr, /mob/living/carbon/human)))
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
if(!( istype(over_object, /obj/screen) ))
|
if(!( istype(over_object, /obj/screen) ))
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
init()
|
init()
|
||||||
else
|
else
|
||||||
area = src.loc.loc:master
|
area = src.loc.loc:master
|
||||||
area.apc |= src
|
area.apc |= src
|
||||||
opened = 1
|
opened = 1
|
||||||
operating = 0
|
operating = 0
|
||||||
name = "[area.name] APC"
|
name = "[area.name] APC"
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
cell.charge = start_charge * cell.maxcharge / 100.0 // (convert percentage to actual value)
|
cell.charge = start_charge * cell.maxcharge / 100.0 // (convert percentage to actual value)
|
||||||
|
|
||||||
var/area/A = src.loc.loc
|
var/area/A = src.loc.loc
|
||||||
|
|
||||||
|
|
||||||
//if area isn't specified use current
|
//if area isn't specified use current
|
||||||
if(isarea(A) && src.areastring == null)
|
if(isarea(A) && src.areastring == null)
|
||||||
@@ -913,7 +913,7 @@
|
|||||||
return 0
|
return 0
|
||||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||||
istype(user, /mob/living/silicon) || \
|
istype(user, /mob/living/silicon) || \
|
||||||
istype(user, /mob/living/carbon/monkey) /*&& ticker && ticker.mode.name == "monkey"*/) )
|
istype(user, /mob/living/carbon/monkey)) )
|
||||||
user << "\red You don't have the dexterity to use this [src]!"
|
user << "\red You don't have the dexterity to use this [src]!"
|
||||||
nanomanager.close_user_uis(user, src)
|
nanomanager.close_user_uis(user, src)
|
||||||
|
|
||||||
@@ -1241,7 +1241,7 @@
|
|||||||
autoflag = 3
|
autoflag = 3
|
||||||
area.poweralert(1, src)
|
area.poweralert(1, src)
|
||||||
if(cell.charge >= 4000)
|
if(cell.charge >= 4000)
|
||||||
area.poweralert(1, src)
|
area.poweralert(1, src)
|
||||||
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
|
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
|
||||||
if(autoflag != 2)
|
if(autoflag != 2)
|
||||||
equipment = autoset(equipment, 2)
|
equipment = autoset(equipment, 2)
|
||||||
@@ -1307,7 +1307,7 @@
|
|||||||
environ = autoset(environ, 0)
|
environ = autoset(environ, 0)
|
||||||
area.poweralert(0, src)
|
area.poweralert(0, src)
|
||||||
autoflag = 0
|
autoflag = 0
|
||||||
|
|
||||||
|
|
||||||
// update icon & area power if anything changed
|
// update icon & area power if anything changed
|
||||||
|
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
#define MONKEY_MODE_RUNNING 0
|
|
||||||
#define MONKEY_MODE_NO_RABID_LEFT 1
|
|
||||||
#define MONKEY_MODE_SHUTTLE_CAPTURED 2
|
|
||||||
#define MONKEY_MODE_SHUTTLE_WITH_HUMANS 3
|
|
||||||
|
|
||||||
#define MONKEY_MODE_MONKEYS 4
|
|
||||||
|
|
||||||
/datum/game_mode/monkey
|
|
||||||
name = "monkey"
|
|
||||||
config_tag = "monkey"
|
|
||||||
var/state = MONKEY_MODE_RUNNING
|
|
||||||
var/list/datum/mind/initial_monkeys = new
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/announce()
|
|
||||||
world << "<B>The current game mode is - Monkey!</B>"
|
|
||||||
world << "<B>Some of your crew members have been infected by a mutageous virus!</B>"
|
|
||||||
world << "<B>Escape on the shuttle but the humans have precedence!</B>"
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/can_start()
|
|
||||||
if (num_players()<2)
|
|
||||||
return 0
|
|
||||||
for(var/mob/new_player/P in player_list)
|
|
||||||
if(P.client && P.ready && !jobban_isbanned(P, "Syndicate"))
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/pre_setup()
|
|
||||||
var/list/possible_monkeys = get_players_for_role(BE_MONKEY)
|
|
||||||
|
|
||||||
// stop setup if no possible monkeys
|
|
||||||
if(!possible_monkeys.len)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
var/num_monkeys = MONKEY_MODE_MONKEYS
|
|
||||||
var/num_players = num_players()
|
|
||||||
|
|
||||||
if (num_players<=num_monkeys)
|
|
||||||
num_monkeys = round(num_players/2)
|
|
||||||
|
|
||||||
for(var/j = 1 to num_monkeys)
|
|
||||||
if (!possible_monkeys.len)
|
|
||||||
break
|
|
||||||
var/datum/mind/monkey = pick(possible_monkeys)
|
|
||||||
possible_monkeys-=monkey
|
|
||||||
initial_monkeys += monkey
|
|
||||||
monkey.special_role = "monkey"
|
|
||||||
|
|
||||||
if(!initial_monkeys.len)
|
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/post_setup()
|
|
||||||
spawn (50)
|
|
||||||
for (var/datum/mind/monkey in initial_monkeys)
|
|
||||||
var/mob/living/carbon/human/H = monkey.current
|
|
||||||
var/mob/living/carbon/monkey/new_monkey = H.monkeyize()
|
|
||||||
new_monkey << "<B>Your goal is to capture the entire human civilization and your first target is Centcom. Hijack the shuttle without humans aboard!</B>"
|
|
||||||
|
|
||||||
for (var/mob/living/carbon/monkey/rabid_monkey in mob_list)
|
|
||||||
if (!(rabid_monkey.mind in initial_monkeys) && (!isturf(rabid_monkey.loc) || rabid_monkey.z!=1))
|
|
||||||
continue
|
|
||||||
rabid_monkey.contract_disease(new /datum/disease/jungle_fever,1,0)
|
|
||||||
del(initial_monkeys)
|
|
||||||
..()
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/proc/is_important_monkey(var/mob/living/carbon/monkey/M as mob)
|
|
||||||
var/turf/T = get_turf(M)
|
|
||||||
var/area/A = get_area(M)
|
|
||||||
if(M.stat!=2)
|
|
||||||
|
|
||||||
for(var/datum/disease/D in M.viruses)
|
|
||||||
if(istype(D, /datum/disease/jungle_fever) && ( T.z==1 || is_type_in_list(A, centcom_areas)))
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/check_win()
|
|
||||||
if (state==MONKEY_MODE_SHUTTLE_CAPTURED || state==MONKEY_MODE_SHUTTLE_WITH_HUMANS)
|
|
||||||
return
|
|
||||||
var/infected_count = 0
|
|
||||||
for (var/mob/living/carbon/monkey/rabid_monkey in mob_list)
|
|
||||||
if (is_important_monkey(rabid_monkey))
|
|
||||||
infected_count++
|
|
||||||
if (infected_count==0)
|
|
||||||
state = MONKEY_MODE_NO_RABID_LEFT
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/check_finished()
|
|
||||||
return (emergency_shuttle.location==2) || (state>0)
|
|
||||||
|
|
||||||
/datum/game_mode/monkey/declare_completion()
|
|
||||||
var/monkeywin = 0
|
|
||||||
if (state != MONKEY_MODE_NO_RABID_LEFT)
|
|
||||||
for(var/mob/living/carbon/monkey/monkey_player in mob_list)
|
|
||||||
if (is_important_monkey(monkey_player))
|
|
||||||
var/area/A = get_area(monkey_player)
|
|
||||||
if ( is_type_in_list(A, centcom_areas))
|
|
||||||
monkeywin = 1
|
|
||||||
break
|
|
||||||
|
|
||||||
if(monkeywin)
|
|
||||||
for(var/mob/living/carbon/human/human_player in mob_list)
|
|
||||||
if (human_player.stat != 2)
|
|
||||||
var/area/A = get_area(human_player)
|
|
||||||
if (istype(A, /area/shuttle/escape/centcom))
|
|
||||||
monkeywin = 0
|
|
||||||
break
|
|
||||||
|
|
||||||
if (monkeywin)
|
|
||||||
feedback_set_details("round_end_result","win - monkey win")
|
|
||||||
world << "<FONT size=3 color=red><B>The monkeys have won! Humanity is doomed!</B></FONT>"
|
|
||||||
for (var/mob/living/carbon/human/player in player_list)
|
|
||||||
spawn(rand(0,150))
|
|
||||||
player.monkeyize()
|
|
||||||
sleep(200)
|
|
||||||
else
|
|
||||||
feedback_set_details("round_end_result","loss - crew win")
|
|
||||||
world << "<FONT size=3 color=red><B>The Research Staff has stopped the monkey invasion!</B></FONT>"
|
|
||||||
..()
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
/datum/game_mode/proc/auto_declare_completion_monkey()
|
|
||||||
for(var/mob/living/carbon/monkey/monkey_player in mob_list)
|
|
||||||
for(var/datum/disease/D in monkey_player.viruses)
|
|
||||||
if (istype(D, /datum/disease/jungle_fever) && monkey_player.ckey)
|
|
||||||
world << "<B>[monkey_player.ckey] was played infested [monkey_player]. [monkey_player.stat == 2 ? "(DEAD)" : ""]</B>"
|
|
||||||
return 1
|
|
||||||
|
|
||||||
#undef MONKEY_MODE_RUNNING
|
|
||||||
#undef MONKEY_MODE_NO_RABID_LEFT
|
|
||||||
#undef MONKEY_MODE_SHUTTLE_CAPTURED
|
|
||||||
#undef MONKEY_MODE_SHUTTLE_WITH_HUMANS
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 49 KiB |
@@ -313,6 +313,14 @@ macro "hotkeymode"
|
|||||||
name = "CTRL+G"
|
name = "CTRL+G"
|
||||||
command = "a-intent right"
|
command = "a-intent right"
|
||||||
is-disabled = false
|
is-disabled = false
|
||||||
|
elem
|
||||||
|
name = "H"
|
||||||
|
command = "holster"
|
||||||
|
is-disabled = false
|
||||||
|
elem
|
||||||
|
name = "CTRL+H"
|
||||||
|
command = "holster"
|
||||||
|
is-disabled = false
|
||||||
elem
|
elem
|
||||||
name = "Q"
|
name = "Q"
|
||||||
command = ".northwest"
|
command = ".northwest"
|
||||||
@@ -1346,6 +1354,8 @@ window "mapwindow"
|
|||||||
on-size = ""
|
on-size = ""
|
||||||
icon-size = 0
|
icon-size = 0
|
||||||
text-mode = false
|
text-mode = false
|
||||||
|
letterbox = true
|
||||||
|
zoom = 0
|
||||||
on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\""
|
on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\""
|
||||||
on-hide = ".winset\"mainwindow.mainvsplit.left=\""
|
on-hide = ".winset\"mainwindow.mainvsplit.left=\""
|
||||||
style = ""
|
style = ""
|
||||||
@@ -1818,4 +1828,6 @@ window "infowindow"
|
|||||||
on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\""
|
on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\""
|
||||||
on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\""
|
on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\""
|
||||||
on-tab = ""
|
on-tab = ""
|
||||||
|
prefix-color = none
|
||||||
|
suffix-color = none
|
||||||
|
|
||||||
|
|||||||
21842
maps/tgstation2.dmm
21842
maps/tgstation2.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user