Mouse Skeletons (#1279)

Adds decomposing animations for mice when dusted. They'll leave behind a little mouse skeleton
Mice and lizards will decompose to a skeleton 30 mins after death, or if dusted

Also some fixes to various small issues and runtime errors related to held mobs and supermatters.
This commit is contained in:
NanakoAC
2016-12-23 18:52:27 +00:00
committed by skull132
parent 7fe4433669
commit 4e5556e9d9
9 changed files with 99 additions and 32 deletions
+5 -3
View File
@@ -18,11 +18,13 @@
icon_state = "remainsrobot"
/obj/effect/decal/remains/mouse
desc = "They look like the remains of a small rodent."
icon_state = "mouse"
name = "mouse skeleton"
desc = "Looks like the remains of a small rodent. It doesn't squeak anymore."
icon = 'icons/mob/mouse.dmi'
icon_state = "skeleton"
/obj/effect/decal/remains/lizard
desc = "They look like the remains of a small rodent."
desc = "They look like the remains of a small reptile."
icon_state = "lizard"
/obj/effect/decal/remains/attack_hand(mob/user as mob)
+5 -2
View File
@@ -25,8 +25,11 @@
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
//Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here.
//Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
/mob/proc/dust(anim="dust-m",remains=/obj/effect/decal/cleanable/ash)
/mob/proc/dust(anim="dust-m",remains=/obj/effect/decal/cleanable/ash, iconfile = 'icons/mob/mob.dmi')
death(1)
if (istype(loc, /obj/item/weapon/holder))
var/obj/item/weapon/holder/H = loc
H.release_mob()
var/atom/movable/overlay/animation = null
transforming = 1
canmove = 0
@@ -35,7 +38,7 @@
animation = new(loc)
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.icon = iconfile
animation.master = src
flick(anim, animation)
+2
View File
@@ -70,6 +70,8 @@ var/list/holder_mob_icon_cache = list()
origin_tech = list(TECH_BIO = 6)
/obj/item/weapon/holder/process()
if (!contained)
qdel(src)
if(!get_holding_mob() || contained.loc != src)
if (is_unsafe_container(loc) && contained.loc == src)
@@ -20,11 +20,19 @@
density = 0
seek_speed = 0.75
var/decompose_time = 18000
/mob/living/simple_animal/lizard/New()
..()
nutrition = rand(max_nutrition*0.25, max_nutrition*0.75)
/mob/living/simple_animal/lizard/Life()
if (!..())
if ((world.time - timeofdeath) > decompose_time)
dust()
/mob/living/simple_animal/lizard/attack_hand(mob/living/carbon/human/M as mob)
if (src.stat == DEAD)//If the creature is dead, we don't pet it, we just pickup the corpse on click
get_scooped(M)
@@ -35,3 +43,6 @@
/mob/living/simple_animal/lizard/death()
.=..()
desc = "It doesn't hiss anymore."
/mob/living/simple_animal/lizard/dust()
..(remains = /obj/effect/decal/remains/lizard)
@@ -49,38 +49,43 @@
can_pull_size = 1
can_pull_mobs = MOB_PULL_NONE
var/decompose_time = 18000
/mob/living/simple_animal/mouse/Life()
..()
if(..())
if(client)
//Player-animals don't do random speech normally, so this is here
//Player-controlled mice will still squeak, but less often than NPC mice
if (stat == CONSCIOUS && prob(speak_chance*0.1))
squeak_soft(0)
if(client)
//Player-animals don't do random speech normally, so this is here
//Player-controlled mice will still squeak, but less often than NPC mice
if (stat == CONSCIOUS && prob(speak_chance*0.1))
squeak_soft(0)
if(is_ventcrawling == 0)
sight = SEE_SELF // Returns mouse sight to normal when they leave a vent
if(is_ventcrawling == 0)
sight = SEE_SELF // Returns mouse sight to normal when they leave a vent
if (squeals < maxSqueals)
var/diff = world.time - last_squealgain
if (diff > 600)
squeals++
last_squealgain = world.time
if (squeals < maxSqueals)
var/diff = world.time - last_squealgain
if (diff > 600)
squeals++
last_squealgain = world.time
if(!ckey && stat == CONSCIOUS && prob(0.5))
stat = UNCONSCIOUS
icon_state = "mouse_[body_color]_sleep"
wander = 0
speak_chance = 0
//snuffles
else if(stat == UNCONSCIOUS)
if(ckey || prob(1))
stat = CONSCIOUS
icon_state = "mouse_[body_color]"
wander = 1
speak_chance = initial(speak_chance)
else if(prob(5))
audible_emote("snuffles.")
if(!ckey && stat == CONSCIOUS && prob(0.5))
stat = UNCONSCIOUS
icon_state = "mouse_[body_color]_sleep"
wander = 0
speak_chance = 0
//snuffles
else if(stat == UNCONSCIOUS)
if(ckey || prob(1))
stat = CONSCIOUS
icon_state = "mouse_[body_color]"
wander = 1
speak_chance = initial(speak_chance)
else if(prob(5))
audible_emote("snuffles.")
else
if ((world.time - timeofdeath) > decompose_time)
dust()
@@ -221,6 +226,9 @@
client.time_died_as_mouse = world.time
..()
/mob/living/simple_animal/mouse/dust()
..(anim = "dust_[body_color]", remains = /obj/effect/decal/remains/mouse, iconfile = 'icons/mob/mouse.dmi')
/mob/living/simple_animal/mouse/lay_down()
set name = "Rest"
set category = "IC"
+5
View File
@@ -371,6 +371,11 @@
user.dust()
power += 200
else
if (istype(user, /obj/item/weapon/holder))
var/obj/item/weapon/holder/H = user
Consume(H.contained)//If its a holder, eat the thing inside
qdel(H)
return
qdel(user)
power += 200
+36
View File
@@ -0,0 +1,36 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Nanako
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Mice and lizards will now decompose to a skeleton 30mins after death, or if turned to dust by something (like the supermatter)"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB