mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-31 07:57:47 +01:00
refactors mice
This commit is contained in:
@@ -57,27 +57,21 @@
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_speech()
|
||||
..()
|
||||
if(prob(speak_chance))
|
||||
if(prob(speak_chance) && !incapacitated())
|
||||
for(var/mob/M in view())
|
||||
M << squeak_sound
|
||||
SEND_SOUND(M, squeak_sound)
|
||||
|
||||
/mob/living/simple_animal/mouse/Life(seconds, times_fired)
|
||||
. = ..()
|
||||
if(stat == UNCONSCIOUS)
|
||||
if(ckey || prob(1))
|
||||
stat = CONSCIOUS
|
||||
icon_state = "mouse_[mouse_color]"
|
||||
wander = 1
|
||||
else if(prob(5))
|
||||
emote("snuffles")
|
||||
|
||||
/mob/living/simple_animal/mouse/Life()
|
||||
..()
|
||||
if(!stat && prob(0.5) && !ckey)
|
||||
stat = UNCONSCIOUS
|
||||
icon_state = "mouse_[mouse_color]_sleep"
|
||||
wander = 0
|
||||
speak_chance = 0
|
||||
if(.) // Alive
|
||||
if(!ckey)
|
||||
if(resting)
|
||||
if(prob(1))
|
||||
StopResting()
|
||||
else if(prob(5))
|
||||
custom_emote(2, "snuffles")
|
||||
else if(prob(0.5))
|
||||
StartResting()
|
||||
|
||||
/mob/living/simple_animal/mouse/New()
|
||||
..()
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
if(isspacepod(the_target))
|
||||
var/obj/spacepod/S = the_target
|
||||
if(S.pilot)//Just so we don't attack empty mechs
|
||||
if(S.pilot)//Just so we don't attack empty pods
|
||||
if(CanAttack(S.pilot))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -143,16 +143,15 @@
|
||||
health = Clamp(health, 0, maxHealth)
|
||||
med_hud_set_status()
|
||||
|
||||
/mob/living/simple_animal/lay_down()
|
||||
/mob/living/simple_animal/StartResting(updating = 1)
|
||||
..()
|
||||
handle_resting_state_icons()
|
||||
if(icon_resting && stat != DEAD)
|
||||
icon_state = icon_resting
|
||||
|
||||
/mob/living/simple_animal/proc/handle_resting_state_icons()
|
||||
if(icon_resting)
|
||||
if(resting && stat != DEAD)
|
||||
icon_state = icon_resting
|
||||
else if(stat != DEAD)
|
||||
icon_state = icon_living
|
||||
/mob/living/simple_animal/StopResting(updating = 1)
|
||||
..()
|
||||
if(icon_resting && stat != DEAD)
|
||||
icon_state = icon_living
|
||||
|
||||
/mob/living/simple_animal/update_stat(reason = "none given")
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
Reference in New Issue
Block a user