From 751219dbfd5f4e6f9fa15c298331b9cb776fd964 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Wed, 18 Dec 2013 02:08:38 +0800 Subject: [PATCH] Added "hide" verb to mousetraps, placing them on the same layer as hidden mice. Triggered mousetraps and dead mice will be moved back to the top layer. Monkeys will no longer move randomly while being pulled. --- code/modules/assembly/mousetrap.dm | 15 ++++++++++++++- code/modules/mob/living/carbon/monkey/life.dm | 12 +++++++++++- .../mob/living/simple_animal/friendly/mouse.dm | 2 ++ html/changelog.html | 9 +++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 4d2c8fa53b9..5cea63edaea 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -45,6 +45,7 @@ visible_message("\red SPLAT!") M.splat() playsound(target.loc, 'sound/effects/snap.ogg', 50, 1) + layer = MOB_LAYER - 0.2 armed = 0 update_icon() pulse(0) @@ -112,4 +113,16 @@ /obj/item/device/assembly/mousetrap/armed icon_state = "mousetraparmed" - armed = 1 \ No newline at end of file + armed = 1 + + +/obj/item/device/assembly/mousetrap/verb/hide_under() + set src in oview(1) + set name = "Hide" + set category = "Object" + + if(usr.stat) + return + + layer = TURF_LAYER+0.2 + usr << "You hide [src]." \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 6c28acc72b5..b2dcfb5d2ca 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -67,8 +67,18 @@ G.process() if(!client && stat == CONSCIOUS) + if(prob(33) && canmove && isturf(loc)) - step(src, pick(cardinal)) + + var/isBeingPulled = 0 + + for(var/mob/M in range(src, 1)) //won't move if being pulled + if(M.pulling == src) + isBeingPulled = 1 + + if(isBeingPulled == 0) + step(src, pick(cardinal)) + if(prob(1)) emote(pick("scratch","jump","roll","tail")) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index af36a591626..503b8536054 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -63,6 +63,7 @@ src.stat = DEAD src.icon_dead = "mouse_[body_color]_splat" src.icon_state = "mouse_[body_color]_splat" + layer = MOB_LAYER if(client) client.time_died_as_mouse = world.time @@ -179,6 +180,7 @@ ..() /mob/living/simple_animal/mouse/Die() + layer = MOB_LAYER if(client) client.time_died_as_mouse = world.time ..() diff --git a/html/changelog.html b/html/changelog.html index 0b546f4072b..f21c83487cd 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,15 @@ should be listed in the changelog upon commit though. Thanks. --> +
+

18 December 2013

+

RavingManiac updated:

+ +
+

24 November 2013

Yinadele updated: