Conflict fix

This commit is contained in:
Kelenius
2015-02-03 23:29:08 +03:00
726 changed files with 5866 additions and 41149 deletions

View File

@@ -26,7 +26,7 @@
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele
@@ -143,7 +143,7 @@ Works together with spawning an observer, noted above.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
ghost.key = key
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost
@@ -409,7 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
see_invisible = SEE_INVISIBLE_OBSERVER
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
else
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
@@ -557,8 +557,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(src.invisibility != 0)
user.visible_message( \
"<span class='warning'>[user] drags ghost, [src], to our plan of reality!</span>", \
"<span class='warning'>You drag [src] to our plan of reality!</span>" \
"<span class='warning'>[user] drags ghost, [src], to our plane of reality!</span>", \
"<span class='warning'>You drag [src] to our plane of reality!</span>" \
)
toggle_visibility(1)
else

View File

@@ -52,6 +52,8 @@
if(stat == DEAD)
return 0
facing_dir = null
if(!gibbed && deathmessage != "no message") // This is gross, but reliable. Only brains use it.
src.visible_message("<b>\The [src.name]</b> [deathmessage]")

View File

@@ -12,7 +12,7 @@
var/input
if(!message)
input = copytext(sanitize(input(src,"Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
else
input = message
if(input)
@@ -108,7 +108,7 @@
var/input
if(!message)
input = copytext(sanitize(input(src, "Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN)
input = sanitize(copytext(input(src, "Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
else
input = message

View File

@@ -124,18 +124,28 @@
var/changed_voice
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
part_a = "<span class='say_quote'>\[[worldtime2text()]\]</span>" + part_a
var/jobname // the mob's "job"
var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any.
var/mob/living/carbon/human/impersonating //The crew member being impersonated, if any.
if (ishuman(speaker))
var/mob/living/carbon/human/H = speaker
if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice)))
if(H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice))
changed_voice = 1
var/mob/living/carbon/human/I = locate(speaker_name)
var/list/impersonated = new()
var/mob/living/carbon/human/I = impersonated[speaker_name]
if(I)
if(!I)
for(var/mob/living/carbon/human/M in mob_list)
if(M.real_name == speaker_name)
I = M
impersonated[speaker_name] = I
break
// If I's display name is currently different from the voice name and using an agent ID then don't impersonate
// as this would allow the AI to track I and realize the mismatch.
if(I && !(I.name != speaker_name && I.wear_id && istype(I.wear_id,/obj/item/weapon/card/id/syndicate)))
impersonating = I
jobname = impersonating.get_assignment()
else

View File

@@ -40,8 +40,9 @@
/mob/living/var/holder_type
/mob/living/proc/get_scooped(var/mob/living/carbon/grabber)
if(!holder_type)
if(!holder_type || buckled || pinned.len)
return
var/obj/item/weapon/holder/H = new holder_type(loc)
src.loc = H
H.name = loc.name

View File

@@ -144,7 +144,7 @@
syllables = list("rr","rr","tajr","kir","raj","kii","mir","kra","ahk","nal","vah","khaz","jri","ran","darr", \
"mi","jri","dynh","manq","rhe","zar","rrhaz","kal","chur","eech","thaa","dra","jurl","mah","sanu","dra","ii'r", \
"ka","aasi","far","wa","baq","ara","qara","zir","sam","mak","hrar","nja","rir","khan","jun","dar","rik","kah", \
"hal","ket","jurl","mah","tul","cresh","azu","ragh")
"hal","ket","jurl","mah","tul","cresh","azu","ragh", "mro", "mra")
/datum/language/tajaran/get_random_name(var/gender)
@@ -223,7 +223,8 @@
colour = "solcom"
key = "1"
flags = RESTRICTED
syllables = list("tao","shi","tzu","yi","com","be","is","i","op","vi","ed","lec","mo","cle","te","dis","e")
//syllables are at the bottom of the file
/datum/language/human/get_spoken_verb(var/msg_end)
switch(msg_end)
@@ -233,6 +234,15 @@
return ask_verb
return speech_verb
/datum/language/human/get_random_name(var/gender)
if (prob(80))
if(gender==FEMALE)
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
else
return ..()
// Galactic common languages (systemwide accepted standards).
/datum/language/trader
name = "Tradeband"
@@ -424,4 +434,66 @@
dat += "<b>[L.name] (:[L.key])</b><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
return
//Syllable Lists
/*
This list really long, mainly because I can't make up my mind about which mandarin syllables should be removed,
and the english syllables had to be duplicated so that there is roughly a 50-50 weighting.
Sources:
http://www.sttmedia.com/syllablefrequency-english
http://www.chinahighlights.com/travelguide/learning-chinese/pinyin-syllables.htm
*/
/datum/language/human/syllables = list(
"a", "ai", "an", "ang", "ao", "ba", "bai", "ban", "bang", "bao", "bei", "ben", "beng", "bi", "bian", "biao",
"bie", "bin", "bing", "bo", "bu", "ca", "cai", "can", "cang", "cao", "ce", "cei", "cen", "ceng", "cha", "chai",
"chan", "chang", "chao", "che", "chen", "cheng", "chi", "chong", "chou", "chu", "chua", "chuai", "chuan", "chuang", "chui", "chun",
"chuo", "ci", "cong", "cou", "cu", "cuan", "cui", "cun", "cuo", "da", "dai", "dan", "dang", "dao", "de", "dei",
"den", "deng", "di", "dian", "diao", "die", "ding", "diu", "dong", "dou", "du", "duan", "dui", "dun", "duo", "e",
"ei", "en", "er", "fa", "fan", "fang", "fei", "fen", "feng", "fo", "fou", "fu", "ga", "gai", "gan", "gang",
"gao", "ge", "gei", "gen", "geng", "gong", "gou", "gu", "gua", "guai", "guan", "guang", "gui", "gun", "guo", "ha",
"hai", "han", "hang", "hao", "he", "hei", "hen", "heng", "hm", "hng", "hong", "hou", "hu", "hua", "huai", "huan",
"huang", "hui", "hun", "huo", "ji", "jia", "jian", "jiang", "jiao", "jie", "jin", "jing", "jiong", "jiu", "ju", "juan",
"jue", "jun", "ka", "kai", "kan", "kang", "kao", "ke", "kei", "ken", "keng", "kong", "kou", "ku", "kua", "kuai",
"kuan", "kuang", "kui", "kun", "kuo", "la", "lai", "lan", "lang", "lao", "le", "lei", "leng", "li", "lia", "lian",
"liang", "liao", "lie", "lin", "ling", "liu", "long", "lou", "lu", "luan", "lun", "luo", "ma", "mai", "man", "mang",
"mao", "me", "mei", "men", "meng", "mi", "mian", "miao", "mie", "min", "ming", "miu", "mo", "mou", "mu", "na",
"nai", "nan", "nang", "nao", "ne", "nei", "nen", "neng", "ng", "ni", "nian", "niang", "niao", "nie", "nin", "ning",
"niu", "nong", "nou", "nu", "nuan", "nuo", "o", "ou", "pa", "pai", "pan", "pang", "pao", "pei", "pen", "peng",
"pi", "pian", "piao", "pie", "pin", "ping", "po", "pou", "pu", "qi", "qia", "qian", "qiang", "qiao", "qie", "qin",
"qing", "qiong", "qiu", "qu", "quan", "que", "qun", "ran", "rang", "rao", "re", "ren", "reng", "ri", "rong", "rou",
"ru", "rua", "ruan", "rui", "run", "ruo", "sa", "sai", "san", "sang", "sao", "se", "sei", "sen", "seng", "sha",
"shai", "shan", "shang", "shao", "she", "shei", "shen", "sheng", "shi", "shou", "shu", "shua", "shuai", "shuan", "shuang", "shui",
"shun", "shuo", "si", "song", "sou", "su", "suan", "sui", "sun", "suo", "ta", "tai", "tan", "tang", "tao", "te",
"teng", "ti", "tian", "tiao", "tie", "ting", "tong", "tou", "tu", "tuan", "tui", "tun", "tuo", "wa", "wai", "wan",
"wang", "wei", "wen", "weng", "wo", "wu", "xi", "xia", "xian", "xiang", "xiao", "xie", "xin", "xing", "xiong", "xiu",
"xu", "xuan", "xue", "xun", "ya", "yan", "yang", "yao", "ye", "yi", "yin", "ying", "yong", "you", "yu", "yuan",
"yue", "yun", "za", "zai", "zan", "zang", "zao", "ze", "zei", "zen", "zeng", "zha", "zhai", "zhan", "zhang", "zhao",
"zhe", "zhei", "zhen", "zheng", "zhi", "zhong", "zhou", "zhu", "zhua", "zhuai", "zhuan", "zhuang", "zhui", "zhun", "zhuo", "zi",
"zong", "zou", "zuan", "zui", "zun", "zuo", "zu",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")

View File

@@ -7,6 +7,7 @@
pass_flags = PASSTABLE
health = 100
maxHealth = 100
mob_size = 4
var/adult_form
var/dead_icon

View File

@@ -31,6 +31,7 @@
M.put_in_active_hand(G)
grabbed_by += G
G.affecting = src
G.synch()
LAssailant = M

View File

@@ -14,4 +14,21 @@
..()
species = all_species["Diona"]
verbs += /mob/living/carbon/alien/diona/proc/merge
verbs += /mob/living/carbon/alien/diona/proc/merge
/mob/living/carbon/alien/diona/start_pulling(var/atom/movable/AM)
//TODO: Collapse these checks into one proc (see pai and drone)
if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class > 2)
src << "<span class='warning'>You are too small to pull that.</span>"
return
else
..()
else
src << "<span class='warning'>You are too small to pull that.</span>"
return
/mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1

View File

@@ -3,7 +3,6 @@
health = 400 //They need to live awhile longer than other organs.
desc = "A piece of juicy meat found in a person's head."
icon_state = "brain2"
flags = TABLEPASS
force = 1.0
w_class = 2.0
throwforce = 1.0

View File

@@ -354,6 +354,8 @@
else if (W == handcuffed)
handcuffed = null
update_inv_handcuffed()
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
else if (W == legcuffed)
legcuffed = null

View File

@@ -1,18 +1,14 @@
/mob/living/carbon/verb/give()
mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr)
set category = "IC"
set name = "Give"
set src in view(1)
if(src.stat == 2 || usr.stat == 2 || src.client == null)
return
if(src == usr)
usr << "\red I feel stupider, suddenly."
if(target.stat == 2 || usr.stat == 2|| target.client == null)
return
var/obj/item/I
if(!usr.hand && usr.r_hand == null)
usr << "\red You don't have anything in your right hand to give to [src.name]"
usr << "<span class='warning'>You don't have anything in your right hand to give to [target.name]</span>"
return
if(usr.hand && usr.l_hand == null)
usr << "\red You don't have anything in your left hand to give to [src.name]"
usr << "<span class='warning'>You don't have anything in your left hand to give to [target.name]</span>"
return
if(usr.hand)
I = usr.l_hand
@@ -20,38 +16,38 @@
I = usr.r_hand
if(!I)
return
if(src.r_hand == null || src.l_hand == null)
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
if(target.r_hand == null || target.l_hand == null)
switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No"))
if("Yes")
if(!I)
return
if(!Adjacent(usr))
usr << "\red You need to stay in reaching distance while giving an object."
src << "\red [usr.name] moved too far away."
usr << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
target << "<span class='warning'>[usr.name] moved too far away.</span>"
return
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
usr << "\red You need to keep the item in your active hand."
src << "\red [usr.name] seem to have given up on giving \the [I.name] to you."
usr << "<span class='warning'>You need to keep the item in your active hand.</span>"
target << "<span class='warning'>[usr.name] seem to have given up on giving \the [I.name] to you.</span>"
return
if(src.r_hand != null && src.l_hand != null)
src << "\red Your hands are full."
usr << "\red Their hands are full."
if(target.r_hand != null && target.l_hand != null)
target << "<span class='warning'>Your hands are full.</span>"
usr << "<span class='warning'>Their hands are full.</span>"
return
else
usr.drop_item()
if(src.r_hand == null)
src.r_hand = I
if(target.r_hand == null)
target.r_hand = I
else
src.l_hand = I
I.loc = src
target.l_hand = I
I.loc = target
I.layer = 20
I.add_fingerprint(src)
src.update_inv_l_hand()
src.update_inv_r_hand()
I.add_fingerprint(target)
target.update_inv_l_hand()
target.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].")
target.visible_message("<span class='notice'>[usr.name] handed \the [I.name] to [target.name].</span>")
if("No")
src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
target.visible_message("<span class='warning'>[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.</span>")
else
usr << "\red [src.name]'s hands are full."
usr << "<span class='warning'>[target.name]'s hands are full.</span>"

View File

@@ -0,0 +1,149 @@
// MEDICAL SIDE EFFECT BASE
// ========================
/datum/medical_effect
var/name = "None"
var/strength = 0
var/start = 0
var/list/triggers
var/list/cures
var/cure_message
/datum/medical_effect/proc/manifest(mob/living/carbon/human/H)
for(var/R in cures)
if(H.reagents.has_reagent(R))
return 0
for(var/R in triggers)
if(H.reagents.get_reagent_amount(R) >= triggers[R])
return 1
return 0
/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
return
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
for(var/R in cures)
if(H.reagents.has_reagent(R))
if (cure_message)
H <<"\blue [cure_message]"
return 1
return 0
// MOB HELPERS
// ===========
/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
/mob/proc/add_side_effect(name, strength = 0)
/mob/living/carbon/human/add_side_effect(name, strength = 0)
for(var/datum/medical_effect/M in src.side_effects)
if(M.name == name)
M.strength = max(M.strength, 10)
M.start = life_tick
return
var/T = side_effects[name]
if (!T)
return
var/datum/medical_effect/M = new T
if(M.name == name)
M.strength = strength
M.start = life_tick
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
//Going to handle those things only every few ticks.
if(life_tick % 15 != 0)
return 0
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
for(var/T in L)
var/datum/medical_effect/M = new T
if (M.manifest(src))
src.add_side_effect(M.name)
// One full cycle(in terms of strength) every 10 minutes
for (var/datum/medical_effect/M in side_effects)
if (!M) continue
var/strength_percent = sin((life_tick - M.start) / 2)
// Only do anything if the effect is currently strong enough
if(strength_percent >= 0.4)
if (M.cure(src) || M.strength > 50)
side_effects -= M
M = null
else
if(life_tick % 45 == 0)
M.on_life(src, strength_percent*M.strength)
// Effect slowly growing stronger
M.strength+=0.08
// HEADACHE
// ========
/datum/medical_effect/headache
name = "Headache"
triggers = list("cryoxadone" = 10, "bicaridine" = 15, "tricordrazine" = 15)
cures = list("alkysine", "tramadol", "paracetamol", "oxycodone")
cure_message = "Your head stops throbbing..."
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a light pain in your head.",0)
if(11 to 30)
H.custom_pain("You feel a throbbing pain in your head!",1)
if(31 to INFINITY)
H.custom_pain("You feel an excrutiating pain in your head!",1)
// BAD STOMACH
// ===========
/datum/medical_effect/bad_stomach
name = "Bad Stomach"
triggers = list("kelotane" = 30, "dermaline" = 15)
cures = list("anti_toxin")
cure_message = "Your stomach feels a little better now..."
/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a bit light around the stomach.",0)
if(11 to 30)
H.custom_pain("Your stomach hurts.",0)
if(31 to INFINITY)
H.custom_pain("You feel sick.",1)
// CRAMPS
// ======
/datum/medical_effect/cramps
name = "Cramps"
triggers = list("anti_toxin" = 30, "tramadol" = 15)
cures = list("inaprovaline")
cure_message = "The cramps let up..."
/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("The muscles in your body hurt a little.",0)
if(11 to 30)
H.custom_pain("The muscles in your body cramp up painfully.",0)
if(31 to INFINITY)
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
H.custom_pain("There's pain all over your body.",1)
// ITCH
// ====
/datum/medical_effect/itch
name = "Itch"
triggers = list("space_drugs" = 10)
cures = list("inaprovaline")
cure_message = "The itching stops..."
/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a slight itch.",0)
if(11 to 30)
H.custom_pain("You want to scratch your itch badly.",0)
if(31 to INFINITY)
H.emote("me",1,"shivers slightly.")
H.custom_pain("This itch makes it really hard to concentrate.",1)

View File

@@ -0,0 +1,149 @@
// MEDICAL SIDE EFFECT BASE
// ========================
/datum/medical_effect
var/name = "None"
var/strength = 0
var/start = 0
var/list/triggers
var/list/cures
var/cure_message
/datum/medical_effect/proc/manifest(mob/living/carbon/human/H)
for(var/R in cures)
if(H.reagents.has_reagent(R))
return 0
for(var/R in triggers)
if(H.reagents.get_reagent_amount(R) >= triggers[R])
return 1
return 0
/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
return
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
for(var/R in cures)
if(H.reagents.has_reagent(R))
if (cure_message)
H <<"\blue [cure_message]"
return 1
return 0
// MOB HELPERS
// ===========
/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
/mob/proc/add_side_effect(name, strength = 0)
/mob/living/carbon/human/add_side_effect(name, strength = 0)
for(var/datum/medical_effect/M in src.side_effects)
if(M.name == name)
M.strength = max(M.strength, 10)
M.start = life_tick
return
var/T = side_effects[name]
if (!T)
return
var/datum/medical_effect/M = new T
if(M.name == name)
M.strength = strength
M.start = life_tick
side_effects += M
/mob/living/carbon/human/proc/handle_medical_side_effects()
//Going to handle those things only every few ticks.
if(life_tick % 15 != 0)
return 0
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
for(var/T in L)
var/datum/medical_effect/M = new T
if (M.manifest(src))
src.add_side_effect(M.name)
// One full cycle(in terms of strength) every 10 minutes
for (var/datum/medical_effect/M in side_effects)
if (!M) continue
var/strength_percent = sin((life_tick - M.start) / 2)
// Only do anything if the effect is currently strong enough
if(strength_percent >= 0.4)
if (M.cure(src) || M.strength > 50)
side_effects -= M
M = null
else
if(life_tick % 45 == 0)
M.on_life(src, strength_percent*M.strength)
// Effect slowly growing stronger
M.strength+=0.08
// HEADACHE
// ========
/datum/medical_effect/headache
name = "Headache"
triggers = list("cryoxadone" = 10, "bicaridine" = 15, "tricordrazine" = 15)
cures = list("alkysine", "tramadol", "paracetamol", "oxycodone")
cure_message = "Your head stops throbbing..."
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a light pain in your head.",0)
if(11 to 30)
H.custom_pain("You feel a throbbing pain in your head!",1)
if(31 to INFINITY)
H.custom_pain("You feel an excrutiating pain in your head!",1)
// BAD STOMACH
// ===========
/datum/medical_effect/bad_stomach
name = "Bad Stomach"
triggers = list("kelotane" = 30, "dermaline" = 15)
cures = list("anti_toxin")
cure_message = "Your stomach feels a little better now..."
/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a bit light around the stomach.",0)
if(11 to 30)
H.custom_pain("Your stomach hurts.",0)
if(31 to INFINITY)
H.custom_pain("You feel sick.",1)
// CRAMPS
// ======
/datum/medical_effect/cramps
name = "Cramps"
triggers = list("anti_toxin" = 30, "tramadol" = 15)
cures = list("inaprovaline")
cure_message = "The cramps let up..."
/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("The muscles in your body hurt a little.",0)
if(11 to 30)
H.custom_pain("The muscles in your body cramp up painfully.",0)
if(31 to INFINITY)
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
H.custom_pain("There's pain all over your body.",1)
// ITCH
// ====
/datum/medical_effect/itch
name = "Itch"
triggers = list("space_drugs" = 10)
cures = list("inaprovaline")
cure_message = "The itching stops..."
/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
switch(strength)
if(1 to 10)
H.custom_pain("You feel a slight itch.",0)
if(11 to 30)
H.custom_pain("You want to scratch your itch badly.",0)
if(31 to INFINITY)
H.emote("me",1,"shivers slightly.")
H.custom_pain("This itch makes it really hard to concentrate.",1)

View File

@@ -50,7 +50,7 @@
m_type = 1
if ("custom")
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
if (!input)
return
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
@@ -577,7 +577,7 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"

View File

@@ -120,7 +120,7 @@
else
msg += "[t_He] [t_has] \icon[gloves] \a [gloves] on [t_his] hands.\n"
else if(blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] blood-stained hands!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] [(hand_blood_color != "#030303") ? "blood" : "oil"]-stained hands!</span>\n"
//handcuffed?
@@ -131,6 +131,10 @@
else
msg += "<span class='warning'>[t_He] [t_is] \icon[handcuffed] handcuffed!</span>\n"
//buckled
if(buckled)
msg += "<span class='warning'>[t_He] [t_is] \icon[buckled] buckled to [buckled]!</span>\n"
//belt
if(belt)
if(belt.blood_DNA)
@@ -145,7 +149,7 @@
else
msg += "[t_He] [t_is] wearing \icon[shoes] \a [shoes] on [t_his] feet.\n"
else if(feet_blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] blood-stained feet!</span>\n"
msg += "<span class='warning'>[t_He] [t_has] [(feet_blood_color != "#030303") ? "blood" : "oil"]-stained feet!</span>\n"
//mask
if(wear_mask && !skipmask)
@@ -219,7 +223,10 @@
usr << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
else
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
if(fire_stacks)
msg += "[t_He] [t_is] covered in some liquid.\n"
if(on_fire)
msg += "<span class='warning'>[t_He] [t_is] on fire!.</span>\n"
msg += "<span class='warning'>"
if(nutrition < 100)

View File

@@ -499,7 +499,7 @@
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
var/t1 = copytext(sanitize(input("Add Comment:", "Sec. records", null, null) as message),1,MAX_MESSAGE_LEN)
var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
@@ -628,7 +628,7 @@
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
@@ -871,6 +871,7 @@
else
target.show_message("\blue You hear a voice that seems to echo around the room: [say]")
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
log_say("[key_name(usr)] sent a telepathic message to [key_name(target)]: [say]")
for(var/mob/dead/observer/G in world)
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
@@ -946,12 +947,13 @@
// This will ignore any prosthetics in the prefs currently.
species.create_organs(src)
for (var/obj/item/organ/brain/H in world)
if(H.brainmob)
if(H.brainmob.real_name == src.real_name)
if(H.brainmob.mind)
H.brainmob.mind.transfer_to(src)
del(H)
if(!client || !key) //Don't boot out anyone already in the mob.
for (var/obj/item/organ/brain/H in world)
if(H.brainmob)
if(H.brainmob.real_name == src.real_name)
if(H.brainmob.mind)
H.brainmob.mind.transfer_to(src)
del(H)
for(var/datum/organ/internal/I in internal_organs)
I.damage = 0

View File

@@ -120,7 +120,7 @@ emp_act
/mob/living/carbon/human/proc/getarmor_organ(var/datum/organ/external/def_zone, var/type)
if(!type) return 0
var/protection = 0
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform)
var/list/protective_gear = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes)
for(var/gear in protective_gear)
if(gear && istype(gear ,/obj/item/clothing))
var/obj/item/clothing/C = gear
@@ -297,11 +297,11 @@ emp_act
return 1
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5)
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)
if(istype(AM,/obj/))
var/obj/O = AM
if(in_throw_mode && !get_active_hand() && speed <= 5) //empty active hand and we're in throw mode
if(in_throw_mode && !get_active_hand() && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
if(canmove && !restrained())
if(isturf(O.loc))
put_in_active_hand(O)
@@ -313,7 +313,7 @@ emp_act
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
var/throw_damage = O.throwforce*(speed/5)
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
var/zone
if (istype(O.thrower, /mob/living))
@@ -375,9 +375,9 @@ emp_act
affecting.embed(I)
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
if(O.throw_source && speed >= THROWNOBJ_KNOCKBACK_SPEED)
var/obj/item/weapon/W = O
var/momentum = speed/2
var/momentum = speed/THROWNOBJ_KNOCKBACK_DIVISOR
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")

View File

@@ -47,7 +47,7 @@
tally += 0.5
else if(E.status & ORGAN_BROKEN)
tally += 1.5
if(shock_stage >= 10) tally += 3
if(FAT in src.mutations)

View File

@@ -175,7 +175,7 @@
text = input("What would you like to say?", "Speak to creature", null, null)
text = trim(copytext(sanitize(text), 1, MAX_MESSAGE_LEN))
text = trim(sanitize(copytext(text, 1, MAX_MESSAGE_LEN)))
if(!text) return
@@ -213,7 +213,7 @@
set desc = "Whisper silently to someone over a distance."
set category = "Abilities"
var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
var/msg = sanitize(copytext(input("Message:", "Psychic Whisper") as text|null, 1, MAX_MESSAGE_LEN))
if(msg)
log_say("PsychicWhisper: [key_name(src)]->[M.key] : [msg]")
M << "\green You hear a strange, alien voice in your head... \italic [msg]"

View File

@@ -167,6 +167,8 @@
update_inv_back()
else if (W == handcuffed)
handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
success = 1
update_inv_handcuffed()
else if (W == legcuffed)
@@ -417,8 +419,55 @@
for(var/mob/O in viewers(target, null))
O.show_message("\red <B>[source] is trying to put \a [item] on [target]</B>", 1)
else
var/message=null
var/target_part = null
var/obj/item/target_item = null
var/message = null
switch(place)
if("mask")
target_part = "head"
target_item = target.wear_mask
if("l_hand")
target_part = "left hand"
target_item = target.l_hand
if("r_hand")
target_part = "right hand"
target_item = target.r_hand
if("gloves")
target_part = "hands"
target_item = target.gloves
if("eyes")
target_part = "eyes"
target_item = target.glasses
if("l_ear")
target_part = "left ear"
target_item = target.l_ear
if("r_ear")
target_part = "right ear"
target_item = target.r_ear
if("head")
target_part = "head"
target_item = target.head
if("shoes")
target_part = "feet"
target_item = target.shoes
if("belt")
target_part = "waist"
target_item = target.belt
if("suit")
target_part = "body"
target_item = target.wear_suit
if("back")
target_part = "back"
target_item = target.back
if("s_store")
target_part = "suit"
target_item = target.s_store
if("id")
target_part = "uniform"
target_item = target.wear_id
if("syringe")
message = "\red <B>[source] is trying to inject [target]!</B>"
if("pill")
@@ -427,86 +476,17 @@
message = "\red <B>[source] is trying to force [target] to swallow a gulp of [item]!</B>"
if("dnainjector")
message = "\red <B>[source] is trying to inject [target] with the [item]!</B>"
if("mask")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their mask removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) mask</font>")
if(target.wear_mask && !target.wear_mask.canremove)
message = "\red <B>[source] fails to take off \a [target.wear_mask] from [target]'s head!</B>"
if("uniform")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
if(target.w_uniform && !target.w_uniform.canremove)
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.wear_mask] from [target]'s head!</B>"
if("l_hand")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left hand item ([target.l_hand]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left hand item ([target.l_hand])</font>")
message = "\red <B>[source] is trying to take off \a [target.l_hand] from [target]'s left hand!</B>"
if("r_hand")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right hand item ([target.r_hand]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right hand item ([target.r_hand])</font>")
message = "\red <B>[source] is trying to take off \a [target.r_hand] from [target]'s right hand!</B>"
if("gloves")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their gloves ([target.gloves]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) gloves ([target.gloves])</font>")
if(target.gloves && !target.gloves.canremove)
message = "\red <B>[source] fails to take off \a [target.gloves] from [target]'s hands!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.gloves] from [target]'s hands!</B>"
if("eyes")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their eyewear ([target.glasses]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) eyewear ([target.glasses])</font>")
if(target.glasses && !target.glasses.canremove)
message = "\red <B>[source] fails to take off \a [target.glasses] from [target]'s eyes!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.glasses] from [target]'s eyes!</B>"
if("l_ear")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their left ear item ([target.l_ear]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) left ear item ([target.l_ear])</font>")
if(target.l_ear && !target.l_ear.canremove)
message = "\red <B>[source] fails to take off \a [target.l_ear] from [target]'s left ear!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.l_ear] from [target]'s left ear!</B>"
if("r_ear")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their right ear item ([target.r_ear]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) right ear item ([target.r_ear])</font>")
if(target.r_ear && !target.r_ear.canremove)
message = "\red <B>[source] fails to take off \a [target.r_ear] from [target]'s right ear!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.r_ear] from [target]'s right ear!</B>"
if("head")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their hat ([target.head]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) hat ([target.head])</font>")
if(target.head && !target.head.canremove)
message = "\red <B>[source] fails to take off \a [target.head] from [target]'s head!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.head] from [target]'s head!</B>"
if("shoes")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their shoes ([target.shoes]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) shoes ([target.shoes])</font>")
if(target.shoes && !target.shoes.canremove)
message = "\red <B>[source] fails to take off \a [target.shoes] from [target]'s feet!</B>"
return
else
message = "\red <B>[source] is trying to take off the [target.shoes] from [target]'s feet!</B>"
if("belt")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their belt item ([target.belt]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) belt item ([target.belt])</font>")
message = "\red <B>[source] is trying to take off the [target.belt] from [target]'s belt!</B>"
if("suit")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit ([target.wear_suit]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit ([target.wear_suit])</font>")
if(target.wear_suit && !target.wear_suit.canremove)
message = "\red <B>[source] fails to take off \a [target.wear_suit] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.wear_suit] from [target]'s body!</B>"
if("back")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their back item ([target.back]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) back item ([target.back])</font>")
message = "\red <B>[source] is trying to take off \a [target.back] from [target]'s back!</B>"
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if("handcuff")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unhandcuffed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unhandcuff [target.name]'s ([target.ckey])</font>")
@@ -515,17 +495,6 @@
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was unlegcuffed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to unlegcuff [target.name]'s ([target.ckey])</font>")
message = "\red <B>[source] is trying to unlegcuff [target]!</B>"
if("uniform")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their uniform ([target.w_uniform]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) uniform ([target.w_uniform])</font>")
for(var/obj/item/I in list(target.l_store, target.r_store))
if(I.on_found(source))
return
if(target.w_uniform && !target.w_uniform.canremove)
message = "\red <B>[source] fails to take off \a [target.w_uniform] from [target]'s body!</B>"
return
else
message = "\red <B>[source] is trying to take off \a [target.w_uniform] from [target]'s body!</B>"
if("tie")
var/obj/item/clothing/under/suit = target.w_uniform
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their accessory ([suit.hastie]) removed by [source.name] ([source.ckey])</font>")
@@ -537,10 +506,6 @@
return
else
message = "\red <B>[source] is trying to take off \a [suit.hastie] from [target]'s suit!</B>"
if("s_store")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their suit storage item ([target.s_store]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) suit storage item ([target.s_store])</font>")
message = "\red <B>[source] is trying to take off \a [target.s_store] from [target]'s suit!</B>"
if("pockets")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their pockets emptied by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to empty [target.name]'s ([target.ckey]) pockets</font>")
@@ -553,10 +518,6 @@
del(src)
target.cpr_time = 0
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
if("id")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their ID ([target.wear_id]) removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) ID ([target.wear_id])</font>")
message = "\red <B>[source] is trying to take off [target.wear_id] from [target]'s uniform!</B>"
if("internal")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their internals toggled by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to toggle [target.name]'s ([target.ckey]) internals</font>")
@@ -575,8 +536,18 @@
return
message = "\red <B>[source] is trying to set [target]'s suit sensors!</B>"
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
if(target_item)
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Had their [target_item] removed by [source.name] ([source.ckey])</font>")
source.attack_log += text("\[[time_stamp()]\] <font color='red'>Attempted to remove [target.name]'s ([target.ckey]) [target_item]</font>")
if(target_item.canremove)
message = "<span class='danger'>[source] is trying to take off \a [target_item] from [target]'s [target_part]!</span>"
else
source.visible_message("<span class='danger'>[source] fails to take off \a [target_item] from [target]'s [target_part]!</span>")
return
source.visible_message(message)
spawn( HUMAN_STRIP_DELAY )
done()
return
@@ -671,9 +642,10 @@ It can still be worn/put on as normal.
W.hold.close(usr)
usr.put_in_hands(tie)
suit.hastie = null*/
suit.hastie.on_removed(usr)
suit.hastie = null
target.update_inv_w_uniform()
if(suit && suit.hastie)
suit.hastie.on_removed(usr)
suit.hastie = null
target.update_inv_w_uniform()
if("id")
slot_to_process = slot_wear_id
if (target.wear_id)

View File

@@ -112,6 +112,9 @@
//Handle temperature/pressure differences between body and environment
handle_environment(environment) //Optimized a good bit.
//Check if we're on fire
handle_fire()
//Status updates, death etc.
handle_regular_status_updates() //Optimized a bit
update_canmove()
@@ -407,11 +410,10 @@
loc.assume_air(breath)
//spread some viruses while we are at it
if (virus2.len > 0)
if (prob(10) && get_infection_chance(src))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
if (virus2.len > 0 && prob(10))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
proc/get_breath_from_internal(volume_needed)
@@ -599,8 +601,9 @@
failed_last_breath = 0
adjustOxyLoss(-5)
// Hot air hurts :(
if( (breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if(breath.temperature < species.cold_level_1)
if(prob(20))
@@ -644,6 +647,10 @@
//world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]"
bodytemperature += temp_adj
else if(breath.temperature >= species.heat_discomfort_level)
species.get_environment_discomfort(src,"heat")
else if(breath.temperature <= species.cold_discomfort_level)
species.get_environment_discomfort(src,"cold")
breath.update_values()
return 1
@@ -784,6 +791,8 @@
if (abs(body_temperature_difference) < 0.5)
return //fuck this precision
if (on_fire)
return //too busy for pesky convection
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
@@ -1040,8 +1049,7 @@
if(halloss > 100)
src << "<span class='notice'>You're in too much pain to keep going...</span>"
for(var/mob/O in oviewers(src, null))
O.show_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.", 1)
src.visible_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
@@ -1426,21 +1434,19 @@
client.screen |= G.overlay
if(G.vision_flags)
sight |= G.vision_flags
if(!druggy)
if(!druggy && !seer)
see_invisible = SEE_INVISIBLE_MINIMUM
if(istype(G,/obj/item/clothing/glasses/night))
if(istype(G,/obj/item/clothing/glasses/night) && !seer)
see_invisible = SEE_INVISIBLE_MINIMUM
/* HUD shit goes here, as long as it doesn't modify sight flags */
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
var/obj/item/clothing/glasses/hud/O = G
if(istype(G, /obj/item/clothing/glasses/sunglasses/sechud))
var/obj/item/clothing/glasses/sunglasses/sechud/O = G
if(O.hud) O.hud.process_hud(src)
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
else if(istype(G, /obj/item/clothing/glasses/hud))
var/obj/item/clothing/glasses/hud/O = G
var/obj/item/clothing/glasses/sunglasses/sechud/S = G
O = S.hud
if(istype(O))
O.process_hud(src)
if(!druggy)
see_invisible = SEE_INVISIBLE_LIVING
if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
proc/handle_random_events()
// Puke if toxloss is too high
@@ -1774,5 +1780,15 @@
speech_problem_flag = 1
return stuttering
/mob/living/carbon/human/handle_fire()
if(..())
return
var/burn_temperature = fire_burn_temperature()
var/thermal_protection = get_heat_protection(burn_temperature)
if (thermal_protection < 1 && bodytemperature < burn_temperature)
bodytemperature += round(BODYTEMP_HEATING_MAX*(1-thermal_protection), 1)
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS

View File

@@ -12,13 +12,20 @@
message = trim_strip_html_properly(message)
if(stat == 2)
return say_dead(message)
if(stat)
if(stat == 2)
return say_dead(message)
return
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_mode = parse_message_mode(message, "headset")
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
switch(copytext(message,1,2))
if("*") return emote(copytext(message,2))
if("^") return custom_emote(1, copytext(message,2))
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
@@ -52,9 +59,6 @@
if(ending=="?")
verb="asks"
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
message = trim(message)
if(speech_problem_flag)
@@ -63,7 +67,7 @@
verb = handle_r[2]
speech_problem_flag = handle_r[3]
if(!message || stat)
if(!message || message == "")
return
var/list/obj/item/used_radios = new
@@ -265,45 +269,46 @@
return verb
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
var/list/returns[3]
var/verb = "says"
var/handled = 0
if(silent)
if(silent || (sdisabilities & MUTE))
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(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))
if(message != "")
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("slobbers","slurs")
handled = 1
if(stuttering)
message = stutter(message)
verb = pick("stammers", "stutters")
if(prob(braindam))
message = uppertext(message)
verb = pick("yells like an idiot","says rather loudly")
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 = "yells loudly"
returns[1] = message
returns[2] = verb
returns[3] = handled
return returns

View File

@@ -56,7 +56,7 @@
var/cold_level_3 = 120 // Cold damage level 3 below this point.
var/heat_level_1 = 360 // Heat damage level 1 above this point.
var/heat_level_2 = 400 // Heat damage level 2 above this point.
var/heat_level_3 = 1000 // Heat damage level 2 above this point.
var/heat_level_3 = 1000 // Heat damage level 3 above this point.
var/synth_temp_gain = 0 // IS_SYNTHETIC species will gain this much temperature every second
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
@@ -65,6 +65,20 @@
var/light_dam // If set, mob will be damaged in light over this value and heal in light below its negative.
var/body_temperature = 310.15 // Non-IS_SYNTHETIC species will try to stabilize at this temperature.
// (also affects temperature processing)
var/heat_discomfort_level = 315 // Aesthetic messages about feeling warm.
var/cold_discomfort_level = 285 // Aesthetic messages about feeling chilly.
var/list/heat_discomfort_strings = list(
"You feel sweat drip down your neck.",
"You feel uncomfortably warm.",
"Your skin prickles in the heat."
)
var/list/cold_discomfort_strings = list(
"You feel chilly.",
"You shiver suddely.",
"Your chilly flesh stands out in goosebumps."
)
// HUD data vars.
var/datum/hud_data/hud
var/hud_type
@@ -100,6 +114,27 @@
for(var/u_type in unarmed_types)
unarmed_attacks += new u_type()
/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type)
if(!prob(5))
return
var/covered = 0 // Basic coverage can help.
for(var/obj/item/clothing/clothes in H)
if(H.l_hand == clothes|| H.r_hand == clothes)
continue
if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
covered = 1
break
switch(msg_type)
if("cold")
if(!covered)
H << "<span class='danger'>[pick(cold_discomfort_strings)]</span>"
if("heat")
if(covered)
H << "<span class='danger'>[pick(heat_discomfort_strings)]</span>"
/datum/species/proc/get_random_name(var/gender)
var/datum/language/species_language = all_languages[language]
return species_language.get_random_name(gender)

View File

@@ -35,23 +35,29 @@
if("head", "mouth", "eyes")
// ----- HEAD ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]</span>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
if(1 to 2)
user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
if(3 to 4)
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")]!</span>") //'with spread claws' sounds a little bit odd, just enough that conciseness is better here I think
if(5)
user.visible_message(pick(
"<span class='danger'>[user] rakes \his [pick(attack_noun)] across [target]'s face!</span>",
"<span class='danger'>[user] tears \his [pick(attack_noun)] into [target]'s face!</span>",
))
else
// ----- BODY ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.display_name]!</span>")
/datum/unarmed_attack/claws/strong
attack_verb = list("slash")
attack_verb = list("slashed")
damage = 10
shredding = 1
/datum/unarmed_attack/bite/strong
attack_verb = list("maul")
attack_verb = list("mauled")
damage = 15
shredding = 1

View File

@@ -45,6 +45,20 @@
reagent_tag = IS_UNATHI
base_color = "#066000"
heat_discomfort_level = 295
heat_discomfort_strings = list(
"You feel soothingly warm.",
"You feel the heat sink into your bones.",
"You feel warm enough to take a nap."
)
cold_discomfort_level = 292
cold_discomfort_strings = list(
"You feel chilly.",
"You feel sluggish and cold.",
"Your scales bristle against the cold."
)
/datum/species/tajaran
name = "Tajara"
name_plural = "Tajaran"
@@ -54,6 +68,9 @@
tail = "tajtail"
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
darksight = 8
slowdown = -1
brute_mod = 1.2
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \
influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \
@@ -75,6 +92,14 @@
flesh_color = "#AFA59E"
base_color = "#333333"
heat_discomfort_level = 292
heat_discomfort_strings = list(
"Your fur prickles in the heat.",
"You feel uncomfortably warm.",
"Your overheated skin itches."
)
cold_discomfort_level = 275
/datum/species/skrell
name = "Skrell"
name_plural = "Skrell"

View File

@@ -15,7 +15,7 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "facehugger"
item_state = "facehugger"
w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | AIRTIGHT
flags = MASKCOVERSMOUTH | MASKCOVERSEYES | AIRTIGHT
body_parts_covered = FACE|EYES
throw_range = 5

View File

@@ -35,17 +35,18 @@
switch(zone) // strong punches can have effects depending on where they hit
if("head", "mouth", "eyes")
// Induce blurriness
target.visible_message("<span class='danger'>[target] looks dazed.</span>", "<span class='danger'>You see stars.</span>")
target.visible_message("<span class='danger'>[target] looks momentarily disoriented.</span>", "<span class='danger'>You see stars.</span>")
target.apply_effect(attack_damage*2, EYE_BLUR, armour)
if("l_arm", "l_hand")
if (target.l_hand)
// Disarm left hand
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.l_hand][pick("", " with a scream")]!</span>")
//Urist McAssistant dropped the macguffin with a scream just sounds odd. Plus it doesn't work with NO_PAIN
target.visible_message("<span class='danger'>\The [target.l_hand] was knocked right out of [src]'s grasp!</span>")
target.drop_l_hand()
if("r_arm", "r_hand")
if (target.r_hand)
// Disarm right hand
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.r_hand][pick("", " with a scream")]!</span>")
target.visible_message("<span class='danger'>\The [target.r_hand] was knocked right out of [src]'s grasp!</span>")
target.drop_r_hand()
if("chest")
if(!target.lying)
@@ -113,21 +114,30 @@
if("head", "mouth", "eyes")
// ----- HEAD ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>")
if(5) user.visible_message("<span class='danger'>[user] gave [target] a resounding slap to the face!</span>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_let", "l_foot", "r_foot")
if(1 to 2)
user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
if(3 to 4)
user.visible_message(pick(
80; "<span class='danger'>[user] [pick(attack_verb)] [target] in the head!</span>", //striking someone with a 'closed fist' is called punching them.
20; "<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>"
))
if(5)
user.visible_message(pick(
10; "<span class='danger'>[user] gave [target] a resounding slap to the face!</span>",
90; "<span class='danger'>[user] smashed \his [pick(attack_noun)] into [target]'s [organ]!</span>"
))
else
// ----- BODY ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target]'s [organ]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] slammed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] smashed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
else
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>")
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "slammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>") //why do we have a separate set of verbs for lying targets?
/datum/unarmed_attack/kick
attack_verb = list("kicked", "kneed")
attack_noun = list("kick", "knee strike")
attack_verb = list("kicked", "kicked", "kicked", "kneed")
attack_noun = list("kick", "kick", "kick", "knee strike")
attack_sound = "swing_hit"
damage = 0
@@ -161,7 +171,7 @@
attack_damage = Clamp(attack_damage, 1, 5)
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] gave [target] a light [pick(attack_noun)] to the [organ]!</span>")
if(1 to 2) user.visible_message("<span class='danger'>[user] threw [target] a glancing [pick(attack_noun)] to the [organ]!</span>") //it's not that they're kicking lightly, it's that the kick didn't quite connect
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] landed a strong [pick(attack_noun)] against [target]'s [organ]!</span>")
@@ -204,6 +214,6 @@
attack_damage = Clamp(attack_damage, 1, 5)
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] [pick("clomped on", "treaded on")] [target]'s [organ]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped down on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a devastating stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>")
if(1 to 2) user.visible_message("<span class='danger'>[user] [pick("stepped on", "treaded on")] [target]'s [organ]!</span>") //stepped on conveys the same meaning and is more recognizable as an actual word than "clomped"
if(3 to 4) user.visible_message("<span class='danger'>[pick("[user] stomped on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down onto")] [target]'s [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/

View File

@@ -126,8 +126,9 @@ Please contact me on #coderbus IRC. ~Carn x
#define LEGCUFF_LAYER 19
#define L_HAND_LAYER 20
#define R_HAND_LAYER 21
#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 22
#define FIRE_LAYER 22 //If you're on fire
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
#define TOTAL_LAYERS 23
//////////////////////////////////
/mob/living/carbon/human
@@ -508,6 +509,7 @@ proc/get_damage_icon_part(damage_state, body_part)
update_inv_handcuffed(0)
update_inv_legcuffed(0)
update_inv_pockets(0)
update_fire(0)
UpdateDamageIcon()
update_icons()
//Hud Stuff
@@ -911,6 +913,13 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons) update_icons()
/mob/living/carbon/human/update_fire(var/update_icons=1)
overlays_standing[FIRE_LAYER] = null
if(on_fire)
overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
if(update_icons) update_icons()
// Used mostly for creating head items
/mob/living/carbon/human/proc/generate_head_icon()
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
@@ -969,4 +978,5 @@ proc/get_damage_icon_part(damage_state, body_part)
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef TARGETED_LAYER
#undef FIRE_LAYER
#undef TOTAL_LAYERS

View File

@@ -5,7 +5,7 @@
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
return
message = trim_strip_html_properly(message)
log_whisper("[src.name]/[src.key] : [message]")
@@ -36,6 +36,11 @@
//This is used by both the whisper verb and human/say() to handle whispering
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
var/message_range = 1
var/eavesdropping_range = 2
var/watching_range = 5
@@ -55,17 +60,19 @@
message = capitalize(trim(message))
//TODO: handle_speech_problems for silent
if (!message || silent || miming)
return
if(speech_problem_flag)
var/list/handle_r = handle_speech_problems(message)
message = handle_r[1]
verb = handle_r[2]
if(verb == "yells loudly")
verb = "slurs emphatically"
else
var/adverb = pick("quietly", "softly")
verb = "[verb] [adverb]"
// Mute disability
//TODO: handle_speech_problems
if (src.sdisabilities & MUTE)
return
speech_problem_flag = handle_r[3]
//TODO: handle_speech_problems
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
if(!message || message=="")
return
//looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems?
@@ -102,10 +109,6 @@
message = replacetext(message, "u", "<22>")
message = replacetext(message, "b", "<22>")
//TODO: handle_speech_problems
if (src.stuttering)
message = stutter(message)
var/list/listening = hearers(message_range, src)
listening |= src

