From 4e4cd7667c2704c2982eee80fd4953eb30ac84bd Mon Sep 17 00:00:00 2001 From: KingkumaArt <69398298+KingkumaArt@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:27:59 -0400 Subject: [PATCH] Allows you to put people through wooden tables, like a wrestling match. (#89826) ## About The Pull Request image Simply put, wooden tables (aka, both wood legs and top) have a 1 in 5 chance to break like glass ones when you stand on them. ## Why It's Good For The Game More potential for funny, but harmless chaos is always nice, and given wrestling is probably the most commonly played sport in this game, being able to do tables matches felt fitting - but please do not let this pull request distract you from the fact that in 1998, The Undertaker threw Mankind off Hell In A Cell, and plummeted 16 ft through an announcer's table. ## Changelog :cl: Webcomicartist add: People shoved onto wooden tables now have a 1 in 3 chance to break it, for all your wrestling needs - but please do not let this pull request distract you from the fact that in 1998, The Undertaker threw Mankind off Hell In A Cell, and plummeted 16 ft through an announcer's table. /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/game/objects/structures/tables_racks.dm | 26 ++++++++++++++++++++ code/modules/shuttle/misc/special.dm | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index a6fb4edec07..b8b4d02efaf 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -370,6 +370,9 @@ passtable_off(pushed_mob, passtable_key) if(pushed_mob.loc != loc) //Something prevented the tabling return + on_mob_tabled(user, pushed_mob) + +/obj/structure/table/proc/on_mob_tabled(mob/living/user, mob/living/pushed_mob) pushed_mob.Knockdown(30) pushed_mob.apply_damage(10, BRUTE) pushed_mob.apply_damage(40, STAMINA) @@ -743,6 +746,29 @@ smoothing_groups = SMOOTH_GROUP_WOOD_TABLES //Don't smooth with SMOOTH_GROUP_TABLES canSmoothWith = SMOOTH_GROUP_WOOD_TABLES +/obj/structure/table/wood/table_living(datum/source, mob/living/shover, mob/living/target, shove_flags, obj/item/weapon) + . = ..() + wood_table_breakroll(target) + +/obj/structure/table/wood/proc/wood_table_breakroll(mob/living/M) + var/breakroll = rand(1,3) + if(breakroll == 3) + wood_table_shatter(M) + return + +/obj/structure/table/wood/proc/wood_table_shatter(mob/living/victim) + visible_message( + span_warning("[src] smashes into bits!"), + blind_message = span_hear("You hear the loud cracking of wood being split."), + ) + + playsound(loc, 'sound/effects/wounds/crack2.ogg', 50, TRUE) + victim.Paralyze(20 SECONDS) // since its not 100% odds, make it longer than a glass table to compensate. + victim.apply_damage(30, BRUTE) + new frame(loc) + qdel(src) + + /obj/structure/table/wood/narsie_act(total_override = TRUE) if(!total_override) ..() diff --git a/code/modules/shuttle/misc/special.dm b/code/modules/shuttle/misc/special.dm index a03d944c7d6..3a511474ea7 100644 --- a/code/modules/shuttle/misc/special.dm +++ b/code/modules/shuttle/misc/special.dm @@ -185,7 +185,7 @@ /obj/structure/table/wood/shuttle_bar/Initialize(mapload, obj/structure/table_frame/frame_used, obj/item/stack/stack_used) . = ..() var/static/list/loc_connections = list( - COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + COMSIG_ATOM_ENTERED = PROC_REF(on_climbed), ) AddElement(/datum/element/connect_loc, loc_connections) @@ -195,7 +195,7 @@ /obj/structure/table/wood/shuttle_bar/wrench_act(mob/living/user, obj/item/tool) return NONE -/obj/structure/table/wood/shuttle_bar/proc/on_entered(datum/source, atom/movable/AM) +/obj/structure/table/wood/shuttle_bar/proc/on_climbed(datum/source, atom/movable/AM) SIGNAL_HANDLER var/mob/living/M = AM if(istype(M) && !M.incorporeal_move && !is_barstaff(M))