Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions code/game/objects/items/weaponry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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("<span class='danger'>[user] slaps [M] in the face!</span>",
"<span class='notice'>You slap [M] in the face!</span>",
"<span class='hear'>You hear a slap.</span>")
else
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",
"<span class='notice'>You slap [M]!</span>",
"<span class='hear'>You hear a slap.</span>")
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("<b><span class='danger'>[user] slams [user.p_their()] fist down on [the_table]!</span></b>", "<b><span class='danger'>You slam your fist down on [the_table]!</span></b>")
else
user.do_attack_animation(the_table)
playsound(get_turf(the_table), 'sound/effects/tableslam.ogg', 40, TRUE)
user.visible_message("<span class='notice'>[user] slaps [user.p_their()] hand on [the_table].</span>", "<span class='notice'>You slap your hand on [the_table].</span>", vision_distance=COMBAT_MESSAGE_RANGE)

/obj/item/proc/can_trigger_gun(mob/living/user)
if(!user.can_use_guns(src))
return FALSE
Expand Down
Binary file added sound/effects/tableslam.ogg
Binary file not shown.