mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Mob refactoring.
Updates Bump() code. Intents now use constants. Simple animals can now use languages without overriding say(). There is now a difference between being able to smash normal and reinforced walls. Reworks simple_animal/attackby so that constructs don't need to override it simply to add damage resistance.
This commit is contained in:
@@ -182,7 +182,7 @@
|
||||
icons.Add(usr.zone_sel)
|
||||
|
||||
for(var/obj/screen/I in icons)
|
||||
if(I.name in list("help", "harm", "disarm", "grab")) continue
|
||||
if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB)) continue
|
||||
I.icon = ui_style2icon(UI_style_new)
|
||||
I.color = UI_style_color_new
|
||||
I.alpha = UI_style_alpha_new
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(ishuman(M) && isliving(user))
|
||||
if(user.a_intent == "help")
|
||||
if(user.a_intent == I_HELP)
|
||||
var/body_part = parse_zone(user.zone_sel.selecting)
|
||||
if(body_part)
|
||||
var/their = "their"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
|
||||
user << "<span class='warning'>You need an empty hand to draw \the [holstered]!</span>"
|
||||
else
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == I_HURT)
|
||||
usr.visible_message(
|
||||
"\red [user] draws \the [holstered], ready to shoot!</span>",
|
||||
"<span class='warning'>You draw \the [holstered], ready to shoot!</span>"
|
||||
|
||||
@@ -401,13 +401,13 @@
|
||||
faction = "neutral"
|
||||
melee_damage_lower = 0
|
||||
melee_damage_upper = 0
|
||||
wall_smash = 0
|
||||
environment_smash = 0
|
||||
destroy_surroundings = 0
|
||||
else
|
||||
faction = "carp"
|
||||
melee_damage_lower = initial(melee_damage_lower)
|
||||
melee_damage_upper = initial(melee_damage_upper)
|
||||
wall_smash = initial(wall_smash)
|
||||
environment_smash = initial(environment_smash)
|
||||
destroy_surroundings = initial(destroy_surroundings)
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holodeck/gib()
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
if(user == M)
|
||||
return ..()
|
||||
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == I_HURT)
|
||||
|
||||
// This is being copypasted here because reagent_containers (WHY DOES FOOD DESCEND FROM THAT) overrides it completely.
|
||||
// TODO: refactor all food paths to be less horrible and difficult to work with in this respect. ~Z
|
||||
@@ -291,7 +291,7 @@
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == I_HURT)
|
||||
user.visible_message("<span class='danger'>\The [user] squashes \the [src]!</span>")
|
||||
seed.thrown_at(src,user)
|
||||
sleep(-1)
|
||||
|
||||
@@ -82,3 +82,30 @@
|
||||
|
||||
/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")
|
||||
|
||||
/datum/language/cult
|
||||
name = "Occult"
|
||||
desc = "The initiated can share their thoughts, by means defying reason."
|
||||
speech_verb = "intones"
|
||||
ask_verb = "intones"
|
||||
exclaim_verb = "chants"
|
||||
colour = "cult"
|
||||
key = "m"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1166,6 +1166,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"
|
||||
|
||||
@@ -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>")
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -80,6 +80,11 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
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)
|
||||
if(stat)
|
||||
return
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
|
||||
@@ -16,6 +16,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 = ""
|
||||
|
||||
@@ -255,20 +260,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))
|
||||
|
||||
@@ -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)
|
||||
..()
|
||||
@@ -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
|
||||
@@ -573,43 +577,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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -28,34 +28,20 @@
|
||||
faction = "cult"
|
||||
status_flags = CANPUSH
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
ghostize()
|
||||
del src
|
||||
return
|
||||
|
||||
|
||||
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/Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
ghostize()
|
||||
del src
|
||||
return
|
||||
|
||||
|
||||
/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
|
||||
return ..()
|
||||
|
||||
@@ -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
|
||||
@@ -363,15 +369,43 @@
|
||||
if(stat)
|
||||
return
|
||||
|
||||
var/verb = "says"
|
||||
//parse the language code and consume it
|
||||
var/datum/language/speaking = parse_language(message)
|
||||
if(speaking)
|
||||
message = copytext(message,2+length(speaking.key))
|
||||
|
||||
if(speak_emote.len)
|
||||
var/verb = "says"
|
||||
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(speak_emote.len)
|
||||
verb = pick(speak_emote)
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
message = capitalize(trim(message))
|
||||
|
||||
..(message, null, verb)
|
||||
..(message, speaking, 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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/obj/item/organ/attack_self(mob/user as mob)
|
||||
|
||||
// Convert it to an edible form, yum yum.
|
||||
if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth")
|
||||
if(!robotic && user.a_intent == I_HELP && user.zone_sel.selecting == "mouth")
|
||||
bitten(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -658,7 +658,7 @@
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC && H.a_intent == "grab")
|
||||
if(H.species.flags & IS_SYNTHETIC && H.a_intent == I_GRAB)
|
||||
if(emagged || stat & BROKEN)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
|
||||
@@ -517,7 +517,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.get_organ(user.zone_sel.selecting)
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
|
||||
return ..()
|
||||
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
if(!proximity) return
|
||||
if(istype(target, /obj/machinery/light))
|
||||
return
|
||||
if(user.a_intent != "hurt")
|
||||
if(user.a_intent != I_HURT)
|
||||
return
|
||||
|
||||
shatter()
|
||||
|
||||
@@ -90,14 +90,14 @@
|
||||
if(user && user.client && !(A in aim_targets))
|
||||
var/client/C = user.client
|
||||
//If help intent is on and we have clicked on an eligible target, switch to aim mode automatically
|
||||
if(user.a_intent == "help" && isliving(A) && !C.gun_mode)
|
||||
if(user.a_intent == I_HELP && isliving(A) && !C.gun_mode)
|
||||
C.ToggleGunMode()
|
||||
|
||||
if(C.gun_mode)
|
||||
aiming = PreFire(A,user,params) //They're using the new gun system, locate what they're aiming at.
|
||||
|
||||
if (!aiming)
|
||||
if(user && user.a_intent == "help") //regardless of what happens, refuse to shoot if help intent is on
|
||||
if(user && user.a_intent == I_HELP) //regardless of what happens, refuse to shoot if help intent is on
|
||||
user << "\red You refrain from firing your [src] as your intent is set to help."
|
||||
else
|
||||
Fire(A,user,params) //Otherwise, fire normally.
|
||||
@@ -105,7 +105,7 @@
|
||||
/obj/item/weapon/gun/attack(atom/A, mob/living/user, def_zone)
|
||||
if (A == user && user.zone_sel.selecting == "mouth" && !mouthshoot)
|
||||
handle_suicide(user)
|
||||
else if(user.a_intent == "hurt") //point blank shooting
|
||||
else if(user.a_intent == I_HURT) //point blank shooting
|
||||
Fire(A, user, pointblank=1)
|
||||
else
|
||||
return ..() //Pistolwhippin'
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
|
||||
new_mob.spell_list += new S.type
|
||||
|
||||
new_mob.a_intent = "hurt"
|
||||
new_mob.a_intent = I_HURT
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
else
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
return
|
||||
|
||||
//reflex firing is disabled when help intent is set
|
||||
if (M.a_intent == "help")
|
||||
if (M.a_intent == I_HELP)
|
||||
M << "\red You refrain from firing your [src] as your intent is set to help."
|
||||
return
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ datum
|
||||
W.loc = M.loc
|
||||
W.dropped(M)
|
||||
var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc)
|
||||
new_mob.a_intent = "hurt"
|
||||
new_mob.a_intent = I_HURT
|
||||
new_mob.universal_speak = 1
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(user.a_intent != "hurt" || !isGlass)
|
||||
if(user.a_intent != I_HURT || !isGlass)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
user << "\red This syringe is broken!"
|
||||
return
|
||||
|
||||
if (user.a_intent == "hurt" && ismob(target))
|
||||
if (user.a_intent == I_HURT && ismob(target))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
target = user
|
||||
syringestab(target, user)
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
|
||||
/datum/artifact_effect/hurt
|
||||
effecttype = "hurt"
|
||||
effect_type = 5
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
|
||||
if(toucher)
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(iscarbon(toucher) && prob(weakness * 100))
|
||||
var/mob/living/carbon/C = toucher
|
||||
C << "\red A painful discharge of energy strikes you!"
|
||||
C.adjustOxyLoss(rand(5,25) * weakness)
|
||||
C.adjustToxLoss(rand(5,25) * weakness)
|
||||
C.adjustBruteLoss(rand(5,25) * weakness)
|
||||
C.adjustFireLoss(rand(5,25) * weakness)
|
||||
C.adjustBrainLoss(rand(5,25) * weakness)
|
||||
C.radiation += 25 * weakness
|
||||
C.nutrition -= min(50 * weakness, C.nutrition)
|
||||
C.make_dizzy(6 * weakness)
|
||||
C.weakened += 6 * weakness
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/C in range(src.effectrange,T))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
if(prob(10))
|
||||
C << "\red You feel a painful force radiating from something nearby."
|
||||
C.adjustBruteLoss(1 * weakness)
|
||||
C.adjustFireLoss(1 * weakness)
|
||||
C.adjustToxLoss(1 * weakness)
|
||||
C.adjustOxyLoss(1 * weakness)
|
||||
C.adjustBrainLoss(1 * weakness)
|
||||
C.updatehealth()
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/C in range(effectrange, T))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
C << "\red A wave of painful energy strikes you!"
|
||||
C.adjustBruteLoss(3 * weakness)
|
||||
C.adjustFireLoss(3 * weakness)
|
||||
C.adjustToxLoss(3 * weakness)
|
||||
C.adjustOxyLoss(3 * weakness)
|
||||
C.adjustBrainLoss(3 * weakness)
|
||||
C.updatehealth()
|
||||
|
||||
/datum/artifact_effect/hurt
|
||||
effecttype = I_HURT
|
||||
effect_type = 5
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
|
||||
if(toucher)
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(iscarbon(toucher) && prob(weakness * 100))
|
||||
var/mob/living/carbon/C = toucher
|
||||
C << "\red A painful discharge of energy strikes you!"
|
||||
C.adjustOxyLoss(rand(5,25) * weakness)
|
||||
C.adjustToxLoss(rand(5,25) * weakness)
|
||||
C.adjustBruteLoss(rand(5,25) * weakness)
|
||||
C.adjustFireLoss(rand(5,25) * weakness)
|
||||
C.adjustBrainLoss(rand(5,25) * weakness)
|
||||
C.radiation += 25 * weakness
|
||||
C.nutrition -= min(50 * weakness, C.nutrition)
|
||||
C.make_dizzy(6 * weakness)
|
||||
C.weakened += 6 * weakness
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectAura()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/C in range(src.effectrange,T))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
if(prob(10))
|
||||
C << "\red You feel a painful force radiating from something nearby."
|
||||
C.adjustBruteLoss(1 * weakness)
|
||||
C.adjustFireLoss(1 * weakness)
|
||||
C.adjustToxLoss(1 * weakness)
|
||||
C.adjustOxyLoss(1 * weakness)
|
||||
C.adjustBrainLoss(1 * weakness)
|
||||
C.updatehealth()
|
||||
|
||||
/datum/artifact_effect/hurt/DoEffectPulse()
|
||||
if(holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
for (var/mob/living/carbon/C in range(effectrange, T))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
C << "\red A wave of painful energy strikes you!"
|
||||
C.adjustBruteLoss(3 * weakness)
|
||||
C.adjustFireLoss(3 * weakness)
|
||||
C.adjustToxLoss(3 * weakness)
|
||||
C.adjustOxyLoss(3 * weakness)
|
||||
C.adjustBrainLoss(3 * weakness)
|
||||
C.updatehealth()
|
||||
|
||||
@@ -80,7 +80,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
|
||||
proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
if (user.a_intent == "harm") //check for Hippocratic Oath
|
||||
if (user.a_intent == I_HURT) //check for Hippocratic Oath
|
||||
return 0
|
||||
var/zone = user.zone_sel.selecting
|
||||
if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly.
|
||||
@@ -108,7 +108,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool)
|
||||
H.update_surgery()
|
||||
return 1 //don't want to do weapony things after surgery
|
||||
|
||||
if (user.a_intent == "help")
|
||||
if (user.a_intent == I_HELP)
|
||||
user << "\red You can't see any useful way to use [tool] on [M]."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user