Merge remote-tracking branch 'upstream/dev' into CultVisualNetwork

Conflicts:
	code/modules/mob/living/simple_animal/shade.dm
	code/setup.dm
This commit is contained in:
PsiOmega
2015-03-30 20:48:25 +02:00
224 changed files with 4588 additions and 4878 deletions

View File

@@ -533,7 +533,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/max_length = 50
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
if (message)

View File

@@ -1,5 +1,5 @@
/mob/dead/observer/say(var/message)
message = strip_html_properly(message)
message = sanitize(message)
if (!message)
return
@@ -18,7 +18,7 @@
/mob/dead/observer/emote(var/act, var/type, var/message)
message = trim_strip_html_properly(message)
message = sanitize(message)
if(!message)
return

View File

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

View File

@@ -82,3 +82,31 @@
/datum/language/vox/get_random_name()
return ..(FEMALE,1,6)
/datum/language/cultcommon
name = "Cult"
desc = "The chants of the occult, the incomprehensible."
speech_verb = "intones"
ask_verb = "intones"
exclaim_verb = "chants"
colour = "cult"
key = "n"
flags = RESTRICTED
space_chance = 100
syllables = list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri", \
"orkan", "allaq", "sas'so", "c'arta", "forbici", "tarem", "n'ath", "reth", "sh'yro", "eth", "d'raggathnor", \
"mah'weyh", "pleggh", "at", "e'ntrath", "tok-lyr", "rqa'nap", "g'lt-ulotf", "ta'gh", "fara'qha", "fel", "d'amar det", \
"yu'gular", "faras", "desdae", "havas", "mithum", "javara", "umathar", "uf'kal", "thenar", "rash'tla", \
"sektath", "mal'zua", "zasan", "therium", "viortia", "kla'atu", "barada", "nikt'o", "fwe'sh", "mah", "erl", "nyag", "r'ya", \
"gal'h'rfikk", "harfrandid", "mud'gib", "fuu", "ma'jin", "dedo", "ol'btoh", "n'ath", "reth", "sh'yro", "eth", \
"d'rekkathnor", "khari'd", "gual'te", "nikka", "nikt'o", "barada", "kla'atu", "barhah", "hra" ,"zar'garis")
/datum/language/cult
name = "Occult"
desc = "The initiated can share their thoughts by means defying all reason."
speech_verb = "intones"
ask_verb = "intones"
exclaim_verb = "chants"
colour = "cult"
key = "m"
flags = RESTRICTED | HIVEMIND

View File

@@ -20,10 +20,10 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, M, src )

View File

@@ -2,7 +2,7 @@
if(istype(M))
//Let people pick the little buggers up.
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
if(M.species && M.species.name == "Diona")
M << "You feel your being twine with that of [src] as it merges with your biomass."
src << "You feel your being twine with that of [M] as you merge with its biomass."

View File

@@ -7,7 +7,7 @@
src << "\red You cannot speak in IC (Muted)."
return
message = trim_strip_html_properly(message)
message = sanitize(message)
if(stat == 2)
return say_dead(message)

View File

@@ -32,5 +32,5 @@
if(istype(container, /obj/item/device/mmi/radio_enabled))
var/obj/item/device/mmi/radio_enabled/R = container
if(R.radio)
spawn(0) R.radio.hear_talk(src, trim(sanitize(message)), verb, speaking)
spawn(0) R.radio.hear_talk(src, sanitize(message), verb, speaking)
..(trim(message), speaking, verb)

View File

@@ -442,102 +442,12 @@
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
usr.sleeping = 20 //Short nap
/mob/living/carbon/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if( istype(tmob, /mob/living/carbon) && prob(10) )
src.spread_disease_to(AM, "Contact")
if(istype(tmob, /mob/living/carbon/human))
if(HULK in tmob.mutations)
if(prob(70))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
for(var/mob/M in range(tmob, 1))
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "\red [tmob] is restrained, you cannot push past"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "\red [tmob] is restraining [M], you cannot push past"
now_pushing = 0
return
//Leaping mobs just land on the tile, no pushing, no anything.
if(status_flags & LEAPING)
loc = tmob.loc
status_flags &= ~LEAPING
now_pushing = 0
return
// Step over drones.
// I have no idea why the hell this isn't already happening. How do mice do it?
if(istype(tmob,/mob/living/silicon/robot/drone))
loc = tmob.loc
now_pushing = 0
return
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && !tmob.buckled && canmove) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
slime.UpdateFeed()
return
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(40) && !(FAT in src.mutations))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = 0
/mob/living/carbon/Bump(var/atom/movable/AM, yes)
if(now_pushing || !yes)
return
return
..()
if(istype(AM, /mob/living/carbon) && prob(10))
src.spread_disease_to(AM, "Contact")
/mob/living/carbon/can_use_vents()
return
@@ -550,4 +460,9 @@
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
Stun(stun_duration)
Weaken(Floor(stun_duration/2))
return 1
return 1
/mob/living/carbon/get_default_language()
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null

View File

@@ -50,7 +50,7 @@
m_type = 1
if ("custom")
var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
var/input = sanitize(input("Choose an emote to display.") as text|null)
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 = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
pose = sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text)
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"

View File

