From b78ce020e7af013fefd3e00dfae58684b1641cf7 Mon Sep 17 00:00:00 2001 From: phil235 Date: Mon, 23 Mar 2015 19:47:39 +0100 Subject: [PATCH] fixing more stuff --- .../modules/mob/living/simple_animal/simple_animal.dm | 11 ++++------- code/modules/mob/living/simple_animal/slime/slime.dm | 9 +++++---- code/modules/research/xenobiology/xenobiology.dm | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 0e394e56fe1..2a9e60ce9e3 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -82,6 +82,7 @@ handle_automated_movement() handle_automated_speech() + return 1 /mob/living/simple_animal/handle_regular_status_updates() if(..()) @@ -374,12 +375,13 @@ if(statpanel("Status")) stat(null, "Health: [round((health / maxHealth) * 100)]%") + return 1 /mob/living/simple_animal/death(gibbed) - health = 0 // so /mob/living/simple_animal/handle_regular_status_updates() doesn't magically revive them + health = 0 icon_state = icon_dead stat = DEAD - density = 0 + lying = 1 if(!gibbed) visible_message("\the [src] stops moving...") ..() @@ -398,11 +400,6 @@ adjustBruteLoss(30) updatehealth() -/mob/living/simple_animal/adjustBruteLoss(damage) - health = Clamp(health - damage, 0, maxHealth) - if(health < 1 && stat != DEAD) - death() - /mob/living/simple_animal/proc/CanAttack(var/atom/the_target) if(see_invisible < the_target.invisibility) return 0 diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 43f2230e234..00ef4a9e0a8 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -146,10 +146,7 @@ return 2 /mob/living/simple_animal/slime/Stat() - ..() - - if(statpanel("Status")) - stat(null, "Health: [round((health / maxHealth) * 100)]%") + if(..()) if(!docile) stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]") @@ -287,6 +284,7 @@ attacked += 10 if(prob(25)) user.do_attack_animation(src) + user.changeNext_move(CLICK_CD_MELEE) user << "[W] passes right through [src]!" return if(Discipline && prob(50)) // wow, buddy, why am I getting attacked?? @@ -347,6 +345,9 @@ /mob/living/simple_animal/slime/proc/discipline_slime(mob/user) + if(stat == DEAD) + return + if(prob(80) && !client) Discipline++ diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 6f07e1b2ba3..b58eacfde4f 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -159,7 +159,7 @@ /obj/item/slimepotion2/afterattack(mob/living/M as mob, mob/user as mob) if(being_used || !ismob(M)) return - if(!(isslime(M) || isanimal(M) || ismonkey(M) || !M.ckey)) //I'm sorry for this line + if( !(isanimal(M) || ismonkey(M)) || M.ckey) //only works on monkeys and animals that aren't player controlled user << "[M] is already too intelligent for this to work!" return ..() if(M.stat)