View File

@@ -423,4 +423,372 @@
/mob/living/carbon/slime/can_use_vents()
if(Victim)
return "You cannot ventcrawl while feeding."
..()
/obj/item/slime_extract
name = "slime extract"
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi'
icon_state = "grey slime extract"
force = 1.0
w_class = 1.0
throwforce = 0
throw_speed = 3
throw_range = 6
origin_tech = "biotech=4"
var/Uses = 1 // uses before it goes inert
var/enhanced = 0 //has it been enhanced before?
attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/slimesteroid2))
if(enhanced == 1)
user << "<span class='warning'> This extract has already been enhanced!</span>"
return ..()
if(Uses == 0)
user << "<span class='warning'> You can't enhance a used extract!</span>"
return ..()
user <<"You apply the enhancer. It now has triple the amount of uses."
Uses = 3
enhanced = 1
del(O)
/obj/item/slime_extract/New()
..()
create_reagents(100)
/obj/item/slime_extract/grey
name = "grey slime extract"
icon_state = "grey slime extract"
/obj/item/slime_extract/gold
name = "gold slime extract"
icon_state = "gold slime extract"
/obj/item/slime_extract/silver
name = "silver slime extract"
icon_state = "silver slime extract"
/obj/item/slime_extract/metal
name = "metal slime extract"
icon_state = "metal slime extract"
/obj/item/slime_extract/purple
name = "purple slime extract"
icon_state = "purple slime extract"
/obj/item/slime_extract/darkpurple
name = "dark purple slime extract"
icon_state = "dark purple slime extract"
/obj/item/slime_extract/orange
name = "orange slime extract"
icon_state = "orange slime extract"
/obj/item/slime_extract/yellow
name = "yellow slime extract"
icon_state = "yellow slime extract"
/obj/item/slime_extract/red
name = "red slime extract"
icon_state = "red slime extract"
/obj/item/slime_extract/blue
name = "blue slime extract"
icon_state = "blue slime extract"
/obj/item/slime_extract/darkblue
name = "dark blue slime extract"
icon_state = "dark blue slime extract"
/obj/item/slime_extract/pink
name = "pink slime extract"
icon_state = "pink slime extract"
/obj/item/slime_extract/green
name = "green slime extract"
icon_state = "green slime extract"
/obj/item/slime_extract/lightpink
name = "light pink slime extract"
icon_state = "light pink slime extract"
/obj/item/slime_extract/black
name = "black slime extract"
icon_state = "black slime extract"
/obj/item/slime_extract/oil
name = "oil slime extract"
icon_state = "oil slime extract"
/obj/item/slime_extract/adamantine
name = "adamantine slime extract"
icon_state = "adamantine slime extract"
/obj/item/slime_extract/bluespace
name = "bluespace slime extract"
icon_state = "bluespace slime extract"
/obj/item/slime_extract/pyrite
name = "pyrite slime extract"
icon_state = "pyrite slime extract"
/obj/item/slime_extract/cerulean
name = "cerulean slime extract"
icon_state = "cerulean slime extract"
/obj/item/slime_extract/sepia
name = "sepia slime extract"
icon_state = "sepia slime extract"
/obj/item/slime_extract/rainbow
name = "rainbow slime extract"
icon_state = "rainbow slime extract"
////Pet Slime Creation///
/obj/item/weapon/slimepotion
name = "docility potion"
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
user << "<span class='warning'> The potion only works on baby slimes!</span>"
return ..()
if(M.is_adult) //Can't tame adults
user << "<span class='warning'> Only baby slimes can be tamed!</span>"
return..()
if(M.stat)
user << "<span class='warning'> The slime is dead!</span>"
return..()
if(M.mind)
user << "<span class='warning'> The slime resists!</span>"
return ..()
var/mob/living/simple_animal/slime/pet = new /mob/living/simple_animal/slime(M.loc)
pet.icon_state = "[M.colour] baby slime"
pet.icon_living = "[M.colour] baby slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
del(M)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
del(src)
/obj/item/weapon/slimepotion2
name = "advanced docility potion"
desc = "A potent chemical mix that will nullify a slime's powers, causing it to become docile and tame. This one is meant for adult slimes"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
user << "<span class='warning'> The potion only works on slimes!</span>"
return ..()
if(M.stat)
user << "<span class='warning'> The slime is dead!</span>"
return..()
if(M.mind)
user << "<span class='warning'> The slime resists!</span>"
return ..()
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
user <<"You feed the slime the potion, removing it's powers and calming it."
del(M)
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
if (!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
del(src)
/obj/item/weapon/slimesteroid
name = "slime steroid"
desc = "A potent chemical mix that will cause a slime to generate more extract."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime))//If target is not a slime.
user << "<span class='warning'> The steroid only works on baby slimes!</span>"
return ..()
if(M.is_adult) //Can't tame adults
user << "<span class='warning'> Only baby slimes can use the steroid!</span>"
return..()
if(M.stat)
user << "<span class='warning'> The slime is dead!</span>"
return..()
if(M.cores == 3)
user <<"<span class='warning'> The slime already has the maximum amount of extract!</span>"
return..()
user <<"You feed the slime the steroid. It now has triple the amount of extract."
M.cores = 3
del(src)
/obj/item/weapon/slimesteroid2
name = "extract enhancer"
desc = "A potent chemical mix that will give a slime extract three uses."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
/*afterattack(obj/target, mob/user , flag)
if(istype(target, /obj/item/slime_extract))
if(target.enhanced == 1)
user << "<span class='warning'> This extract has already been enhanced!</span>"
return ..()
if(target.Uses == 0)
user << "<span class='warning'> You can't enhance a used extract!</span>"
return ..()
user <<"You apply the enhancer. It now has triple the amount of uses."
target.Uses = 3
target.enahnced = 1
del(src)*/
/obj/effect/golemrune
anchored = 1
desc = "a strange rune used to create golems. It glows when spirits are nearby."
name = "rune"
icon = 'icons/obj/rune.dmi'
icon_state = "golem"
unacidable = 1
layer = TURF_LAYER
New()
..()
processing_objects.Add(src)
process()
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!O.client) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O
break
if(ghost)
icon_state = "golem2"
else
icon_state = "golem"
attack_hand(mob/living/user as mob)
var/mob/dead/observer/ghost
for(var/mob/dead/observer/O in src.loc)
if(!O.client) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O
break
if(!ghost)
user << "The rune fizzles uselessly. There is no spirit nearby."
return
var/mob/living/carbon/human/G = new(src.loc)
G.set_species("Golem")
G.key = ghost.key
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
del (src)
proc/announce_to_ghosts()
for(var/mob/dead/observer/G in player_list)
if(G.client)
var/area/A = get_area(src)
if(A)
G << "Golem rune created in [A.name]."
/mob/living/carbon/slime/has_eyes()
return 0
//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them////////////////////////
/*
// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere
/obj/item/slime_core
name = "slime extract"
desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"."
icon = 'icons/mob/slimes.dmi'
icon_state = "slime extract"
force = 1.0
w_class = 1.0
throwforce = 1.0
throw_speed = 2
throw_range = 6
origin_tech = "biotech=4"
var/POWERFLAG = 0 // sshhhhhhh
var/Flush = 30
var/Uses = 5 // uses before it goes inert
/obj/item/slime_core/New()
..()
create_reagents(100)
POWERFLAG = rand(1,10)
Uses = rand(7, 25)
//flags |= NOREACT
/*
spawn()
Life()
proc/Life()
while(src)
sleep(25)
Flush--
if(Flush <= 0)
reagents.clear_reagents()
Flush = 30
*/
/obj/item/weapon/reagent_containers/food/snacks/egg/slime
name = "slime egg"
desc = "A small, gelatinous egg."
icon = 'icons/mob/mob.dmi'
icon_state = "slime egg-growing"
bitesize = 12
origin_tech = "biotech=4"
var/grown = 0
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("slimejelly", 1)
spawn(rand(1200,1500))//the egg takes a while to "ripen"
Grow()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow()
grown = 1
icon_state = "slime egg-grown"
processing_objects.Add(src)
return
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch()
processing_objects.Remove(src)
var/turf/T = get_turf(src)
src.visible_message("<span class='warning'> The [name] pulsates and quivers!</span>")
spawn(rand(50,100))
src.visible_message("<span class='warning'> The [name] bursts open!</span>")
new/mob/living/carbon/slime(T)
del(src)
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/process()
var/turf/location = get_turf(src)
var/datum/gas_mixture/environment = location.return_air()
if (environment.phoron > MOLES_PHORON_VISIBLE)//phoron exposure causes the egg to hatch
src.Hatch()
/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype( W, /obj/item/toy/crayon ))
return
else
..()
*/
>>>>>>> dev