@@ -501,7 +501,7 @@
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Add Comment:", "Sec. records", null, null) as message)
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
@@ -630,7 +630,7 @@
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
@@ -657,17 +657,11 @@
src << browse(null, "window=flavor_changes")
return
if("general")
var/msg = input(usr,"Update the general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message
if(msg != null)
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = html_encode(msg)
var/msg = sanitize(input(usr,"Update the general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0)
flavor_texts[href_list["flavor_change"]] = msg
return
else
var/msg = input(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message
if(msg != null)
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = html_encode(msg)
var/msg = sanitize(input(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0)
flavor_texts[href_list["flavor_change"]] = msg
set_flavor()
return
@@ -1166,6 +1160,10 @@
else
return 0
mob_bump_flag = species.bump_flag
mob_swap_flags = species.swap_flags
mob_push_flags = species.push_flags
/mob/living/carbon/human/proc/bloody_doodle()
set category = "IC"
set name = "Write in blood"
@@ -1205,7 +1203,7 @@
var/max_length = bloody_hands * 30 //tweeter style
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
if (message)
var/used_blood_amount = round(length(message) / 30, 1)

View File

@@ -45,7 +45,7 @@
M.spread_disease_to(src, "Contact")
switch(M.a_intent)
if("help")
if(I_HELP)
if(istype(H) && health < config.health_threshold_crit)
@@ -69,7 +69,7 @@
help_shake_act(M)
return 1
if("grab")
if(I_GRAB)
if(M == src || anchored)
return 0
if(w_uniform)
@@ -88,7 +88,7 @@
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
return 1
if("hurt")
if(I_HURT)
if(!istype(H))
attack_generic(H,rand(1,3),"punched")
@@ -101,11 +101,11 @@
var/datum/organ/external/affecting = get_organ(hit_zone)
switch(src.a_intent)
if("help")
if(I_HELP)
// We didn't see this coming, so we get the full blow
rand_damage = 5
accurate = 1
if("hurt", "grab")
if(I_HURT, I_GRAB)
// We're in a fighting stance, there's a chance we block
if(src.canmove && src!=H && prob(20))
block = 1
@@ -200,7 +200,7 @@
// Finally, apply damage to target
apply_damage(real_damage, BRUTE, affecting, armour, sharp=attack.sharp, edge=attack.edge)
if("disarm")
if(I_DISARM)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")

View File

@@ -82,3 +82,7 @@
var/hand_blood_color
var/list/flavor_texts = list()
mob_bump_flag = HUMAN
mob_push_flags = ALLMOBS
mob_swap_flags = ALLMOBS

View File

@@ -175,7 +175,7 @@
text = input("What would you like to say?", "Speak to creature", null, null)
text = trim(sanitize(copytext(text, 1, MAX_MESSAGE_LEN)))
text = sanitize(text)
if(!text) return
@@ -213,7 +213,7 @@
set desc = "Whisper silently to someone over a distance."
set category = "Abilities"
var/msg = sanitize(copytext(input("Message:", "Psychic Whisper") as text|null, 1, MAX_MESSAGE_LEN))
var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
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

@@ -1,156 +1,14 @@
/mob/living/carbon/human/say(var/message)
var/verb = "says"
var/alt_name = ""
var/message_range = world.view
var/italics = 0
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
message = trim_strip_html_properly(message)
if(stat)
if(stat == 2)
return say_dead(message)
return
if(name != GetVoice())
alt_name = "(as [get_id_name("Unknown")])"
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")
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")])"
//parse the radio code and consume it
if (message_mode)
if (message_mode == "headset")
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
else
message = copytext(message,3)
message = trim_left(message)
//parse the language code and consume it
var/datum/language/speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else if(species.default_language)
speaking = all_languages[species.default_language]
var/ending = copytext(message, length(message))
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
else
if(ending=="!")
verb=pick("exclaims","shouts","yells")
if(ending=="?")
verb="asks"
message = trim(message)
if(speech_problem_flag)
if(!speaking || !(speaking.flags & NO_STUTTER))
var/list/handle_r = handle_speech_problems(message)
message = handle_r[1]
verb = handle_r[2]
speech_problem_flag = handle_r[3]
if(!message || message == "")
return
var/list/obj/item/used_radios = new
switch (message_mode)
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = l_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = r_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += r_ear
if("right ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(r_ear && istype(r_ear,/obj/item/device/radio))
R = r_ear
has_radio = 1
if(r_hand && istype(r_hand, /obj/item/device/radio))
R = r_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("left ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(l_ear && istype(l_ear,/obj/item/device/radio))
R = l_ear
has_radio = 1
if(l_hand && istype(l_hand,/obj/item/device/radio))
R = l_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
used_radios += I
if("whisper")
whisper_say(message, speaking, alt_name)
return
else
if(message_mode)
if(l_ear && istype(l_ear,/obj/item/device/radio))
l_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
r_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += r_ear
var/sound/speech_sound
var/sound_vol
if(species.speech_sounds && prob(species.speech_chance))
speech_sound = sound(pick(species.speech_sounds))
sound_vol = 50
//speaking into radios
if(used_radios.len)
italics = 1
message_range = 1
if(speaking)
message_range = speaking.get_talkinto_msg_range(message)
var/msg
if(!speaking || !(speaking.flags & NO_TALK_MSG))
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
for(var/mob/living/M in hearers(5, src))
if((M != src) && msg)
M.show_message(msg)
if (speech_sound)
sound_vol *= 0.5
..(message, speaking, verb, alt_name, italics, message_range, speech_sound, sound_vol) //ohgod we should really be passing a datum here.
message = sanitize(message)
..(message, alt_name = alt_name) //ohgod we should really be passing a datum here.
/mob/living/carbon/human/proc/forcesay(list/append)
if(stat == CONSCIOUS)
@@ -271,39 +129,33 @@
return verb
/mob/living/carbon/human/proc/handle_speech_problems(var/message)
/mob/living/carbon/human/handle_speech_problems(var/message, var/verb)
if(!speech_problem_flag)
return ..()
var/list/returns[3]
var/verb = "says"
var/handled = 0
speech_problem_flag = 0
if(silent || (sdisabilities & MUTE))
message = ""
handled = 1
speech_problem_flag = 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
speech_problem_flag = 1
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")
handled = 1
var/list/parent = ..()
message = parent[1]
verb = parent[2]
if(parent[3])
speech_problem_flag = 1
var/braindam = getBrainLoss()
if(braindam >= 60)
handled = 1
speech_problem_flag = 1
if(prob(braindam/4))
message = stutter(message)
verb = pick("stammers", "stutters")
@@ -313,5 +165,63 @@
returns[1] = message
returns[2] = verb
returns[3] = handled
returns[3] = speech_problem_flag
return returns
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
used_radios += I
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = l_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = r_ear
R.talk_into(src,message,null,verb,speaking)
used_radios += r_ear
if("right ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(r_ear && istype(r_ear,/obj/item/device/radio))
R = r_ear
has_radio = 1
if(r_hand && istype(r_hand, /obj/item/device/radio))
R = r_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("left ear")
var/obj/item/device/radio/R
var/has_radio = 0
if(l_ear && istype(l_ear,/obj/item/device/radio))
R = l_ear
has_radio = 1
if(l_hand && istype(l_hand,/obj/item/device/radio))
R = l_hand
has_radio = 1
if(has_radio)
R.talk_into(src,message,null,verb,speaking)
used_radios += R
if("whisper")
whisper_say(message, speaking, alt_name)
return 1
else
if(message_mode)
if(l_ear && istype(l_ear,/obj/item/device/radio))
l_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += l_ear
else if(r_ear && istype(r_ear,/obj/item/device/radio))
r_ear.talk_into(src,message, message_mode, verb, speaking)
used_radios += r_ear
/mob/living/carbon/human/handle_speech_sound()
if(species.speech_sounds && prob(species.speech_chance))
var/list/returns[2]
returns[1] = sound(pick(species.speech_sounds))
returns[2] = 50
return ..()

View File

@@ -115,6 +115,11 @@
"eyes" = /datum/organ/internal/eyes
)
// Bump vars
var/bump_flag = HUMAN // What are we considered to be when bumped?
var/push_flags = ALLMOBS // What can we push?
var/swap_flags = ALLMOBS // What can we swap place with?
/datum/species/New()
if(hud_type)
hud = new hud_type()
@@ -250,7 +255,7 @@
// Called when using the shredding behavior.
/datum/species/proc/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
if(!ignore_intent && H.a_intent != "hurt")
if(!ignore_intent && H.a_intent != I_HURT)
return 0
for(var/datum/unarmed_attack/attack in unarmed_attacks)

View File

@@ -33,6 +33,10 @@
flags = IS_RESTRICTED
bump_flag = MONKEY
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
if(H.stat != CONSCIOUS)
return
@@ -44,6 +48,7 @@
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
H.real_name = "[lowertext(name)] ([rand(100,999)])"
H.name = H.real_name
..()
/datum/species/monkey/tajaran

View File

@@ -25,7 +25,11 @@
breath_type = null
poison_type = null
bump_flag = SLIME
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
/datum/species/slime/handle_death(var/mob/living/carbon/human/H)
spawn(1)
if(H)
H.gib()
H.gib()

View File

@@ -52,6 +52,10 @@
"nutrient vessel" = /datum/organ/internal/diona/nutrients
)
bump_flag = ALIEN
swap_flags = ALLMOBS
push_flags = ALLMOBS ^ ROBOT
var/alien_number = 0
var/caste_name = "creature" // Used to update alien name.
var/weeds_heal_rate = 1 // Health regen on weeds.

View File

@@ -6,7 +6,7 @@
usr << "\red Speech is currently admin-disabled."
return
message = trim_strip_html_properly(message)
message = sanitize(message)
log_whisper("[src.name]/[src.key] : [message]")
if (src.client)

View File

@@ -146,7 +146,7 @@
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))
var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN)
if (!newname)
newname = "pet slime"
@@ -177,7 +177,7 @@
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))
var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN)
if (!newname)
newname = "pet slime"

