Golden Bike Horns now have a small delay between each flips. (#31652)

* flip timer on GBH

Added a slight timer on the flip effect, allowing its victims to finish the flip before being forced to jump again.

* GBH Fix 1.0.1

if (!flip_flag)

* world.time instead of a timer
This commit is contained in:
Mercenaryblue
2017-10-14 19:51:03 -04:00
committed by CitadelStationBot
parent b200389630
commit ecd85a2de7

View File

@@ -3,6 +3,7 @@
* Soap
* Bike Horns
* Air Horns
* Canned Laughter
*/
/*
@@ -92,7 +93,6 @@
* Bike Horns
*/
/obj/item/bikehorn
name = "bike horn"
desc = "A horn off of a bicycle."
@@ -117,6 +117,7 @@
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
return (BRUTELOSS)
//air horn
/obj/item/bikehorn/airhorn
name = "air horn"
desc = "Damn son, where'd you find this?"
@@ -127,18 +128,22 @@
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50)
//golden bikehorn
/obj/item/bikehorn/golden
name = "golden bike horn"
desc = "Golden? Clearly, it's made with bananium! Honk!"
icon_state = "gold_horn"
item_state = "gold_horn"
var/flip_cooldown = 0
/obj/item/bikehorn/golden/attack()
flip_mobs()
if(flip_cooldown < world.time)
flip_mobs()
return ..()
/obj/item/bikehorn/golden/attack_self(mob/user)
flip_mobs()
if(flip_cooldown < world.time)
flip_mobs()
..()
/obj/item/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
@@ -149,7 +154,9 @@
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M.emote("flip")
flip_cooldown = world.time + 7
//canned laughter
/obj/item/reagent_containers/food/drinks/soda_cans/canned_laughter
name = "Canned Laughter"
desc = "Just looking at this makes you want to giggle."