mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
most cameras on the station are now split up into networks. the larger departments all have camera computers to monitor their departments (security and ai can see everywhere). ai can now see multiple networks at once, legacy proc ai_network_change() now acts as a shortcut to let the ai jump to a specific network (picks a random cam in that network). cleaned up / added / removed numerous cameras all over the station to be in line with this update. all camera monitor computers can be built with a single camera circuitboard, simply click the circuitboard when in hand and select a department (must be authorised by a department head).
scattered minor updates, including removing unnecessary preceeding whitespace in the examine() verb. added the tajaran as an adminspawnable race, see the forum topic for more information. features: new non-human (feline) playable mob, slightly more vulnerable to heat than humans, can speak in private language understood only by other tajarans (and possibly adept adminhackers), uses mob/living/carbon/human as a base template, so there will be unintended side effects (such as human hair overlays). known bugs: ears/tail overlays, hud health (and temp?) display not updating, genetics will probably go haywire, speech bug means nothing can be said (high priority). for the love of god, let this commit go through without trouble. Signed-off-by: CaelAislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
198
code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm
Normal file
198
code/WorkInProgress/Cael_Aislinn/Tajara/examine.dm
Normal file
@@ -0,0 +1,198 @@
|
||||
/mob/living/carbon/human/tajaran/examine()
|
||||
set src in view()
|
||||
|
||||
usr << "\blue *---------*"
|
||||
|
||||
usr << "\blue This is \icon[src.icon] <B>[src.name]</B>! One of the cat-like Tajarans."
|
||||
|
||||
// crappy hack because you can't do \his[src] etc
|
||||
var/t_his = "its"
|
||||
var/t_him = "it"
|
||||
if (src.gender == MALE)
|
||||
t_his = "his"
|
||||
t_him = "him"
|
||||
else if (src.gender == FEMALE)
|
||||
t_his = "her"
|
||||
t_him = "her"
|
||||
|
||||
if (src.w_uniform)
|
||||
if (src.w_uniform.blood_DNA)
|
||||
usr << "\red [src.name] is wearing a[src.w_uniform.blood_DNA ? " bloody " : " "] \icon[src.w_uniform] [src.w_uniform.name]!"
|
||||
else
|
||||
usr << "\blue [src.name] is wearing a \icon[src.w_uniform] [src.w_uniform.name]."
|
||||
|
||||
if (src.handcuffed)
|
||||
usr << "\blue [src.name] is \icon[src.handcuffed] handcuffed!"
|
||||
|
||||
if (src.wear_suit)
|
||||
if (src.wear_suit.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name] on!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.wear_suit] [src.wear_suit.name] on."
|
||||
|
||||
if (src.l_ear)
|
||||
usr << "\blue [src.name] has a \icon[src.l_ear] [src.l_ear.name] on [t_his] left ear."
|
||||
|
||||
if (src.r_ear)
|
||||
usr << "\blue [src.name] has a \icon[src.r_ear] [src.r_ear.name] on [t_his] right ear."
|
||||
|
||||
if (src.wear_mask)
|
||||
if (src.wear_mask.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.wear_mask.blood_DNA ? " bloody " : " "] \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.wear_mask] [src.wear_mask.name] on [t_his] face."
|
||||
|
||||
if (src.l_hand)
|
||||
if (src.l_hand.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.l_hand.blood_DNA ? " bloody " : " "] \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.l_hand] [src.l_hand.name] in [t_his] left hand."
|
||||
|
||||
if (src.r_hand)
|
||||
if (src.r_hand.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.r_hand.blood_DNA ? " bloody " : " "] \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.r_hand] [src.r_hand.name] in [t_his] right hand."
|
||||
|
||||
if (src.belt)
|
||||
if (src.belt.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.belt.blood_DNA ? " bloody " : " "] \icon[src.belt] [src.belt.name] on [t_his] belt!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.belt] [src.belt.name] on [t_his] belt."
|
||||
if(src.s_store)
|
||||
if(src.s_store.blood_DNA)
|
||||
usr << "\red [src.name] has a[src.s_store.blood_DNA ? " bloody " : " "] \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]!"
|
||||
else
|
||||
usr << "\blue [src.name] has a \icon[src.s_store] [src.s_store.name] on [t_his][src.wear_suit.blood_DNA ? " bloody " : " "] \icon[src.wear_suit] [src.wear_suit.name]."
|
||||
if (src.shoes)
|
||||
usr << "[src.shoes.blood_DNA ? "\red" : "\blue"][src.name] has a[src.shoes.blood_DNA ? " bloody " : " "] \icon[src.shoes] [src.shoes.name] on [t_his] feet."
|
||||
|
||||
|
||||
if (src.gloves)
|
||||
if (src.gloves.blood_DNA)
|
||||
usr << "\red [src.name] has bloody \icon[src.gloves] [src.gloves.name] on [t_his] hands!"
|
||||
else
|
||||
usr << "\blue [src.name] has \icon[src.gloves] [src.gloves.name] on [t_his] hands."
|
||||
else if (src.blood_DNA)
|
||||
usr << "\red [src.name] has[src.blood_DNA ? " bloody " : " "] hands!"
|
||||
|
||||
if (src.back)
|
||||
usr << "\blue [src.name] has a \icon[src.back] [src.back.name] on [t_his] back."
|
||||
|
||||
if (src.wear_id)
|
||||
var/id
|
||||
var/photo = 0
|
||||
if(istype(src:wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = src:wear_id
|
||||
id = pda.owner
|
||||
else
|
||||
id = src.wear_id.registered
|
||||
if (src.wear_id.PHOTO)
|
||||
photo = 1
|
||||
if (id != src.real_name && in_range(src, usr) && prob(10))
|
||||
if (photo)
|
||||
usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo yet doesn't seem to be that person!!!"
|
||||
else
|
||||
usr << "\red [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] yet doesn't seem to be that person!!!"
|
||||
else
|
||||
if (photo)
|
||||
usr << "\blue [src.name] is wearing \icon[src.wear_id] [src.wear_id.name] with a photo."
|
||||
else
|
||||
usr << "\blue [src.name] is wearing \icon[src.wear_id] [src.wear_id.name]."
|
||||
|
||||
|
||||
if (src.is_jittery)
|
||||
switch(src.jitteriness)
|
||||
if(300 to INFINITY)
|
||||
usr << "\red [src] is violently convulsing."
|
||||
if(200 to 300)
|
||||
usr << "\red [src] looks extremely jittery."
|
||||
if(100 to 200)
|
||||
usr << "\red [src] is twitching ever so slightly."
|
||||
|
||||
if (src.suiciding)
|
||||
switch(src.suiciding)
|
||||
if(1)
|
||||
usr << "\red [src.name] appears to have bitten [t_his] tongue off!"
|
||||
|
||||
var/distance = get_dist(usr,src)
|
||||
if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything
|
||||
distance = 1
|
||||
|
||||
if (src.stat == 1 || stat == 2)
|
||||
usr << "\red [name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep."
|
||||
if(health < 0 && distance <= 3)
|
||||
usr << "\red [name] does not appear to be breathing."
|
||||
if(ishuman(src) && usr.stat == 0 && src.stat == 1 && distance <= 1)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
sleep(15)
|
||||
usr << "\blue [name] has a pulse!"
|
||||
|
||||
if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1))
|
||||
if(distance <= 1)
|
||||
if(ishuman(usr) && usr.stat == 0)
|
||||
for(var/mob/O in viewers(usr.loc, null) )
|
||||
O.show_message("[usr] checks [src]'s pulse.", 1)
|
||||
sleep(15)
|
||||
usr << "\red [name] has no pulse!"
|
||||
else
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 30)
|
||||
usr << "\red [src.name] looks slightly injured!"
|
||||
else
|
||||
usr << "\red <B>[src.name] looks severely injured!</B>"
|
||||
|
||||
if (src.cloneloss)
|
||||
if (src.cloneloss < 30)
|
||||
usr << "\red [src.name] looks slightly... unfinished?"
|
||||
else
|
||||
usr << "\red <B>[src.name] looks very... unfinished?</B>"
|
||||
|
||||
if (src.getFireLoss())
|
||||
if (src.getFireLoss() < 30)
|
||||
usr << "\red [src.name] looks slightly burned!"
|
||||
else
|
||||
usr << "\red <B>[src.name] looks severely burned!</B>"
|
||||
|
||||
if (src.nutrition < 100)
|
||||
usr << "\red [src.name] looks like flesh and bones."
|
||||
else if (src.nutrition >= 500)
|
||||
if (usr.nutrition < 100)
|
||||
usr << "\red [src.name] looks very round and delicious. Like a little piggy. A tasty piggy."
|
||||
else
|
||||
usr << "\blue [src.name] looks quite chubby."
|
||||
|
||||
else if (src.brainloss >= 60)
|
||||
usr << "\red [src.name] has a stupid expression on [t_his] face."
|
||||
if (!src.client)
|
||||
usr << "\red [src.name] doesn't seem as though they want to talk."
|
||||
|
||||
for(var/named in organs)
|
||||
var/datum/organ/external/temp = organs[named]
|
||||
if(temp.destroyed)
|
||||
usr << "\red [src.name] is missing [t_his] [temp.display_name]."
|
||||
if(temp.wounds)
|
||||
for(var/datum/organ/external/wound/w in temp.wounds)
|
||||
var/size = w.wound_size
|
||||
var/sizetext
|
||||
switch(size)
|
||||
if(1)
|
||||
sizetext = "cut"
|
||||
if(2)
|
||||
sizetext = "deep cut"
|
||||
if(3)
|
||||
sizetext = "flesh wound"
|
||||
if(4)
|
||||
sizetext = "gaping wound"
|
||||
if(5)
|
||||
sizetext = "big gaping wound"
|
||||
if(6)
|
||||
sizetext = "massive wound"
|
||||
if(w.bleeding)
|
||||
usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]."
|
||||
continue
|
||||
|
||||
print_flavor_text()
|
||||
|
||||
usr << "\blue *---------*"
|
||||
528
code/WorkInProgress/Cael_Aislinn/Tajara/say.dm
Normal file
528
code/WorkInProgress/Cael_Aislinn/Tajara/say.dm
Normal file
@@ -0,0 +1,528 @@
|
||||
//their language needs to hook into radios as well
|
||||
|
||||
/mob/living/carbon/human/tajaran/say_quote(var/text)
|
||||
//work out if the listener can understand or not
|
||||
|
||||
var/is_decipherable = 0
|
||||
var/n = length(text)
|
||||
var/p = 0
|
||||
while(p <= n)
|
||||
if (copytext(text, p, p + 1) in tajspeak_letters)
|
||||
p++
|
||||
continue
|
||||
is_decipherable = 1
|
||||
break
|
||||
|
||||
var/ending = copytext(text, length(text))
|
||||
if (src.disease_symptoms & DISEASE_HOARSE)
|
||||
return "rasps, \"[text]\"";
|
||||
if (src.stuttering)
|
||||
return "stammers, \"[text]\"";
|
||||
if (src.slurring)
|
||||
return "slurrs, \"[text]\"";
|
||||
if (src.brainloss >= 60)
|
||||
return "gibbers, \"[text]\"";
|
||||
|
||||
if(!is_decipherable)
|
||||
return "mewls, \"[text]\""//pick("yowls, \"[text]\"", "growls, \"[text]\"","mewls, \"[text]\"", "mrowls, \"[text]\"", "meows, \"[text]\"", "purrs, \"[text]\"");
|
||||
|
||||
if (ending == "?")
|
||||
return "asks, \"[text]\"";
|
||||
else if (ending == "!")
|
||||
return "exclaims, \"[text]\"";
|
||||
|
||||
return "says, \"[text]\"";
|
||||
|
||||
//convert message to an indecipherable series of sounds for anyone who isnt tajaran
|
||||
/mob/living/carbon/human/tajaran/proc/tajspeak(var/message)
|
||||
var/te = html_decode(message)
|
||||
var/t = ""
|
||||
var/n = length(message)
|
||||
var/p = 1
|
||||
while(p <= n)
|
||||
if (copytext(te, p, p + 1) != " ")
|
||||
t = text("[][]", t, pick(tajspeak_letters))
|
||||
p++
|
||||
return html_encode(t)
|
||||
/*if (pr == null)
|
||||
pr = 25
|
||||
if (pr <= 0)
|
||||
return null
|
||||
else
|
||||
if (pr >= 100)
|
||||
return n
|
||||
var/te = html_decode(n)
|
||||
var/t = ""
|
||||
n = length(n)
|
||||
var/p = null
|
||||
p = 1
|
||||
while(p <= n)
|
||||
if ((copytext(te, p, p + 1) == " " || prob(pr)))
|
||||
t = text("[][]", t, copytext(te, p, p + 1))
|
||||
else
|
||||
t = text("[]*", t)
|
||||
p++
|
||||
return html_encode(t)*/
|
||||
|
||||
/mob/living/carbon/human/tajaran/say(var/message)
|
||||
var/message_old = message
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
log_say("[name]/[key] : [message]")
|
||||
|
||||
if (length(message) >= 1)
|
||||
if (miming && copytext(message, 1, 2) != "*")
|
||||
return
|
||||
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (silent)
|
||||
return
|
||||
|
||||
if (src.client && (client.muted || src.client.muted_complete))
|
||||
src << "You are muted."
|
||||
return
|
||||
|
||||
// wtf?
|
||||
if (stat)
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
if (sdisabilities & 2)
|
||||
return
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
// emotes
|
||||
if (copytext(message, 1, 2) == "*" && !stat)
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && name != real_name)
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
var/italics = 0
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
|
||||
if (brainloss >= 60 && prob(50))
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
// Special message handling
|
||||
else if (copytext(message, 1, 2) == ";")
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
else if(istype(src, /mob/living/silicon/pai) || istype(src, /mob/living/silicon/robot))
|
||||
message_mode = "pAI"
|
||||
message = copytext(message, 2)
|
||||
|
||||
else if (length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1, 3)
|
||||
|
||||
var/list/keys = list(
|
||||
":r" = "right ear",
|
||||
":l" = "left ear",
|
||||
":i" = "intercom",
|
||||
":h" = "department",
|
||||
":c" = "Command",
|
||||
":n" = "Science",
|
||||
":m" = "Medical",
|
||||
":e" = "Engineering",
|
||||
":s" = "Security",
|
||||
":w" = "whisper",
|
||||
":b" = "binary",
|
||||
":a" = "alientalk",
|
||||
":t" = "Syndicate",
|
||||
":d" = "Mining",
|
||||
":q" = "Cargo",
|
||||
":g" = "changeling",
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
":<3A>" = "right hand",
|
||||
":<3A>" = "left hand",
|
||||
":<3A>" = "intercom",
|
||||
":<3A>" = "department",
|
||||
":<3A>" = "Command",
|
||||
":<3A>" = "Science",
|
||||
":<3A>" = "Medical",
|
||||
":<3A>" = "Engineering",
|
||||
":<3A>" = "Security",
|
||||
":<3A>" = "whisper",
|
||||
":<3A>" = "binary",
|
||||
":<3A>" = "alientalk",
|
||||
":<3A>" = "Syndicate",
|
||||
":<3A>" = "Mining",
|
||||
":<3A>" = "Cargo",
|
||||
":<3A>" = "changeling",
|
||||
)
|
||||
|
||||
message_mode = keys[channel_prefix]
|
||||
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
|
||||
if (message_mode)
|
||||
message = trim(copytext(message, 3))
|
||||
if (!ishuman(src) && (message_mode=="department" || (message_mode in radiochannels)))
|
||||
message_mode = null //only humans can use headsets
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
if( !message_mode && (disease_symptoms & DISEASE_WHISPER))
|
||||
message_mode = "whisper"
|
||||
|
||||
if(src.stunned > 0 && (!(traumatic_shock > 61) && prob(50)))
|
||||
message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
||||
|
||||
|
||||
message = capitalize(message) //capitalize the first letter of what they actually say
|
||||
|
||||
// :downs:
|
||||
if (brainloss >= 60)
|
||||
message = dd_replacetext(message, " am ", " ")
|
||||
message = dd_replacetext(message, " is ", " ")
|
||||
message = dd_replacetext(message, " are ", " ")
|
||||
message = dd_replacetext(message, "you", "u")
|
||||
message = dd_replacetext(message, "help", "halp")
|
||||
message = dd_replacetext(message, "grief", "grife")
|
||||
message = dd_replacetext(message, "space", "spess")
|
||||
message = dd_replacetext(message, "carp", "crap")
|
||||
message = dd_replacetext(message, "reason", "raisin")
|
||||
if(prob(50))
|
||||
message = uppertext(message)
|
||||
message += "[stutter(pick("!", "!!", "!!!"))]"
|
||||
if(!stuttering && prob(15))
|
||||
message = stutter(message)
|
||||
|
||||
if (stuttering)
|
||||
message = stutter(message)
|
||||
if (slurring)
|
||||
message = slur(message)
|
||||
|
||||
/* //qw do not have beesease atm.
|
||||
if(virus)
|
||||
if(virus.name=="beesease" && virus.stage>=2)
|
||||
if(prob(virus.stage*10))
|
||||
var/bzz = length(message)
|
||||
message = "B"
|
||||
for(var/i=0,i<bzz,i++)
|
||||
message += "Z"
|
||||
*/
|
||||
var/list/obj/item/used_radios = new
|
||||
|
||||
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
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message)
|
||||
used_radios += src:r_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
|
||||
if ("secure headset")
|
||||
if (src:l_ear && istype(src:l_ear,/obj/item/device/radio))
|
||||
src:l_ear.talk_into(src, message, 1)
|
||||
used_radios += src:l_ear
|
||||
else if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message, 1)
|
||||
used_radios += src:r_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("right ear")
|
||||
if (src:r_ear)
|
||||
src:r_ear.talk_into(src, message)
|
||||
used_radios += src:r_ear
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("left ear")
|
||||
if (src:l_ear)
|
||||
src:l_ear.talk_into(src, message)
|
||||
used_radios += src:l_ear
|
||||
|
||||
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
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
//I see no reason to restrict such way of whispering
|
||||
if ("whisper")
|
||||
whisper(trim(copytext(message_old, 3)))
|
||||
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 (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
|
||||
if("changeling")
|
||||
if(src.changeling)
|
||||
for(var/mob/living/carbon/aChangeling in world)
|
||||
if(aChangeling.changeling)
|
||||
aChangeling << "<i><font color=#800080><b>[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]:</b> [message]</font></i>"
|
||||
return
|
||||
////SPECIAL HEADSETS START
|
||||
else
|
||||
//world << "SPECIAL HEADSETS"
|
||||
if (message_mode in radiochannels)
|
||||
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
|
||||
|
||||
//work out if we're speaking tajaran or not
|
||||
var/is_speaking_taj = 0
|
||||
if(copytext(message, 1, 3) == ":j")
|
||||
is_speaking_taj = 1
|
||||
message = trim(copytext(message, 1, 3))
|
||||
|
||||
var/list/listening
|
||||
/*
|
||||
if(istype(loc, /obj/item/device/aicard)) // -- TLE
|
||||
var/obj/O = loc
|
||||
if(istype(O.loc, /mob))
|
||||
var/mob/M = O.loc
|
||||
listening = hearers(message_range, M)
|
||||
else
|
||||
listening = hearers(message_range, O)
|
||||
else
|
||||
listening = hearers(message_range, src)
|
||||
|
||||
for (var/obj/O in view(message_range, src))
|
||||
for (var/mob/M in O)
|
||||
listening += M // maybe need to check if M can hear src
|
||||
spawn (0)
|
||||
if (O)
|
||||
O.hear_talk(src, message)
|
||||
|
||||
if (!(src in listening))
|
||||
listening += src
|
||||
|
||||
*/
|
||||
var/turf/T = get_turf(src)
|
||||
listening = hearers(message_range, T)
|
||||
var/list/V = view(message_range, T)
|
||||
var/list/W = V
|
||||
//find mobs in lockers, cryo, intellicards, brains, MMIs, and so on.
|
||||
for (var/mob/M in world)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat <2) //is alive
|
||||
if (isturf(M.loc))
|
||||
continue //if M can hear us it was already found by hearers()
|
||||
if (get_turf(M) in V) //this is slow, but I don't think we'd have a lot of wardrobewhores every round --rastaf0
|
||||
listening+=M
|
||||
else
|
||||
if (M.client && M.client.ghost_ears)
|
||||
listening|=M
|
||||
|
||||
for (var/obj/O in ((W | contents)-used_radios))
|
||||
W |= O
|
||||
|
||||
for (var/mob/M in W)
|
||||
W |= M.contents
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/G = M
|
||||
for(var/name in G.organs)
|
||||
var/datum/organ/external/F = G.organs[name]
|
||||
W |= F.implant
|
||||
|
||||
for (var/obj/item/device/pda/M in W)
|
||||
W |= M.contents
|
||||
|
||||
for (var/obj/O in W) //radio in pocket could work, radio in backpack wouldn't --rastaf0
|
||||
spawn (0)
|
||||
if(O && !istype(O.loc, /obj/item/weapon/storage))
|
||||
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/mob/M in listening)
|
||||
//if speaking in tajaran, only let other tajs hear
|
||||
if ( (M.say_understands(src) && !is_speaking_taj) || istype(M,/mob/living/carbon/human/tajaran) )
|
||||
heard_a += M
|
||||
else
|
||||
heard_b += M
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('talk.dmi',src,"h[speech_bubble_test]")
|
||||
|
||||
var/rendered = null
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message)
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
if (!istype(src, /mob/living/carbon/human))
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
if(wear_mask:vchange)
|
||||
rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>"
|
||||
|
||||
/*
|
||||
// Create speech bubble
|
||||
var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
// Determine if the speech bubble's going to have a special look
|
||||
var/presay = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
presay = "bot"
|
||||
if(istype(src, /mob/living/carbon/alien))
|
||||
presay = "xeno"
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
presay = "metroid"
|
||||
*/
|
||||
for (var/mob/M in heard_a)
|
||||
|
||||
M.show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
//spawn(30) del(speech_bubble)
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
// If this client has bubbles disabled, obscure the bubble
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
*/
|
||||
/*
|
||||
// find the suffix, if bot, human or monkey
|
||||
var/punctuation = ""
|
||||
if(presay == "bot" || presay == "")
|
||||
var/ending = copytext(text, length(text))
|
||||
if (ending == "?")
|
||||
punctuation = "question"
|
||||
else if (ending == "!")
|
||||
punctuation = "exclamation"
|
||||
else
|
||||
punctuation = ""
|
||||
|
||||
// flick the bubble
|
||||
flick("[presay]say[punctuation]", B)
|
||||
|
||||
if(istype(loc, /turf))
|
||||
B.loc = loc
|
||||
else
|
||||
B.loc = loc.loc
|
||||
|
||||
spawn()
|
||||
sleep(11)
|
||||
del(B)
|
||||
*/
|
||||
|
||||
if (length(heard_b))
|
||||
var/message_b
|
||||
|
||||
if (voice_message)
|
||||
message_b = voice_message
|
||||
else
|
||||
message_b = tajspeak(message)
|
||||
message_b = say_quote(message_b)
|
||||
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
|
||||
|
||||
|
||||
/*
|
||||
// Create speech bubble
|
||||
var/obj/effect/speech_bubble/B = new/obj/effect/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
// Determine if the speech bubble's going to have a special look
|
||||
var/presay = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
presay = "bot"
|
||||
if(istype(src, /mob/living/carbon/alien))
|
||||
presay = "xeno"
|
||||
if(istype(src, /mob/living/carbon/metroid))
|
||||
presay = "metroid"
|
||||
*/
|
||||
|
||||
for (var/mob/M in heard_b)
|
||||
M.show_message(rendered, 2)
|
||||
M << speech_bubble
|
||||
spawn(30) del(speech_bubble)
|
||||
|
||||
/*
|
||||
if(M.client)
|
||||
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('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)
|
||||
*/
|
||||
200
code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
Normal file
200
code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dm
Normal file
@@ -0,0 +1,200 @@
|
||||
/mob/living/carbon/human/tajaran
|
||||
name = "tajaran"
|
||||
real_name = "tajaran"
|
||||
voice_name = "tajaran"
|
||||
icon = 'tajaran.dmi'
|
||||
var/list/tajspeak_letters
|
||||
|
||||
/mob/living/carbon/human/tajaran/New()
|
||||
tajspeak_letters = new/list("~","*","-")
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
if(!dna) dna = new /datum/dna(null)
|
||||
|
||||
new /datum/organ/external/chest(src)
|
||||
new /datum/organ/external/groin(src)
|
||||
new /datum/organ/external/head(src)
|
||||
new /datum/organ/external/l_arm(src)
|
||||
new /datum/organ/external/r_arm(src)
|
||||
new /datum/organ/external/r_leg(src)
|
||||
new /datum/organ/external/l_leg(src)
|
||||
|
||||
var/datum/organ/external/part = new /datum/organ/external/l_hand(src)
|
||||
part.parent = organs["l_arm"]
|
||||
part = new /datum/organ/external/l_foot(src)
|
||||
part.parent = organs["l_leg"]
|
||||
part = new /datum/organ/external/r_hand(src)
|
||||
part.parent = organs["r_arm"]
|
||||
part = new /datum/organ/external/r_foot(src)
|
||||
part.parent = organs["r_leg"]
|
||||
|
||||
debug_leftarm = organs["l_arm"]
|
||||
debug_lefthand = organs["l_hand"]
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
else
|
||||
gender = MALE
|
||||
g = "m"
|
||||
|
||||
spawn (1)
|
||||
if(!stand_icon)
|
||||
stand_icon = new /icon('tajaran.dmi', "body_[g]_s")
|
||||
if(!lying_icon)
|
||||
lying_icon = new /icon('tajaran.dmi', "body_[g]_l")
|
||||
icon = stand_icon
|
||||
update_clothing()
|
||||
src << "\blue Your icons have been generated!"
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/tajaran/update_body()
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
if(lying_icon)
|
||||
del(lying_icon)
|
||||
|
||||
if (mutantrace)
|
||||
return
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
stand_icon = new /icon('tajaran.dmi', "torso_s")
|
||||
lying_icon = new /icon('tajaran.dmi', "torso_l")
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
//var/obese = (mutations & FAT)
|
||||
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "chest_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(!head.destroyed)
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "head_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "head_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/part = organs[name]
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& !part.destroyed)
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "[part.icon_name]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "[part.icon_name]_l"), ICON_OVERLAY)
|
||||
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "groin_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
if (husk)
|
||||
var/icon/husk_s = new /icon('tajaran.dmi', "husk_s")
|
||||
var/icon/husk_l = new /icon('tajaran.dmi', "husk_l")
|
||||
|
||||
for(var/name in organs)
|
||||
var/datum/organ/external/part = organs[name]
|
||||
if(!istype(part, /datum/organ/external/groin) \
|
||||
&& !istype(part, /datum/organ/external/chest) \
|
||||
&& !istype(part, /datum/organ/external/head) \
|
||||
&& part.destroyed)
|
||||
husk_s.Blend(new /icon('dam_mask.dmi', "[part.icon_name]"), ICON_SUBTRACT)
|
||||
husk_l.Blend(new /icon('dam_mask.dmi', "[part.icon_name]2"), ICON_SUBTRACT)
|
||||
|
||||
stand_icon.Blend(husk_s, ICON_OVERLAY)
|
||||
lying_icon.Blend(husk_l, ICON_OVERLAY)
|
||||
/*else if(obese)
|
||||
stand_icon.Blend(new /icon('human.dmi', "fatbody_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('human.dmi', "fatbody_l"), ICON_OVERLAY)*/
|
||||
|
||||
// Skin tone
|
||||
if (s_tone >= 0)
|
||||
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
|
||||
else
|
||||
stand_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
|
||||
|
||||
if (underwear > 0)
|
||||
//if(!obese)
|
||||
stand_icon.Blend(new /icon('tajaran.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
|
||||
lying_icon.Blend(new /icon('tajaran.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
|
||||
|
||||
/mob/living/carbon/human/tajaran/update_face()
|
||||
if(organs)
|
||||
var/datum/organ/external/head = organs["head"]
|
||||
if(head)
|
||||
if(head.destroyed)
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
return
|
||||
|
||||
if(!facial_hair_style || !hair_style) return//Seems people like to lose their icons, this should stop the runtimes for now
|
||||
del(face_standing)
|
||||
del(face_lying)
|
||||
|
||||
if (mutantrace)
|
||||
return
|
||||
|
||||
var/g = "m"
|
||||
if (gender == MALE)
|
||||
g = "m"
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "eyes_s")
|
||||
var/icon/eyes_l = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "eyes_l")
|
||||
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
eyes_l.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
|
||||
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
var/icon/hair_l = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
|
||||
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
hair_l.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
var/icon/facial_l = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
|
||||
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
facial_l.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
|
||||
var/icon/mouth_s = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "mouth_[g]_s")
|
||||
var/icon/mouth_l = new/icon("icon" = 'tajaran_face.dmi', "icon_state" = "mouth_[g]_l")
|
||||
|
||||
// if the head or mask has the flag BLOCKHAIR (equal to 5), then do not apply hair
|
||||
if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR)))
|
||||
eyes_s.Blend(hair_s, ICON_OVERLAY)
|
||||
eyes_l.Blend(hair_l, ICON_OVERLAY)
|
||||
|
||||
eyes_s.Blend(mouth_s, ICON_OVERLAY)
|
||||
eyes_l.Blend(mouth_l, ICON_OVERLAY)
|
||||
|
||||
// if BLOCKHAIR, do not apply facial hair
|
||||
if((!(head && (head.flags & BLOCKHAIR))) && !(wear_mask && (wear_mask.flags & BLOCKHAIR)))
|
||||
eyes_s.Blend(facial_s, ICON_OVERLAY)
|
||||
eyes_l.Blend(facial_l, ICON_OVERLAY)
|
||||
|
||||
|
||||
face_standing = new /image()
|
||||
face_lying = new /image()
|
||||
face_standing.icon = eyes_s
|
||||
face_standing.layer = MOB_LAYER
|
||||
face_lying.icon = eyes_l
|
||||
face_lying.layer = MOB_LAYER
|
||||
|
||||
del(mouth_l)
|
||||
del(mouth_s)
|
||||
del(facial_l)
|
||||
del(facial_s)
|
||||
del(hair_l)
|
||||
del(hair_s)
|
||||
del(eyes_l)
|
||||
del(eyes_s)
|
||||
|
||||
/mob/living/carbon/human/tajaran/co2overloadtime = null
|
||||
/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70
|
||||
BIN
code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi
Normal file
BIN
code/WorkInProgress/Cael_Aislinn/Tajara/tajaran.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
code/WorkInProgress/Cael_Aislinn/Tajara/tajaran_face.dmi
Normal file
BIN
code/WorkInProgress/Cael_Aislinn/Tajara/tajaran_face.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user