[Automated] Merge dev into gh-pages

This commit is contained in:
github-actions[bot] authored and GitHub committed 2021-07-19 20:02:19 +00:00
commit 52edc5696a
7 files changed
+66 -42

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
/*! For license information please see CookieMonsterDev.js.LICENSE.txt */
(()=>{var e={877:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,n,a,i=((a={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",a.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?a.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),i=new RegExp("(^|\\s)("+a.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var s,l;if(!(n[r].jscolor&&n[r].jscolor instanceof a.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!a.isColorAttrSupported)&&(null!==(s=a.getDataAttr(n[r],"jscolor"))||n[r].className&&(l=n[r].className.match(i)))){var c=n[r],d="";null!==s?d=s:l&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+a.docsRef),l[4]&&(d=l[4]));var m=null;if(d.trim())try{m=a.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new a.pub(c,m)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!a.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<a.instances.length;t+=1)a.instances[t]&&a.instances[t].targetElement&&e.push(a.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return a.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,n=null;try{n=e.document.querySelector(o)}catch(e){return console.warn(e),null}return n||console.warn("No element matches the selector: %s",o),n}return a.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===a.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=a.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(a.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(n=e.document.createElement("input"),!(!n.setAttribute||(n.setAttribute("type","color"),"color"!=n.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(a.dataProp)?e[a.dataProp]:e[a.dataProp]={},o=arguments[2];return t[i=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(a.dataProp)?e[a.dataProp]:e[a.dataProp]={};var n=arguments[1];for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(a.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[a.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(a.dataProp)){if(void 0===o)return;e[a.dataProp]={}}var n=e[a.dataProp];return n.hasOwnProperty(t)||void 0===o||(n[t]=o),n[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var n="data-"+t;e.setAttribute(n,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,n){a._attachedGroupEvents.hasOwnProperty(e)||(a._attachedGroupEvents[e]=[]),a._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(a._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<a._attachedGroupEvents[e].length;t+=1){var o=a._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete a._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(a._capturedTarget=e,a._capturedTarget.setCapture())},releaseTarget:function(){a._capturedTarget&&(a._capturedTarget.releaseCapture(),a._capturedTarget=null)},triggerEvent:function(t,o,n,i){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:i}):(r=e.document.createEvent("Event")).initEvent(o,n,i),!!r&&(a.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&a.isTextInput(e)Line truncated
(()=>{var e={877:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,n,a,i=((a={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",a.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?a.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),i=new RegExp("(^|\\s)("+a.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var s,l;if(!(n[r].jscolor&&n[r].jscolor instanceof a.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!a.isColorAttrSupported)&&(null!==(s=a.getDataAttr(n[r],"jscolor"))||n[r].className&&(l=n[r].className.match(i)))){var c=n[r],d="";null!==s?d=s:l&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+a.docsRef),l[4]&&(d=l[4]));var m=null;if(d.trim())try{m=a.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new a.pub(c,m)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!a.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<a.instances.length;t+=1)a.instances[t]&&a.instances[t].targetElement&&e.push(a.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return a.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,n=null;try{n=e.document.querySelector(o)}catch(e){return console.warn(e),null}return n||console.warn("No element matches the selector: %s",o),n}return a.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===a.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=a.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(a.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(n=e.document.createElement("input"),!(!n.setAttribute||(n.setAttribute("type","color"),"color"!=n.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(a.dataProp)?e[a.dataProp]:e[a.dataProp]={},o=arguments[2];return t[i=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(a.dataProp)?e[a.dataProp]:e[a.dataProp]={};var n=arguments[1];for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(a.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[a.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(a.dataProp)){if(void 0===o)return;e[a.dataProp]={}}var n=e[a.dataProp];return n.hasOwnProperty(t)||void 0===o||(n[t]=o),n[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var n="data-"+t;e.setAttribute(n,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,n){a._attachedGroupEvents.hasOwnProperty(e)||(a._attachedGroupEvents[e]=[]),a._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(a._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<a._attachedGroupEvents[e].length;t+=1){var o=a._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete a._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(a._capturedTarget=e,a._capturedTarget.setCapture())},releaseTarget:function(){a._capturedTarget&&(a._capturedTarget.releaseCapture(),a._capturedTarget=null)},triggerEvent:function(t,o,n,i){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:i}):(r=e.document.createEvent("Event")).initEvent(o,n,i),!!r&&(a.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&a.isTextInput(e)Line truncated
//# sourceMappingURL=https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonsterDev.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["webpack:///./node_modules/@eastdesire/jscolor/jscolor.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/draw/drawLoop.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/saveDataFunctions/saveFramework.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/menuFunctions/toggleHeader.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/addMenu.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/info/addInfoMenuSection.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/info/createFrameworkInfoMenuSection.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/data/modInfo.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/options/addOptionsMenuSection.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/saveDataFunctions/loadMod.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/saveDataFunctions/createSaveDataObject.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/data/headers.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/data/settings.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/logic/logicLoop.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/cookieMonsterFramework.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/init.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/load.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/save.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/index.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/initFunctions/initModFramework.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/initFunctions/registerMod.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/menuFunctions/createInfoListing.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/menuFunctions/createModMenuSection.js","webpack:///./src/Config/Toggles/ToggleWrinklerButtons.js","webpack:///./src/Data/Scales.ts","webpack:///./src/Main/VariablesAndData.js","webpack:///./src/Disp/BeautifyAndFormatting/Beautify.js","webpack:///./src/Cache/VariablesAndData.js","webpack:///./src/Sim/VariablesAndData.js","webpack:///./src/Disp/VariablesAndData.js","webpack:///./src/Sim/ReplacedGameFunctions/SimAuraMult.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetSellMultiplier.js","webpack:///./src/Sim/ReplacedGameFunctions/SimEff.js","webpack:///./src/Sim/ReplacedGameFunctions/SimHas.js","webpack:///./src/Sim/ReplacedGameFunctions/SimHasGod.js","webpack:///./src/Sim/ReplacedGameFunctions/SimModifyBuidlingPrice.js","webpack:///./src/Sim/SimulationEvents/SellBuilding.js","webpack:///./src/Disp/BuildingsUpgrades/Buildings.js","webpack:///./src/Disp/BuildingsUpgrades/UpdateUpgradeSectionsHeight.js","webpack:///./src/Disp/BuildingsUpgrades/Upgrades.js","webpack:///./src/Disp/BeautifyAndFormatting/FormatTime.js","webpack:///./src/Disp/BeautifyAndFormatting/GetTimeColour.js","webpack:///./src/Disp/HelperFunctions/GetCPS.js","webpack:///./src/Disp/HelperFunctions/GetWrinkConfigBank.js","webpack:///./src/Disp/InfoBars/CreateDOMElements.js","webpack:///./src/Disp/InfoBars/BottomBar.js","webpack:///./src/Disp/HelperFunctions/UpdateBackground.js","webpack:///./src/Config/SpecificToggles.js","webpack:///./src/Cache/Dragon/CacheDragonAuras.js","webpack:///./src/Sim/InitializeData/InitAchievement.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetTieredCpsMult.js","webpack:///./src/Sim/InitializeData/InitialBuildingData.js","webpack:///./src/Sim/InitializeData/InitUpgrade.js","webpack:///./src/Sim/SimulationData/CopyData.js","webpack:///./src/Disp/Tooltips/CreateTooltip.js","webpack:///./src/Cache/PP/ColourOfPP.js","webpack:///./src/Cache/CPS/GetCPSBuffMult.js","webpack:///./src/Sim/SimulationData/SimWin.js","webpack:///./src/Sim/Calculations/CalculateGains.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetHeavenlyMultiplier.js","webpack:///./src/Data/Gamedata.ts","webpack:///./src/Sim/ReplacedGameFunctions/SimHasAchiev.js","webpack:///./src/Sim/Calculations/CheckOtherAchiev.js","webpack:///./src/Sim/SimulationEvents/BuyBuildingBonusIncome.js","webpack:/Line truncated
{"version":3,"sources":["webpack:///./node_modules/@eastdesire/jscolor/jscolor.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/draw/drawLoop.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/saveDataFunctions/saveFramework.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/menuFunctions/toggleHeader.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/addMenu.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/info/addInfoMenuSection.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/info/createFrameworkInfoMenuSection.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/data/modInfo.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/menuSections/options/addOptionsMenuSection.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/saveDataFunctions/loadMod.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/saveDataFunctions/createSaveDataObject.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/data/headers.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/data/settings.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/logic/logicLoop.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/cookieMonsterFramework.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/init.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/load.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/frameworkDataObject/save.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/index.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/initFunctions/initModFramework.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/initFunctions/registerMod.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/menuFunctions/createInfoListing.js","webpack:///./node_modules/@cookiemonsterteam/cookiemonsterframework/src/menuFunctions/createModMenuSection.js","webpack:///./src/Config/Toggles/ToggleWrinklerButtons.js","webpack:///./src/Data/Scales.ts","webpack:///./src/Main/VariablesAndData.js","webpack:///./src/Disp/BeautifyAndFormatting/Beautify.js","webpack:///./src/Cache/VariablesAndData.js","webpack:///./src/Sim/VariablesAndData.js","webpack:///./src/Disp/VariablesAndData.js","webpack:///./src/Sim/ReplacedGameFunctions/SimAuraMult.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetSellMultiplier.js","webpack:///./src/Sim/ReplacedGameFunctions/SimEff.js","webpack:///./src/Sim/ReplacedGameFunctions/SimHas.js","webpack:///./src/Sim/ReplacedGameFunctions/SimHasGod.js","webpack:///./src/Sim/ReplacedGameFunctions/SimModifyBuidlingPrice.js","webpack:///./src/Sim/SimulationEvents/SellBuilding.js","webpack:///./src/Disp/BuildingsUpgrades/Buildings.js","webpack:///./src/Disp/BuildingsUpgrades/UpdateUpgradeSectionsHeight.js","webpack:///./src/Disp/BuildingsUpgrades/Upgrades.js","webpack:///./src/Disp/BeautifyAndFormatting/FormatTime.js","webpack:///./src/Disp/BeautifyAndFormatting/GetTimeColour.js","webpack:///./src/Disp/HelperFunctions/GetCPS.js","webpack:///./src/Disp/HelperFunctions/GetWrinkConfigBank.js","webpack:///./src/Disp/InfoBars/CreateDOMElements.js","webpack:///./src/Disp/InfoBars/BottomBar.js","webpack:///./src/Disp/HelperFunctions/UpdateBackground.js","webpack:///./src/Config/SpecificToggles.js","webpack:///./src/Cache/Dragon/CacheDragonAuras.js","webpack:///./src/Sim/InitializeData/InitAchievement.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetTieredCpsMult.js","webpack:///./src/Sim/InitializeData/InitialBuildingData.js","webpack:///./src/Sim/InitializeData/InitUpgrade.js","webpack:///./src/Sim/SimulationData/CopyData.js","webpack:///./src/Disp/Tooltips/CreateTooltip.js","webpack:///./src/Cache/PP/ColourOfPP.js","webpack:///./src/Cache/CPS/GetCPSBuffMult.js","webpack:///./src/Sim/SimulationData/SimWin.js","webpack:///./src/Sim/Calculations/CalculateGains.js","webpack:///./src/Sim/ReplacedGameFunctions/SimGetHeavenlyMultiplier.js","webpack:///./src/Data/Gamedata.ts","webpack:///./src/Sim/ReplacedGameFunctions/SimHasAchiev.js","webpack:///./src/Sim/Calculations/CheckOtherAchiev.js","webpack:///./src/Sim/SimulationEvents/BuyBuildingBonusIncome.js","webpack:/Line truncated
+18 -2
View File
@@ -1,5 +1,6 @@
import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank';
import { ColourGray } from '../../Disp/VariablesAndData';
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding';
import {
CacheMinPP, // eslint-disable-line no-unused-vars
CacheMinPPBulk, // eslint-disable-line no-unused-vars
@@ -25,7 +26,16 @@ function CacheColour(target, amount) {
return;
}
// eslint-disable-next-line no-param-reassign
target[i].color = ColourOfPP(target[i], Game.Objects[i].getSumPrice(amount));
target[i].color = ColourOfPP(
target[i],
BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
amount,
),
);
// Colour based on excluding certain top-buildings
for (
let j = 0;
@@ -39,7 +49,13 @@ function CacheColour(target, amount) {
function CachePP(target, amount) {
Object.keys(target).forEach((i) => {
const price = Game.Objects[i].getSumPrice(amount);
const price = BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
amount,
);
if (Game.cookiesPs) {
target[i].pp = // eslint-disable-line no-param-reassign
Math.max(price - (Game.cookies + GetWrinkConfigBank()), 0) / Game.cookiesPs +
+19 -16
View File
@@ -38,22 +38,25 @@ function CacheBuildingIncome(amount) {
* It is called by CM.Cache.CacheIncome()
*/
function CacheUpgradeIncome() {
CacheUpgrades = [];
Object.keys(Game.Upgrades).forEach((i) => {
const bonusIncome = BuyUpgradesBonusIncome(i);
if (i === 'Elder Pledge') {
CacheUpgrades[i] = { bonus: Game.cookiesPs - CacheAverageGainBank };
CacheUpgrades = {};
for (let i = 0; i < Game.UpgradesInStore.length; i++) {
const upgradeName = Game.UpgradesInStore[i].name;
const bonusIncome = BuyUpgradesBonusIncome(upgradeName);
if (upgradeName === 'Elder Pledge') {
CacheUpgrades[upgradeName] = {
bonus: Game.cookiesPs - CacheAverageGainBank,
};
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 1)
CacheUpgrades[i].bonus -= CacheAverageGainWrink;
CacheUpgrades[upgradeName].bonus -= CacheAverageGainWrink;
else if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.CalcWrink === 2)
CacheUpgrades[i].bonus -= CacheAverageGainWrinkFattest;
if (!Number.isFinite(CacheUpgrades[i].bonus)) CacheUpgrades[i].bonus = 0;
CacheUpgrades[upgradeName].bonus -= CacheAverageGainWrinkFattest;
if (!Number.isFinite(CacheUpgrades[upgradeName].bonus)) CacheUpgrades[upgradeName].bonus = 0;
} else {
CacheUpgrades[i] = {};
if (bonusIncome[0]) CacheUpgrades[i].bonus = bonusIncome[0];
if (bonusIncome[1]) CacheUpgrades[i].bonusMouse = bonusIncome[1];
CacheUpgrades[upgradeName] = {};
if (bonusIncome[0]) CacheUpgrades[upgradeName].bonus = bonusIncome[0];
if (bonusIncome[1]) CacheUpgrades[upgradeName].bonusMouse = bonusIncome[1];
}
}
});
}
/**
@@ -62,28 +65,28 @@ function CacheUpgradeIncome() {
export function CacheBuildingsPrices() {
Object.keys(Game.Objects).forEach((i) => {
CacheObjects1[i].price = BuildingGetPrice(
Game.Objects[i],
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
1,
);
CacheObjects10[i].price = BuildingGetPrice(
Game.Objects[i],
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
10,
);
CacheObjects100[i].price = BuildingGetPrice(
Game.Objects[i],
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
100,
);
CacheObjectsNextAchievement[i].price = BuildingGetPrice(
Game.Objects[i],
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
@@ -1,3 +1,4 @@
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding';
import { CacheObjectsNextAchievement } from '../VariablesAndData';
import IndividualAmountTillNextAchievement from './IndividualAmountTillNextAchievement';
@@ -17,7 +18,11 @@ export default function AllAmountTillNextAchievement(forceRecalc) {
result[i] = {
AmountNeeded: CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount,
TotalNeeded: CacheObjectsNextAchievement[i].TotalNeeded,
price: Game.Objects[i].getSumPrice(
price: BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
CacheObjectsNextAchievement[i].TotalNeeded - Game.Objects[i].amount,
),
};
@@ -26,7 +31,13 @@ export default function AllAmountTillNextAchievement(forceRecalc) {
result[i] = {
AmountNeeded: tillNext,
TotalNeeded: Game.Objects[i].amount + tillNext,
price: Game.Objects[i].getSumPrice(tillNext),
price: BuildingGetPrice(
i,
Game.Objects[i].basePrice,
Game.Objects[i].amount,
Game.Objects[i].free,
tillNext,
),
};
}
});
+8 -9
View File
@@ -20,16 +20,15 @@ export default function ReplaceAscendTooltip() {
);
const startDate = Game.sayTime(((Date.now() - Game.startDate) / 1000) * Game.fps, -1);
let str = '';
str += `You've been on this run for <b>${
let str = `You've been on this run for <b>${
startDate === '' ? 'not very long' : startDate
}</b>.<br>`;
str += '<div class="line"></div>';
}</b>.<br>
<div class="line"></div>`;
if (Game.prestige > 0) {
str += `Your prestige level is currently <b>${Beautify(Game.prestige)}</b>.<br>(CpS +${Beautify(
Game.prestige,
)}%)`;
str += '<div class="line"></div>';
)}%)
<div class="line"></div>`;
}
if (CacheLastHeavenlyChips < 1) str += 'Ascending now would grant you no prestige.';
else if (CacheLastHeavenlyChips < 2)
@@ -41,9 +40,9 @@ export default function ReplaceAscendTooltip() {
)} prestige levels</b> (+${Beautify(CacheLastHeavenlyChips)}% CpS)<br>and <b>${Beautify(
CacheLastHeavenlyChips,
)} heavenly chips</b> to spend.`;
str += '<div class="line"></div>';
str += `You need <b>${Beautify(cookiesToNext)} more cookies</b> for the next level.<br>`;
str += `${
str += `<div class="line"></div>
You need <b>${Beautify(cookiesToNext)} more cookies</b> for the next level.<br>
${
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TooltipAscendButton
? `<div class='line'></div>It takes ${CacheTimeTillNextPrestige} to reach the next level and you were making ${Beautify(
CacheHCPerSecond,
+6 -11
View File
@@ -1,7 +1,5 @@
/**
* This function calculates the total price for buying "increase" of a building
* Base Game does not currently allow this
* It is called by CM.Cache.CacheBuildingsPrices() and CM.Disp.Tooltip()
* @param {string} build Name of the building
* @param {number} basePrice Base Price of building
* @param {number} start Starting amount of building
@@ -10,14 +8,11 @@
* @returns {number} moni Total price
*/
export default function BuildingGetPrice(build, basePrice, start, free, increase) {
let startingAmount = start;
let moni = 0;
for (let i = 0; i < increase; i += 1) {
let price = basePrice * Game.priceIncrease ** Math.max(0, startingAmount - free);
price = Game.modifyBuildingPrice(build, price);
price = Math.ceil(price);
moni += price;
startingAmount += 1;
let partialPrice = 0;
for (let i = Math.max(0, start); i < Math.max(0, start + increase); i++) {
partialPrice += Game.priceIncrease ** Math.max(0, i - free);
}
return moni;
let price = basePrice * partialPrice;
price = Game.modifyBuildingPrice(Game.Objects[build], price);
return Math.ceil(price);
}