From 17b5d154514188da65d4949c5e5b93fe7336f4f2 Mon Sep 17 00:00:00 2001 From: cowbot92 <75333826+cowbot92@users.noreply.github.com> Date: Mon, 19 Feb 2024 18:05:57 -0500 Subject: [PATCH 01/75] [FIX] Makes it so beartraps work again (#21454) * fixes beaetrapsds yeah * Five nights at springrtraps why do you want to stay --- code/game/objects/items/handcuffs.dm | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index c14723dd7e6c..eeed8cb5abbc 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -268,7 +268,11 @@ /obj/item/restraints/legcuffs/beartrap/Initialize(mapload) . = ..() - update_appearance(UPDATE_ICON) + update_appearance() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(trap_stepped_on), + ) + AddElement(/datum/element/connect_loc, loc_connections) /obj/item/restraints/legcuffs/beartrap/update_icon_state() . = ..() @@ -310,6 +314,32 @@ update_appearance(UPDATE_ICON) playsound(src, 'sound/effects/snap.ogg', 50, TRUE) +/obj/item/restraints/legcuffs/beartrap/proc/trap_stepped_on(datum/source, atom/movable/entering, ...) + SIGNAL_HANDLER + + spring_trap(entering) + +/** + * Tries to spring the trap on the target movable. + * + * This proc is safe to call without knowing if the target is valid or if the trap is armed. + * + * Does not trigger on tiny mobs. + * If ignore_movetypes is FALSE, does not trigger on floating / flying / etc. mobs. + */ +/obj/item/restraints/legcuffs/beartrap/proc/spring_trap(atom/movable/target, ignore_movetypes = FALSE) + if(!armed || !isturf(loc) || !isliving(target)) + return + + var/mob/living/victim = target + if(istype(victim.buckled, /obj/vehicle)) + var/obj/vehicle/ridden_vehicle = victim.buckled + if(!ridden_vehicle.are_legs_exposed) //close the trap without injuring/trapping the rider if their legs are inside the vehicle at all times. + close_trap() + ridden_vehicle.visible_message(span_danger("[ridden_vehicle] triggers \the [src].")) + return + + /obj/item/restraints/legcuffs/beartrap/Crossed(AM as mob|obj) if(armed && isturf(loc)) if(isliving(AM)) From e27a5f8c7045c2dd9c37164fc7f702068a569fe6 Mon Sep 17 00:00:00 2001 From: Yogbot-13 Date: Mon, 19 Feb 2024 18:05:59 -0500 Subject: [PATCH 02/75] Automatic changelog generation #21454 [ci skip] --- html/changelogs/AutoChangelog-pr-21454.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangelog-pr-21454.yml diff --git a/html/changelogs/AutoChangelog-pr-21454.yml b/html/changelogs/AutoChangelog-pr-21454.yml new file mode 100644 index 000000000000..97d3e2a654a6 --- /dev/null +++ b/html/changelogs/AutoChangelog-pr-21454.yml @@ -0,0 +1,4 @@ +author: "cowbot92" +delete-after: true +changes: + - bugfix: "fixed beartraps not trapping" From a4eb6bb3b247f4530f3df8bc2ce4d34e5863623f Mon Sep 17 00:00:00 2001 From: Changelogs Date: Tue, 20 Feb 2024 06:11:40 +0000 Subject: [PATCH 03/75] Automatic changelog compile [ci skip] --- html/changelog.html | 6 ++++++ html/changelogs/.all_changelog.yml | 3 +++ html/changelogs/AutoChangelog-pr-21454.yml | 4 ---- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 html/changelogs/AutoChangelog-pr-21454.yml diff --git a/html/changelog.html b/html/changelog.html index 4a251bd03991..b27ced3bdb29 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -57,6 +57,12 @@ -->
+

20 February 2024

+

cowbot92 updated:

+
    +
  • fixed beartraps not trapping
  • +
+

19 February 2024

SapphicOverload updated: