mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
WIP moving carbon/life to living/life()
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
H.loc = src
|
||||
loc.visible_message("<span class='warning'> The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/Die()
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
|
||||
// On death, create a small smoke of harmful gas (s-Acid)
|
||||
var/datum/effect/effect/system/chem_smoke_spread/S = new
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -165,6 +165,6 @@
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/blob_act()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/death(gibbed)
|
||||
..(gibbed)
|
||||
flick("blobbernaut_death", src)
|
||||
@@ -628,7 +628,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/Die()
|
||||
/mob/living/simple_animal/hostile/mining_drone/death()
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/mob/living/carbon/death(gibbed)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
..(gibbed)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
///////////////
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/proc/handle_breathing()
|
||||
/mob/living/carbon/handle_breathing()
|
||||
if(SSmob.times_fired%4==2 || failed_last_breath)
|
||||
breathe() //Breathe per 4 ticks, unless suffocating
|
||||
else
|
||||
@@ -253,10 +253,10 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/proc/handle_changeling()
|
||||
/mob/living/carbon/handle_changeling()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_mutations_and_radiation()
|
||||
/mob/living/carbon/handle_mutations_and_radiation()
|
||||
if(radiation)
|
||||
|
||||
switch(radiation)
|
||||
@@ -281,7 +281,7 @@
|
||||
radiation = Clamp(radiation, 0, 100)
|
||||
|
||||
|
||||
/mob/living/carbon/proc/handle_chemicals_in_body()
|
||||
/mob/living/carbon/handle_chemicals_in_body()
|
||||
if(reagents)
|
||||
reagents.metabolize(src)
|
||||
|
||||
@@ -304,16 +304,16 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_blood()
|
||||
/mob/living/carbon/handle_blood()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_random_events()
|
||||
/mob/living/carbon/handle_random_events()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
/mob/living/carbon/handle_environment(var/datum/gas_mixture/environment)
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_stomach()
|
||||
/mob/living/carbon/handle_stomach()
|
||||
spawn(0)
|
||||
for(var/mob/living/M in stomach_contents)
|
||||
if(M.loc != src)
|
||||
@@ -330,26 +330,21 @@
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
/mob/living/carbon/proc/handle_regular_status_updates()
|
||||
/mob/living/carbon/handle_regular_status_updates()
|
||||
|
||||
if(stat == DEAD)
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
else
|
||||
updatehealth()
|
||||
if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
eye_blind = max(eye_blind, 1)
|
||||
silent = 0
|
||||
return 1
|
||||
updatehealth()
|
||||
if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
|
||||
death()
|
||||
return
|
||||
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
if(stat != DEAD)
|
||||
|
||||
if(getOxyLoss() > 50 || health <= config.health_threshold_crit)
|
||||
Paralyse(3)
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
..()
|
||||
|
||||
if(sleeping && !paralysis)
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
@@ -358,14 +353,6 @@
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
|
||||
else if (status_flags & FAKEDEATH)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
handle_disabilities()
|
||||
|
||||
//Dizziness
|
||||
if(dizziness)
|
||||
var/client/C = client
|
||||
@@ -419,16 +406,6 @@
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
if(!weakened)
|
||||
update_icons()
|
||||
|
||||
if(hallucination)
|
||||
spawn handle_hallucinations()
|
||||
|
||||
@@ -442,28 +419,10 @@
|
||||
qdel(a)
|
||||
|
||||
CheckStamina()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/handle_disabilities()
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else
|
||||
// deafness heals slowly over time, unless ear_damage is over 100
|
||||
if(ear_damage < 100)
|
||||
adjustEarDamage(-0.05,-1)
|
||||
|
||||
return 1
|
||||
|
||||
//this handles hud updates. Calles update_vision() and handle_hud_icons()
|
||||
/mob/living/carbon/proc/handle_regular_hud_updates()
|
||||
/mob/living/carbon/handle_regular_hud_updates()
|
||||
if(!client) return 0
|
||||
|
||||
update_action_buttons()
|
||||
@@ -550,7 +509,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/handle_vision()
|
||||
/mob/living/carbon/handle_vision()
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
@@ -597,7 +556,7 @@
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
/mob/living/carbon/proc/handle_hud_icons()
|
||||
/mob/living/carbon/handle_hud_icons()
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_hud_icons_health()
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/mob/living/Life()
|
||||
set invisibility = 0
|
||||
set background = BACKGROUND_ENABLED
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
//Breathing, if applicable
|
||||
handle_breathing()
|
||||
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Blud
|
||||
handle_blood()
|
||||
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
. = 1
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment(environment)
|
||||
|
||||
handle_fire()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
update_canmove()
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
for(var/obj/item/weapon/grab/G in src)
|
||||
G.process()
|
||||
|
||||
handle_regular_status_updates() // Status updates, death etc.
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
return .
|
||||
|
||||
|
||||
|
||||
/mob/living/proc/handle_breathing()
|
||||
|
||||
/mob/living/proc/handle_changeling()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_mutations_and_radiation()
|
||||
if(radiation)
|
||||
|
||||
switch(radiation)
|
||||
if(0 to 50)
|
||||
radiation--
|
||||
if(prob(25))
|
||||
adjustToxLoss(1)
|
||||
updatehealth()
|
||||
|
||||
if(50 to 75)
|
||||
radiation -= 2
|
||||
adjustToxLoss(1)
|
||||
if(prob(5))
|
||||
radiation -= 5
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
radiation -= 3
|
||||
adjustToxLoss(3)
|
||||
updatehealth()
|
||||
|
||||
radiation = Clamp(radiation, 0, 100)
|
||||
|
||||
|
||||
/mob/living/proc/handle_chemicals_in_body()
|
||||
if(reagents)
|
||||
reagents.metabolize(src)
|
||||
|
||||
if(drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if(prob(5))
|
||||
sleeping += 1
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 5)
|
||||
jitteriness = max(0, jitteriness - 5)
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
jitteriness = max(0, jitteriness - 1)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_blood()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_random_events()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_stomach()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_regular_status_updates()
|
||||
|
||||
if(stat != DEAD)
|
||||
updatehealth()
|
||||
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else if (status_flags & FAKEDEATH)
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
|
||||
handle_disabilities()
|
||||
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(!stunned)
|
||||
update_icons()
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
if(!weakened)
|
||||
update_icons()
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_disabilities()
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
else
|
||||
// deafness heals slowly over time, unless ear_damage is over 100
|
||||
if(ear_damage < 100)
|
||||
adjustEarDamage(-0.05,-1)
|
||||
|
||||
|
||||
//this handles hud updates. Calles update_vision() and handle_hud_icons()
|
||||
/mob/living/proc/handle_regular_hud_updates()
|
||||
if(!client) return 0
|
||||
|
||||
handle_vision()
|
||||
handle_hud_icons()
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_vision()
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
if(stat == DEAD)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if(blind)
|
||||
if(eye_blind)
|
||||
blind.layer = 18
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & NEARSIGHT)
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
client.screen += global_hud.blurry
|
||||
|
||||
if (druggy)
|
||||
client.screen += global_hud.druggy
|
||||
|
||||
if(eye_stat > 20)
|
||||
if(eye_stat > 30)
|
||||
client.screen += global_hud.darkMask
|
||||
else
|
||||
client.screen += global_hud.vimpaired
|
||||
|
||||
if(machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
/mob/living/proc/handle_hud_icons()
|
||||
return
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ Sorry Giacom. Please don't be mad :(
|
||||
push_mob_back(src, A.push_dir)
|
||||
*/
|
||||
|
||||
|
||||
/mob/living/New()
|
||||
. = ..()
|
||||
generateStaticOverlay()
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
src.stat = 1
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_regular_status_updates()
|
||||
/mob/living/silicon/robot/handle_regular_status_updates()
|
||||
|
||||
if(src.camera && !scrambledcodes)
|
||||
if(src.stat == 2 || wires.IsCameraCut())
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_regular_hud_updates()
|
||||
/mob/living/silicon/robot/handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || src.sight_mode & BORGXRAY)
|
||||
src.sight |= SEE_TURFS
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
for(var/spell in construct_spells)
|
||||
mob_spell_list += new spell(src)
|
||||
|
||||
/mob/living/simple_animal/construct/Die()
|
||||
/mob/living/simple_animal/construct/death()
|
||||
..()
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
visible_message("<span class='danger'>[src] collapses in a shattered heap.</span>")
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
..()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/corgi/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/corgi/death(gibbed)
|
||||
..(gibbed)
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_animal/corgi/revive()
|
||||
|
||||
@@ -94,8 +94,8 @@
|
||||
pickVisualAppearence()
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/drone/death(gibbed)
|
||||
..(gibbed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
if(internal_storage)
|
||||
|
||||
@@ -223,8 +223,8 @@ var/global/chicken_count = 0
|
||||
pixel_y = rand(0, 10)
|
||||
chicken_count += 1
|
||||
|
||||
/mob/living/simple_animal/chicken/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/chicken/death(gibbed)
|
||||
..(gibbed)
|
||||
chicken_count -= 1
|
||||
|
||||
/mob/living/simple_animal/chicken/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
/mob/living/simple_animal/mouse/proc/splat()
|
||||
src.health = 0
|
||||
src.icon_dead = "mouse_[body_color]_splat"
|
||||
Die()
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/mouse/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
..(gibbed)
|
||||
if(!ckey)
|
||||
var/obj/item/trash/deadmouse/M = new(src.loc)
|
||||
M.icon_state = src.icon_dead
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
..()
|
||||
overlays += "aslime-:33"
|
||||
|
||||
/mob/living/simple_animal/slime/adult/Die()
|
||||
/mob/living/simple_animal/slime/adult/death(gibbed)
|
||||
for(var/i = 0, i<=1, i++)
|
||||
var/mob/living/simple_animal/slime/S1 = new /mob/living/simple_animal/slime (src.loc)
|
||||
S1.icon_state = "[colour] baby slime"
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
damage = 30
|
||||
icon_state = "toxin"
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/alien/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...")
|
||||
playsound(src, 'sound/voice/hiss6.ogg', 100, 1)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
..()
|
||||
update_bees()
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/bees/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/poison/bees/death(gibbed)
|
||||
..(gibbed)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
icon_living = "holocarp"
|
||||
maxbodytemp = INFINITY
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/holocarp/Die()
|
||||
/mob/living/simple_animal/hostile/carp/holocarp/death()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
if(.)
|
||||
emote("me", 1, "glares at [.]")
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/eyeball/Die()
|
||||
/mob/living/simple_animal/hostile/carp/eyeball/death()
|
||||
qdel(src)
|
||||
return
|
||||
@@ -46,8 +46,8 @@
|
||||
health = 80
|
||||
ranged = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/hivebot/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/hivebot/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<b>[src]</b> blows apart!")
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
|
||||
@@ -229,9 +229,9 @@
|
||||
|
||||
//////////////END HOSTILE MOB TARGETTING AND AGGRESSION////////////
|
||||
|
||||
/mob/living/simple_animal/hostile/Die()
|
||||
/mob/living/simple_animal/hostile/death(gibbed)
|
||||
LoseAggro()
|
||||
..()
|
||||
..(gibbed)
|
||||
walk(src, 0)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/OpenFire(var/the_target)
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
if(.)
|
||||
emote("me", 1, "[Attackemote] [.].")
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/mimic/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> stops moving!</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -107,13 +107,13 @@
|
||||
..()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/Die()
|
||||
/mob/living/simple_animal/hostile/mimic/crate/death(gibbed)
|
||||
|
||||
var/obj/structure/closet/crate/C = new(get_turf(src))
|
||||
// Put loot in crate
|
||||
for(var/obj/O in src)
|
||||
O.loc = C
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/crate/AttackingTarget()
|
||||
. =..()
|
||||
@@ -144,13 +144,13 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Life()
|
||||
..()
|
||||
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
|
||||
Die()
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Die()
|
||||
/mob/living/simple_animal/hostile/mimic/copy/death(gibbed)
|
||||
|
||||
for(var/atom/movable/M in src)
|
||||
M.loc = get_turf(src)
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/ListTargets()
|
||||
// Return a list of targets that isn't the creator
|
||||
|
||||
@@ -108,12 +108,12 @@
|
||||
if(3.0)
|
||||
adjustBruteLoss(110)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/Die()
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/death(gibbed)
|
||||
var/counter
|
||||
for(counter=0, counter<2, counter++)
|
||||
var/obj/item/weapon/ore/diamond/D = new /obj/item/weapon/ore/diamond(src.loc)
|
||||
D.layer = 4.1
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub
|
||||
name = "goldgrub"
|
||||
@@ -204,10 +204,10 @@
|
||||
visible_message("<span class='danger'>The [P.name] was repelled by [src.name]'s girth!</span>")
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/Die()
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/death(gibbed)
|
||||
alerted = 0
|
||||
Reward()
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustBruteLoss(var/damage)
|
||||
idle_vision_range = 9
|
||||
@@ -253,10 +253,10 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/AttackingTarget()
|
||||
OpenFire()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/Die()
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/death(gibbed)
|
||||
new /obj/item/asteroid/hivelord_core(src.loc)
|
||||
mouse_opacity = 1
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/obj/item/asteroid/hivelord_core
|
||||
name = "hivelord remains"
|
||||
@@ -318,7 +318,7 @@
|
||||
spawn(100)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Die()
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/death()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath
|
||||
@@ -367,9 +367,9 @@
|
||||
anchored = 1
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/Die()
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/death(gibbed)
|
||||
anchored = 0
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire()
|
||||
var/tturf = get_turf(target)
|
||||
@@ -434,10 +434,10 @@
|
||||
spawn(50)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/Die()
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/death(gibbed)
|
||||
var/obj/item/asteroid/goliath_hide/G = new /obj/item/asteroid/goliath_hide(src.loc)
|
||||
G.layer = 4.1
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/obj/item/asteroid/goliath_hide
|
||||
name = "goliath hide plates"
|
||||
|
||||
@@ -87,9 +87,9 @@
|
||||
icon_state = "mushroom_color"
|
||||
UpdateMushroomCap()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/Die()
|
||||
/mob/living/simple_animal/hostile/mushroom/death(gibbed)
|
||||
visible_message("<span class='notice'>[src] fainted.</span>")
|
||||
..()
|
||||
..(gibbed)
|
||||
UpdateMushroomCap()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/proc/UpdateMushroomCap()
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
weapon1 = /obj/item/weapon/gun/energy/laser
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/pirate/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/pirate/death(gibbed)
|
||||
..(gibbed)
|
||||
if(corpse)
|
||||
new corpse (src.loc)
|
||||
if(weapon1)
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
weapon1 = /obj/item/weapon/gun/projectile/shotgun/boltaction
|
||||
casingtype = /obj/item/ammo_casing/a762
|
||||
|
||||
/mob/living/simple_animal/hostile/russian/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/russian/death(gibbed)
|
||||
..(gibbed)
|
||||
if(corpse)
|
||||
new corpse (src.loc)
|
||||
if(weapon1)
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
faction = list("syndicate")
|
||||
status_flags = CANPUSH
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/syndicate/death(gibbed)
|
||||
..(gibbed)
|
||||
if(corpse)
|
||||
new corpse (src.loc)
|
||||
if(weapon1)
|
||||
@@ -160,8 +160,8 @@
|
||||
minbodytemp = 0
|
||||
mob_size = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/viscerator/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/viscerator/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> is smashed into pieces!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
@@ -50,8 +50,8 @@
|
||||
L.Weaken(3)
|
||||
L.visible_message("<span class='danger'>\The [src] knocks down \the [L]!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/tree/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> is hacked into pieces!</span>")
|
||||
new /obj/item/stack/sheet/mineral/wood(loc)
|
||||
qdel(src)
|
||||
@@ -64,8 +64,8 @@
|
||||
icon_dead = "festivus_pole"
|
||||
icon_gib = "festivus_pole"
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/festivus/Die()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/tree/festivus/death(gibbed)
|
||||
..(gibbed)
|
||||
visible_message("<span class='danger'><b>[src]</b> is hacked into pieces!</span>")
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -113,12 +113,12 @@
|
||||
/mob/living/simple_animal/parrot/proc/toggle_mode)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Die()
|
||||
/mob/living/simple_animal/parrot/death(gibbed)
|
||||
if(held_item)
|
||||
held_item.loc = src.loc
|
||||
held_item = null
|
||||
walk(src,0)
|
||||
..()
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/parrot/Stat()
|
||||
..()
|
||||
|
||||
@@ -81,13 +81,12 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/updatehealth()
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
//Health
|
||||
if(stat == DEAD)
|
||||
if(health > 0)
|
||||
icon_state = icon_living
|
||||
@@ -98,21 +97,12 @@
|
||||
update_canmove()
|
||||
return 0
|
||||
|
||||
updatehealth()
|
||||
|
||||
if(health < 1 && stat != DEAD)
|
||||
Die()
|
||||
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
if(weakened)
|
||||
AdjustWeakened(-1)
|
||||
if(paralysis)
|
||||
AdjustParalysis(-1)
|
||||
|
||||
adjustEarDamage((ear_damage < 25 ? -0.05 : 0), -1)
|
||||
if(health < 1)
|
||||
death()
|
||||
else
|
||||
handle_regular_status_updates()
|
||||
|
||||
//Movement
|
||||
if(!client && !stop_automated_movement && wander)
|
||||
@@ -392,22 +382,14 @@
|
||||
if(statpanel("Status"))
|
||||
stat(null, "Health: [round((health / maxHealth) * 100)]%")
|
||||
|
||||
/mob/living/simple_animal/proc/Die()
|
||||
/mob/living/simple_animal/death(gibbed)
|
||||
health = 0 // so /mob/living/simple_animal/Life() doesn't magically revive them
|
||||
dead_mob_list += src
|
||||
icon_state = icon_dead
|
||||
stat = DEAD
|
||||
density = 0
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
if(!gibbed)
|
||||
visible_message("<span class='danger'>\the [src] stops moving...</span>")
|
||||
|
||||
Die()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/ex_act(severity, target)
|
||||
..()
|
||||
@@ -426,7 +408,7 @@
|
||||
/mob/living/simple_animal/adjustBruteLoss(damage)
|
||||
health = Clamp(health - damage, 0, maxHealth)
|
||||
if(health < 1 && stat != DEAD)
|
||||
Die()
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/proc/CanAttack(var/atom/the_target)
|
||||
if(see_invisible < the_target.invisibility)
|
||||
|
||||
@@ -1045,6 +1045,7 @@
|
||||
#include "code\modules\mob\living\damage_procs.dm"
|
||||
#include "code\modules\mob\living\death.dm"
|
||||
#include "code\modules\mob\living\emote.dm"
|
||||
#include "code\modules\mob\living\life.dm"
|
||||
#include "code\modules\mob\living\living.dm"
|
||||
#include "code\modules\mob\living\living_defense.dm"
|
||||
#include "code\modules\mob\living\living_defines.dm"
|
||||
|
||||
Reference in New Issue
Block a user