View File

@@ -57,6 +57,9 @@
if(environment) // More error checking -- TLE
handle_environment(environment)
//Check if we're on fire
handle_fire()
//Status updates, death etc.
handle_regular_status_updates()
update_canmove()
@@ -629,3 +632,9 @@
proc/handle_changeling()
if(mind && mind.changeling)
mind.changeling.regenerate()
/mob/living/carbon/monkey/handle_fire()
if(..())
return
adjustFireLoss(6)
return

View File

@@ -5,7 +5,8 @@
#define M_L_HAND_LAYER 4
#define M_R_HAND_LAYER 5
#define TARGETED_LAYER 6
#define M_TOTAL_LAYERS 6
#define M_FIRE_LAYER 6
#define M_TOTAL_LAYERS 7
/////////////////////////////////
/mob/living/carbon/monkey
@@ -19,6 +20,7 @@
update_inv_r_hand(0)
update_inv_l_hand(0)
update_inv_handcuffed(0)
update_fire(0)
update_icons()
//Hud Stuff
update_hud()
@@ -109,6 +111,12 @@
overlays_standing[TARGETED_LAYER] = null
if(update_icons) update_icons()
/mob/living/carbon/monkey/update_fire(var/update_icons=1)
if(on_fire)
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
else
overlays_standing[M_FIRE_LAYER] = null
if(update_icons) update_icons()
//Monkey Overlays Indexes////////
#undef M_MASK_LAYER
#undef M_BACK_LAYER
@@ -116,5 +124,6 @@
#undef M_L_HAND_LAYER
#undef M_R_HAND_LAYER
#undef TARGETED_LAYER
#undef M_FIRE_LAYER
#undef M_TOTAL_LAYERS

