mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user