Blood Refactor (#6220)

* commit for branch swap

* branch swap again

* BLEED

* trying to clear up compile errors

* i killed everything when i tested this...

* restorealltheblood

* I REMOVED A THING

* well some progress

* stop bleeding

* got to swap branches again.

* grr

* damn bloodcolors

* Squash everything

* color....colourrrrrrr

* color....colourrrrrrr

* well now that updated the branch...

* Changes

* Some tweaks..before i upload something major

* COLOR NOT COLOUR...COLOR

YES I KNOW NOT EVERYONE SPELLS IT LIKE THAT BUT MY GOD

* Foot print shit..

blood coloring is going to be PAIN

* trying to handle some colors..maybe.

* blood colorsing sucks..di i mention this?

* commenting cod malfunctions.

* Changes

* lets try this

* Its too late at night.

* blargh

* woops

* almost works...

* progress..

* Branch swap

* figured out the overlay issue....

* BRANCH SWAP

* BLARGH

* fixed merged conflicts..expect something to be horribly wrong.

* bunch of changes

* Major Fixes

 - Moved blood_state and bloodiness var definitions to
 /obj/effect/decal/cleanable/blood as well as /cleanable/Crossed(), in
 order to make blood color work properly.
   - These were not used by any other decal, so it was pointless.
 - Tweaked human/add_blood so that hand_blood_color uses the correct
 value now.
 - Corrected gibs having the wrong basecolor.
 - Tracks of different blood colors will no longer combine weirdly, and
 will instead form seperate overlays.
   - This also fixes all of the issues with tracks in general and not
   updating correctly.
 - Fixed transfering blood in add_fingerprint; the old detective code
 didn't use the new format for add_blood().
 - Fixed xenomorphs causing runtimes in makeTrail(), and gave them their
 own trails. Sprites should probably be brightened later.
 - Fixed mobs occasionally randomly having their blood_DNA list reset.

* may have accidently removed shit.

* Mrowl

* stiff

water is not bleeding
lowered trail making threshold

* tweaks then conflcits

* weee

* indent

* some tweaks

* somefox tweaks.

* derp

* why won't they bleed!?

* BLEED DAMMIT

* Flattist comments and removes simple animale blood volume

Cause i cannot get it to work right.

* PRAISE FLATTIST

* Simple animals have a blood volume now

Bug with trail fixed.

* changes

* thanksmrowlmrowl

* exotice blood trails

* makesure is an exotic bleeder has a bleed rate first...

* FoxBoxTweakSox

* BoxVoxSoXFox

* ONE MORE THING

* animalsbleedreds

* Buh? BUGH!

* thisismescreaming

* removing note needed thing

* Color changes but the rabbit hole continues.

* This is not pretty....

* wot

* IT WORKS DAMMIT

* colors.

* germaphobic commit..

* we have to use the old system

* nothing to see here

* doubleprocarady

* try to fix mulebots

* mulebot fixed

* DONE
This commit is contained in:
Aurorablade
2017-07-11 16:49:11 -04:00
committed by Fox McCloud
parent cf7c028659
commit 476cdc3e06
73 changed files with 957 additions and 1047 deletions
@@ -294,3 +294,9 @@ Des: Removes all infected images from the alien.
playsound(T, S, volume, 1, range)
return 1
return 0
/mob/living/carbon/alien/getTrail()
if(getBruteLoss() < 200)
return pick("xltrails_1", "xltrails_2")
else
return pick("xttrails_1", "xttrails_2")
+1 -16
View File
@@ -107,7 +107,7 @@
for(var/i=0 to distance)
if(blood)
if(T)
T.add_blood_floor(src)
add_splatter_floor(T)
if(stun)
adjustBruteLoss(3)
else
@@ -477,21 +477,6 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
if(istype(loc, /obj/machinery/atmospherics))
add_ventcrawl(loc)
/mob/living/carbon/clean_blood()
. = ..()
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.gloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0,0)
H.gloves.germ_level = 0
else
if(H.bloody_hands)
H.bloody_hands = 0
H.update_inv_gloves(0,0)
H.germ_level = 0
update_icons() //apply the now updated overlays to the mob
//Throwing stuff
@@ -30,3 +30,5 @@
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
var/co2overloadtime = null
blood_volume = BLOOD_VOLUME_NORMAL
@@ -441,6 +441,11 @@
if(display_gloves)
msg += "<span class='warning'><b>[src] has blood running from under [t_his] gloves!</b></span>\n"
if(blood_volume < BLOOD_VOLUME_SAFE)
msg += "[t_He] [t_has] pale skin.\n"
if(bleedsuppress)
msg += "[t_He] [t_is] bandaged with something.\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
if(!(skipface || ( wear_mask && ( wear_mask.flags_inv & HIDEFACE || wear_mask.flags_cover & MASKCOVERSMOUTH) ) ) && is_thrall(src) && in_range(user,src))
+6 -30
View File
@@ -33,7 +33,6 @@
create_reagents(330)
prev_gender = gender // Debug for plural genders
make_blood()
martial_art = default_martial_art
@@ -539,12 +538,10 @@
popup.open()
// called when something steps onto a human
// this handles mulebots and vehicles
/mob/living/carbon/human/Crossed(var/atom/movable/AM)
if(istype(AM, /obj/vehicle))
var/obj/vehicle/V = AM
V.RunOver(src)
/mob/living/carbon/human/Crossed(atom/movable/AM)
var/mob/living/simple_animal/bot/mulebot/MB = AM
if(istype(MB))
MB.RunOver(src)
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
/mob/living/carbon/human/proc/get_authentification_rank(var/if_no_id = "No id", var/if_no_job = "No job")
@@ -1255,12 +1252,6 @@
I.insert(H)
/mob/living/carbon/human/revive()
if(species && !(species.flags & NO_BLOOD))
var/blood_reagent = get_blood_name()
vessel.add_reagent(blood_reagent, max_blood-vessel.total_volume)
fixblood()
//Fix up all organs and replace lost ones.
restore_all_organs() //Rejuvenate and reset all existing organs.
check_and_regenerate_organs(src) //Regenerate limbs and organs only if they're really missing.
@@ -1332,23 +1323,13 @@
*/
//returns 1 if made bloody, returns 0 otherwise
/mob/living/carbon/human/add_blood(mob/living/carbon/human/M as mob)
if(!..())
return 0
//if this blood isn't already in the list, add it
if(blood_DNA[M.dna.unique_enzymes])
return 0 //already bloodied with this blood. Cannot add more.
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
hand_blood_color = blood_color
src.update_inv_gloves()
verbs += /mob/living/carbon/human/proc/bloody_doodle
return 1 //we applied blood to the item
/mob/living/carbon/human/clean_blood(var/clean_feet)
.=..()
if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
feet_blood_color = null
qdel(feet_blood_DNA)
bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0)
blood_state = BLOOD_STATE_NOT_BLOODY
update_inv_shoes(1)
return 1
@@ -1443,10 +1424,6 @@
tail = species.tail
if(vessel)
vessel = null
make_blood()
maxHealth = species.total_health
toxins_alert = 0
@@ -1543,7 +1520,6 @@
overlays.Cut()
update_mutantrace(1)
regenerate_icons()
fixblood()
if(!delay_icon_update)
UpdateAppearance()
@@ -300,15 +300,6 @@
////////////////////////////////////////////
/*
This function restores the subjects blood to max.
*/
/mob/living/carbon/human/proc/restore_blood()
if(!(species.flags & NO_BLOOD))
var/blood_type = get_blood_name()
var/blood_volume = vessel.get_reagent_amount(blood_type)
vessel.add_reagent(blood_type, BLOOD_VOLUME_NORMAL - blood_volume)
/*
This function restores all organs.
*/
@@ -8,6 +8,7 @@ emp_act
*/
/mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone)
if(P.is_reflectable)
@@ -185,7 +186,7 @@ emp_act
newmeat.subjectjob = src.job
newmeat.reagents.add_reagent ("nutriment", (src.nutrition / 15) / 3)
src.reagents.trans_to (newmeat, round ((src.reagents.total_volume) / 3, 1))
src.loc.add_blood(src)
add_mob_blood(src)
--src.meatleft
to_chat(user, "<span class='warning'>You hack off a chunk of meat from [src.name]</span>")
if(!src.meatleft)
@@ -232,19 +233,18 @@ emp_act
var/bloody = 0
if(I.damtype == BRUTE && I.force && prob(25 + I.force * 2))
I.add_blood(src) //Make the weapon bloody, not the person.
I.add_mob_blood(src) //Make the weapon bloody, not the person.
// if(user.hand) user.update_inv_l_hand() //updates the attacker's overlay for the (now bloodied) weapon
// else user.update_inv_r_hand() //removed because weapons don't have on-mob blood overlays
if(prob(33))
if(prob(I.force * 2)) //blood spatter!
bloody = 1
var/turf/location = loc
if(istype(location, /turf/simulated))
location.add_blood(src)
add_splatter_floor(location)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
H.bloody_body(src)
H.bloody_hands(src)
H.add_mob_blood(src)
if(!stat)
switch(hit_area)
@@ -260,15 +260,16 @@ emp_act
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_blood(src)
wear_mask.add_mob_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
head.add_mob_blood(src)
update_inv_head(0,0)
if(glasses && prob(33))
glasses.add_blood(src)
glasses.add_mob_blood(src)
update_inv_glasses(0)
if("upper body")//Easier to score a stun but lasts less time
if(stat == CONSCIOUS && I.force && prob(I.force + 10))
visible_message("<span class='combat danger'>[src] has been knocked down!</span>", \
@@ -276,7 +277,13 @@ emp_act
apply_effect(5, WEAKEN, armor)
if(bloody)
bloody_body(src)
if(wear_suit)
wear_suit.add_mob_blood(src)
update_inv_wear_suit(1)
if(w_uniform)
w_uniform.add_mob_blood(src)
update_inv_w_uniform(1)
if(Iforce > 10 || Iforce >= 5 && prob(33))
@@ -313,22 +320,20 @@ emp_act
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
if(gloves)
gloves.add_blood(source)
gloves.add_mob_blood(source)
gloves:transfer_blood = amount
gloves:bloody_hands_mob = source
else
add_blood(source)
add_mob_blood(source)
bloody_hands = amount
bloody_hands_mob = source
update_inv_gloves(1) //updates on-mob overlays for bloody hands and/or bloody gloves
/mob/living/carbon/human/proc/bloody_body(var/mob/living/source)
if(wear_suit)
wear_suit.add_blood(source)
wear_suit.add_mob_blood(source)
update_inv_wear_suit(0)
return
if(w_uniform)
w_uniform.add_blood(source)
w_uniform.add_mob_blood(source)
update_inv_w_uniform(1)
/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage)
@@ -65,6 +65,8 @@ var/global/default_martial_art = new/datum/martial_art
var/meatleft = 3 //For chef item
var/decaylevel = 0 // For rotting bodies
var/max_blood = BLOOD_VOLUME_NORMAL // For stuff in the vessel
var/bleed_rate = 0
var/bleedsuppress = 0 //for stopping bloodloss
var/check_mutations=0 // Check mutations on next life tick
@@ -35,12 +35,52 @@
/mob/living/carbon/human/Move(NewLoc, direct)
. = ..()
if(shoes && .) // did we actually move?
if(.) // did we actually move?
if(!lying && !buckled)
var/obj/item/clothing/shoes/S = shoes
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
S.step_action(src)
//Bloody footprints
var/turf/T = get_turf(src)
var/obj/item/organ/external/l_foot = get_organ("l_foot")
var/obj/item/organ/external/r_foot = get_organ("r_foot")
var/hasfeet = 1
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
hasfeet = 0
if(shoes)
if(S.bloody_shoes && S.bloody_shoes[S.blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
if(oldFP && oldFP.blood_state == S.blood_state && oldFP.basecolor == S.blood_color)
return
else
//No oldFP or it's a different kind of blood
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T)
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.bloody_shoes[S.blood_state]
FP.blood_DNA = S.blood_DNA
FP.basecolor = S.blood_color
FP.update_icon()
update_inv_shoes()
else if(hasfeet)
if(bloody_feet && bloody_feet[blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
if(oldFP && oldFP.blood_state == blood_state && oldFP.basecolor == feet_blood_color)
return
else
bloody_feet[blood_state] = max(0, bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T)
FP.blood_state = blood_state
FP.entered_dirs |= dir
FP.bloodiness = bloody_feet[blood_state]
FP.basecolor = feet_blood_color
FP.update_icon()
update_inv_shoes()
//End bloody footprints
if(S)
S.step_action(src)
/mob/living/carbon/human/handle_footstep(turf/T)
if(..())
+1 -3
View File
@@ -893,7 +893,6 @@
if(!in_stasis)
handle_organs()
handle_blood()
else //dead
@@ -1040,8 +1039,7 @@
var/temp = PULSE_NORM
var/blood_type = get_blood_name()
if(round(vessel.get_reagent_amount(blood_type)) <= BLOOD_VOLUME_BAD) //how much blood do we have
if(blood_volume <= BLOOD_VOLUME_BAD)//how much blood do we have
temp = PULSE_THREADY //not enough :(
if(status_flags & FAKEDEATH)
@@ -519,6 +519,7 @@
"is cracking their exoskeleton!",
"is stabbing themselves with their mandibles!",
"is holding their breath!")
/datum/species/slime
name = "Slime People"
name_plural = "Slime People"
@@ -547,6 +548,7 @@
bodyflags = HAS_SKIN_COLOR | NO_EYES
dietflags = DIET_CARN
reagent_tag = PROCESS_ORG
blood_color = "#0064C8"
exotic_blood = "water"
//ventcrawler = 1 //ventcrawling commented out
butt_sprite = "slime"
@@ -575,7 +577,7 @@
#define SLIMEPERSON_BLOOD_SCALING_FACTOR 5 // Used to adjust how much of an effect the blood has on the rate of color change. Higher is slower.
// Slowly shifting to the color of the reagents
if((H in recolor_list) && H.reagents.total_volume > SLIMEPERSON_COLOR_SHIFT_TRIGGER)
var/blood_amount = H.vessel.total_volume
var/blood_amount = H.blood_volume
var/r_color = mix_color_from_reagents(H.reagents.reagent_list)
var/new_body_color = BlendRGB(r_color, rgb(H.r_skin, H.g_skin, H.b_skin), (blood_amount*SLIMEPERSON_BLOOD_SCALING_FACTOR)/((blood_amount*SLIMEPERSON_BLOOD_SCALING_FACTOR)+(H.reagents.total_volume)))
var/list/new_color_list = ReadRGB(new_body_color)
+3
View File
@@ -9,6 +9,7 @@
if(..())
. = 1
handle_blood()
for(var/obj/item/organ/internal/O in internal_organs)
O.on_life()
handle_changeling()
@@ -196,6 +197,8 @@
return
//remember to remove the "proc" of the child procs of these.
/mob/living/carbon/proc/handle_blood()
return
/mob/living/carbon/proc/handle_changeling()
return
+54 -4
View File
@@ -524,6 +524,7 @@
stat = CONSCIOUS
update_fire()
regenerate_icons()
restore_blood()
if(human_mob)
human_mob.update_eyes()
human_mob.update_dna()
@@ -577,10 +578,10 @@
var/pull_dir = get_dir(src, pulling)
if(get_dist(src, pulling) > 1 || ((pull_dir - 1) & pull_dir)) // puller and pullee more than one tile away or in diagonal position
//if(isliving(pulling))
//var/mob/living/M = pulling
//if(M.lying && !M.buckled && (prob(M.getBruteLoss() * 200 / M.maxHealth)))
//M.makeTrail(T)
if(isliving(pulling))
var/mob/living/M = pulling
if(M.lying && !M.buckled && (prob(M.getBruteLoss() * 200 / M.maxHealth)))
M.makeTrail(T)
pulling.Move(T, get_dir(pulling, T)) // the pullee tries to reach our previous position
if(pulling && get_dist(src, pulling) > 1) // the pullee couldn't keep up
stop_pulling()
@@ -601,6 +602,55 @@
return 1
return 0
/mob/living/proc/makeTrail(turf/T)
if(!has_gravity(src))
return
var/blood_exists = 0
for(var/obj/effect/decal/cleanable/trail_holder/C in loc) //checks for blood splatter already on the floor
blood_exists = 1
if(isturf(loc))
var/trail_type = getTrail()
if(trail_type)
var/brute_ratio = round(getBruteLoss()/maxHealth, 0.1)
if(blood_volume && blood_volume > max(BLOOD_VOLUME_NORMAL*(1 - brute_ratio * 0.25), 0))//don't leave trail if blood volume below a threshold
blood_volume = max(blood_volume - max(1, brute_ratio * 2), 0) //that depends on our brute damage.
var/newdir = get_dir(T, loc)
if(newdir != src.dir)
newdir = newdir | dir
if(newdir == 3) //N + S
newdir = NORTH
else if(newdir == 12) //E + W
newdir = EAST
if((newdir in cardinal) && (prob(50)))
newdir = turn(get_dir(T, loc), 180)
if(!blood_exists)
new /obj/effect/decal/cleanable/trail_holder(loc)
for(var/obj/effect/decal/cleanable/trail_holder/TH in loc)
if((!(newdir in TH.existing_dirs) || trail_type == "trails_1" || trail_type == "trails_2") && TH.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
TH.existing_dirs += newdir
TH.overlays.Add(image('icons/effects/blood.dmi', trail_type, dir = newdir))
TH.transfer_mob_blood_dna(src)
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.species.blood_color)
TH.color = H.species.blood_color
else
TH.color = "#A10808"
/mob/living/carbon/human/makeTrail(turf/T)
if((species.flags & NO_BLOOD) || species.exotic_blood || !bleed_rate || bleedsuppress)
return
..()
/mob/living/proc/getTrail()
if(getBruteLoss() < 300)
return pick("ltrails_1", "ltrails_2")
else
return pick("trails_1", "trails_2")
/*//////////////////////
START RESIST PROCS
*///////////////////////
@@ -59,3 +59,5 @@
var/tesla_ignore = FALSE
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
var/blood_volume = 0 //how much blood the mob has
@@ -568,23 +568,6 @@
mode = BOT_NO_ROUTE
/mob/living/simple_animal/bot/mulebot/Move(turf/simulated/next)
var/turf/simulated/last = loc
if(istype(last) && bloodiness)
last.AddTracks(/obj/effect/decal/cleanable/blood/tracks/wheels, currentDNA, 0, get_dir(last, next), currentBloodColor)
. = ..()
if(. && istype(next))
if(bloodiness)
next.AddTracks(/obj/effect/decal/cleanable/blood/tracks/wheels, currentDNA, get_dir(last, next), 0, currentBloodColor)
bloodiness--
for(var/mob/living/carbon/human/H in next)
if(H != load)
RunOver(H)
// calculates a path to the current destination
// given an optional turf to avoid
/mob/living/simple_animal/bot/mulebot/calc_path(turf/avoid = null)
@@ -668,6 +651,30 @@
return
/mob/living/simple_animal/bot/mulebot/Move(turf/simulated/next)
. = ..()
if(. && istype(next))
if(bloodiness)
var/obj/effect/decal/cleanable/blood/tracks/B = locate() in next
if(!B)
B = new /obj/effect/decal/cleanable/blood/tracks(loc)
if(blood_DNA && blood_DNA.len)
B.blood_DNA |= blood_DNA.Copy()
B.basecolor = currentBloodColor
var/newdir = get_dir(next, loc)
if(newdir == dir)
B.setDir(newdir)
else
newdir = newdir | dir
if(newdir == 3)
newdir = 1
else if(newdir == 12)
newdir = 4
B.setDir(newdir)
B.update_icon()
bloodiness--
// called when bot bumps into anything
/mob/living/simple_animal/bot/mulebot/Bump(atom/obs)
if(!wires.MobAvoid()) // usually just bumps, but if avoidance disabled knock over mobs
@@ -697,21 +704,18 @@
H.apply_damage(0.5*damage, BRUTE, "l_arm", run_armor_check("l_arm", "melee"))
H.apply_damage(0.5*damage, BRUTE, "r_arm", run_armor_check("r_arm", "melee"))
var/obj/effect/decal/cleanable/blood/B = new(loc)
B.blood_DNA = list()
B.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
currentDNA = B.blood_DNA
var/turf/T = get_turf(src)
H.add_mob_blood(H)
H.add_splatter_floor(T)
bloodiness += 4
currentBloodColor = "#A10808"
if(istype(H))
var/datum/reagent/blood/bld = H.get_blood(H.vessel)
if(bld.data["blood_colour"])
currentBloodColor = bld.data["blood_colour"]
return
B.basecolor = currentBloodColor
B.update_icon()
var/list/blood_dna = H.get_blood_dna_list()
if(blood_dna)
transfer_blood_dna(blood_dna)
currentBloodColor = H.species.blood_color
return
/mob/living/simple_animal/bot/mulebot/bot_control_message(command, mob/user, user_turf)
switch(command)
@@ -27,6 +27,7 @@
stop_automated_movement_when_pulled = 1
var/milk_content = 0
can_collar = 1
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/hostile/retaliate/goat/handle_automated_movement()
..()
@@ -110,6 +111,7 @@
var/milk_content = 0
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/cow/New()
..()
@@ -312,6 +314,7 @@ var/global/chicken_count = 0
maxHealth = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/turkey
name = "turkey"
@@ -381,6 +384,7 @@ var/global/chicken_count = 0
maxHealth = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/walrus
name = "walrus"
@@ -404,3 +408,4 @@ var/global/chicken_count = 0
maxHealth = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
@@ -2,6 +2,7 @@
icon = 'icons/mob/pets.dmi'
can_collar = 1
mob_size = MOB_SIZE_SMALL
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/pet/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/newspaper))
@@ -203,9 +203,9 @@
reagents.reaction(C, INGEST, fraction)
reagents.trans_to(C, volume)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/proc/link_host(mob/living/carbon/human/H)
faction = list("\ref[src]", "\ref[H]") // Hostile to everyone except the host.
H.vessel.trans_to(src, 30)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/proc/link_host(mob/living/carbon/C)
faction = list("\ref[src]", "\ref[C]") // Hostile to everyone except the host.
C.transfer_blood_to(src, 30)
color = mix_color_from_reagents(reagents.reagent_list)
// Legion
@@ -422,6 +422,13 @@
damage = O.force
if(O.damtype == STAMINA)
damage = 0
if(O.damtype == BRUTE)
if(prob(33))
O.add_mob_blood(src)
var/turf/location = get_turf(src)
add_splatter_floor(location)
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
user.add_mob_blood(src)
visible_message("<span class='danger'>[user] has [O.attack_verb.len ? "[pick(O.attack_verb)]": "attacked"] [src] with [O]!</span>",\
"<span class='userdanger'>[user] has [O.attack_verb.len ? "[pick(O.attack_verb)]": "attacked"] you with [O]!</span>")
else
@@ -432,7 +439,6 @@
"<span class='warning'>This weapon is ineffective, it does no damage.</span>")
adjustBruteLoss(damage)
/mob/living/simple_animal/movement_delay()
. = ..()