diff --git a/code/defines/obj/toy.dm b/code/defines/obj/toy.dm index e47f11f777491..afddd617a468c 100644 --- a/code/defines/obj/toy.dm +++ b/code/defines/obj/toy.dm @@ -10,6 +10,23 @@ /obj/item/toy/prize icon = 'icons/obj/toy.dmi' icon_state = "ripleytoy" + var/cooldown = 0 + +//all credit to skasi for toy mech fun ideas +/obj/item/toy/prize/attack_self(mob/user as mob) + if(cooldown < world.time - 8) + user << "You play with [src]." + playsound(user, 'sound/mecha/mechstep.ogg', 20, 1) + cooldown = world.time + +/obj/item/toy/prize/attack_hand(mob/user as mob) + if(loc == user) + if(cooldown < world.time - 8) + user << "You play with [src]." + playsound(user, 'sound/mecha/mechturn.ogg', 20, 1) + cooldown = world.time + return + ..() /obj/item/toy/prize/ripley name = "toy ripley" diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index b93e418a5c2a6..c6823e88a1124 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -1,5 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - /obj/item/weapon name = "weapon" icon = 'icons/obj/weapons.dmi' @@ -37,14 +35,17 @@ m_amt = 1000 origin_tech = "materials=2" attack_verb = list("shoved", "bashed") + var/cooldown = 0 //shield bash cooldown. based on world.time IsShield() return 1 attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/melee/baton)) - user.visible_message("[user] bashes their [src] with [W]!") - playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1) + if(cooldown < world.time - 25) + user.visible_message("[user] bashes [src] with [W]!") + playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1) + cooldown = world.time else ..()