From d9c381b76cf0a1945dbde7b87fb2112a588f3258 Mon Sep 17 00:00:00 2001 From: MouseOfLight <MouseOfLight@gmail.com> Date: Thu, 10 Oct 2019 10:10:21 -0700 Subject: [PATCH] Moved corporate id into storage instead of calculating. --- src/Corporation/corporate-divisionBase.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Corporation/corporate-divisionBase.js b/src/Corporation/corporate-divisionBase.js index 2e840b48f80..2951cc8ebfb 100644 --- a/src/Corporation/corporate-divisionBase.js +++ b/src/Corporation/corporate-divisionBase.js @@ -4,6 +4,7 @@ App.Corporate.Init_DivisionBase = function(shared) { constructor({id, name, focusDescription, sizeCost, maintenance, founding, merger}) { this._const = {}; this._const.id = id; + this._const.corpId = `corpDiv${capFirstChar(id)}`; this._const.cost = sizeCost; this._const.name = name; this._const.focusDescription = focusDescription; @@ -198,8 +199,7 @@ App.Corporate.Init_DivisionBase = function(shared) { } //private helpers - get corpDiv() { return `corpDiv${this._const.id}`; } - getStored(key ) { return V[this.corpDiv + key]; } - setStored(key, value) { V[this.corpDiv + key] = value; } + getStored(key ) { return V[this._const.corpId + key]; } + setStored(key, value) { V[this._const.corpId + key] = value; } }; } -- GitLab