Added stomping sound effects to the mech toys. Thanks to Skasi for the idea.

Click them inhand to make a stomp, and click them with your other hand to make a turn.

Added a cooldown to riot shield bashing, as it does actually seem to cause lag. Kor was right! Who knew?

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5066 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-11-14 20:37:43 +00:00
parent 242cd37c4b
commit 1a4d38dfab
2 changed files with 22 additions and 4 deletions

View File

@@ -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 << "<span class='notice'>You play with [src].</span>"
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 << "<span class='notice'>You play with [src].</span>"
playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
cooldown = world.time
return
..()
/obj/item/toy/prize/ripley
name = "toy ripley"

View File

@@ -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("<span class='warning'>[user] bashes their [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()