From 705a392099c0917447bb0d2adbeeaa6349fded5b Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:42:15 +0300 Subject: [PATCH] [MIRROR] Fix OPFOR bluescreen (#5203) * Fix OPFOR bluescreen (#4640) fimx i'm really running out of energy to write descriptive commit message * [MIRROR] Fix OPFOR bluescreen --------- Co-authored-by: FlufflesTheDog Co-authored-by: StealsThePRs --- .../modules/opposing_force/code/opposing_force_datum.dm | 4 ++-- tgui/packages/tgui/interfaces/OpposingForcePanel.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modular_nova/modules/opposing_force/code/opposing_force_datum.dm b/modular_nova/modules/opposing_force/code/opposing_force_datum.dm index f63c08c3204..62d8b7781fd 100644 --- a/modular_nova/modules/opposing_force/code/opposing_force_datum.dm +++ b/modular_nova/modules/opposing_force/code/opposing_force_datum.dm @@ -378,8 +378,8 @@ user.client?.admin_follow(mind_reference.current) /datum/opposing_force/proc/set_equipment_count(mob/user, datum/opposing_force_selected_equipment/equipment, new_count) - var/sanitized_newcount = sanitize_integer(new_count, 1, equipment.opposing_force_equipment.max_amount) - equipment.count = new_count + var/sanitized_newcount = sanitize_integer(new_count, 1, equipment.opposing_force_equipment.max_amount, default = 1) + equipment.count = sanitized_newcount add_log(user.ckey, "Set equipment '[equipment.opposing_force_equipment.name] count to [sanitized_newcount]") /datum/opposing_force/proc/handle(mob/user) diff --git a/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx b/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx index 7f25e09847d..bbc46203e3e 100644 --- a/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx +++ b/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx @@ -509,11 +509,11 @@ export const EquipmentTab = (props) => { buttons={ <> + onChange={(value) => act('set_equipment_count', { selected_equipment_ref: equipment.ref, new_equipment_count: value,