Add the 'next multiple of 50' information to buildings' tooltip

This commit is contained in:
Laurent Georget
2017-03-09 15:21:51 +01:00
committed by Laurent Georget
parent f32b1d5685
commit 816c566442
4 changed files with 26 additions and 2 deletions

View File

@@ -133,6 +133,14 @@ CM.Cache.RemakePP = function() {
CM.Cache.RemakeBuildingsOtherPP(100, 'Objects100');
}
CM.Cache.RemakeMultiple = function () {
for (var i in CM.Cache.Objects) {
var nextMultiple = 50 - Game.Objects[i].amount % 50;
CM.Cache.Objects[i].multiple_quantity = nextMultiple;
CM.Cache.Objects[i].multiple_price = CM.Sim.BuildingGetPrice(Game.Objects[i].basePrice, Game.Objects[i].amount, Game.Objects[i].free, nextMultiple);
}
}
CM.Cache.RemakeLucky = function() {
CM.Cache.Lucky = (CM.Cache.NoGoldSwitchCookiesPS * 60 * 15) / 0.15;
CM.Cache.Lucky /= CM.Sim.getCPSBuffMult();