View File

@@ -304,7 +304,7 @@
if(Target.Adjacent(src))
if(istype(Target, /mob/living/silicon)) // Glomp the silicons
if(!Atkcool)
a_intent = "hurt"
a_intent = I_HURT
UnarmedAttack(Target)
Atkcool = 1
spawn(45)
@@ -318,12 +318,12 @@
spawn(45)
Atkcool = 0
a_intent = "disarm"
a_intent = I_DISARM
UnarmedAttack(Target)
else
if(!Atkcool)
a_intent = "grab"
a_intent = I_GRAB
UnarmedAttack(Target)
else if(Target in view(7, src))
@@ -341,9 +341,9 @@
frenemy = S
if (frenemy && prob(1))
if (frenemy.colour == colour)
a_intent = "help"
a_intent = I_HELP
else
a_intent = "hurt"
a_intent = I_HURT
UnarmedAttack(frenemy)
var/sleeptime = movement_delay()
@@ -355,10 +355,10 @@
/mob/living/carbon/slime/proc/handle_speech_and_mood()
//Mood starts here
var/newmood = ""
a_intent = "help"
a_intent = I_HELP
if (rabid || attacked)
newmood = "angry"
a_intent = "hurt"
a_intent = I_HURT
else if (Target) newmood = "mischevous"
if (!newmood)

View File

@@ -285,10 +285,10 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (I_GRAB)
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)

View File

@@ -20,6 +20,122 @@
usr.visible_message("<b>[src]</b> points to [A]")
return 1
/*one proc, four uses
swapping: if it's 1, the mobs are trying to switch, if 0, non-passive is pushing passive
default behaviour is:
- non-passive mob passes the passive version
- passive mob checks to see if its mob_bump_flag is in the non-passive's mob_bump_flags
- if si, the proc returns
*/
/mob/living/proc/can_move_mob(var/mob/living/swapped, swapping = 0, passive = 0)
if(!swapped)
return 1
if(!passive)
return swapped.can_move_mob(src, swapping, 1)
else
var/context_flags = 0
if(swapping)
context_flags = swapped.mob_swap_flags
else
context_flags = swapped.mob_push_flags
if(!mob_bump_flag) //nothing defined, go wild
return 1
if(mob_bump_flag & context_flags)
return 1
return 0
/mob/living/Bump(atom/movable/AM, yes)
spawn(0)
if ((!( yes ) || now_pushing) || !loc)
return
now_pushing = 1
if (istype(AM, /mob/living))
var/mob/living/tmob = AM
for(var/mob/living/M in range(tmob, 1))
if(tmob.pinned.len || ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
if ( !(world.time % 5) )
src << "<span class='warning'>[tmob] is restrained, you cannot push past</span>"
now_pushing = 0
return
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
if ( !(world.time % 5) )
src << "<span class='warning'>[tmob] is restraining [M], you cannot push past</span>"
now_pushing = 0
return
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
var/dense = 0
if(loc.density)
dense = 1
for(var/atom/movable/A in loc)
if(A == src)
continue
if(A.density)
if(A.flags&ON_BORDER)
dense = !A.CanPass(src, src.loc)
else
dense = 1
if(dense) break
//Leaping mobs just land on the tile, no pushing, no anything.
if(status_flags & LEAPING)
loc = tmob.loc
status_flags &= ~LEAPING
now_pushing = 0
return
if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc
now_pushing = 0
for(var/mob/living/carbon/slime/slime in view(1,tmob))
if(slime.Victim == tmob)
slime.UpdateFeed()
return
if(!can_move_mob(tmob, 0, 0))
now_pushing = 0
return
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(40) && !(FAT in src.mutations))
src << "<span class='danger'>You fail to push [tmob]'s fat ass out of the way.</span>"
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
spawn(0)
..()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = 0
return
return
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))

View File

@@ -20,7 +20,6 @@
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
@@ -32,6 +31,10 @@
var/t_n2 = null
var/now_pushing = null
var/mob_bump_flag = 0
var/mob_swap_flags = 0
var/mob_push_flags = 0
var/mob_always_swap = 0
var/mob/living/cameraFollow = null

View File

@@ -79,7 +79,132 @@ proc/get_radio_key_from_channel(var/channel)
if(!istype(dongle)) return
if(dongle.translate_binary) return 1
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/sound/speech_sound, var/sound_vol)
/mob/living/proc/get_default_language()
return null
/mob/living/proc/handle_speech_problems(var/message, var/verb)
var/list/returns[3]
var/speech_problem_flag = 0
if((HULK in mutations) && health >= 25 && length(message))
message = "[uppertext(message)]!!!"
verb = pick("yells","roars","hollers")
speech_problem_flag = 1
if(slurring)
message = slur(message)
verb = pick("slobbers","slurs")
speech_problem_flag = 1
if(stuttering)
message = stutter(message)
verb = pick("stammers","stutters")
speech_problem_flag = 1
returns[1] = message
returns[2] = verb
returns[3] = speech_problem_flag
return returns
/mob/living/proc/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
if(message_mode == "intercom")
for(var/obj/item/device/radio/intercom/I in view(1, null))
I.talk_into(src, message, verb, speaking)
used_radios += I
return 0
/mob/living/proc/handle_speech_sound()
var/list/returns[2]
returns[1] = null
returns[2] = null
return returns
/mob/living/proc/get_speech_ending(verb, var/ending)
if(ending=="!")
return pick("exclaims","shouts","yells")
if(ending=="?")
return "asks"
return verb
/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="")
if(client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (Muted)."
return
if(stat)
if(stat == 2)
return say_dead(message)
return
var/message_mode = parse_message_mode(message, "headset")
switch(copytext(message,1,2))
if("*") return emote(copytext(message,2))
if("^") return custom_emote(1, copytext(message,2))
//parse the radio code and consume it
if (message_mode)
if (message_mode == "headset")
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
else
message = copytext(message,3)
message = trim_left(message)
//parse the language code and consume it
if(!speaking)
speaking = parse_language(message)
if(speaking)
message = copytext(message,2+length(speaking.key))
else
speaking = get_default_language()
var/ending = copytext(message, length(message))
if (speaking)
// This is broadcast to all mobs with the language,
// irrespective of distance or anything else.
if(speaking.flags & HIVEMIND)
speaking.broadcast(src,trim(message))
return
//If we've gotten this far, keep going!
verb = speaking.get_spoken_verb(ending)
else
verb = get_speech_ending(verb, ending)
message = trim_left(message)
if(!(speaking && (speaking.flags & NO_STUTTER)))
var/list/handle_s = handle_speech_problems(message, verb)
message = handle_s[1]
verb = handle_s[2]
if(!message || message == "")
return
var/list/obj/item/used_radios = new
if(handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name))
return
var/list/handle_v = handle_speech_sound()
var/sound/speech_sound = handle_v[1]
var/sound_vol = handle_v[2]
var/italics = 0
var/message_range = world.view
//speaking into radios
if(used_radios.len)
italics = 1
message_range = 1
if(speaking)
message_range = speaking.get_talkinto_msg_range(message)
var/msg
if(!speaking || !(speaking.flags & NO_TALK_MSG))
msg = "<span class='notice'>\The [src] talks into \the [used_radios[1]]</span>"
for(var/mob/living/M in hearers(5, src))
if((M != src) && msg)
M.show_message(msg)
if (speech_sound)
sound_vol *= 0.5
var/turf/T = get_turf(src)

View File

@@ -311,13 +311,6 @@ var/list/ai_verbs_default = list(
//usr <<"You can only change your display once!"
//return
/mob/living/silicon/ai/proc/is_malf()
if(ticker.mode.name == "AI malfunction")
for (var/datum/mind/malfai in malf.current_antagonists)
if (mind == malfai)
return malf
return 0
// displays the malf_ai information if the AI is the malf
/mob/living/silicon/ai/show_malf_ai()
if(malf && malf.hacked_apcs.len >= 3)

View File

@@ -39,4 +39,5 @@ var/global/list/empty_playable_ai_cores = list()
clear_antag_roles(mind)
del(src)
ghostize(0)
del(src)

View File

@@ -16,8 +16,7 @@
src.laws.show_laws(who)
/mob/living/silicon/ai/add_ion_law(var/law)
src.laws_sanity_check()
src.laws.add_ion_law(law)
..()
for(var/mob/living/silicon/robot/R in mob_list)
if(R.lawupdate && (R.connected_ai == src))
R.show_laws()

View File

@@ -12,6 +12,7 @@
/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg)
laws_sanity_check()
laws.set_zeroth_law(law, law_borg)
log_and_message_admins("has given [src] the zeroth laws: [law]/[law_borg ? law_borg : "N/A"]")
/mob/living/silicon/robot/set_zeroth_law(var/law, var/law_borg)
..()
@@ -21,28 +22,39 @@
/mob/living/silicon/proc/add_ion_law(var/law)
laws_sanity_check()
laws.add_ion_law(law)
log_and_message_admins("has given [src] the ion law: [law]")
/mob/living/silicon/proc/add_inherent_law(var/law, var/state_law = 1)
/mob/living/silicon/proc/add_inherent_law(var/law)
laws_sanity_check()
laws.add_inherent_law(law, state_law)
laws.add_inherent_law(law)
log_and_message_admins("has given [src] the inherent law: [law]")
/mob/living/silicon/proc/add_supplied_law(var/number, var/law)
laws_sanity_check()
laws.add_supplied_law(number, law)
log_and_message_admins("has given [src] the supplied law: [law]")
/mob/living/silicon/proc/delete_law(var/datum/ai_law/law)
laws_sanity_check()
laws.delete_law(law)
log_and_message_admins("has deleted a law belonging to [src]: [law.law]")
/mob/living/silicon/proc/clear_inherent_laws()
laws_sanity_check()
laws.clear_inherent_laws()
log_and_message_admins("cleared the inherent laws of [src]")
/mob/living/silicon/proc/clear_ion_laws()
laws_sanity_check()
laws.clear_ion_laws()
/mob/living/silicon/proc/add_supplied_law(var/number, var/law, var/state_law = 1)
laws_sanity_check()
laws.add_supplied_law(number, law, state_law)
log_and_message_admins("cleared the ion laws of [src]")
/mob/living/silicon/proc/clear_supplied_laws()
laws_sanity_check()
laws.clear_supplied_laws()
log_and_message_admins("cleared the supplied laws of [src]")
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws, var/use_statement_order = 1) // -- TLE
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws)
var/prefix = ""
switch(lawchannel)
if(MAIN_CHANNEL) prefix = ";"
@@ -50,9 +62,9 @@
else
prefix = get_radio_key_from_channel(lawchannel == "Holopad" ? "department" : lawchannel) + " "
dostatelaws(lawchannel, prefix, laws, use_statement_order)
dostatelaws(lawchannel, prefix, laws)
/mob/living/silicon/proc/dostatelaws(var/method, var/prefix, var/datum/ai_laws/laws, var/use_statement_order)
/mob/living/silicon/proc/dostatelaws(var/method, var/prefix, var/datum/ai_laws/laws)
if(stating_laws[prefix])
src << "<span class='notice'>[method]: Already stating laws using this communication method.</span>"
return
@@ -62,7 +74,7 @@
var/can_state = statelaw("[prefix]Current Active Laws:")
for(var/datum/ai_law/law in laws.laws_to_state())
can_state = statelaw("[prefix][law.get_index(use_statement_order)]. [law.law]")
can_state = statelaw("[prefix][law.get_index()]. [law.law]")
if(!can_state)
src << "<span class='danger'>[method]: Unable to state laws. Communication method unavailable.</span>"
@@ -81,3 +93,7 @@
channels += common_radio.channels
channels += additional_law_channels
return channels
/mob/living/silicon/proc/lawsync()
laws_sanity_check()
laws.sort_laws()

View File

@@ -57,32 +57,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 = sanitize(copytext(t,1,MAX_NAME_LEN))
candidate.name = sanitizeSafe(t, MAX_NAME_LEN)
if("desc")
t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
candidate.description = sanitize(t)
if("role")
t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
candidate.role = sanitize(t)
if("ooc")
t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
candidate.comments = sanitize(t)
if("save")
candidate.savefile_save(usr)
if("load")
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
candidate.name = sanitizeSafe(candidate.name, MAX_NAME_LEN)
if(candidate.description)
candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
candidate.description = sanitize(candidate.description)
if(candidate.role)
candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
candidate.role = sanitize(candidate.role)
if(candidate.comments)
candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
candidate.comments = sanitize(candidate.comments)
if("submit")
if(candidate)

View File

@@ -17,6 +17,11 @@
integrated_light_power = 2
local_transmit = 1
mob_bump_flag = SIMPLE_ANIMAL
mob_swap_flags = SIMPLE_ANIMAL
mob_push_flags = SIMPLE_ANIMAL
mob_always_swap = 1
//Used for self-mailing.
var/mail_destination = ""
@@ -256,20 +261,6 @@
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your third law</i></b>."
/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes)
if (!yes || ( \
!istype(AM,/obj/machinery/door) && \
!istype(AM,/obj/machinery/recharge_station) && \
!istype(AM,/obj/machinery/disposal/deliveryChute) && \
!istype(AM,/obj/machinery/teleport/hub) && \
!istype(AM,/obj/effect/portal)
)) return
..()
return
/mob/living/silicon/robot/drone/Bumped(AM as mob|obj)
return
/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct))

View File

@@ -24,6 +24,6 @@
//Actual picking-up event.
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
get_scooped(M)
..()

View File

@@ -38,11 +38,12 @@
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
/mob/living/silicon/robot/proc/lawsync()
/mob/living/silicon/robot/lawsync()
laws_sanity_check()
var/datum/ai_laws/master = connected_ai ? connected_ai.laws : null
var/datum/ai_laws/master = connected_ai && lawupdate ? connected_ai.laws : null
if (master)
master.sync(src)
..()
return
/mob/living/silicon/robot/proc/robot_checklaws()

View File

