From 867fec79f48842f44ec543c260e49c5f605fd705 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Tue, 13 May 2025 08:16:36 +0200 Subject: [PATCH] Fixes wheelchair TTV logging, prevents detonation when stunned/timestopped (#91010) ## About The Pull Request Wheelchair bell detonation did not give any fingerprints to the bomb, resulting in the person who attached it not being logged anywhere. The bell action could also be used while stunned or paralyzed, allowing you to blow yourself up during timestop which is a bit silly. ## Why It's Good For The Game Makes admins job easier, fixes an oversight/exploit. --- code/game/objects/items/devices/transfer_valve.dm | 2 +- code/modules/vehicles/vehicle_actions.dm | 4 ++-- code/modules/vehicles/wheelchair.dm | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 74eda45b12f..aee6e25b832 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -90,9 +90,9 @@ return ITEM_INTERACT_FAILURE chair.attach_bomb(src) + user.log_message("attached [src] to [chair]", LOG_GAME) return ITEM_INTERACT_SUCCESS - /obj/item/transfer_valve/attackby(obj/item/item, mob/user, params) if(istype(item, /obj/item/tank)) if(tank_one && tank_two) diff --git a/code/modules/vehicles/vehicle_actions.dm b/code/modules/vehicles/vehicle_actions.dm index 909a9fe14ad..63d9dff013f 100644 --- a/code/modules/vehicles/vehicle_actions.dm +++ b/code/modules/vehicles/vehicle_actions.dm @@ -314,7 +314,7 @@ desc = "Ring the bell." button_icon = 'icons/obj/service/bureaucracy.dmi' button_icon_state = "desk_bell" - check_flags = AB_CHECK_CONSCIOUS + check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_INCAPACITATED var/bell_cooldown /datum/action/vehicle/ridden/wheelchair/bell/Trigger(trigger_flags) @@ -322,7 +322,7 @@ return TIMER_COOLDOWN_START(src, bell_cooldown, 0.5 SECONDS) playsound(vehicle_ridden_target, 'sound/machines/microwave/microwave-end.ogg', 70) - SEND_SIGNAL(vehicle_ridden_target, COMSIG_WHEELCHAIR_BELL_RANG) + SEND_SIGNAL(vehicle_ridden_target, COMSIG_WHEELCHAIR_BELL_RANG, owner) /datum/action/vehicle/ridden/scooter/skateboard/ollie name = "Ollie" diff --git a/code/modules/vehicles/wheelchair.dm b/code/modules/vehicles/wheelchair.dm index 087a1c4e956..423baf8627a 100644 --- a/code/modules/vehicles/wheelchair.dm +++ b/code/modules/vehicles/wheelchair.dm @@ -59,10 +59,12 @@ update_appearance() /// When you ring your bell and are armed try to explode -/obj/vehicle/ridden/wheelchair/proc/on_bell_rang() +/obj/vehicle/ridden/wheelchair/proc/on_bell_rang(obj/source, mob/user) SIGNAL_HANDLER if (prob(80)) return + if (bomb_attached) + bomb_attached.add_hiddenprint(user) detonate_bomb() /obj/vehicle/ridden/wheelchair/wrench_act(mob/living/user, obj/item/tool) //Attackby should stop it attacking the wheelchair after moving away during decon