From 153d90035a9f73b85f7e8a8c0ad9386d02c07130 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sun, 26 Apr 2020 22:34:37 -0400 Subject: [PATCH] start subsidiesAndBarriers --- src/interaction/budgets/recordTemplates.js | 1 + src/js/economyJS.js | 7 ++++--- src/uncategorized/costsBudget.js | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/interaction/budgets/recordTemplates.js b/src/interaction/budgets/recordTemplates.js index 09c8b1a3972..082abff9e53 100644 --- a/src/interaction/budgets/recordTemplates.js +++ b/src/interaction/budgets/recordTemplates.js @@ -117,6 +117,7 @@ App.Data.Records.LastWeeksCash = function() { this.futureSocieties = 0, this.schoolBacking = 0, this.policies = 0, + this.subsidiesAndBarriers = 0, this.edicts = 0, // Personal Finance diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 5fd936e7e05..1c91462aebd 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -205,7 +205,8 @@ globalThis.CategoryAssociatedGroup = Object.freeze({ 'cheating' ], POLICIES: [ - 'policies' + 'policies', + 'subsidiesAndBarriers' ], EDICTS: [ 'edicts' @@ -2591,14 +2592,14 @@ globalThis.supplyPoliciesReport = function(NPCclass) { // charge supply barriers (unreported, since it's a flat amount that you were told when you enacted the policy) const supplyCosts = [0, 1000, 5000, 20000, 60000]; - cashX(forceNeg(supplyCosts[V.sexSupplyBarriers[varName]]), "policies"); + cashX(forceNeg(supplyCosts[V.sexSupplyBarriers[varName]]), "subsidiesAndBarriers"); // report subsidy cost since it is variable if (V.sexSubsidies[varName] > 0) { const severity = ["none", "minor", "moderate", "substantial", "gratuitous"]; const subsidyCost = forceNeg(Math.trunc(V.NPCSexSupply[varName] * Math.pow(V.sexSubsidies[varName], 2) * 0.25)); r += `<i> Your ${severity[V.sexSubsidies[varName]]} subsidy costs ${cashFormatColor(subsidyCost)} this week</i>`; - cashX(subsidyCost, "policies"); + cashX(subsidyCost, "subsidiesAndBarriers"); // warn about conflicting policies if (V.sexSupplyBarriers[varName] > 0) { diff --git a/src/uncategorized/costsBudget.js b/src/uncategorized/costsBudget.js index 4ef87b0d427..a9b2a0dec1c 100644 --- a/src/uncategorized/costsBudget.js +++ b/src/uncategorized/costsBudget.js @@ -743,6 +743,7 @@ App.UI.Budget.Cost = function() { // POLICIES generateRowGroup("Policies", "POLICIES"); generateRowCategory("Policies", "policies"); + generateRowCategory("Subsidies and Barriers", "subsidiesAndBarriers"); // EDICTS generateRowGroup("Edicts", "EDICTS"); -- GitLab