@@ -8,6 +8,10 @@
maxHealth = 200
health = 200
mob_bump_flag = ROBOT
mob_swap_flags = ROBOT|MONKEY|SLIME|SIMPLE_ANIMAL
mob_push_flags = ALLMOBS //trundle trundle
var/lights_on = 0 // Is our integrated light on?
var/used_power_this_tick = 0
var/sight_mode = 0
@@ -432,8 +436,8 @@
spawn(0)
var/newname
newname = input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text
if (newname != "")
newname = sanitizeSafe(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
if (newname)
custom_name = newname
updatename()
@@ -575,43 +579,6 @@
if(prob(75) && Proj.damage > 0) spark_system.start()
return 2
/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(20))
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
now_pushing = 0
..()
if (istype(AM, /obj/machinery/recharge_station))
var/obj/machinery/recharge_station/F = AM
F.move_inside()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
return
@@ -1233,6 +1200,7 @@
/mob/living/silicon/robot/proc/disconnect_from_ai()
if(connected_ai)
sync() // One last sync attempt
connected_ai.connected_robots -= src
connected_ai = null

View File

@@ -124,11 +124,11 @@
/obj/item/weapon/pen/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
if ( !user || !paper )
return
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
var/n_name = sanitizeSafe(input(user, "What would you like to label the paper?", "Paper Labelling", null) as text, 32)
if ( !user || !paper )
return
n_name = copytext(n_name, 1, 32)
//n_name = copytext(n_name, 1, 32)
if(( get_dist(user,paper) <= 1 && user.stat == 0))
paper.name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(user)

View File

@@ -34,7 +34,7 @@
if (src.client.handle_spam_prevention(message,MUTE_IC))
return 0
message = trim_strip_html_properly(message)
message = sanitize(message)
if (stat == 2)
return say_dead(message)

View File

