From e32843e5445445abf5eebd027690d38e7ecd1f7a Mon Sep 17 00:00:00 2001 From: 1080pCat <96908085+1080pCat@users.noreply.github.com> Date: Tue, 16 Jul 2024 08:00:43 +1000 Subject: [PATCH] Fixes rigged batons runtiming on hit. and also fixes syringes (#26223) --- code/game/objects/items/weapons/stunbaton.dm | 1 + code/modules/power/cell.dm | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index ca4e38529b5..5885c3a39ae 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -110,6 +110,7 @@ cell = null turned_on = FALSE update_icon(UPDATE_ICON_STATE) + return if(cell.charge < (hitcost)) // If after the deduction the baton doesn't have enough charge for a stun hit it turns off. turned_on = FALSE update_icon() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index a1c774be631..21205d03a3d 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -99,15 +99,12 @@ if(istype(W, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/S = W - to_chat(user, "You inject the solution into the power cell.") - if(S.reagents.has_reagent("plasma", 5) || S.reagents.has_reagent("plasma_dust", 5)) - + to_chat(user, "You inject the solution into the power cell.") rigged = TRUE log_admin("LOG: [key_name(user)] injected a power cell with plasma, rigging it to explode.") message_admins("LOG: [key_name_admin(user)] injected a power cell with plasma, rigging it to explode.") - S.reagents.clear_reagents() else return ..()