From 29abbc17f628a4918df3cb67054f0bd3a78f05a0 Mon Sep 17 00:00:00 2001 From: Blank_Alt <Blank_Alt> Date: Fri, 23 Sep 2022 16:04:43 +1200 Subject: [PATCH] fixRiotGearFromSF --- src/Mods/SecExp/buildings/riotControlCenter.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/Mods/SecExp/buildings/riotControlCenter.js b/src/Mods/SecExp/buildings/riotControlCenter.js index b7b9dc39025..428a4352280 100644 --- a/src/Mods/SecExp/buildings/riotControlCenter.js +++ b/src/Mods/SecExp/buildings/riotControlCenter.js @@ -200,18 +200,11 @@ App.Mods.SecExp.riotCenter = (function() { if (V.SF.Toggle && V.SF.Active >= 1) { if (V.SecExp.edicts.SFSupportLevel >= 4 && V.SF.Squad.Armoury >= 8 && !V.SecExp.rebellions.sfArmor) { - App.UI.DOM.appendNewElement("div", node); const cost = Math.ceil(500000 * App.Mods.SF.env() * (1.15 + (V.SF.Squad.Armoury/10) )); - App.UI.DOM.appendNewElement("span", node, - App.UI.DOM.link( - `Give the riot unit access to the combat armor suits of ${V.SF.Lower}.`, - () => { - V.SecExp.rebellions.sfArmor = 1; - cashX(-cost, "capEx"); - } - ) - ); - App.UI.DOM.appendNewElement("span", node, `Costs ${cashFormat(cost)}.`, "note"); + App.UI.DOM.appendNewElement("div", node, makePurchase( + `Give the riot unit access to the combat armor suits of ${V.SF.Lower}.`, cost, "capEx", + {handler: () => { V.SecExp.rebellions.sfArmor = 1; }} + )); } else { App.UI.DOM.appendNewElement("div", node, `You have given the riot unit access to the combat armor suits of ${V.SF.Lower}.`); } -- GitLab