@@ -235,14 +235,14 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = sanitize(copytext(input(usr, "This is [src]. It is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
pose = sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text)
/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 = sanitize(copytext(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text, 1))
flavor_text = sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
/mob/living/silicon/binarycheck()
return 1
@@ -333,3 +333,14 @@
for(var/obj/machinery/camera/C in A.cameras())
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=\ref[src];switchcamera=\ref[C]>[C.c_tag]</A>"
src << "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])"
/mob/living/silicon/proc/is_traitor()
return mind && (mind in traitors.current_antagonists)
/mob/living/silicon/proc/is_malf()
return mind && (mind in malf.current_antagonists)
/mob/living/silicon/proc/is_malf_or_traitor()
return is_traitor() || is_malf()

View File

@@ -11,7 +11,7 @@
icon_living = "brainslug"
icon_dead = "brainslug_dead"
speed = 5
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement = 1
status_flags = CANPUSH
attacktext = "nipped"

View File

@@ -14,7 +14,7 @@
if(istype(src.loc,/mob/living/simple_animal/borer))
message = trim_strip_html_properly(message)
message = sanitize(message)
if (!message)
return
log_say("[key_name(src)] : [message]")

View File

@@ -1,6 +1,6 @@
/mob/living/simple_animal/borer/say(var/message)
message = trim_strip_html_properly(message)
message = sanitize(message)
message = capitalize(message)
if(!message)

View File

@@ -10,10 +10,11 @@
response_harm = "punches"
icon_dead = "shade_dead"
speed = -1
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement = 1
status_flags = CANPUSH
universal_speak = 1
universal_speak = 0
universal_understand = 1
attack_sound = 'sound/weapons/punch1.ogg'
min_oxy = 0
max_oxy = 0
@@ -24,15 +25,25 @@
min_n2 = 0
max_n2 = 0
minbodytemp = 0
show_stat_health = 0
faction = "cult"
supernatural = 1
var/nullblock = 0
mob_swap_flags = HUMAN|SIMPLE_ANIMAL|SLIME|MONKEY
mob_push_flags = ALLMOBS
var/list/construct_spells = list()
/mob/living/simple_animal/construct/New()
..()
name = text("[initial(name)] ([rand(1, 1000)])")
real_name = name
add_language("Cult")
add_language("Occult")
for(var/spell in construct_spells)
spell_list += new spell(src)
updateicon()
/mob/living/simple_animal/construct/death()
new /obj/item/weapon/ectoplasm (src.loc)
@@ -40,12 +51,11 @@
ghostize()
del src
/mob/living/simple_animal/construct/attack_generic(var/mob/user)
if(istype(user, /mob/living/simple_animal/construct/builder))
if(health < maxHealth)
adjustBruteLoss(-5)
user.visible_message("<b>\The [user]</b> mends some of \the [src]'s wounds.")
user.visible_message("<span class='notice'>\The [user]</b> mends some of \the [src]'s wounds.</span>")
else
user << "<span class='notice'>\The [src] is undamaged.</span>"
return
@@ -53,7 +63,7 @@
/mob/living/simple_animal/construct/examine(mob/user)
..(user)
var/msg = ""
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
@@ -64,54 +74,12 @@
msg += "*---------*</span>"
user << msg
return
/mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
/mob/living/simple_animal/construct/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
/////////////////Juggernaut///////////////
/mob/living/simple_animal/construct/armoured
name = "Juggernaut"
real_name = "Juggernaut"
@@ -128,32 +96,12 @@
attacktext = "smashed their armoured gauntlet into"
mob_size = 20
speed = 3
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch3.ogg'
status_flags = 0
resistance = 10
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
/mob/living/simple_animal/construct/armoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
/mob/living/simple_animal/construct/armoured/Life()
weakened = 0
..()
@@ -163,8 +111,8 @@
var/reflectchance = 80 - round(P.damage/3)
if(prob(reflectchance))
adjustBruteLoss(P.damage * 0.5)
visible_message("<span class='danger'>\The [P] was reflected by \the [src]'s shell!</span>", \
"<span class='userdanger'>\The [P] was reflected by \the [src]'s shell!</span>")
visible_message("<span class='danger'>The [P.name] gets reflected by [src]'s shell!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [src]'s shell!</span>")
// Find a turf near or on the original location to bounce to
if(P.starting)
@@ -198,12 +146,12 @@
melee_damage_upper = 25
attacktext = "slashed"
speed = -1
environment_smash = 1
see_in_dark = 7
attack_sound = 'sound/weapons/bladeslice.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift)
/////////////////////////////Artificer/////////////////////////
@@ -223,7 +171,7 @@
melee_damage_upper = 5
attacktext = "rammed"
speed = 0
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch2.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser,
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
@@ -250,60 +198,35 @@
melee_damage_upper = 50
attacktext = "brutally crushed"
speed = 5
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch4.ogg'
mob_size = 20
resistance = 10
var/energy = 0
var/max_energy = 1000
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.force)
if(O.force >= 11)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with [O] by [user]. ")
else
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [O] bounces harmlessly off of [src]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with [O]. ")
////////////////////////Harvester////////////////////////////////
////////////////Powers//////////////////
/mob/living/simple_animal/construct/harvester
name = "Harvester"
real_name = "Harvester"
desc = "The promised reward of the livings who follow narsie. Obtained by offering their bodies to the geometer of blood"
icon = 'icons/mob/mob.dmi'
icon_state = "harvester"
icon_living = "harvester"
maxHealth = 150
health = 150
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "violently stabs"
speed = -1
environment_smash = 1
see_in_dark = 7
attack_sound = 'sound/weapons/pierce.ogg'
/*
/client/proc/summon_cultist()
set category = "Behemoth"
set name = "Summon Cultist (300)"
set desc = "Teleport a cultist to your location"
if (istype(usr,/mob/living/simple_animal/constructbehemoth))
if(usr.energy<300)
usr << "\red You do not have enough power stored!"
return
if(usr.stat)
return
usr.energy -= 300
var/list/mob/living/cultists = new
for(var/datum/mind/H in ticker.mode.cult)
if (istype(H.current,/mob/living))
cultists+=H.current
var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - usr)
if(!cultist)
return
if (cultist == usr) //just to be sure.
return
cultist.loc = usr.loc
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/
construct_spells = list(
//spell/targeted/harvest,
//spell/aoe_turf/knock/harvester,
//spell/rune_write
)

View File

@@ -103,7 +103,7 @@
/mob/living/simple_animal/cat/attack_hand(mob/living/carbon/human/M as mob)
. = ..()
if(M.a_intent == "hurt")
if(M.a_intent == I_HURT)
set_flee_target(M)
/mob/living/simple_animal/cat/ex_act()

View File

@@ -24,241 +24,6 @@
var/obj/item/inventory_back
var/facehugger
/*
/mob/living/simple_animal/corgi/Life()
..()
regenerate_icons()
/mob/living/simple_animal/corgi/show_inv(mob/user as mob)
user.set_machine(src)
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(inventory_head)
dat += "<br><b>Head:</b> [inventory_head] (<a href='?src=\ref[src];remove_inv=head'>Remove</a>)"
else
dat += "<br><b>Head:</b> <a href='?src=\ref[src];add_inv=head'>Nothing</a>"
if(inventory_back)
dat += "<br><b>Back:</b> [inventory_back] (<a href='?src=\ref[src];remove_inv=back'>Remove</a>)"
else
dat += "<br><b>Back:</b> <a href='?src=\ref[src];add_inv=back'>Nothing</a>"
user << browse(dat, text("window=mob[];size=325x500", name))
onclose(user, "mob[real_name]")
return
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(inventory_head && inventory_back)
//helmet and armor = 100% protection
if( istype(inventory_head,/obj/item/clothing/head/helmet) && istype(inventory_back,/obj/item/clothing/suit/armor) )
if( O.force )
usr << "\red This animal is wearing too much armor. You can't cause /him any damage."
for (var/mob/M in viewers(src, null))
M.show_message("\red \b [user] hits [src] with the [O], however [src] is too armored.")
else
usr << "\red This animal is wearing too much armor. You can't reach its skin."
for (var/mob/M in viewers(src, null))
M.show_message("\red [user] gently taps [src] with the [O]. ")
if(prob(15))
visible_emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression on \his face")
return
..()
/mob/living/simple_animal/corgi/Topic(href, href_list)
if(usr.stat) return
//Removing from inventory
if(href_list["remove_inv"])
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
return
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("head")
if(inventory_head)
name = real_name
desc = initial(desc)
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
desc = "It's a corgi."
SetLuminosity(0)
inventory_head.loc = src.loc
inventory_head = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
if("back")
if(inventory_back)
inventory_back.loc = src.loc
inventory_back = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
//Adding things to inventory
else if(href_list["add_inv"])
if(!Adjacent(usr) || !(ishuman(usr) || issmall(usr) || isrobot(usr) || isalienadult(usr)))
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
usr << "\red You have nothing in your hand to put on its [add_to]."
return
switch(add_to)
if("head")
if(inventory_head)
usr << "\red It's is already wearing something."
return
else
place_on_head(usr.get_active_hand())
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
//Corgis are supposed to be simpler, so only a select few objects can actually be put
//to be compatible with them. The objects are below.
//Many hats added, Some will probably be removed, just want to see which ones are popular.
var/list/allowed_types = list(
/obj/item/clothing/head/helmet,
/obj/item/clothing/glasses/sunglasses,
/obj/item/clothing/head/caphat,
/obj/item/clothing/head/collectable/captain,
/obj/item/clothing/head/that,
/obj/item/clothing/head/that,
/obj/item/clothing/head/kitty,
/obj/item/clothing/head/collectable/kitty,
/obj/item/clothing/head/rabbitears,
/obj/item/clothing/head/collectable/rabbitears,
/obj/item/clothing/head/beret,
/obj/item/clothing/head/collectable/beret,
/obj/item/clothing/head/det_hat,
/obj/item/clothing/head/nursehat,
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/collectable/pirate,
/obj/item/clothing/head/ushanka,
/obj/item/clothing/head/chefhat,
/obj/item/clothing/head/collectable/chef,
/obj/item/clothing/head/collectable/police,
/obj/item/clothing/head/wizard/fake,
/obj/item/clothing/head/wizard,
/obj/item/clothing/head/collectable/wizard,
/obj/item/clothing/head/hardhat,
/obj/item/clothing/head/collectable/hardhat,
/obj/item/clothing/head/hardhat/white,
/obj/item/weapon/bedsheet,
/obj/item/clothing/head/helmet/space/santahat,
/obj/item/clothing/head/collectable/paper,
/obj/item/clothing/head/soft
)
if( ! ( item_to_add.type in allowed_types ) )
usr << "\red It doesn't seem too keen on wearing that item."
return
usr.drop_item()
place_on_head(item_to_add)
if("back")
if(inventory_back)
usr << "\red It's already wearing something."
return
else
var/obj/item/item_to_add = usr.get_active_hand()
if(!item_to_add)
return
//Corgis are supposed to be simpler, so only a select few objects can actually be put
//to be compatible with them. The objects are below.
var/list/allowed_types = list(
/obj/item/clothing/suit/armor/vest,
/obj/item/device/radio
)
if( ! ( item_to_add.type in allowed_types ) )
usr << "\red This object won't fit."
return
usr.drop_item()
item_to_add.loc = src
src.inventory_back = item_to_add
regenerate_icons()
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
else
..()
/mob/living/simple_animal/corgi/proc/place_on_head(obj/item/item_to_add)
item_to_add.loc = src
src.inventory_head = item_to_add
regenerate_icons()
//Various hats and items (worn on his head) change Ian's behaviour. His attributes are reset when a HAT is removed.
switch(inventory_head && inventory_head.type)
if(/obj/item/clothing/head/caphat, /obj/item/clothing/head/collectable/captain)
name = "Captain [real_name]"
desc = "Probably better than the last captain."
if(/obj/item/clothing/head/kitty, /obj/item/clothing/head/collectable/kitty)
name = "Runtime"
emote_see = list("coughs up a furball", "stretches")
emote_hear = list("purrs")
speak = list("Purrr", "Meow!", "MAOOOOOW!", "HISSSSS", "MEEEEEEW")
desc = "It's a cute little kitty-cat! ... wait ... what the hell?"
if(/obj/item/clothing/head/rabbitears, /obj/item/clothing/head/collectable/rabbitears)
name = "Hoppy"
emote_see = list("twitches its nose", "hops around a bit")
desc = "This is hoppy. It's a corgi-...urmm... bunny rabbit"
if(/obj/item/clothing/head/beret, /obj/item/clothing/head/collectable/beret)
name = "Yann"
desc = "Mon dieu! C'est un chien!"
speak = list("le woof!", "le bark!", "JAPPE!!")
emote_see = list("cowers in fear", "surrenders", "plays dead","looks as though there is a wall in front of him")
if(/obj/item/clothing/head/det_hat)
name = "Detective [real_name]"
desc = "[name] sees through your lies..."
emote_see = list("investigates the area","sniffs around for clues","searches for scooby snacks")
if(/obj/item/clothing/head/nursehat)
name = "Nurse [real_name]"
desc = "[name] needs 100cc of beef jerky...STAT!"
if(/obj/item/clothing/head/pirate, /obj/item/clothing/head/collectable/pirate)
name = "[pick("Ol'","Scurvy","Black","Rum","Gammy","Bloody","Gangrene","Death","Long-John")] [pick("kibble","leg","beard","tooth","poop-deck","Threepwood","Le Chuck","corsair","Silver","Crusoe")]"
desc = "Yaarghh!! Thar' be a scurvy dog!"
emote_see = list("hunts for treasure","stares coldly...","gnashes his tiny corgi teeth")
emote_hear = list("growls ferociously", "snarls")
speak = list("Arrrrgh!!","Grrrrrr!")
if(/obj/item/clothing/head/ushanka)
name = "[pick("Comrade","Commissar","Glorious Leader")] [real_name]"
desc = "A follower of Karl Barx."
emote_see = list("contemplates the failings of the capitalist economic model", "ponders the pros and cons of vangaurdism")
if(/obj/item/clothing/head/collectable/police)
name = "Officer [real_name]"
emote_see = list("drools","looks for donuts")
desc = "Stop right there criminal scum!"
if(/obj/item/clothing/head/wizard/fake, /obj/item/clothing/head/wizard, /obj/item/clothing/head/collectable/wizard)
name = "Grandwizard [real_name]"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU", "EI NATH!")
if(/obj/item/weapon/bedsheet)
name = "\improper Ghost"
speak = list("WoooOOOooo~","AUUUUUUUUUUUUUUUUUU")
emote_see = list("stumbles around", "shivers")
emote_hear = list("howls","groans")
desc = "Spooky!"
if(/obj/item/clothing/head/helmet/space/santahat)
name = "Rudolph the Red-Nosed Corgi"
emote_hear = list("barks christmas songs", "yaps")
desc = "He has a very shiny nose."
SetLuminosity(6)
if(/obj/item/clothing/head/soft)
name = "Corgi Tech [real_name]"
desc = "The reason your yellow gloves have chew-marks."
*/
//IAN! SQUEEEEEEEEE~
/mob/living/simple_animal/corgi/Ian
name = "Ian"
@@ -325,44 +90,6 @@
name = "Corgi meat"
desc = "Tastes like... well you know..."
/mob/living/simple_animal/corgi/Ian/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
//PC stuff-Sieve
/mob/living/simple_animal/corgi/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/weapon/newspaper))
if(!stat)

