From 4dfcd17b6d7e3c292ae84337993fd9386b7d6f63 Mon Sep 17 00:00:00 2001 From: FlufflesTheDog Date: Wed, 27 Nov 2024 11:59:54 -0700 Subject: [PATCH 1/2] Fix OPFOR bluescreen (#4640) fimx i'm really running out of energy to write descriptive commit message --- .../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, From a5fae2a2a809a55c2258ca25ce1fda89d4089ce8 Mon Sep 17 00:00:00 2001 From: StealsThePRs Date: Wed, 27 Nov 2024 22:00:15 +0300 Subject: [PATCH 2/2] [MIRROR] Fix OPFOR bluescreen