From 622b3e56087067836e86efed7dc5371d2cd28128 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Fri, 6 Dec 2019 15:31:05 +0100
Subject: [PATCH] ddddddd
---
code/game/objects/items/toys.dm | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 0fcc034371..05d7736560 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -401,6 +401,7 @@
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
var/active = FALSE
icon = 'icons/obj/items_and_weapons.dmi'
+ hitsound = 'sound/weapons/smash.ogg'
attack_verb = list("robusted")
/obj/item/toy/windupToolbox/attack_self(mob/user)
@@ -408,13 +409,33 @@
icon_state = "his_grace_awakened"
to_chat(user, "You wind up [src], it begins to rumble.")
active = TRUE
+ playsound(src, 'sound/effects/pope_entry.ogg', 100)
+ Rumble()
addtimer(CALLBACK(src, .proc/stopRumble), 600)
else
to_chat(user, "[src] is already active.")
+/obj/item/toy/windupToolbox/proc/Rumble()
+ var/static/list/transforms
+ if(!transforms)
+ var/matrix/M1 = matrix()
+ var/matrix/M2 = matrix()
+ var/matrix/M3 = matrix()
+ var/matrix/M4 = matrix()
+ M1.Translate(-1, 0)
+ M2.Translate(0, 1)
+ M3.Translate(1, 0)
+ M4.Translate(0, -1)
+ transforms = list(M1, M2, M3, M4)
+ animate(src, transform=transforms[1], time=0.2, loop=-1)
+ animate(transform=transforms[2], time=0.1)
+ animate(transform=transforms[3], time=0.2)
+ animate(transform=transforms[4], time=0.3)
+
/obj/item/toy/windupToolbox/proc/stopRumble()
icon_state = initial(icon_state)
active = FALSE
+ animate(src, transform=matrix())
/*
* Subtype of Double-Bladed Energy Swords
@@ -864,9 +885,10 @@
return ..()
/obj/item/toy/cards/deck/MouseDrop(atom/over_object)
+ . = ..()
var/mob/living/M = usr
if(!istype(M) || usr.incapacitated() || usr.lying)
- return ..()
+ return
if(Adjacent(usr))
if(over_object == M && loc != M)
M.put_in_hands(src)
@@ -878,9 +900,7 @@
to_chat(usr, "You pick up the deck.")
else
- . = ..()
- if(!.)
- to_chat(usr, "You can't reach it from here!")
+ to_chat(usr, "You can't reach it from here!")