View File

@@ -125,7 +125,7 @@
udder.add_reagent("milk", rand(5, 10))
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == "disarm" && icon_state != icon_dead)
if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(30)
icon_state = icon_dead

View File

@@ -14,43 +14,6 @@
emote_see = list("jiggles", "bounces in place")
var/colour = "grey"
/mob/living/simple_animal/slime/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
var/mob/tmob = AM
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
if(prob(70))
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
return
tmob.LAssailant = src
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
var/obj/structure/window/W = AM
if(W.is_full_window())
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
step(AM, t)
now_pushing = null
return
return
/mob/living/simple_animal/adultslime
name = "pet slime"
desc = "A lovable, domesticated slime."

View File

@@ -17,7 +17,7 @@
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashed"
a_intent = "harm"
a_intent = I_HURT
attack_sound = 'sound/weapons/bladeslice.ogg'
min_oxy = 0
max_oxy = 0
@@ -29,7 +29,7 @@
max_n2 = 0
unsuitable_atoms_damage = 15
faction = "alien"
wall_smash = 1
environment_smash = 2
status_flags = CANPUSH
minbodytemp = 0
heat_damage_per_tick = 20

View File

@@ -13,7 +13,7 @@
speak = list("HONK", "Honk!", "Welcome to clown planet!")
emote_see = list("honks")
speak_chance = 1
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
maxHealth = 75
health = 75

View File

@@ -15,7 +15,7 @@
response_harm = "hits"
speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.")
emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity")
a_intent = "harm"
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
health = 300
maxHealth = 300

View File

@@ -18,7 +18,7 @@
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "punched"
a_intent = "harm"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchenknife
min_oxy = 5

View File

@@ -18,7 +18,7 @@
melee_damage_lower = 10
melee_damage_upper = 10
attacktext = "punched"
a_intent = "harm"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier
var/weapon1
var/weapon2
@@ -31,7 +31,7 @@
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 15
wall_smash = 1
environment_smash = 1
faction = "syndicate"
status_flags = CANPUSH
@@ -159,4 +159,4 @@
/mob/living/simple_animal/hostile/viscerator/death()
..(null,"is smashed into pieces!")
del src
del src

View File

@@ -215,7 +215,7 @@
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M as mob)
..()
if(client) return
if(!stat && M.a_intent == "hurt")
if(!stat && M.a_intent == I_HURT)
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks

View File

@@ -28,28 +28,13 @@
faction = "cult"
status_flags = CANPUSH
/mob/living/simple_animal/shade/Life()
..()
OnDeathInLife()
Life()
..()
OnDeathInLife()
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
else
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
health -= damage
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
else
usr << "\red This weapon is ineffective, it does no damage."
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
O.transfer_soul("SHADE", src, user)
return
/mob/living/simple_animal/shade/proc/OnDeathInLife()
@@ -60,4 +45,4 @@
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
ghostize()
del src
return
return

View File