View File

@@ -281,6 +281,8 @@
C.legcuffed = initial(C.legcuffed)
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
ExtinguishMob()
fire_stacks = 0
/mob/living/proc/rejuvenate()
@@ -490,17 +492,17 @@
var/mob/living/simple_animal/borer/B = src.loc
var/mob/living/captive_brain/H = src
H << "\red <B>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</B>"
B.host << "\red <B>You feel the captive mind of [src] begin to resist your control.</B>"
H << "<span class='danger'>You begin doggedly resisting the parasite's control (this will take approximately sixty seconds).</span>"
B.host << "<span class='danger'>You feel the captive mind of [src] begin to resist your control.</span>"
spawn(rand(400,500)+B.host.brainloss)
spawn(rand(200,250)+B.host.brainloss)
if(!B || !B.controlling)
return
B.host.adjustBrainLoss(rand(5,10))
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
H << "<span class='danger'>With an immense exertion of will, you regain control of your body!</span>"
B.host << "<span class='danger'>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</span>"
B.detatch()
@@ -555,9 +557,9 @@
for(var/mob/O in viewers(C))
O.show_message("\red <B>[usr] manages to unbuckle themself!</B>", 1)
C << "\blue You successfully unbuckle yourself."
C.buckled.manual_unbuckle(C)
C.buckled.user_unbuckle_mob(C)
else
L.buckled.manual_unbuckle(L)
L.buckled.user_unbuckle_mob(L)
//Breaking out of a locker?
else if( src.loc && (istype(src.loc, /obj/structure/closet)) )
@@ -628,9 +630,21 @@
BD.attack_hand(usr)
C.open()
//breaking out of handcuffs
//drop && roll or breaking out of handcuffs
else if(iscarbon(L))
var/mob/living/carbon/CM = L
if(CM.on_fire && CM.canmove)
CM.fire_stacks -= 5
CM.Weaken(3)
CM.spin(32,2)
CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
"<span class='notice'>You stop, drop, and roll!</span>")
sleep(30)
if(fire_stacks <= 0)
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
"<span class='notice'>You extinguish yourself.</span>")
ExtinguishMob()
return
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.next_move = world.time + 100
CM.last_special = world.time + 100
@@ -657,6 +671,8 @@
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
del(CM.handcuffed)
CM.handcuffed = null
if(buckled && buckled.buckle_require_restraints)
buckled.unbuckle_mob()
CM.update_inv_handcuffed()
else
var/obj/item/weapon/handcuffs/HC = CM.handcuffed
@@ -841,4 +857,22 @@
return 1
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
return 0
return 0
/mob/living/carbon/proc/spin(spintime, speed)
spawn()
var/D = dir
while(spintime >= speed)
sleep(speed)
switch(D)
if(NORTH)
D = EAST
if(SOUTH)
D = WEST
if(EAST)
D = SOUTH
if(WEST)
D = NORTH
set_dir(D)
spintime -= speed
return

View File

@@ -100,14 +100,14 @@
..()
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
var/throw_damage = O.throwforce*(speed/5)
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
var/miss_chance = 15
if (O.throw_source)
@@ -136,9 +136,9 @@
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
if(O.throw_source && speed >= THROWNOBJ_KNOCKBACK_SPEED)
var/obj/item/weapon/W = O
var/momentum = speed/2
var/momentum = speed/THROWNOBJ_KNOCKBACK_DIVISOR
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
@@ -191,3 +191,52 @@
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
spawn(1) updatehealth()
return 1
/mob/living/proc/IgniteMob()
if(fire_stacks > 0 && !on_fire)
on_fire = 1
src.AddLuminosity(3)
update_fire()
/mob/living/proc/ExtinguishMob()
if(on_fire)
on_fire = 0
fire_stacks = 0
src.AddLuminosity(-3)
update_fire()
/mob/living/proc/update_fire()
return
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = FIRE_MIN_STACKS, max = FIRE_MAX_STACKS)
/mob/living/proc/handle_fire()
if(fire_stacks < 0)
fire_stacks = max(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly
if(!on_fire)
return 1
else if(fire_stacks <= 0)
ExtinguishMob() //Fire's been put out.
return 1
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(G.gas["oxygen"] < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return 1
var/turf/location = get_turf(src)
location.hotspot_expose(fire_burn_temperature(), 50, 1)
/mob/living/fire_act()
adjust_fire_stacks(0.5)
IgniteMob()
//Finds the effective temperature that the mob is burning at.
/mob/living/proc/fire_burn_temperature()
if (fire_stacks <= 0)
return 0
//Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
return round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2)

View File

@@ -37,4 +37,7 @@
var/tod = null // Time of death
var/update_slimes = 1
var/silent = null //Can't talk. Value goes down every life proc.
var/silent = null // Can't talk. Value goes down every life proc.
var/mob_size // Used by lockers.
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks

View File

@@ -141,7 +141,7 @@ var/list/ai_verbs_default = list(
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
del(src)//Delete AI.
return
else

View File

@@ -54,4 +54,4 @@
var/obj/item/device/aicard/card = loc
card.update_icon()
return ..(gibbed)
return ..(gibbed,"gives one shrill beep before falling lifeless.")

View File

@@ -7,10 +7,16 @@ var/datum/cameranet/cameranet = new()
/datum/cameranet
// The cameras on the map, no matter if they work or not. Updated in obj/machinery/camera.dm by New() and Del().
var/list/cameras = list()
var/cameras_unsorted = 1
// The chunks of the map, mapping the areas that the cameras can see.
var/list/chunks = list()
var/ready = 0
/datum/cameranet/proc/process_sort()
if(cameras_unsorted)
cameras = dd_sortedObjectList(cameras)
cameras_unsorted = 0
// Checks if a chunk has been Generated in x, y, z.
/datum/cameranet/proc/chunkGenerated(x, y, z)
x &= ~0xf

View File

@@ -1,17 +1,19 @@
// AI EYE
//
// An invisible (no icon) mob that the AI controls to look around the station with.
// A mob that the AI controls to look around the station with.
// It streams chunks as it moves around, which will show it what the AI can and cannot see.
/mob/aiEye
name = "Inactive AI Eye"
icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o
icon = 'icons/mob/AI.dmi'
icon_state = "eye"
alpha = 127
var/list/visibleCameraChunks = list()
var/mob/living/silicon/ai/ai = null
density = 0
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
see_in_dark = 7
invisibility = INVISIBILITY_AI_EYE
// Movement code. Returns 0 to stop air movement from moving it.
/mob/aiEye/Move()

View File

@@ -92,7 +92,13 @@
/obj/machinery/camera/New()
..()
cameranet.cameras += src //Camera must be added to global list of all cameras no matter what...
//Camera must be added to global list of all cameras no matter what...
if(cameranet.cameras_unsorted || !ticker)
cameranet.cameras += src
cameranet.cameras_unsorted = 1
else
dd_insertObjectList(cameranet.cameras, src)
var/list/open_networks = difflist(network,restricted_camera_networks) //...but if all of camera's networks are restricted, it only works for specific camera consoles.
if(open_networks.len) //If there is at least one open network, chunk is available for AI usage.
cameranet.addCamera(src)

View File

@@ -0,0 +1,44 @@
var/global/list/empty_playable_ai_cores = list()
/hook/roundstart/proc/spawn_empty_ai()
for(var/obj/effect/landmark/start/S in landmarks_list)
if(S.name != "AI")
continue
if(locate(/mob/living) in S.loc)
continue
empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S))
return 1
/mob/living/silicon/ai/verb/wipe_core()
set name = "Wipe Core"
set category = "OOC"
set desc = "Wipe your core. This is functionally equivalent to cryo or robotic storage, freeing up your job slot."
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
usr << "<span class='danger'>You cannot use this verb in malfunction. If you need to leave, please adminhelp.</span>"
return
// Guard against misclicks, this isn't the sort of thing we want happening accidentally
if(alert("WARNING: This will immediately wipe your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?",
"Wipe Core", "No", "No", "Yes") != "Yes")
return
// We warned you.
empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc)
global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight")
//Handle job slot/tater cleanup.
var/job = mind.assigned_role
job_master.FreeRole(job)
if(mind.objectives.len)
del(mind.objectives)
mind.special_role = null
else
if(ticker.mode.name == "AutoTraitor")
var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode
current_mode.possible_traitors.Remove(src)
del(src)

View File

@@ -59,7 +59,7 @@
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
src.see_invisible = SEE_INVISIBLE_LIVING
//Congratulations! You've found a way for AI's to run without using power!

View File

@@ -390,6 +390,9 @@
..()
else
src << "<span class='warning'>You are too small to pull that.</span>"
else
src << "<span class='warning'>You are too small to pull that.</span>"
return
// No binary for pAIs.
/mob/living/silicon/pai/binarycheck()

View File

@@ -58,32 +58,32 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if("name")
t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
if(t)
candidate.name = copytext(sanitize(t),1,MAX_NAME_LEN)
candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = copytext(sanitize(candidate.name),1,MAX_NAME_LEN)
candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
if(candidate.description)
candidate.description = copytext(sanitize(candidate.description),1,MAX_MESSAGE_LEN)
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
if(candidate.role)
candidate.role = copytext(sanitize(candidate.role),1,MAX_MESSAGE_LEN)
candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
if(candidate.comments)
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
if("submit")
if(candidate)

View File

@@ -6,7 +6,7 @@
icon_state = "robotanalyzer"
item_state = "analyzer"
desc = "A hand-held scanner able to diagnose robotic injuries."
flags = FPRINT | TABLEPASS | CONDUCT
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0

View File

@@ -234,3 +234,7 @@
sight_mode |= module_state_3:sight_mode
else
src << "<span class='notice'>You need to disable a module first!</span>"
/mob/living/silicon/robot/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1

View File

