diff --git a/src/Mods/SecExp/buildings/riotControlCenter.js b/src/Mods/SecExp/buildings/riotControlCenter.js index b7b9dc39025d0c794e21f93e6ee41feb65854fe0..428a4352280136372cd6adbb11065cfa2466d21d 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}.`); }