@@ -4,6 +4,12 @@
health = 20
maxHealth = 20
mob_bump_flag = SIMPLE_ANIMAL
mob_swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
mob_push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
var/show_stat_health = 1 //does the percentage health show in the stat panel for the mob
var/icon_living = ""
var/icon_dead = ""
var/icon_gib = null //We only try to show a gibbing animation if this exists.
@@ -52,7 +58,12 @@
var/attacktext = "attacked"
var/attack_sound = null
var/friendly = "nuzzles"
var/wall_smash = 0
var/environment_smash = 0
var/resistance = 0 // Damage reduction
//Null rod stuff
var/supernatural = 0
var/purge = 0
/mob/living/simple_animal/New()
..()
@@ -88,6 +99,7 @@
handle_stunned()
handle_weakened()
handle_paralysed()
handle_supernatural()
//Movement
if(!client && !stop_automated_movement && wander && !anchored)
@@ -186,19 +198,9 @@
adjustBruteLoss(unsuitable_atoms_damage)
return 1
/mob/living/simple_animal/Bumped(AM as mob|obj)
if(!AM) return
if(resting || buckled)
return
if(isturf(src.loc))
if(ismob(AM))
var/newamloc = src.loc
src.loc = AM:loc
AM:loc = newamloc
else
..()
/mob/living/simple_animal/proc/handle_supernatural()
if(purge)
purge -= 1
/mob/living/simple_animal/gib()
..(icon_gib,1)
@@ -225,15 +227,15 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if (health > 0)
M.visible_message("\blue [M] [response_help] \the [src]")
if("disarm")
if(I_DISARM)
M.visible_message("\blue [M] [response_disarm] \the [src]")
//TODO: Push the mob away or something
if("grab")
if(I_GRAB)
if (M == src)
return
if (!(status_flags & CANPUSH))
@@ -249,62 +251,66 @@
M.visible_message("\red [M] has grabbed [src] passively!")
if("hurt")
if(I_HURT)
adjustBruteLoss(harm_intent_damage)
M.visible_message("\red [M] [response_harm] \the [src]")
return
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user) //Marker -Agouri
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/stack/medical))
if(stat != DEAD && health < maxHealth)
var/obj/item/stack/medical/medical_pack = O
if(medical_pack.use(1))
adjustBruteLoss(-medical_pack.heal_brute)
visible_message("<span class='warning'>\The [user] applies the [medical_pack] to \the [src].</span>")
user.changeNext_move(4)
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
if(MED.amount >= 1)
adjustBruteLoss(-MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] applies the [MED] on [src].</span>")
else
user << "<span class='warning'>\The [src] cannot benefit from medical items in \his current state.</span>"
return
else if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
var/actual_meat_amount = max(1,(meat_amount/2))
if(meat_type && actual_meat_amount>0 && (stat == DEAD))
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
meat.name = "[src.name] [meat.name]"
if(small)
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
del(src)
else
user.visible_message("<span class='danger'>[user] butchers \the [src] messily!</span>")
gib()
return
if(O.force)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
adjustBruteLoss(damage)
visible_message("<span class='danger'>\The [src] has been attacked with \the [O] by [user].</span>")
user << "<span class='notice>\The [src] is dead, medical items won't bring it back to life.</span>"
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
harvest(user)
else
user << "<span class='danger'>This weapon is ineffective; it does no damage.</span>"
visible_message("<span class='danger'>\The [user] gently taps [src] with the [O].</span>")
user.changeNext_move(8)
if(O.force > resistance)
var/damage = O.force
if (O.damtype == HALLOSS)
damage = 0
if(supernatural && istype(O,/obj/item/weapon/nullrod))
damage *= 2
purge = 3
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='danger>[src] has been attacked with the [O] by [user].</span>")
else
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] gently taps [src] with the [O].</span>")
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
tally = speed
if(purge)//Purged creatures will move more slowly. The more time before their purge stops, the slower they'll move.
if(tally <= 0)
tally = 1
tally *= purge
return tally+config.animal_delay
/mob/living/simple_animal/Stat()
..()
statpanel("Status")
stat(null, "Health: [round((health / maxHealth) * 100)]%")
if(statpanel("Status") && show_stat_health)
stat(null, "Health: [round((health / maxHealth) * 100)]%")
/mob/living/simple_animal/death()
icon_state = icon_dead
@@ -354,24 +360,32 @@
overlays += target_locked
/mob/living/simple_animal/say(var/message)
if(stat)
return
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
if(stat)
return
var/verb = "says"
if(speak_emote.len)
verb = pick(speak_emote)
message = capitalize(trim_left(message))
message = sanitize(message)
..(message, null, verb)
/mob/living/simple_animal/get_speech_ending(verb, var/ending)
return verb
/mob/living/simple_animal/put_in_hands(var/obj/item/W) // No hands.
W.loc = get_turf(src)
return 1
// Harvest an animal's delicious byproducts
/mob/living/simple_animal/proc/harvest(var/mob/user)
var/actual_meat_amount = max(1,(meat_amount/2))
if(meat_type && actual_meat_amount>0 && (stat == DEAD))
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
meat.name = "[src.name] [meat.name]"
if(small)
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
del(src)
else
user.visible_message("<span class='danger'>[user] butchers \the [src] messily!</span>")
gib()

View File

@@ -30,9 +30,9 @@
max_co2 = 0
max_tox = 0
a_intent = "harm" //so they don't get pushed around
a_intent = I_HURT //so they don't get pushed around
wall_smash = 1
environment_smash = 2
speed = -1

View File

@@ -360,12 +360,9 @@ var/list/slot_equipment_priority = list( \
set src in usr
if(usr != src)
usr << "No."
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
var/msg = sanitize(input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null, extra = 0)
if(msg != null)
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
msg = html_encode(msg)
flavor_text = msg
/mob/proc/warn_flavor_changed()

View File

@@ -14,6 +14,7 @@
var/obj/screen/blind = null
var/obj/screen/hands = null
var/obj/screen/pullin = null
var/obj/screen/purged = null
var/obj/screen/internals = null
var/obj/screen/oxygen = null
var/obj/screen/i_select = null
@@ -117,7 +118,7 @@
var/losebreath = 0.0//Carbon
var/intent = null//Living
var/shakecamera = 0
var/a_intent = "help"//Living
var/a_intent = I_HELP//Living
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null

View File

@@ -342,7 +342,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 sanitize(copytext(t,1,MAX_MESSAGE_LEN))
return sanitize(t)
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
@@ -389,7 +389,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 sanitize(copytext(t,1,MAX_MESSAGE_LEN))
return sanitize(t)
/proc/shake_camera(mob/M, duration, strength=1)
@@ -433,20 +433,20 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 0
//converts intent-strings into numbers and back
var/list/intents = list("help","disarm","grab","hurt")
var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
/proc/intent_numeric(argument)
if(istext(argument))
switch(argument)
if("help") return 0
if("disarm") return 1
if("grab") return 2
if(I_HELP) return 0
if(I_DISARM) return 1
if(I_GRAB) return 2
else return 3
else
switch(argument)
if(0) return "help"
if(1) return "disarm"
if(2) return "grab"
else return "hurt"
if(0) return I_HELP
if(1) return I_DISARM
if(2) return I_GRAB
else return I_HURT
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
/mob/verb/a_intent_change(input as text)
@@ -455,7 +455,7 @@ var/list/intents = list("help","disarm","grab","hurt")
if(ishuman(src) || isbrain(src) || isslime(src))
switch(input)
if("help","disarm","grab","hurt")
if(I_HELP,I_DISARM,I_GRAB,I_HURT)
a_intent = input
if("right")
a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4)
@@ -466,17 +466,17 @@ var/list/intents = list("help","disarm","grab","hurt")
else if(isrobot(src))
switch(input)
if("help")
a_intent = "help"
if("hurt")
a_intent = "hurt"
if(I_HELP)
a_intent = I_HELP
if(I_HURT)
a_intent = I_HURT
if("right","left")
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
if(hud_used && hud_used.action_intent)
if(a_intent == "hurt")
hud_used.action_intent.icon_state = "harm"
if(a_intent == I_HURT)
hud_used.action_intent.icon_state = I_HURT
else
hud_used.action_intent.icon_state = "help"
hud_used.action_intent.icon_state = I_HELP
proc/is_blind(A)
if(istype(A, /mob/living/carbon))

View File

@@ -36,7 +36,7 @@
usr << "\red Speech is currently admin-disabled."
return
message = strip_html_properly(message)
message = sanitize(message)
set_typing_indicator(0)
if(use_me)

View File

@@ -180,7 +180,7 @@
var/alien_caste = pick("Hunter","Sentinel","Drone")
var/mob/living/carbon/human/new_xeno = create_new_xenomorph(alien_caste,loc)
new_xeno.a_intent = "hurt"
new_xeno.a_intent = I_HURT
new_xeno.key = key
new_xeno << "<B>You are now an alien.</B>"
@@ -237,7 +237,7 @@
del(t)
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
new_corgi.a_intent = "hurt"
new_corgi.a_intent = I_HURT
new_corgi.key = key
new_corgi << "<B>You are now a Corgi. Yap Yap!</B>"
@@ -271,7 +271,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob << "You suddenly feel more... animalistic."
@@ -291,7 +291,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob << "You feel more... animalistic"
del(src)