mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Co-authored-by: uomo <51800976+uomo91@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
var/label = ""
|
||||
var/last_wave = 0
|
||||
COOLDOWN_DECLARE(picket_sign_cooldown)
|
||||
|
||||
/obj/item/picket_sign/cyborg
|
||||
name = "metallic nano-sign"
|
||||
@@ -35,13 +35,27 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/picket_sign/attack_self(mob/living/carbon/human/user)
|
||||
if( last_wave + 20 < world.time )
|
||||
last_wave = world.time
|
||||
if(label)
|
||||
user.visible_message("<span class='warning'>[user] waves around \the \"[label]\" sign.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] waves around blank sign.</span>")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!COOLDOWN_FINISHED(src, picket_sign_cooldown))
|
||||
return
|
||||
COOLDOWN_START(src, picket_sign_cooldown, 5 SECONDS)
|
||||
if(label)
|
||||
user.manual_emote("waves around \the \"[label]\" sign.")
|
||||
else
|
||||
user.manual_emote("waves around a blank sign.")
|
||||
var/direction = prob(50) ? -1 : 1
|
||||
if(NSCOMPONENT(user.dir)) //So signs are waved horizontally relative to what way the player waving it is facing.
|
||||
animate(user, pixel_x = user.pixel_x + (1 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_x = user.pixel_x - (2 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_x = user.pixel_x + (2 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_x = user.pixel_x - (2 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_x = user.pixel_x + (1 * direction), time = 1, easing = SINE_EASING)
|
||||
else
|
||||
animate(user, pixel_y = user.pixel_y + (1 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_y = user.pixel_y - (2 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_y = user.pixel_y + (2 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_y = user.pixel_y - (2 * direction), time = 1, easing = SINE_EASING)
|
||||
animate(pixel_y = user.pixel_y + (1 * direction), time = 1, easing = SINE_EASING)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
/datum/crafting_recipe/picket_sign
|
||||
name = "Picket Sign"
|
||||
|
||||
Reference in New Issue
Block a user