[MIRROR] Remove rats from total count on death (#547)

* Remove rats from total count on death (#53209)

* remove rats on death

* revival add back to the list

* Remove rats from total count on death

Co-authored-by: NightRed <nightred@gmail.com>
This commit is contained in:
SkyratBot
2020-08-27 22:17:37 +02:00
committed by GitHub
co-authored by NightRed
parent b816ef4b87
commit 344d9bf17d
2 changed files with 23 additions and 0 deletions
@@ -62,8 +62,18 @@
M.desc = "It's toast."
qdel(src)
else
SSmobs.cheeserats -= src // remove play controlled mouse also
..(gibbed)
/mob/living/simple_animal/mouse/revive(full_heal = FALSE, admin_revive = FALSE)
var/cap = CONFIG_GET(number/ratcap)
if(!admin_revive && !ckey && LAZYLEN(SSmobs.cheeserats) >= cap)
visible_message("<span class='warning'>[src] twitched but does not continue moving due to the overwhelming rodent population on the station!</span>")
return FALSE
. = ..()
if(.)
SSmobs.cheeserats += src
/mob/living/simple_animal/mouse/Crossed(AM as mob|obj)
if( ishuman(AM) )
if(!stat)
@@ -198,6 +198,19 @@
SSmobs.cheeserats -= src
return ..()
/mob/living/simple_animal/hostile/rat/death(gibbed)
SSmobs.cheeserats -= src // remove rats on death
return ..()
/mob/living/simple_animal/hostile/rat/revive(full_heal = FALSE, admin_revive = FALSE)
var/cap = CONFIG_GET(number/ratcap)
if(!admin_revive && !ckey && LAZYLEN(SSmobs.cheeserats) >= cap)
visible_message("<span class='warning'>[src] twitched but does not continue moving due to the overwhelming rodent population on the station!</span>")
return FALSE
. = ..()
if(.)
SSmobs.cheeserats += src
/mob/living/simple_animal/hostile/rat/examine(mob/user)
. = ..()
if(istype(user,/mob/living/simple_animal/hostile/rat))