@@ -23,6 +23,11 @@ var/list/robot_verbs_default = list(
var/integrated_light_power = 6
var/datum/wires/robot/wires
//Icon stuff
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
//Hud stuff
var/obj/screen/cells = null
@@ -106,6 +111,8 @@ var/list/robot_verbs_default = list(
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
module_sprites["Basic"] = "robot"
icontype = "Default"
updatename("Default")
updateicon()
@@ -227,11 +234,10 @@ var/list/robot_verbs_default = list(
modules+="Combat"
modtype = input("Please, select a module!", "Robot", null, null) in modules
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
if(module)
return
module_sprites = list()
switch(modtype)
if("Standard")
module = new /obj/item/weapon/robot_module/standard(src)
@@ -958,38 +964,25 @@ var/list/robot_verbs_default = list(
overlays.Cut()
if(stat == 0)
overlays += "eyes"
overlays.Cut()
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
if(wiresexposed)
overlays += "[src.ckey]-openpanel +w"
else if(cell)
overlays += "[src.ckey]-openpanel +c"
else
overlays += "[src.ckey]-openpanel -c"
overlays += "eyes-[module_sprites[icontype]]"
if(opened)
var/panelprefix = custom_sprite ? src.ckey : "ov"
if(wiresexposed)
overlays += "ov-openpanel +w"
overlays += "[panelprefix]-openpanel +w"
else if(cell)
overlays += "ov-openpanel +c"
overlays += "[panelprefix]-openpanel +c"
else
overlays += "ov-openpanel -c"
overlays += "[panelprefix]-openpanel -c"
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
overlays += "[icon_state]-shield"
overlays += "[module_sprites[icontype]]-shield"
if(modtype == "Combat")
var/base_icon = ""
base_icon = icon_state
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
icon_state = "[icon_state]-roll"
icon_state = "[module_sprites[icontype]]-roll"
else
icon_state = base_icon
icon_state = module_sprites[icontype]
return
//Call when target overlay should be added/removed
@@ -1222,8 +1215,6 @@ var/list/robot_verbs_default = list(
else
triesleft--
var/icontype
if (custom_sprite == 1)
icontype = "Custom"
triesleft = 0
@@ -1304,4 +1295,5 @@ var/list/robot_verbs_default = list(
if(2) //New Module
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] module change detected: [name] has loaded the [module.name].</span><br>"
if(3) //New Name
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
if(oldname != newname)
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"

View File

@@ -4,7 +4,7 @@
icon_state = "std_module"
w_class = 100.0
item_state = "electronic"
flags = FPRINT|TABLEPASS | CONDUCT
flags = CONDUCT
var/channels = list()
var/list/modules = list()
var/obj/item/emag = null
@@ -34,8 +34,11 @@
if(!stacktypes || !stacktypes.len) return
for(var/T in stacktypes)
var/O = locate(T) in src.modules
var/obj/item/stack/S = O
var/obj/item/stack/S
for(var/obj/O in src.modules)
if(O.type == T)
S = O
break
if(!S)
src.modules -= null
@@ -43,6 +46,9 @@
src.modules |= S
S.amount = 1
if(!istype(S))
continue
if(S && S.amount < stacktypes[T])
S.amount++

View File

@@ -226,14 +226,14 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = copytext(sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text), 1, MAX_MESSAGE_LEN)
pose = sanitize(copytext(input(usr, "This is [src]. It is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
/mob/living/silicon/verb/set_flavor()
set name = "Set Flavour Text"
set desc = "Sets an extended description of your character's features."
set category = "IC"
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)
flavor_text = sanitize(copytext(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text, 1))
/mob/living/silicon/binarycheck()
return 1
@@ -277,4 +277,4 @@
if (stat != 2)
adjustBruteLoss(30)
updatehealth()
updatehealth()

View File

@@ -4,6 +4,7 @@
icon = 'icons/obj/apiary_bees_etc.dmi'
icon_state = "bees1"
icon_dead = "bees1"
mob_size = 1
var/strength = 1
var/feral = 0
var/mut = 0

View File

@@ -174,7 +174,7 @@
//Procs for grabbing players.
/mob/living/simple_animal/borer/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(jobban_isbanned(O, "Syndicate"))
if(jobban_isbanned(O, "Borer"))
continue
if(O.client)
if(O.client.prefs.be_special & BE_ALIEN)
@@ -193,15 +193,21 @@
/mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate)
if(!candidate)
if(!candidate || !candidate.mob || !candidate.mob.mind)
return
src.mind = candidate.mob.mind
candidate.mob.mind.current = src
src.ckey = candidate.ckey
if(src.mind)
src.mind.assigned_role = "Cortical Borer"
src.mind.special_role = "Cortical Borer"
ticker.mode.borers |= src.mind
src << "<span class='notice'>You are a cortical borer!</span> You are a brain slug that worms its way \
into the head of its victim. Use stealth, persuasion and your powers of mind control to keep you, \
your host and your eventual spawn safe and warm."
src << "You can speak to your victim with <b>say</b>, to other borers with <b>say :x</b>, and use your Abilities tab to access powers."
/mob/living/simple_animal/borer/can_use_vents()
return

View File

@@ -69,6 +69,10 @@
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/E = H.organs_by_name["head"]
if(!E || (E.status & ORGAN_DESTROYED))
src << "\The [H] does not have a head!"
if(!H.species.has_organ["brain"])
src << "\The [H] does not seem to have an ear canal to breach."
return
@@ -124,6 +128,7 @@
src << "They are no longer in range!"
return
/*
/mob/living/simple_animal/borer/verb/devour_brain()
set category = "Abilities"
set name = "Devour Brain"
@@ -147,6 +152,7 @@
src << "<span class = 'danger'>It only takes a few moments to render the dead host brain down into a nutrient-rich slurry...</span>"
replace_brain()
*/
// BRAIN WORM ZOMBIES AAAAH.
/mob/living/simple_animal/borer/proc/replace_brain()

View File

@@ -129,6 +129,7 @@
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashed their armoured gauntlet into"
mob_size = 20
speed = 3
wall_smash = 1
attack_sound = 'sound/weapons/punch3.ogg'
@@ -259,6 +260,7 @@
speed = 5
wall_smash = 1
attack_sound = 'sound/weapons/punch4.ogg'
mob_size = 20
var/energy = 0
var/max_energy = 1000

View File

@@ -22,6 +22,7 @@
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
holder_type = /obj/item/weapon/holder/cat
mob_size = 5
/mob/living/simple_animal/cat/Life()
//MICE!
@@ -50,7 +51,7 @@
if(turns_since_scan > 5)
walk_to(src,0)
turns_since_scan = 0
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
movement_target = null
stop_automated_movement = 0
@@ -68,7 +69,7 @@
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
var/mob/living/carbon/H = over_object
if(!istype(H)) return ..()
if(!istype(H) || !Adjacent(H)) return ..()
if(H.a_intent == "help")
get_scooped(H)

View File

@@ -18,6 +18,8 @@
response_disarm = "bops"
response_harm = "kicks"
see_in_dark = 5
mob_size = 8
var/obj/item/inventory_head
var/obj/item/inventory_back
var/facehugger

View File

@@ -17,6 +17,7 @@
response_harm = "stomps"
stop_automated_movement = 1
friendly = "pinches"
mob_size = 5
var/obj/item/inventory_head
var/obj/item/inventory_mask

View File

@@ -14,4 +14,5 @@
melee_damage_upper = 2
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
response_harm = "stomps on"
mob_size = 1

View File

@@ -28,6 +28,7 @@
maxbodytemp = 323 //Above 50 Degrees Celcius
universal_speak = 0
universal_understand = 1
mob_size = 1
/mob/living/simple_animal/mouse/Life()
..()

View File

@@ -5,6 +5,7 @@
max_co2 = 0
minbodytemp = 0
maxbodytemp = 500
mob_size = 5
var/obj/item/device/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null

View File

@@ -113,7 +113,11 @@
/mob/living/simple_animal/hostile/proc/ListTargets(var/dist = 7)
var/list/L = hearers(src, dist)
L += mechas_list
for (var/obj/mecha/M in mechas_list)
if (get_dist(src, M) <= dist)
L += M
return L
/mob/living/simple_animal/hostile/death()

View File

@@ -372,3 +372,7 @@
message = capitalize(trim_left(message))
..(message, null, verb)
/mob/living/simple_animal/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1

View File

@@ -130,14 +130,14 @@
return 1
return 0
//This is a SAFE proc. Use this instead of equip_to_splot()!
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
if(!istype(W)) return 0
if(!W.mob_can_equip(src, slot, disable_warning))
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
del(W)
else
@@ -839,12 +839,9 @@ note dizziness decrements automatically in the mob's Life() proc.
// facing verbs
/mob/proc/canface()
if(!canmove) return 0
if(client.moving) return 0
if(world.time < client.move_delay) return 0
if(stat==2) return 0
if(stat) return 0
if(anchored) return 0
if(monkeyizing) return 0
if(restrained()) return 0
return 1
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
@@ -856,21 +853,17 @@ note dizziness decrements automatically in the mob's Life() proc.
canmove = 0
pixel_y = V.mob_offset_y - 5
else
lying = 0
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
canmove = 1
pixel_y = V.mob_offset_y
else if(buckled)
if (!buckled.movable)
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
if (!buckled.buckle_movable)
anchored = 1
canmove = 0
if(istype(buckled,/obj/structure/stool/bed/chair) )
lying = 0
else
lying = 1
else
anchored = 0
canmove = 1
lying = 0
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
lying = 1
canmove = 0
@@ -904,9 +897,10 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/facedir(var/ndir)
if(!canface()) return 0
if(!canface() || client.moving || world.time < client.move_delay)
return 0
set_dir(ndir)
if(buckled && buckled.movable)
if(buckled && buckled.buckle_movable)
buckled.set_dir(ndir)
client.move_delay += movement_delay()
return 1
@@ -938,6 +932,7 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/Stun(amount)
if(status_flags & CANSTUN)
facing_dir = null
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
return
@@ -953,6 +948,7 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/Weaken(amount)
if(status_flags & CANWEAKEN)
facing_dir = null
weakened = max(max(weakened,amount),0)
update_canmove() //updates lying, canmove and icons
return
@@ -971,6 +967,7 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/Paralyse(amount)
if(status_flags & CANPARALYSE)
facing_dir = null
paralysis = max(max(paralysis,amount),0)
return
@@ -985,6 +982,7 @@ note dizziness decrements automatically in the mob's Life() proc.
return
/mob/proc/Sleeping(amount)
facing_dir = null
sleeping = max(max(sleeping,amount),0)
return
@@ -997,6 +995,7 @@ note dizziness decrements automatically in the mob's Life() proc.
return
/mob/proc/Resting(amount)
facing_dir = null
resting = max(max(resting,amount),0)
return
@@ -1160,3 +1159,55 @@ mob/proc/yank_out_object()
/mob/proc/updateicon()
return
/mob/verb/face_direction()
set name = "Face Direction"
set category = "IC"
set src = usr
set_face_dir()
if(!facing_dir)
usr << "You are now not facing anything."
else
usr << "You are now facing [dir2text(facing_dir)]."
/mob/proc/set_face_dir(var/newdir)
if(newdir)
set_dir(newdir)
facing_dir = newdir
else if(facing_dir)
facing_dir = null
else
set_dir(dir)
facing_dir = dir
/mob/set_dir()
if(facing_dir)
if(!canface() || lying || buckled || restrained())
facing_dir = null
else if(dir != facing_dir)
return ..(facing_dir)
else
return ..()
/mob/verb/northfaceperm()
set hidden = 1
facing_dir = null
set_face_dir(NORTH)
/mob/verb/southfaceperm()
set hidden = 1
facing_dir = null
set_face_dir(SOUTH)
/mob/verb/eastfaceperm()
set hidden = 1
facing_dir = null
set_face_dir(EAST)
/mob/verb/westfaceperm()
set hidden = 1
facing_dir = null
set_face_dir(WEST)

View File

@@ -90,6 +90,7 @@
var/list/languages = list() // For speaking/listening.
var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null.
var/emote_type = 1 // Define emote default type, 1 for seen emotes, 2 for heard emotes
var/facing_dir = null // Used for the ancient art of moonwalking.
var/name_archive //For admin things like possession
@@ -214,7 +215,7 @@
var/universal_understand = 0 // Set to 1 to enable the mob to understand everyone, not necessarily speak
var/stance_damage = 0 //Whether this mob's ability to stand has been affected
//SSD var, changed it up some so people can have special things happen for different mobs when SSD.
var/player_logged = 0

View File

@@ -193,16 +193,16 @@
return
if(M == assailant && state >= GRAB_AGGRESSIVE)
var/can_eat
var/can_eat
if((FAT in user.mutations) && ismonkey(affecting))
can_eat = 1
else
var/mob/living/carbon/human/H = user
if(istype(H) && iscarbon(affecting) && H.species.gluttonous)
if(istype(H) && H.species.gluttonous)
if(H.species.gluttonous == 2)
can_eat = 2
else if(!ishuman(affecting))
else if(!ishuman(affecting) && !ismonkey(affecting) && (affecting.small || iscarbon(affecting)))
can_eat = 1
if(can_eat)

View File

@@ -305,7 +305,7 @@ proc/slur(phrase)
n_letter = text("[n_letter]-[n_letter]")
t = text("[t][n_letter]")//since the above is ran through for each letter, the text just adds up back to the original word.
p++//for each letter p is increased to find where the next letter will be.
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added
@@ -352,7 +352,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
n_letter = text("[n_letter]")
t = text("[t][n_letter]")
p=p+n_mod
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
/proc/shake_camera(mob/M, duration, strength=1)
@@ -360,6 +360,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return
M.shakecamera = 1
spawn(1)
if(!M.client)
return
var/atom/oldeye=M.client.eye
var/aiEyeFlag = 0

View File

@@ -284,7 +284,7 @@
proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
if(!job) return 0
if((job.current_positions >= job.total_positions) && job.total_positions != -1) return 0
if(!job.is_position_available()) return 0
if(jobban_isbanned(src,rank)) return 0
if(!job.player_old_enough(src.client)) return 0
return 1
@@ -313,6 +313,24 @@
UpdateFactionList(character)
EquipCustomItems(character)
// AIs don't need a spawnpoint, they must spawn at an empty core
if(character.mind.assigned_role == "AI")
character = character.AIize(move=0) // AIize the character, but don't move them yet
// IsJobAvailable for AI checks that there is an empty core available in this list
var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
empty_playable_ai_cores -= C
character.loc = C.loc
AnnounceCyborg(character, rank, "has been downloaded to the empty core in \the [character.loc.loc]")
ticker.mode.latespawn(character)
del(C)
del(src)
return
//Find our spawning point.
var/join_message
var/datum/spawnpoint/S
@@ -356,20 +374,16 @@
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
if (ticker.current_state == GAME_STATE_PLAYING)
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
del(a)
global_announcer.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message)
if (ticker.current_state == GAME_STATE_PLAYING)
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
// can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc.
a.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
del(a)
global_announcer.autosay("A new[rank ? " [rank]" : " visitor" ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
proc/LateChoices()
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever

View File

@@ -13,6 +13,7 @@
usr << "\red Speech is currently admin-disabled."
return
//Let's try to make users fix their errors - we try to detect single, out-of-place letters and 'unintended' words
/*
var/first_letter = copytext(message,1,2)
if((copytext(message,2,3) == " " && first_letter != "I" && first_letter != "A" && first_letter != ";") || cmptext(copytext(message,1,5), "say ") || cmptext(copytext(message,1,4), "me ") || cmptext(copytext(message,1,6), "looc ") || cmptext(copytext(message,1,5), "ooc ") || cmptext(copytext(message,2,6), "say "))
var/response = alert(usr, "Do you really want to say this using the *say* verb?\n\n[message]\n", "Confirm your message", "Yes", "Edit message", "No")
@@ -22,6 +23,7 @@
return
else if(response == "No")
return
*/
set_typing_indicator(0)
usr.say(message)

View File

@@ -56,13 +56,13 @@
spawning = 1
return ..()
/mob/living/carbon/human/AIize()
/mob/living/carbon/human/AIize(move=1) // 'move' argument needs defining here too because BYOND is dumb
if (monkeyizing)
return
for(var/t in organs)
del(t)
return ..()
return ..(move)
/mob/living/carbon/AIize()
if (monkeyizing)
@@ -75,7 +75,7 @@
invisibility = 101
return ..()
/mob/proc/AIize()
/mob/proc/AIize(move=1)
if(client)
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jams for AIs
var/mob/living/silicon/ai/O = new (loc, base_law_type,,1)//No MMI but safety is in effect.
@@ -88,37 +88,38 @@
else
O.key = key
var/obj/loc_landmark
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if (sloc.name != "AI")
continue
if (locate(/mob/living) in sloc.loc)
continue
loc_landmark = sloc
if (!loc_landmark)
for(var/obj/effect/landmark/tripai in landmarks_list)
if (tripai.name == "tripai")
if(locate(/mob/living) in tripai.loc)
continue
loc_landmark = tripai
if (!loc_landmark)
O << "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone."
if(move)
var/obj/loc_landmark
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if (sloc.name == "AI")
loc_landmark = sloc
if (sloc.name != "AI")
continue
if ((locate(/mob/living) in sloc.loc) || (locate(/obj/structure/AIcore) in sloc.loc))
continue
loc_landmark = sloc
if (!loc_landmark)
for(var/obj/effect/landmark/tripai in landmarks_list)
if (tripai.name == "tripai")
if((locate(/mob/living) in tripai.loc) || (locate(/obj/structure/AIcore) in tripai.loc))
continue
loc_landmark = tripai
if (!loc_landmark)
O << "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone."
for(var/obj/effect/landmark/start/sloc in landmarks_list)
if (sloc.name == "AI")
loc_landmark = sloc
O.loc = loc_landmark.loc
for (var/obj/item/device/radio/intercom/comm in O.loc)
comm.ai += O
O.loc = loc_landmark.loc
for (var/obj/item/device/radio/intercom/comm in O.loc)
comm.ai += O
O.on_mob_init()
O.add_ai_verbs()
O.rename_self("ai",1)
. = O
del(src)
spawn(0)
del(src)
return O
//human -> robot
/mob/living/carbon/human/proc/Robotize()