diff --git a/binaries/data/mods/public/simulation/components/TechnologyManager.js b/binaries/data/mods/public/simulation/components/TechnologyManager.js index 72782bdc97..89f0ee296b 100644 --- a/binaries/data/mods/public/simulation/components/TechnologyManager.js +++ b/binaries/data/mods/public/simulation/components/TechnologyManager.js @@ -2,6 +2,21 @@ function TechnologyManager() {} TechnologyManager.prototype.Schema = ""; + +TechnologyManager.prototype.Serialize = function() +{ + // The modifications cache will be affected by property reads from the GUI and other places so we shouldn't + // serialize it. + + var ret = {}; + for (i in this) + { + if (this.hasOwnProperty(i)) + ret[i] = this[i]; + } + ret.modificationCache = {}; + return ret; +}; TechnologyManager.prototype.Init = function () {