Index: binaries/data/mods/public/simulation/components/Pack.js =================================================================== --- binaries/data/mods/public/simulation/components/Pack.js +++ binaries/data/mods/public/simulation/components/Pack.js @@ -98,7 +98,7 @@ { let cmpPlayer = QueryOwnerInterface(this.entity, IID_Player); - return ApplyValueModificationsToEntity("Pack/Time", +this.template.Time, this.entity) * cmpPlayer.GetTimeMultiplier(); + return ApplyValueModificationsToEntity("Pack/Time", +this.template.Time, this.entity); }; Pack.prototype.GetElapsedTime = function() Index: binaries/data/mods/public/simulation/components/Player.js =================================================================== --- binaries/data/mods/public/simulation/components/Player.js +++ binaries/data/mods/public/simulation/components/Player.js @@ -68,7 +68,6 @@ this.gatherRateMultiplier = 1; this.tradeRateMultiplier = 1; this.cheatsEnabled = false; - this.cheatTimeMultiplier = 1; this.panelEntities = []; this.resourceNames = {}; this.disabledTemplates = {}; @@ -226,12 +225,12 @@ Player.prototype.GetGatherRateMultiplier = function() { - return this.gatherRateMultiplier / this.cheatTimeMultiplier; + return this.gatherRateMultiplier; }; Player.prototype.GetTimeMultiplier = function() { - return this.timeMultiplier * this.cheatTimeMultiplier; + return this.timeMultiplier; }; Player.prototype.GetTradeRateMultiplier = function() @@ -845,17 +844,6 @@ return this.cheatsEnabled; }; -Player.prototype.SetCheatTimeMultiplier = function(time) -{ - this.cheatTimeMultiplier = time; - Engine.BroadcastMessage(MT_MultiplierChanged, { "player": this.playerID, "type": "cheat" }); -}; - -Player.prototype.GetCheatTimeMultiplier = function() -{ - return this.cheatTimeMultiplier; -}; - Player.prototype.TributeResource = function(player, amounts) { var cmpPlayer = QueryPlayerIDInterface(player); Index: binaries/data/mods/public/simulation/components/ProductionQueue.js =================================================================== --- binaries/data/mods/public/simulation/components/ProductionQueue.js +++ binaries/data/mods/public/simulation/components/ProductionQueue.js @@ -335,7 +335,7 @@ let template = TechnologyTemplates.Get(templateName); let techCostMultiplier = this.GetTechCostMultiplier(); - let time = techCostMultiplier.time * template.researchTime * cmpPlayer.GetTimeMultiplier(); + let time = techCostMultiplier.time * template.researchTime; let cost = {}; for (let res in template.cost) @@ -503,7 +503,7 @@ var batchTimeModifier = ApplyValueModificationsToEntity("ProductionQueue/BatchTimeModifier", +this.template.BatchTimeModifier, this.entity); // TODO: work out what equation we should use here. - return Math.pow(batchSize, batchTimeModifier) * cmpPlayer.GetTimeMultiplier(); + return Math.pow(batchSize, batchTimeModifier); }; ProductionQueue.prototype.OnOwnershipChanged = function(msg) Index: binaries/data/mods/public/simulation/components/Upgrade.js =================================================================== --- binaries/data/mods/public/simulation/components/Upgrade.js +++ binaries/data/mods/public/simulation/components/Upgrade.js @@ -276,8 +276,7 @@ return 0; let cmpPlayer = QueryPlayerIDInterface(this.owner, IID_Player); - return ApplyValueModificationsToEntity("Upgrade/Time", +this.template[choice].Time, this.entity) * - cmpPlayer.GetTimeMultiplier(); + return ApplyValueModificationsToEntity("Upgrade/Time", +this.template[choice].Time, this.entity); }; Upgrade.prototype.GetElapsedTime = function() Index: binaries/data/mods/public/simulation/helpers/Cheat.js =================================================================== --- binaries/data/mods/public/simulation/helpers/Cheat.js +++ binaries/data/mods/public/simulation/helpers/Cheat.js @@ -69,7 +69,20 @@ cmpProductionQueue.SpawnUnits(input.templates[i % input.templates.length], 1, null); return; case "fastactions": - cmpPlayer.SetCheatTimeMultiplier((cmpPlayer.GetCheatTimeMultiplier() == 1) ? 0.01 : 1); + let cmpModifiersManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModifiersManager); + if (!cmpModifiersManager) + return; + + if (cmpModifiersManager.HasAnyModifier("cheat/fastactions", playerEnt)) + cmpModifiersManager.RemoveAllModifiers("cheat/fastactions", playerEnt); + else + cmpModifiersManager.AddModifiers("cheat/fastactions", { + "Cost/BuildTime": { "affects": [["Structure"], ["Unit"]], "multiply": 0.01 }, + "ResourceGatherer/BaseSpeed": { "affects": [["Structure"], ["Unit"]], "multiply": 1000 }, + "Pack/Time": { "affects": [["Structure"], ["Unit"]], "multiply": 0.01 }, + "Upgrade/Time": { "affects": [["Structure"], ["Unit"]], "multiply": 0.01 }, + "ProductionQueue/TechCostMultiplier/time": { "affects": [["Structure"], ["Unit"]], "multiply": 0.01 } + }, playerEnt); return; case "changespeed": cmpPlayer.SetCheatTimeMultiplier(input.parameter);