diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 0148baf7ed5d..0927e3fd06e9 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -795,17 +795,49 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 attack_verb = list("slapped") hitsound = 'sound/effects/snap.ogg' -/obj/item/slapper/attack(mob/M, mob/living/carbon/human/user) +/obj/item/slapper/attack(mob/living/M, mob/living/carbon/human/user) if(ishuman(M)) var/mob/living/carbon/human/L = M if(L && L.dna && L.dna.species) L.dna.species.stop_wagging_tail(M) user.do_attack_animation(M) - playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1) - user.visible_message(span_danger("[user] slaps [M]!"), - span_notice("You slap [M]!"),\ - "You hear a slap.") + var/slap_volume = 50 + if(user.zone_selected == BODY_ZONE_HEAD || user.zone_selected == BODY_ZONE_PRECISE_MOUTH) + user.visible_message("[user] slaps [M] in the face!", + "You slap [M] in the face!", + "You hear a slap.") + else + user.visible_message("[user] slaps [M]!", + "You slap [M]!", + "You hear a slap.") + playsound(M, 'sound/weapons/slap.ogg', slap_volume, TRUE, -1) return + +/obj/item/slapper/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + if(!istype(target, /obj/structure/table)) + return ..() + + var/obj/structure/table/the_table = target + + if(!proximity_flag) + return + + if(user.a_intent == INTENT_HARM) + transform = transform.Scale(5) // BIG slap + if(HAS_TRAIT(user, TRAIT_HULK)) + transform = transform.Scale(2) + color = COLOR_GREEN + user.do_attack_animation(the_table) + //Uncomment if we ever port table slam signals + //SEND_SIGNAL(user, COMSIG_LIVING_SLAM_TABLE, the_table) + //SEND_SIGNAL(the_table, COMSIG_TABLE_SLAMMED, user) + playsound(get_turf(the_table), 'sound/effects/tableslam.ogg', 110, TRUE) + user.visible_message("[user] slams [user.p_their()] fist down on [the_table]!", "You slam your fist down on [the_table]!") + else + user.do_attack_animation(the_table) + playsound(get_turf(the_table), 'sound/effects/tableslam.ogg', 40, TRUE) + user.visible_message("[user] slaps [user.p_their()] hand on [the_table].", "You slap your hand on [the_table].", vision_distance=COMBAT_MESSAGE_RANGE) + /obj/item/proc/can_trigger_gun(mob/living/user) if(!user.can_use_guns(src)) return FALSE diff --git a/sound/effects/tableslam.ogg b/sound/effects/tableslam.ogg new file mode 100644 index 000000000000..6d1ba5ce2154 Binary files /dev/null and b/sound/effects/tableslam.ogg differ