diff --git a/code/game/objects/items/signs.dm b/code/game/objects/items/signs.dm index 5941cbe7763..236b0d34e0d 100644 --- a/code/game/objects/items/signs.dm +++ b/code/game/objects/items/signs.dm @@ -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("[user] waves around \the \"[label]\" sign.") - else - user.visible_message("[user] waves around blank sign.") - 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"