Merge pull request #679 from DanielNoord/tooltip/pantheon
Added tooltips to Pantheon #597
This commit is contained in:
25 files changed
+822
-553
No files matched your search
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
/*! For license information please see CookieMonster.js.LICENSE.txt */
|
/*! For license information please see CookieMonster.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,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var l,s;if(!(n[r].jscolor&&n[r].jscolor instanceof i.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!i.isColorAttrSupported)&&(null!==(l=i.getDataAttr(n[r],"jscolor"))||n[r].className&&(s=n[r].className.match(a)))){var c=n[r],d="";null!==l?d=l:s&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+i.docsRef),s[4]&&(d=s[4]));var p=null;if(d.trim())try{p=i.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new i.pub(c,p)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!i.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<i.instances.length;t+=1)i.instances[t]&&i.instances[t].targetElement&&e.push(i.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return i.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 i.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"===i.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=i.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(i.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(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[i.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(i.dataProp)){if(void 0===o)return;e[i.dataProp]={}}var n=e[i.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){i._attachedGroupEvents.hasOwnProperty(e)||(i._attachedGroupEvents[e]=[]),i._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(i._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<i._attachedGroupEvents[e].length;t+=1){var o=i._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete i._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(i._capturedTarget=e,i._capturedTarget.setCapture())},releaseTarget:function(){i._capturedTarget&&(i._capturedTarget.releaseCapture(),i._capturedTarget=null)},triggerEvent:function(t,o,n,a){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:a}):(r=e.document.createEvent("Event")).initEvent(o,n,a),!!r&&(i.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&i.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,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var l,s;if(!(n[r].jscolor&&n[r].jscolor instanceof i.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!i.isColorAttrSupported)&&(null!==(l=i.getDataAttr(n[r],"jscolor"))||n[r].className&&(s=n[r].className.match(a)))){var c=n[r],d="";null!==l?d=l:s&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+i.docsRef),s[4]&&(d=s[4]));var p=null;if(d.trim())try{p=i.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new i.pub(c,p)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!i.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<i.instances.length;t+=1)i.instances[t]&&i.instances[t].targetElement&&e.push(i.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return i.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 i.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"===i.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=i.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(i.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(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[i.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(i.dataProp)){if(void 0===o)return;e[i.dataProp]={}}var n=e[i.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){i._attachedGroupEvents.hasOwnProperty(e)||(i._attachedGroupEvents[e]=[]),i._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(i._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<i._attachedGroupEvents[e].length;t+=1){var o=i._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete i._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(i._capturedTarget=e,i._capturedTarget.setCapture())},releaseTarget:function(){i._capturedTarget&&(i._capturedTarget.releaseCapture(),i._capturedTarget=null)},triggerEvent:function(t,o,n,a){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:a}):(r=e.document.createEvent("Event")).initEvent(o,n,a),!!r&&(i.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&i.isTextInput(e)Line truncated
|
||||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
/*! For license information please see CookieMonster.js.LICENSE.txt */
|
/*! For license information please see CookieMonster.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,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var l,s;if(!(n[r].jscolor&&n[r].jscolor instanceof i.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!i.isColorAttrSupported)&&(null!==(l=i.getDataAttr(n[r],"jscolor"))||n[r].className&&(s=n[r].className.match(a)))){var c=n[r],d="";null!==l?d=l:s&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+i.docsRef),s[4]&&(d=s[4]));var p=null;if(d.trim())try{p=i.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new i.pub(c,p)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!i.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<i.instances.length;t+=1)i.instances[t]&&i.instances[t].targetElement&&e.push(i.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return i.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 i.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"===i.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=i.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(i.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(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[i.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(i.dataProp)){if(void 0===o)return;e[i.dataProp]={}}var n=e[i.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){i._attachedGroupEvents.hasOwnProperty(e)||(i._attachedGroupEvents[e]=[]),i._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(i._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<i._attachedGroupEvents[e].length;t+=1){var o=i._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete i._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(i._capturedTarget=e,i._capturedTarget.setCapture())},releaseTarget:function(){i._capturedTarget&&(i._capturedTarget.releaseCapture(),i._capturedTarget=null)},triggerEvent:function(t,o,n,a){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:a}):(r=e.document.createEvent("Event")).initEvent(o,n,a),!!r&&(i.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&i.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,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var l,s;if(!(n[r].jscolor&&n[r].jscolor instanceof i.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!i.isColorAttrSupported)&&(null!==(l=i.getDataAttr(n[r],"jscolor"))||n[r].className&&(s=n[r].className.match(a)))){var c=n[r],d="";null!==l?d=l:s&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+i.docsRef),s[4]&&(d=s[4]));var p=null;if(d.trim())try{p=i.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new i.pub(c,p)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!i.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<i.instances.length;t+=1)i.instances[t]&&i.instances[t].targetElement&&e.push(i.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return i.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 i.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"===i.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=i.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(i.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(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[i.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(i.dataProp)){if(void 0===o)return;e[i.dataProp]={}}var n=e[i.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){i._attachedGroupEvents.hasOwnProperty(e)||(i._attachedGroupEvents[e]=[]),i._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(i._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<i._attachedGroupEvents[e].length;t+=1){var o=i._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete i._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(i._capturedTarget=e,i._capturedTarget.setCapture())},releaseTarget:function(){i._capturedTarget&&(i._capturedTarget.releaseCapture(),i._capturedTarget=null)},triggerEvent:function(t,o,n,a){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:a}):(r=e.document.createEvent("Event")).initEvent(o,n,a),!!r&&(i.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&i.isTextInput(e)Line truncated
|
||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
{"version":3,"sources":["webpack://cookiemonster-mod/CookieMonster.js"],"names":["__webpack_modules__","877","module","global","factory","exports","document","win","Error","window","this","BoxShadow","funcName","elm","jsc","jscolor","initialized","instances","readyQueue","register","addEventListener","pub","init","installBySelector","selector","rootNode","node","elms","querySelectorAll","matchClass","RegExp","lookupClass","i","length","dataOpts","m","undefined","type","toLowerCase","isColorAttrSupported","getDataAttr","className","match","targetElm","optsStr","console","warn","docsRef","opts","trim","parseOptionsStr","e","str","JSON","parse","eParse","looseJSON","Function","eEval","getInstances","inst","targetElement","push","createEl","tagName","el","createElement","setData","nodeOrSelector","sel","querySelector","isNode","val","Node","nodeType","nodeName","removeChildren","firstChild","removeChild","isTextInput","isButton","n","indexOf","isButtonEmpty","value","textContent","isPassiveEventSupported","supported","Object","defineProperty","get","removeEventListener","setAttribute","dataProp","obj","arguments","data","hasOwnProperty","prop","map","removeData","getData","setDefault","name","attrName","getAttribute","setDataAttr","_attachedGroupEvents","attachGroupEvent","groupName","evnt","func","detachGroupEvents","evt","preventDefault","returnValue","captureTarget","target","setCapture","_capturedTarget","releaseTarget","releaseCapture","triggerEvent","eventName","bubbles","cancelable","ev","Event","createEvent","initEvent","dispatchEvent","triggerInputEvent","eventKey","keys","9","13","27","code","keyCode","strList","replace","split","hasClass","classList","contains","addClass","classNames","add","removeClass","repl","remove","getCompStyle","getComputedStyle","currentStyle","setStyle","styles","important","reversible","priority","origStyle","setVal","style","setProperty","hexColor","r","g","b","Math","round","toString","substr","toUpperCase","hexaColor","a","rgbColor","rgbaColor","linearGradient","stdName","prefixes","helper","tryFunc","tryVal","background","getFuncName","Array","prototype","join","call","setBorderRadius","border-radius","setBoxShadow","box-shadow","getElementPos","relativeToViewport","x","y","rect","getBoundingClientRect","left","top","viewPos","getViewPos","getElementSize","offsetWidth","offsetHeight","getAbsPointerPos","changedTouches","clientX","clientY","getRelPointerPos","targetRect","srcElement","doc","documentElement","pageXOffset","scrollLeft","clientLeft","pageYOffset","scrollTop","clientTop","getViewSize","innerWidth","clientWidth","innerHeight","clientHeight","RGB_HSV","min","v","max","h","HSV_RGB","s","u","floor","parseColorString","ret","rgba","format","parseInt","charAt","mR","mG","mB","mA","par","re","parseFloat","parsePaletteValue","mixed","vals","isArray","colors","color","containsTranparentColor","isAlphaFormat","scaleCanvasForHighDPR","canvas","dpr","devicePixelRatio","width","height","getContext","scale","genColorPreviewCanvas","separatorPos","specWidth","scaleForHighDPR","sepW","previewSeparator","sqSize","chessboardSize","sqColor1","chessboardColor1","sqColor2","chessboardColor2","cWidth","cHeight","ctx","fillStyle","fillRect","start","clearRect","lineWidth","beginPath","strokeStyle","moveTo","lineTo","stroke","genColorPreviewGradient","position","params","right","apply","redrawPosition","picker","owner","tp","vp","thisObj","fixed","c","ts","vs","pd","getPickerDims","ps","borderW","borderH","l","smartPosition","pp","positionValue","contractShadow","_drawPosition","vShadow","shadowBlur","wrap","boxS","shadow","shadowColor","w","controlBorderWidth","sliderSpace","getControlPadding","sliderSize","getSliderChannel","hasAlphaChannel","pal","getPaletteDims","padding","closeButton","buttonHeight","pW","pH","contentW","contentH","paddedW","paddedH","borderWidth","palette","cols","rows","cellW","cellH","sampleCount","_palette","paletteCols","ceil","paletteSpacing","paletteHeight","pointerBorderWidth","pointerThickness","getPadYChannel","mode","triggerCallback","callback","error","triggerGlobal","eventNames","trigger","_pointerMoveEvent","mouse","touch","_pointerEndEvent","_pointerOrigin","onDocumentKeyUp","tryHide","onWindowResize","onWindowScroll","onParentScroll","onDocumentMouseDown","showOnClick","disabled","show","onControlPointerStart","onPickerTouchStart","controlName","pointerType","registerDragEvents","offset","onDocumentPointerMove","onDocumentPointerEnd","parent","frameElement","ofs","abs","rel","channels","fromHSVA","setPad","setSld","setASld","onPaletteSampleClick","currentTarget","_setFormat","getFormat","paletteSetsAlpha","_paletteHasTransparency","fromRGBA","hideOnPaletteClick","hide","ofsX","ofsY","pointerAbs","xVal","yVal","fmt","createPadCanvas","draw","hGrad","createLinearGradient","addColorStop","vGrad","createSliderGradient","color1","color2","grad","createASliderGradient","hShadow","blur","spread","inset","flags","leaveValue","leaveAlpha","leavePreviewLine truncated
|
{"version":3,"sources":["webpack://cookiemonster-mod/CookieMonster.js"],"names":["__webpack_modules__","877","module","global","factory","exports","document","win","Error","window","this","BoxShadow","funcName","elm","jsc","jscolor","initialized","instances","readyQueue","register","addEventListener","pub","init","installBySelector","selector","rootNode","node","elms","querySelectorAll","matchClass","RegExp","lookupClass","i","length","dataOpts","m","undefined","type","toLowerCase","isColorAttrSupported","getDataAttr","className","match","targetElm","optsStr","console","warn","docsRef","opts","trim","parseOptionsStr","e","str","JSON","parse","eParse","looseJSON","Function","eEval","getInstances","inst","targetElement","push","createEl","tagName","el","createElement","setData","nodeOrSelector","sel","querySelector","isNode","val","Node","nodeType","nodeName","removeChildren","firstChild","removeChild","isTextInput","isButton","n","indexOf","isButtonEmpty","value","textContent","isPassiveEventSupported","supported","Object","defineProperty","get","removeEventListener","setAttribute","dataProp","obj","arguments","data","hasOwnProperty","prop","map","removeData","getData","setDefault","name","attrName","getAttribute","setDataAttr","_attachedGroupEvents","attachGroupEvent","groupName","evnt","func","detachGroupEvents","evt","preventDefault","returnValue","captureTarget","target","setCapture","_capturedTarget","releaseTarget","releaseCapture","triggerEvent","eventName","bubbles","cancelable","ev","Event","createEvent","initEvent","dispatchEvent","triggerInputEvent","eventKey","keys","9","13","27","code","keyCode","strList","replace","split","hasClass","classList","contains","addClass","classNames","add","removeClass","repl","remove","getCompStyle","getComputedStyle","currentStyle","setStyle","styles","important","reversible","priority","origStyle","setVal","style","setProperty","hexColor","r","g","b","Math","round","toString","substr","toUpperCase","hexaColor","a","rgbColor","rgbaColor","linearGradient","stdName","prefixes","helper","tryFunc","tryVal","background","getFuncName","Array","prototype","join","call","setBorderRadius","border-radius","setBoxShadow","box-shadow","getElementPos","relativeToViewport","x","y","rect","getBoundingClientRect","left","top","viewPos","getViewPos","getElementSize","offsetWidth","offsetHeight","getAbsPointerPos","changedTouches","clientX","clientY","getRelPointerPos","targetRect","srcElement","doc","documentElement","pageXOffset","scrollLeft","clientLeft","pageYOffset","scrollTop","clientTop","getViewSize","innerWidth","clientWidth","innerHeight","clientHeight","RGB_HSV","min","v","max","h","HSV_RGB","s","u","floor","parseColorString","ret","rgba","format","parseInt","charAt","mR","mG","mB","mA","par","re","parseFloat","parsePaletteValue","mixed","vals","isArray","colors","color","containsTranparentColor","isAlphaFormat","scaleCanvasForHighDPR","canvas","dpr","devicePixelRatio","width","height","getContext","scale","genColorPreviewCanvas","separatorPos","specWidth","scaleForHighDPR","sepW","previewSeparator","sqSize","chessboardSize","sqColor1","chessboardColor1","sqColor2","chessboardColor2","cWidth","cHeight","ctx","fillStyle","fillRect","start","clearRect","lineWidth","beginPath","strokeStyle","moveTo","lineTo","stroke","genColorPreviewGradient","position","params","right","apply","redrawPosition","picker","owner","tp","vp","thisObj","fixed","c","ts","vs","pd","getPickerDims","ps","borderW","borderH","l","smartPosition","pp","positionValue","contractShadow","_drawPosition","vShadow","shadowBlur","wrap","boxS","shadow","shadowColor","w","controlBorderWidth","sliderSpace","getControlPadding","sliderSize","getSliderChannel","hasAlphaChannel","pal","getPaletteDims","padding","closeButton","buttonHeight","pW","pH","contentW","contentH","paddedW","paddedH","borderWidth","palette","cols","rows","cellW","cellH","sampleCount","_palette","paletteCols","ceil","paletteSpacing","paletteHeight","pointerBorderWidth","pointerThickness","getPadYChannel","mode","triggerCallback","callback","error","triggerGlobal","eventNames","trigger","_pointerMoveEvent","mouse","touch","_pointerEndEvent","_pointerOrigin","onDocumentKeyUp","tryHide","onWindowResize","onWindowScroll","onParentScroll","onDocumentMouseDown","showOnClick","disabled","show","onControlPointerStart","onPickerTouchStart","controlName","pointerType","registerDragEvents","offset","onDocumentPointerMove","onDocumentPointerEnd","parent","frameElement","ofs","abs","rel","channels","fromHSVA","setPad","setSld","setASld","onPaletteSampleClick","currentTarget","_setFormat","getFormat","paletteSetsAlpha","_paletteHasTransparency","fromRGBA","hideOnPaletteClick","hide","ofsX","ofsY","pointerAbs","xVal","yVal","fmt","createPadCanvas","draw","hGrad","createLinearGradient","addColorStop","vGrad","createSliderGradient","color1","color2","grad","createASliderGradient","hShadow","blur","spread","inset","flags","leaveValue","leaveAlpha","leavePreviewLine truncated
|
||||||
Generated
+5
-6
@@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "cookiemonster-mod",
|
"name": "cookiemonster-mod",
|
||||||
"version": "2.031.6",
|
"version": "2.031.5",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cookiemonster-mod",
|
"name": "cookiemonster-mod",
|
||||||
"version": "2.031.6",
|
"version": "2.031.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eastdesire/jscolor": "^2.4.5"
|
"@eastdesire/jscolor": "^2.4.5",
|
||||||
|
"lodash": "^4.17.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.19.0",
|
"eslint": "^7.19.0",
|
||||||
@@ -1758,7 +1759,6 @@
|
|||||||
},
|
},
|
||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.20",
|
"version": "4.17.20",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
@@ -4271,8 +4271,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "4.17.20",
|
"version": "4.17.20"
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"lru-cache": {
|
"lru-cache": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import CalculateChangeGod from '../../Sim/SimulationEvents/GodChange';
|
||||||
|
import { CacheGods } from '../VariablesAndData';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions caches the cps effect of each God in slot 1, 2 or 3
|
||||||
|
*/
|
||||||
|
export default function CachePantheonGods() {
|
||||||
|
for (let god = 0; god < 11; god += 1) {
|
||||||
|
for (let slot = 0; slot < 3; slot += 1) {
|
||||||
|
CacheGods[god][slot] = CalculateChangeGod(god, slot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -99,3 +99,17 @@ export let CacheLastHeavenlyChips;
|
|||||||
export let CacheDoRemakeBuildPrices;
|
export let CacheDoRemakeBuildPrices;
|
||||||
|
|
||||||
export let CacheHadBuildAura;
|
export let CacheHadBuildAura;
|
||||||
|
|
||||||
|
export let CacheGods = {
|
||||||
|
0: [0, 0, 0],
|
||||||
|
1: [0, 0, 0],
|
||||||
|
2: [0, 0, 0],
|
||||||
|
3: [0, 0, 0],
|
||||||
|
4: [0, 0, 0],
|
||||||
|
5: [0, 0, 0],
|
||||||
|
6: [0, 0, 0],
|
||||||
|
7: [0, 0, 0],
|
||||||
|
8: [0, 0, 0],
|
||||||
|
9: [0, 0, 0],
|
||||||
|
10: [0, 0, 0],
|
||||||
|
};
|
||||||
@@ -585,6 +585,16 @@ const Config = {
|
|||||||
'Shows a tooltip for plants that have a cookie reward.',
|
'Shows a tooltip for plants that have a cookie reward.',
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
|
TooltipPantheon: new SettingStandard(
|
||||||
|
'bool',
|
||||||
|
'Tooltip',
|
||||||
|
[
|
||||||
|
'Show Extra Info Pantheon Tooltip OFF',
|
||||||
|
'Show Extra Info Pantheon Tooltip ON',
|
||||||
|
],
|
||||||
|
'Shows additional info in the pantheon tooltip',
|
||||||
|
true,
|
||||||
|
),
|
||||||
DragonAuraInfo: new SettingStandard(
|
DragonAuraInfo: new SettingStandard(
|
||||||
'bool',
|
'bool',
|
||||||
'Tooltip',
|
'Tooltip',
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ const ConfigDefault = {
|
|||||||
TooltipWrink: 1,
|
TooltipWrink: 1,
|
||||||
TooltipLump: 1,
|
TooltipLump: 1,
|
||||||
TooltipPlots: 1,
|
TooltipPlots: 1,
|
||||||
|
TooltipPantheon: 1,
|
||||||
DragonAuraInfo: 1,
|
DragonAuraInfo: 1,
|
||||||
TooltipAscendButton: 1,
|
TooltipAscendButton: 1,
|
||||||
Stats: 1,
|
Stats: 1,
|
||||||
|
|||||||
@@ -113,6 +113,12 @@ export function CreateTooltip(type, name) {
|
|||||||
else if (type === 'ha')
|
else if (type === 'ha')
|
||||||
l('tooltip').innerHTML = Game.ObjectsById[2].minigame.toolTooltip(1)();
|
l('tooltip').innerHTML = Game.ObjectsById[2].minigame.toolTooltip(1)();
|
||||||
else if (type === 'wb') l('tooltip').innerHTML = '';
|
else if (type === 'wb') l('tooltip').innerHTML = '';
|
||||||
|
else if (type === 'pag')
|
||||||
|
l('tooltip').innerHTML = Game.Objects.Temple.minigame.godTooltip(name)();
|
||||||
|
else if (type === 'pas')
|
||||||
|
l('tooltip').innerHTML = Game.Objects.Temple.minigame.slotTooltip(
|
||||||
|
name[0],
|
||||||
|
)();
|
||||||
|
|
||||||
// Adds area for extra tooltip-sections
|
// Adds area for extra tooltip-sections
|
||||||
if (
|
if (
|
||||||
@@ -122,7 +128,9 @@ export function CreateTooltip(type, name) {
|
|||||||
type === 'g' ||
|
type === 'g' ||
|
||||||
(type === 'p' && !Game.keys[16]) ||
|
(type === 'p' && !Game.keys[16]) ||
|
||||||
type === 'ha' ||
|
type === 'ha' ||
|
||||||
type === 'wb'
|
type === 'wb' ||
|
||||||
|
type === 'pag' ||
|
||||||
|
(type === 'pas' && name[1] !== -1)
|
||||||
) {
|
) {
|
||||||
const area = document.createElement('div');
|
const area = document.createElement('div');
|
||||||
area.id = 'CMTooltipArea';
|
area.id = 'CMTooltipArea';
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
import {
|
||||||
|
CacheObjects1,
|
||||||
|
CacheObjects10,
|
||||||
|
CacheObjects100,
|
||||||
|
} from '../../../Cache/VariablesAndData';
|
||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import { SimObjects } from '../../../Sim/VariablesAndData';
|
||||||
|
import {
|
||||||
|
Beautify,
|
||||||
|
GetTimeColor,
|
||||||
|
} from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import GetCPS from '../../HelperFunctions/GetCPS';
|
||||||
|
import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank';
|
||||||
|
import {
|
||||||
|
ColorTextPre,
|
||||||
|
LastTargetTooltipBuilding,
|
||||||
|
TooltipBonusIncome,
|
||||||
|
TooltipName,
|
||||||
|
TooltipPrice,
|
||||||
|
} from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Building tooltips
|
||||||
|
*/
|
||||||
|
export default function Building() {
|
||||||
|
if (CMOptions.TooltipBuildUpgrade === 1 && Game.buyMode === 1) {
|
||||||
|
const tooltipBox = l('CMTooltipBorder');
|
||||||
|
Create.TooltipCreateCalculationSection(tooltipBox);
|
||||||
|
|
||||||
|
let target;
|
||||||
|
if (Game.buyMode === 1) {
|
||||||
|
LastTargetTooltipBuilding = target;
|
||||||
|
} else {
|
||||||
|
target = LastTargetTooltipBuilding;
|
||||||
|
}
|
||||||
|
if (Game.buyBulk === 1) target = CacheObjects1;
|
||||||
|
else if (Game.buyBulk === 10) target = CacheObjects10;
|
||||||
|
else if (Game.buyBulk === 100) target = CacheObjects100;
|
||||||
|
|
||||||
|
TooltipPrice = Game.Objects[TooltipName].bulkPrice;
|
||||||
|
TooltipBonusIncome = target[TooltipName].bonus;
|
||||||
|
|
||||||
|
if (CMOptions.TooltipBuildUpgrade === 1 && Game.buyMode === 1) {
|
||||||
|
l('CMTooltipIncome').textContent = Beautify(TooltipBonusIncome, 2);
|
||||||
|
const increase = Math.round(
|
||||||
|
(TooltipBonusIncome / Game.cookiesPs) * 10000,
|
||||||
|
);
|
||||||
|
if (Number.isFinite(increase) && increase !== 0) {
|
||||||
|
l('CMTooltipIncome').textContent += ` (${increase / 100}% of income)`;
|
||||||
|
} else {
|
||||||
|
l('CMTooltipIncome').textContent += ` (<0${
|
||||||
|
CMOptions.ScaleSeparator ? ',' : '.'
|
||||||
|
}01% of income)`;
|
||||||
|
}
|
||||||
|
l('CMTooltipBorder').className = ColorTextPre + target[TooltipName].color;
|
||||||
|
l('CMTooltipPP').textContent = Beautify(target[TooltipName].pp, 2);
|
||||||
|
l('CMTooltipPP').className = ColorTextPre + target[TooltipName].color;
|
||||||
|
const timeColor = GetTimeColor(
|
||||||
|
(TooltipPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
|
||||||
|
);
|
||||||
|
l('CMTooltipTime').textContent = timeColor.text;
|
||||||
|
if (
|
||||||
|
timeColor.text === 'Done!' &&
|
||||||
|
Game.cookies < target[TooltipName].price
|
||||||
|
) {
|
||||||
|
l('CMTooltipTime').textContent = `${timeColor.text} (with Wrink)`;
|
||||||
|
} else l('CMTooltipTime').textContent = timeColor.text;
|
||||||
|
l('CMTooltipTime').className = ColorTextPre + timeColor.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add "production left till next achievement"-bar
|
||||||
|
l('CMTooltipProductionHeader').style.display = 'none';
|
||||||
|
l('CMTooltipTime').style.marginBottom = '0px';
|
||||||
|
for (const i of Object.keys(Game.Objects[TooltipName].productionAchievs)) {
|
||||||
|
if (
|
||||||
|
!Game.HasAchiev(
|
||||||
|
Game.Objects[TooltipName].productionAchievs[i].achiev.name,
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
const nextProductionAchiev =
|
||||||
|
Game.Objects[TooltipName].productionAchievs[i];
|
||||||
|
l('CMTooltipTime').style.marginBottom = '4px';
|
||||||
|
l('CMTooltipProductionHeader').style.display = '';
|
||||||
|
l('CMTooltipProduction').className = `ProdAchievement${TooltipName}`;
|
||||||
|
l('CMTooltipProduction').textContent = Beautify(
|
||||||
|
nextProductionAchiev.pow - SimObjects[TooltipName].totalCookies,
|
||||||
|
15,
|
||||||
|
);
|
||||||
|
l('CMTooltipProduction').style.color = 'white';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import { Beautify } from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import { TooltipName } from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Garden plots tooltips
|
||||||
|
* It adds to the additional information to l('CMTooltipArea')
|
||||||
|
*/
|
||||||
|
export default function GardenPlots() {
|
||||||
|
const minigame = Game.Objects.Farm.minigame;
|
||||||
|
if (
|
||||||
|
CMOptions.TooltipPlots &&
|
||||||
|
minigame.plot[TooltipName[1]][TooltipName[0]][0] !== 0
|
||||||
|
) {
|
||||||
|
const mature =
|
||||||
|
minigame.plot[TooltipName[1]][TooltipName[0]][1] >
|
||||||
|
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1]
|
||||||
|
.matureBase;
|
||||||
|
const plantName =
|
||||||
|
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1]
|
||||||
|
.name;
|
||||||
|
l('CMTooltipBorder').appendChild(
|
||||||
|
Create.TooltipCreateHeader('Reward (Current / Maximum)'),
|
||||||
|
);
|
||||||
|
const reward = document.createElement('div');
|
||||||
|
reward.id = 'CMTooltipPlantReward';
|
||||||
|
l('CMTooltipBorder').appendChild(reward);
|
||||||
|
if (plantName === 'Bakeberry') {
|
||||||
|
l('CMTooltipPlantReward').textContent = `${
|
||||||
|
mature
|
||||||
|
? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 30))
|
||||||
|
: '0'
|
||||||
|
} / ${Beautify(Game.cookiesPs * 60 * 30)}`;
|
||||||
|
} else if (plantName === 'Chocoroot' || plantName === 'White chocoroot') {
|
||||||
|
l('CMTooltipPlantReward').textContent = `${
|
||||||
|
mature
|
||||||
|
? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 3))
|
||||||
|
: '0'
|
||||||
|
} / ${Beautify(Game.cookiesPs * 60 * 3)}`;
|
||||||
|
} else if (plantName === 'Queenbeet') {
|
||||||
|
l('CMTooltipPlantReward').textContent = `${
|
||||||
|
mature
|
||||||
|
? Beautify(Math.min(Game.cookies * 0.04, Game.cookiesPs * 60 * 60))
|
||||||
|
: '0'
|
||||||
|
} / ${Beautify(Game.cookiesPs * 60 * 60)}`;
|
||||||
|
} else if (plantName === 'Duketater') {
|
||||||
|
l('CMTooltipPlantReward').textContent = `${
|
||||||
|
mature
|
||||||
|
? Beautify(Math.min(Game.cookies * 0.08, Game.cookiesPs * 60 * 120))
|
||||||
|
: '0'
|
||||||
|
} / ${Beautify(Game.cookiesPs * 60 * 120)}`;
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
import { CacheNoGoldSwitchCookiesPS } from '../../../Cache/VariablesAndData';
|
||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import {
|
||||||
|
Beautify,
|
||||||
|
GetTimeColor,
|
||||||
|
} from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import CalculateGrimoireRefillTime from '../../HelperFunctions/CalculateGrimoireRefillTime';
|
||||||
|
import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank';
|
||||||
|
import { ColorTextPre, TooltipName } from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Grimoire tooltips
|
||||||
|
* It adds to the additional information to l('CMTooltipArea')
|
||||||
|
*/
|
||||||
|
export default function Grimoire() {
|
||||||
|
const minigame = Game.Objects['Wizard tower'].minigame;
|
||||||
|
const spellCost = minigame.getSpellCost(minigame.spellsById[TooltipName]);
|
||||||
|
|
||||||
|
if (CMOptions.TooltipGrim === 1 && spellCost <= minigame.magicM) {
|
||||||
|
const tooltipBox = l('CMTooltipBorder');
|
||||||
|
|
||||||
|
// Time left till enough magic for spell
|
||||||
|
tooltipBox.appendChild(Create.TooltipCreateHeader('Time Left'));
|
||||||
|
const time = document.createElement('div');
|
||||||
|
time.id = 'CMTooltipTime';
|
||||||
|
tooltipBox.appendChild(time);
|
||||||
|
const timeColor = GetTimeColor(
|
||||||
|
CalculateGrimoireRefillTime(minigame.magic, minigame.magicM, spellCost),
|
||||||
|
);
|
||||||
|
time.textContent = timeColor.text;
|
||||||
|
time.className = ColorTextPre + timeColor.color;
|
||||||
|
|
||||||
|
// Time left untill magic spent is recovered
|
||||||
|
if (spellCost <= minigame.magic) {
|
||||||
|
tooltipBox.appendChild(Create.TooltipCreateHeader('Recover Time'));
|
||||||
|
const recover = document.createElement('div');
|
||||||
|
recover.id = 'CMTooltipRecover';
|
||||||
|
tooltipBox.appendChild(recover);
|
||||||
|
const recoverColor = GetTimeColor(
|
||||||
|
CalculateGrimoireRefillTime(
|
||||||
|
Math.max(0, minigame.magic - spellCost),
|
||||||
|
minigame.magicM,
|
||||||
|
minigame.magic,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
recover.textContent = recoverColor.text;
|
||||||
|
recover.className = ColorTextPre + recoverColor.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extra information on cookies gained when spell is Conjure Baked Goods (Name === 0)
|
||||||
|
if (TooltipName === '0') {
|
||||||
|
tooltipBox.appendChild(
|
||||||
|
Create.TooltipCreateHeader('Cookies to be gained/lost'),
|
||||||
|
);
|
||||||
|
const conjure = document.createElement('div');
|
||||||
|
conjure.id = 'x';
|
||||||
|
tooltipBox.appendChild(conjure);
|
||||||
|
const reward = document.createElement('span');
|
||||||
|
reward.style.color = '#33FF00';
|
||||||
|
reward.textContent = Beautify(
|
||||||
|
Math.min(
|
||||||
|
(Game.cookies + GetWrinkConfigBank()) * 0.15,
|
||||||
|
CacheNoGoldSwitchCookiesPS * 60 * 30,
|
||||||
|
),
|
||||||
|
2,
|
||||||
|
);
|
||||||
|
conjure.appendChild(reward);
|
||||||
|
const seperator = document.createElement('span');
|
||||||
|
seperator.textContent = ' / ';
|
||||||
|
conjure.appendChild(seperator);
|
||||||
|
const loss = document.createElement('span');
|
||||||
|
loss.style.color = 'red';
|
||||||
|
loss.textContent = Beautify(CacheNoGoldSwitchCookiesPS * 60 * 15, 2);
|
||||||
|
conjure.appendChild(loss);
|
||||||
|
}
|
||||||
|
|
||||||
|
l('CMTooltipArea').appendChild(tooltipBox);
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import { Beautify } from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Garden Harvest All tooltip
|
||||||
|
* It is called when the Harvest All tooltip is created or refreshed by CM.Disp.UpdateTooltip()
|
||||||
|
* It adds to the additional information to l('CMTooltipArea')
|
||||||
|
*/
|
||||||
|
export default function HarvestAll() {
|
||||||
|
const minigame = Game.Objects.Farm.minigame;
|
||||||
|
if (CMOptions.TooltipLump) {
|
||||||
|
l('CMTooltipBorder').appendChild(
|
||||||
|
Create.TooltipCreateHeader('Cookies gained from harvesting:'),
|
||||||
|
);
|
||||||
|
let totalGain = 0;
|
||||||
|
let mortal = 0;
|
||||||
|
if (Game.keys[16] && Game.keys[17]) mortal = 1;
|
||||||
|
for (let y = 0; y < 6; y++) {
|
||||||
|
for (let x = 0; x < 6; x++) {
|
||||||
|
if (minigame.plot[y][x][0] >= 1) {
|
||||||
|
const tile = minigame.plot[y][x];
|
||||||
|
const me = minigame.plantsById[tile[0] - 1];
|
||||||
|
const plantName = me.name;
|
||||||
|
|
||||||
|
let count = true;
|
||||||
|
if (mortal && me.immortal) count = false;
|
||||||
|
if (tile[1] < me.matureBase) count = false;
|
||||||
|
if (count && plantName === 'Bakeberry') {
|
||||||
|
totalGain += Math.min(
|
||||||
|
Game.cookies * 0.03,
|
||||||
|
Game.cookiesPs * 60 * 30,
|
||||||
|
);
|
||||||
|
} else if (
|
||||||
|
(count && plantName === 'Chocoroot') ||
|
||||||
|
plantName === 'White chocoroot'
|
||||||
|
) {
|
||||||
|
totalGain += Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 3);
|
||||||
|
} else if (count && plantName === 'Queenbeet') {
|
||||||
|
totalGain += Math.min(
|
||||||
|
Game.cookies * 0.04,
|
||||||
|
Game.cookiesPs * 60 * 60,
|
||||||
|
);
|
||||||
|
} else if (count && plantName === 'Duketater') {
|
||||||
|
totalGain += Math.min(
|
||||||
|
Game.cookies * 0.08,
|
||||||
|
Game.cookiesPs * 60 * 120,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
l('CMTooltipBorder').appendChild(
|
||||||
|
document.createTextNode(Beautify(totalGain)),
|
||||||
|
);
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
import { CacheGods } from '../../../Cache/VariablesAndData';
|
||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import { Beautify } from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import { TooltipName, TooltipType } from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Pantheon Gods tooltip
|
||||||
|
* It is called when the Harvest All tooltip is created or refreshed by CM.Disp.UpdateTooltip()
|
||||||
|
* It adds to the additional information to l('CMTooltipArea')
|
||||||
|
*/
|
||||||
|
export default function PantheonGods() {
|
||||||
|
if (CMOptions.TooltipPantheon === 1) {
|
||||||
|
const tooltipBox = l('CMTooltipBorder');
|
||||||
|
let GodID;
|
||||||
|
if (TooltipType === 'pas') GodID = TooltipName[1];
|
||||||
|
else GodID = TooltipName;
|
||||||
|
|
||||||
|
// Time left till enough magic for spell
|
||||||
|
tooltipBox.appendChild(Create.TooltipCreateHeader('Effect in position 1:'));
|
||||||
|
const cps1 = document.createElement('div');
|
||||||
|
cps1.id = 'CMPantheonTooltipPosition1';
|
||||||
|
if (CacheGods[GodID][0] !== 0) {
|
||||||
|
cps1.textContent = Beautify(CacheGods[GodID][0]);
|
||||||
|
const increase = Math.round(
|
||||||
|
(CacheGods[GodID][0] / Game.cookiesPs) * 10000,
|
||||||
|
);
|
||||||
|
if (Number.isFinite(increase) && increase !== 0) {
|
||||||
|
cps1.textContent += ` (${increase / 100}% of income)`;
|
||||||
|
} else {
|
||||||
|
cps1.textContent += ` (<0${
|
||||||
|
CMOptions.ScaleSeparator ? ',' : '.'
|
||||||
|
}01% of income)`;
|
||||||
|
}
|
||||||
|
} else cps1.textContent = 'No effect to CPS';
|
||||||
|
tooltipBox.appendChild(cps1);
|
||||||
|
|
||||||
|
tooltipBox.appendChild(Create.TooltipCreateHeader('Effect in position 2:'));
|
||||||
|
const cps2 = document.createElement('div');
|
||||||
|
cps2.id = 'CMPantheonTooltipPosition2';
|
||||||
|
if (CacheGods[GodID][1] !== 0) {
|
||||||
|
cps2.textContent = Beautify(CacheGods[GodID][1]);
|
||||||
|
const increase = Math.round(
|
||||||
|
(CacheGods[GodID][1] / Game.cookiesPs) * 10000,
|
||||||
|
);
|
||||||
|
if (Number.isFinite(increase) && increase !== 0) {
|
||||||
|
cps2.textContent += ` (${increase / 100}% of income)`;
|
||||||
|
} else {
|
||||||
|
cps2.textContent += ` (<0${
|
||||||
|
CMOptions.ScaleSeparator ? ',' : '.'
|
||||||
|
}01% of income)`;
|
||||||
|
}
|
||||||
|
} else cps2.textContent = 'No effect to CPS';
|
||||||
|
tooltipBox.appendChild(cps2);
|
||||||
|
|
||||||
|
tooltipBox.appendChild(Create.TooltipCreateHeader('Effect in position 3:'));
|
||||||
|
const cps3 = document.createElement('div');
|
||||||
|
cps3.id = 'CMPantheonTooltipPosition2';
|
||||||
|
if (CacheGods[GodID][2] !== 0) {
|
||||||
|
cps3.textContent = Beautify(CacheGods[GodID][2]);
|
||||||
|
const increase = Math.round(
|
||||||
|
(CacheGods[GodID][2] / Game.cookiesPs) * 10000,
|
||||||
|
);
|
||||||
|
if (Number.isFinite(increase) && increase !== 0) {
|
||||||
|
cps3.textContent += ` (${increase / 100}% of income)`;
|
||||||
|
} else {
|
||||||
|
cps3.textContent += ` (<0${
|
||||||
|
CMOptions.ScaleSeparator ? ',' : '.'
|
||||||
|
}01% of income)`;
|
||||||
|
}
|
||||||
|
} else cps3.textContent = 'No effect to CPS';
|
||||||
|
tooltipBox.appendChild(cps3);
|
||||||
|
|
||||||
|
l('CMTooltipArea').appendChild(tooltipBox);
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import GetLumpColor from '../../HelperFunctions/GetLumpColor';
|
||||||
|
import { ColorTextPre } from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Sugar Lump tooltip
|
||||||
|
* It adds to the additional information to l('CMTooltipArea')
|
||||||
|
*/
|
||||||
|
export default function SugarLump() {
|
||||||
|
if (CMOptions.TooltipLump === 1) {
|
||||||
|
const tooltipBox = l('CMTooltipBorder');
|
||||||
|
|
||||||
|
tooltipBox.appendChild(Create.TooltipCreateHeader('Current Sugar Lump'));
|
||||||
|
|
||||||
|
const lumpType = document.createElement('div');
|
||||||
|
lumpType.id = 'CMTooltipTime';
|
||||||
|
tooltipBox.appendChild(lumpType);
|
||||||
|
const lumpColor = GetLumpColor(Game.lumpCurrentType);
|
||||||
|
lumpType.textContent = lumpColor.text;
|
||||||
|
lumpType.className = ColorTextPre + lumpColor.color;
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
import {
|
||||||
|
CacheLastChoEgg,
|
||||||
|
CacheUpgrades,
|
||||||
|
} from '../../../Cache/VariablesAndData';
|
||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
import {
|
||||||
|
Beautify,
|
||||||
|
GetTimeColor,
|
||||||
|
} from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import GetCPS from '../../HelperFunctions/GetCPS';
|
||||||
|
import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank';
|
||||||
|
import {
|
||||||
|
ColorTextPre,
|
||||||
|
TooltipBonusIncome,
|
||||||
|
TooltipBonusMouse,
|
||||||
|
TooltipName,
|
||||||
|
TooltipPrice,
|
||||||
|
TooltipType,
|
||||||
|
} from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the Upgrade tooltips
|
||||||
|
*/
|
||||||
|
export default function Upgrade() {
|
||||||
|
const tooltipBox = l('CMTooltipBorder');
|
||||||
|
Create.TooltipCreateCalculationSection(tooltipBox);
|
||||||
|
|
||||||
|
TooltipBonusIncome =
|
||||||
|
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].bonus;
|
||||||
|
TooltipPrice = Game.Upgrades[
|
||||||
|
Game.UpgradesInStore[TooltipName].name
|
||||||
|
].getPrice();
|
||||||
|
TooltipBonusMouse =
|
||||||
|
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].bonusMouse;
|
||||||
|
|
||||||
|
if (CMOptions.TooltipBuildUpgrade === 1) {
|
||||||
|
l('CMTooltipIncome').textContent = Beautify(TooltipBonusIncome, 2);
|
||||||
|
const increase = Math.round((TooltipBonusIncome / Game.cookiesPs) * 10000);
|
||||||
|
// Don't display certain parts of tooltip if not applicable
|
||||||
|
if (
|
||||||
|
l('CMTooltipIncome').textContent === '0' &&
|
||||||
|
(TooltipType === 'b' || TooltipType === 'u')
|
||||||
|
) {
|
||||||
|
l('Bonus IncomeTitle').style.display = 'none';
|
||||||
|
l('CMTooltipIncome').style.display = 'none';
|
||||||
|
l('Payback PeriodTitle').style.display = 'none';
|
||||||
|
l('CMTooltipPP').style.display = 'none';
|
||||||
|
} else {
|
||||||
|
if (Number.isFinite(increase) && increase !== 0) {
|
||||||
|
l('CMTooltipIncome').textContent += ` (${increase / 100}% of income)`;
|
||||||
|
} else {
|
||||||
|
l('CMTooltipIncome').textContent += ` (<0${
|
||||||
|
CMOptions.ScaleSeparator ? ',' : '.'
|
||||||
|
}01% of income)`;
|
||||||
|
}
|
||||||
|
l('CMTooltipBorder').className =
|
||||||
|
ColorTextPre +
|
||||||
|
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color;
|
||||||
|
// If clicking power upgrade
|
||||||
|
if (TooltipBonusMouse) {
|
||||||
|
l('CMTooltipCookiePerClick').textContent = Beautify(TooltipBonusMouse);
|
||||||
|
l('CMTooltipCookiePerClick').style.display = 'block';
|
||||||
|
l('CMTooltipCookiePerClick').previousSibling.style.display = 'block';
|
||||||
|
}
|
||||||
|
// If only a clicking power upgrade change PP to click-based period
|
||||||
|
if (TooltipBonusIncome === 0 && TooltipBonusMouse) {
|
||||||
|
l('CMTooltipPP').textContent = `${Beautify(
|
||||||
|
TooltipPrice / TooltipBonusMouse,
|
||||||
|
)} Clicks`;
|
||||||
|
l('CMTooltipPP').style.color = 'white';
|
||||||
|
} else {
|
||||||
|
l('CMTooltipPP').textContent = Beautify(
|
||||||
|
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].pp,
|
||||||
|
2,
|
||||||
|
);
|
||||||
|
l('CMTooltipPP').className =
|
||||||
|
ColorTextPre +
|
||||||
|
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const timeColor = GetTimeColor(
|
||||||
|
(TooltipPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
|
||||||
|
);
|
||||||
|
l('CMTooltipTime').textContent = timeColor.text;
|
||||||
|
if (
|
||||||
|
timeColor.text === 'Done!' &&
|
||||||
|
Game.cookies < Game.UpgradesInStore[TooltipName].getPrice()
|
||||||
|
) {
|
||||||
|
l('CMTooltipTime').textContent = `${timeColor.text} (with Wrink)`;
|
||||||
|
} else l('CMTooltipTime').textContent = timeColor.text;
|
||||||
|
l('CMTooltipTime').className = ColorTextPre + timeColor.color;
|
||||||
|
|
||||||
|
// Add extra info to Chocolate egg tooltip
|
||||||
|
if (Game.UpgradesInStore[TooltipName].name === 'Chocolate egg') {
|
||||||
|
l('CMTooltipBorder').lastChild.style.marginBottom = '4px';
|
||||||
|
l('CMTooltipBorder').appendChild(
|
||||||
|
Create.TooltipCreateHeader('Cookies to be gained (Currently/Max)'),
|
||||||
|
);
|
||||||
|
const chocolate = document.createElement('div');
|
||||||
|
chocolate.style.color = 'white';
|
||||||
|
chocolate.textContent = `${Beautify(Game.cookies * 0.05)} / ${Beautify(
|
||||||
|
CacheLastChoEgg,
|
||||||
|
)}`;
|
||||||
|
l('CMTooltipBorder').appendChild(chocolate);
|
||||||
|
}
|
||||||
|
} else l('CMTooltipArea').style.display = 'none';
|
||||||
|
}
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
import GetCPSBuffMult from '../../../Cache/CPS/GetCPSBuffMult';
|
||||||
|
import { CacheEdifice, CacheLucky } from '../../../Cache/VariablesAndData';
|
||||||
|
import ToggleToolWarnPos from '../../../Config/Toggles/ToggleToolWarnPos';
|
||||||
|
import { CMOptions } from '../../../Config/VariablesAndData';
|
||||||
|
|
||||||
|
import {
|
||||||
|
Beautify,
|
||||||
|
FormatTime,
|
||||||
|
} from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
|
import GetCPS from '../../HelperFunctions/GetCPS';
|
||||||
|
import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank';
|
||||||
|
import {
|
||||||
|
TooltipBonusIncome,
|
||||||
|
TooltipPrice,
|
||||||
|
TooltipType,
|
||||||
|
} from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function updates the warnings section of the building and upgrade tooltips
|
||||||
|
*/
|
||||||
|
export default function Warnings() {
|
||||||
|
if (TooltipType === 'b' || TooltipType === 'u') {
|
||||||
|
if (document.getElementById('CMDispTooltipWarningParent') === null) {
|
||||||
|
l('tooltipAnchor').appendChild(Create.TooltipCreateWarningSection());
|
||||||
|
ToggleToolWarnPos();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CMOptions.ToolWarnPos === 0)
|
||||||
|
l('CMDispTooltipWarningParent').style.right = '0px';
|
||||||
|
else
|
||||||
|
l('CMDispTooltipWarningParent').style.top = `${
|
||||||
|
l('tooltip').offsetHeight
|
||||||
|
}px`;
|
||||||
|
|
||||||
|
l('CMDispTooltipWarningParent').style.width = `${
|
||||||
|
l('tooltip').offsetWidth - 6
|
||||||
|
}px`;
|
||||||
|
|
||||||
|
const amount = Game.cookies + GetWrinkConfigBank() - TooltipPrice;
|
||||||
|
const bonusIncomeUsed = CMOptions.ToolWarnBon ? TooltipBonusIncome : 0;
|
||||||
|
let limitLucky = CacheLucky;
|
||||||
|
if (CMOptions.ToolWarnBon === 1) {
|
||||||
|
let bonusNoFren = TooltipBonusIncome;
|
||||||
|
bonusNoFren /= GetCPSBuffMult();
|
||||||
|
limitLucky += (bonusNoFren * 60 * 15) / 0.15;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CMOptions.ToolWarnLucky === 1) {
|
||||||
|
if (amount < limitLucky && (TooltipType !== 'b' || Game.buyMode === 1)) {
|
||||||
|
l('CMDispTooltipWarnLucky').style.display = '';
|
||||||
|
l('CMDispTooltipWarnLuckyText').textContent = `${Beautify(
|
||||||
|
limitLucky - amount,
|
||||||
|
)} (${FormatTime(
|
||||||
|
(limitLucky - amount) / (GetCPS() + bonusIncomeUsed),
|
||||||
|
)})`;
|
||||||
|
} else l('CMDispTooltipWarnLucky').style.display = 'none';
|
||||||
|
} else l('CMDispTooltipWarnLucky').style.display = 'none';
|
||||||
|
|
||||||
|
if (CMOptions.ToolWarnLuckyFrenzy === 1) {
|
||||||
|
const limitLuckyFrenzy = limitLucky * 7;
|
||||||
|
if (
|
||||||
|
amount < limitLuckyFrenzy &&
|
||||||
|
(TooltipType !== 'b' || Game.buyMode === 1)
|
||||||
|
) {
|
||||||
|
l('CMDispTooltipWarnLuckyFrenzy').style.display = '';
|
||||||
|
l('CMDispTooltipWarnLuckyFrenzyText').textContent = `${Beautify(
|
||||||
|
limitLuckyFrenzy - amount,
|
||||||
|
)} (${FormatTime(
|
||||||
|
(limitLuckyFrenzy - amount) / (GetCPS() + bonusIncomeUsed),
|
||||||
|
)})`;
|
||||||
|
} else l('CMDispTooltipWarnLuckyFrenzy').style.display = 'none';
|
||||||
|
} else l('CMDispTooltipWarnLuckyFrenzy').style.display = 'none';
|
||||||
|
|
||||||
|
if (CMOptions.ToolWarnConjure === 1) {
|
||||||
|
const limitConjure = limitLucky * 2;
|
||||||
|
if (
|
||||||
|
amount < limitConjure &&
|
||||||
|
(TooltipType !== 'b' || Game.buyMode === 1)
|
||||||
|
) {
|
||||||
|
l('CMDispTooltipWarnConjure').style.display = '';
|
||||||
|
l('CMDispTooltipWarnConjureText').textContent = `${Beautify(
|
||||||
|
limitConjure - amount,
|
||||||
|
)} (${FormatTime(
|
||||||
|
(limitConjure - amount) / (GetCPS() + bonusIncomeUsed),
|
||||||
|
)})`;
|
||||||
|
} else l('CMDispTooltipWarnConjure').style.display = 'none';
|
||||||
|
} else l('CMDispTooltipWarnConjure').style.display = 'none';
|
||||||
|
|
||||||
|
if (CMOptions.ToolWarnConjureFrenzy === 1) {
|
||||||
|
const limitConjureFrenzy = limitLucky * 2 * 7;
|
||||||
|
if (
|
||||||
|
amount < limitConjureFrenzy &&
|
||||||
|
(TooltipType !== 'b' || Game.buyMode === 1)
|
||||||
|
) {
|
||||||
|
l('CMDispTooltipWarnConjureFrenzy').style.display = '';
|
||||||
|
l('CMDispTooltipWarnConjureFrenzyText').textContent = `${Beautify(
|
||||||
|
limitConjureFrenzy - amount,
|
||||||
|
)} (${FormatTime(
|
||||||
|
(limitConjureFrenzy - amount) / (GetCPS() + bonusIncomeUsed),
|
||||||
|
)})`;
|
||||||
|
} else l('CMDispTooltipWarnConjureFrenzy').style.display = 'none';
|
||||||
|
} else l('CMDispTooltipWarnConjureFrenzy').style.display = 'none';
|
||||||
|
|
||||||
|
if (
|
||||||
|
CMOptions.ToolWarnEdifice === 1 &&
|
||||||
|
Game.Objects['Wizard tower'].minigameLoaded
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
CacheEdifice &&
|
||||||
|
amount < CacheEdifice &&
|
||||||
|
(TooltipType !== 'b' || Game.buyMode === 1)
|
||||||
|
) {
|
||||||
|
l('CMDispTooltipWarnEdifice').style.display = '';
|
||||||
|
l('CMDispTooltipWarnEdificeText').textContent = `${Beautify(
|
||||||
|
CacheEdifice - amount,
|
||||||
|
)} (${FormatTime(
|
||||||
|
(CacheEdifice - amount) / (GetCPS() + bonusIncomeUsed),
|
||||||
|
)})`;
|
||||||
|
} else l('CMDispTooltipWarnEdifice').style.display = 'none';
|
||||||
|
} else l('CMDispTooltipWarnEdifice').style.display = 'none';
|
||||||
|
|
||||||
|
if (CMOptions.ToolWarnUser > 0) {
|
||||||
|
if (
|
||||||
|
amount < CMOptions.ToolWarnUser * GetCPS() &&
|
||||||
|
(TooltipType !== 'b' || Game.buyMode === 1)
|
||||||
|
) {
|
||||||
|
l('CMDispTooltipWarnUser').style.display = '';
|
||||||
|
// Need to update tooltip text dynamically
|
||||||
|
l(
|
||||||
|
'CMDispTooltipWarnUser',
|
||||||
|
).children[0].textContent = `Purchase of this item will put you under the number of Cookies equal to ${CMOptions.ToolWarnUser} seconds of CPS`;
|
||||||
|
l('CMDispTooltipWarnUserText').textContent = `${Beautify(
|
||||||
|
CMOptions.ToolWarnUser * GetCPS() - amount,
|
||||||
|
)} (${FormatTime(
|
||||||
|
(CMOptions.ToolWarnUser * GetCPS() - amount) /
|
||||||
|
(GetCPS() + bonusIncomeUsed),
|
||||||
|
)})`;
|
||||||
|
} else l('CMDispTooltipWarnUser').style.display = 'none';
|
||||||
|
} else l('CMDispTooltipWarnUser').style.display = 'none';
|
||||||
|
} else if (l('CMDispTooltipWarningParent') !== null) {
|
||||||
|
l('CMDispTooltipWarningParent').remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import {
|
||||||
|
CacheWrinklersFattest,
|
||||||
|
CacheWrinklersTotal,
|
||||||
|
} from '../../../Cache/VariablesAndData';
|
||||||
|
import { TooltipName } from '../../VariablesAndData';
|
||||||
|
import * as Create from '../CreateTooltip';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function adds extra info to the wrinkler button tooltip
|
||||||
|
* It adds to the additional information to l('CMTooltipArea')
|
||||||
|
*/
|
||||||
|
export default function WrinklerButton() {
|
||||||
|
l('tooltip').innerHTML = '';
|
||||||
|
l('tooltip').appendChild(Create.TooltipCreateHeader('Reward:'));
|
||||||
|
|
||||||
|
const WrinklerReward = document.createElement('div');
|
||||||
|
WrinklerReward.id = 'CMWrinklerReward';
|
||||||
|
if (TooltipName === 'PopAll') {
|
||||||
|
WrinklerReward.textContent = CacheWrinklersTotal;
|
||||||
|
} else if (TooltipName === 'PopFattest') {
|
||||||
|
WrinklerReward.textContent = CacheWrinklersFattest[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
l('tooltip').appendChild(WrinklerReward);
|
||||||
|
}
|
||||||
@@ -1,543 +1,15 @@
|
|||||||
import GetCPSBuffMult from '../../Cache/CPS/GetCPSBuffMult';
|
|
||||||
import {
|
|
||||||
CacheEdifice,
|
|
||||||
CacheLastChoEgg,
|
|
||||||
CacheLucky,
|
|
||||||
CacheNoGoldSwitchCookiesPS,
|
|
||||||
CacheObjects1,
|
|
||||||
CacheObjects10,
|
|
||||||
CacheObjects100,
|
|
||||||
CacheUpgrades,
|
|
||||||
CacheWrinklersFattest,
|
|
||||||
CacheWrinklersTotal,
|
|
||||||
} from '../../Cache/VariablesAndData';
|
|
||||||
import ToggleToolWarnPos from '../../Config/Toggles/ToggleToolWarnPos';
|
|
||||||
import { CMOptions } from '../../Config/VariablesAndData';
|
|
||||||
import CopyData from '../../Sim/SimulationData/CopyData';
|
import CopyData from '../../Sim/SimulationData/CopyData';
|
||||||
import { SimObjects } from '../../Sim/VariablesAndData';
|
import { TooltipName, TooltipType } from '../VariablesAndData';
|
||||||
import {
|
|
||||||
Beautify,
|
|
||||||
FormatTime,
|
|
||||||
GetTimeColor,
|
|
||||||
} from '../BeautifyAndFormatting/BeautifyFormatting';
|
|
||||||
import CalculateGrimoireRefillTime from '../HelperFunctions/CalculateGrimoireRefillTime';
|
|
||||||
import GetCPS from '../HelperFunctions/GetCPS';
|
|
||||||
import GetLumpColor from '../HelperFunctions/GetLumpColor';
|
|
||||||
import GetWrinkConfigBank from '../HelperFunctions/GetWrinkConfigBank';
|
|
||||||
import {
|
|
||||||
ColorTextPre,
|
|
||||||
LastTargetTooltipBuilding,
|
|
||||||
TooltipBonusIncome,
|
|
||||||
TooltipBonusMouse,
|
|
||||||
TooltipName,
|
|
||||||
TooltipPrice,
|
|
||||||
TooltipType,
|
|
||||||
} from '../VariablesAndData';
|
|
||||||
import * as Create from './CreateTooltip';
|
import * as Create from './CreateTooltip';
|
||||||
|
import Building from './TypesOfTooltips/Building';
|
||||||
/** Functions that update specific types of tooltips */
|
import GardenPlots from './TypesOfTooltips/GardenPlots';
|
||||||
|
import Grimoire from './TypesOfTooltips/Grimoire';
|
||||||
/**
|
import HarvestAll from './TypesOfTooltips/HarvestAll';
|
||||||
* This function adds extra info to the Building tooltips
|
import PantheonGods from './TypesOfTooltips/PantheonGods';
|
||||||
*/
|
import SugarLump from './TypesOfTooltips/SugarLump';
|
||||||
function Building() {
|
import Upgrade from './TypesOfTooltips/Upgrade';
|
||||||
if (CMOptions.TooltipBuildUpgrade === 1 && Game.buyMode === 1) {
|
import Warnings from './TypesOfTooltips/Warnings';
|
||||||
const tooltipBox = l('CMTooltipBorder');
|
import WrinklerButton from './TypesOfTooltips/WrinklerButton';
|
||||||
Create.TooltipCreateCalculationSection(tooltipBox);
|
|
||||||
|
|
||||||
let target;
|
|
||||||
if (Game.buyMode === 1) {
|
|
||||||
LastTargetTooltipBuilding = target;
|
|
||||||
} else {
|
|
||||||
target = LastTargetTooltipBuilding;
|
|
||||||
}
|
|
||||||
if (Game.buyBulk === 1) target = CacheObjects1;
|
|
||||||
else if (Game.buyBulk === 10) target = CacheObjects10;
|
|
||||||
else if (Game.buyBulk === 100) target = CacheObjects100;
|
|
||||||
|
|
||||||
TooltipPrice = Game.Objects[TooltipName].bulkPrice;
|
|
||||||
TooltipBonusIncome = target[TooltipName].bonus;
|
|
||||||
|
|
||||||
if (CMOptions.TooltipBuildUpgrade === 1 && Game.buyMode === 1) {
|
|
||||||
l('CMTooltipIncome').textContent = Beautify(TooltipBonusIncome, 2);
|
|
||||||
const increase = Math.round(
|
|
||||||
(TooltipBonusIncome / Game.cookiesPs) * 10000,
|
|
||||||
);
|
|
||||||
if (Number.isFinite(increase) && increase !== 0) {
|
|
||||||
l('CMTooltipIncome').textContent += ` (${increase / 100}% of income)`;
|
|
||||||
} else {
|
|
||||||
l('CMTooltipIncome').textContent += ` (<0${
|
|
||||||
CMOptions.ScaleSeparator ? ',' : '.'
|
|
||||||
}01% of income)`;
|
|
||||||
}
|
|
||||||
l('CMTooltipBorder').className = ColorTextPre + target[TooltipName].color;
|
|
||||||
l('CMTooltipPP').textContent = Beautify(target[TooltipName].pp, 2);
|
|
||||||
l('CMTooltipPP').className = ColorTextPre + target[TooltipName].color;
|
|
||||||
const timeColor = GetTimeColor(
|
|
||||||
(TooltipPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
|
|
||||||
);
|
|
||||||
l('CMTooltipTime').textContent = timeColor.text;
|
|
||||||
if (
|
|
||||||
timeColor.text === 'Done!' &&
|
|
||||||
Game.cookies < target[TooltipName].price
|
|
||||||
) {
|
|
||||||
l('CMTooltipTime').textContent = `${timeColor.text} (with Wrink)`;
|
|
||||||
} else l('CMTooltipTime').textContent = timeColor.text;
|
|
||||||
l('CMTooltipTime').className = ColorTextPre + timeColor.color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add "production left till next achievement"-bar
|
|
||||||
l('CMTooltipProductionHeader').style.display = 'none';
|
|
||||||
l('CMTooltipTime').style.marginBottom = '0px';
|
|
||||||
for (const i of Object.keys(Game.Objects[TooltipName].productionAchievs)) {
|
|
||||||
if (
|
|
||||||
!Game.HasAchiev(
|
|
||||||
Game.Objects[TooltipName].productionAchievs[i].achiev.name,
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
const nextProductionAchiev =
|
|
||||||
Game.Objects[TooltipName].productionAchievs[i];
|
|
||||||
l('CMTooltipTime').style.marginBottom = '4px';
|
|
||||||
l('CMTooltipProductionHeader').style.display = '';
|
|
||||||
l('CMTooltipProduction').className = `ProdAchievement${TooltipName}`;
|
|
||||||
l('CMTooltipProduction').textContent = Beautify(
|
|
||||||
nextProductionAchiev.pow - SimObjects[TooltipName].totalCookies,
|
|
||||||
15,
|
|
||||||
);
|
|
||||||
l('CMTooltipProduction').style.color = 'white';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function adds extra info to the Upgrade tooltips
|
|
||||||
*/
|
|
||||||
function Upgrade() {
|
|
||||||
const tooltipBox = l('CMTooltipBorder');
|
|
||||||
Create.TooltipCreateCalculationSection(tooltipBox);
|
|
||||||
|
|
||||||
TooltipBonusIncome =
|
|
||||||
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].bonus;
|
|
||||||
TooltipPrice = Game.Upgrades[
|
|
||||||
Game.UpgradesInStore[TooltipName].name
|
|
||||||
].getPrice();
|
|
||||||
TooltipBonusMouse =
|
|
||||||
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].bonusMouse;
|
|
||||||
|
|
||||||
if (CMOptions.TooltipBuildUpgrade === 1) {
|
|
||||||
l('CMTooltipIncome').textContent = Beautify(TooltipBonusIncome, 2);
|
|
||||||
const increase = Math.round((TooltipBonusIncome / Game.cookiesPs) * 10000);
|
|
||||||
// Don't display certain parts of tooltip if not applicable
|
|
||||||
if (
|
|
||||||
l('CMTooltipIncome').textContent === '0' &&
|
|
||||||
(TooltipType === 'b' || TooltipType === 'u')
|
|
||||||
) {
|
|
||||||
l('Bonus IncomeTitle').style.display = 'none';
|
|
||||||
l('CMTooltipIncome').style.display = 'none';
|
|
||||||
l('Payback PeriodTitle').style.display = 'none';
|
|
||||||
l('CMTooltipPP').style.display = 'none';
|
|
||||||
} else {
|
|
||||||
if (Number.isFinite(increase) && increase !== 0) {
|
|
||||||
l('CMTooltipIncome').textContent += ` (${increase / 100}% of income)`;
|
|
||||||
} else {
|
|
||||||
l('CMTooltipIncome').textContent += ` (<0${
|
|
||||||
CMOptions.ScaleSeparator ? ',' : '.'
|
|
||||||
}01% of income)`;
|
|
||||||
}
|
|
||||||
l('CMTooltipBorder').className =
|
|
||||||
ColorTextPre +
|
|
||||||
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color;
|
|
||||||
// If clicking power upgrade
|
|
||||||
if (TooltipBonusMouse) {
|
|
||||||
l('CMTooltipCookiePerClick').textContent = Beautify(TooltipBonusMouse);
|
|
||||||
l('CMTooltipCookiePerClick').style.display = 'block';
|
|
||||||
l('CMTooltipCookiePerClick').previousSibling.style.display = 'block';
|
|
||||||
}
|
|
||||||
// If only a clicking power upgrade change PP to click-based period
|
|
||||||
if (TooltipBonusIncome === 0 && TooltipBonusMouse) {
|
|
||||||
l('CMTooltipPP').textContent = `${Beautify(
|
|
||||||
TooltipPrice / TooltipBonusMouse,
|
|
||||||
)} Clicks`;
|
|
||||||
l('CMTooltipPP').style.color = 'white';
|
|
||||||
} else {
|
|
||||||
l('CMTooltipPP').textContent = Beautify(
|
|
||||||
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].pp,
|
|
||||||
2,
|
|
||||||
);
|
|
||||||
l('CMTooltipPP').className =
|
|
||||||
ColorTextPre +
|
|
||||||
CacheUpgrades[Game.UpgradesInStore[TooltipName].name].color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const timeColor = GetTimeColor(
|
|
||||||
(TooltipPrice - (Game.cookies + GetWrinkConfigBank())) / GetCPS(),
|
|
||||||
);
|
|
||||||
l('CMTooltipTime').textContent = timeColor.text;
|
|
||||||
if (
|
|
||||||
timeColor.text === 'Done!' &&
|
|
||||||
Game.cookies < Game.UpgradesInStore[TooltipName].getPrice()
|
|
||||||
) {
|
|
||||||
l('CMTooltipTime').textContent = `${timeColor.text} (with Wrink)`;
|
|
||||||
} else l('CMTooltipTime').textContent = timeColor.text;
|
|
||||||
l('CMTooltipTime').className = ColorTextPre + timeColor.color;
|
|
||||||
|
|
||||||
// Add extra info to Chocolate egg tooltip
|
|
||||||
if (Game.UpgradesInStore[TooltipName].name === 'Chocolate egg') {
|
|
||||||
l('CMTooltipBorder').lastChild.style.marginBottom = '4px';
|
|
||||||
l('CMTooltipBorder').appendChild(
|
|
||||||
Create.TooltipCreateHeader('Cookies to be gained (Currently/Max)'),
|
|
||||||
);
|
|
||||||
const chocolate = document.createElement('div');
|
|
||||||
chocolate.style.color = 'white';
|
|
||||||
chocolate.textContent = `${Beautify(Game.cookies * 0.05)} / ${Beautify(
|
|
||||||
CacheLastChoEgg,
|
|
||||||
)}`;
|
|
||||||
l('CMTooltipBorder').appendChild(chocolate);
|
|
||||||
}
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function adds extra info to the Sugar Lump tooltip
|
|
||||||
* It adds to the additional information to l('CMTooltipArea')
|
|
||||||
*/
|
|
||||||
function SugarLump() {
|
|
||||||
if (CMOptions.TooltipLump === 1) {
|
|
||||||
const tooltipBox = l('CMTooltipBorder');
|
|
||||||
|
|
||||||
tooltipBox.appendChild(Create.TooltipCreateHeader('Current Sugar Lump'));
|
|
||||||
|
|
||||||
const lumpType = document.createElement('div');
|
|
||||||
lumpType.id = 'CMTooltipTime';
|
|
||||||
tooltipBox.appendChild(lumpType);
|
|
||||||
const lumpColor = GetLumpColor(Game.lumpCurrentType);
|
|
||||||
lumpType.textContent = lumpColor.text;
|
|
||||||
lumpType.className = ColorTextPre + lumpColor.color;
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function adds extra info to the Grimoire tooltips
|
|
||||||
* It adds to the additional information to l('CMTooltipArea')
|
|
||||||
*/
|
|
||||||
function Grimoire() {
|
|
||||||
const minigame = Game.Objects['Wizard tower'].minigame;
|
|
||||||
const spellCost = minigame.getSpellCost(minigame.spellsById[TooltipName]);
|
|
||||||
|
|
||||||
if (CMOptions.TooltipGrim === 1 && spellCost <= minigame.magicM) {
|
|
||||||
const tooltipBox = l('CMTooltipBorder');
|
|
||||||
|
|
||||||
// Time left till enough magic for spell
|
|
||||||
tooltipBox.appendChild(Create.TooltipCreateHeader('Time Left'));
|
|
||||||
const time = document.createElement('div');
|
|
||||||
time.id = 'CMTooltipTime';
|
|
||||||
tooltipBox.appendChild(time);
|
|
||||||
const timeColor = GetTimeColor(
|
|
||||||
CalculateGrimoireRefillTime(minigame.magic, minigame.magicM, spellCost),
|
|
||||||
);
|
|
||||||
time.textContent = timeColor.text;
|
|
||||||
time.className = ColorTextPre + timeColor.color;
|
|
||||||
|
|
||||||
// Time left untill magic spent is recovered
|
|
||||||
if (spellCost <= minigame.magic) {
|
|
||||||
tooltipBox.appendChild(Create.TooltipCreateHeader('Recover Time'));
|
|
||||||
const recover = document.createElement('div');
|
|
||||||
recover.id = 'CMTooltipRecover';
|
|
||||||
tooltipBox.appendChild(recover);
|
|
||||||
const recoverColor = GetTimeColor(
|
|
||||||
CalculateGrimoireRefillTime(
|
|
||||||
Math.max(0, minigame.magic - spellCost),
|
|
||||||
minigame.magicM,
|
|
||||||
minigame.magic,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
recover.textContent = recoverColor.text;
|
|
||||||
recover.className = ColorTextPre + recoverColor.color;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Extra information on cookies gained when spell is Conjure Baked Goods (Name === 0)
|
|
||||||
if (TooltipName === '0') {
|
|
||||||
tooltipBox.appendChild(
|
|
||||||
Create.TooltipCreateHeader('Cookies to be gained/lost'),
|
|
||||||
);
|
|
||||||
const conjure = document.createElement('div');
|
|
||||||
conjure.id = 'x';
|
|
||||||
tooltipBox.appendChild(conjure);
|
|
||||||
const reward = document.createElement('span');
|
|
||||||
reward.style.color = '#33FF00';
|
|
||||||
reward.textContent = Beautify(
|
|
||||||
Math.min(
|
|
||||||
(Game.cookies + GetWrinkConfigBank()) * 0.15,
|
|
||||||
CacheNoGoldSwitchCookiesPS * 60 * 30,
|
|
||||||
),
|
|
||||||
2,
|
|
||||||
);
|
|
||||||
conjure.appendChild(reward);
|
|
||||||
const seperator = document.createElement('span');
|
|
||||||
seperator.textContent = ' / ';
|
|
||||||
conjure.appendChild(seperator);
|
|
||||||
const loss = document.createElement('span');
|
|
||||||
loss.style.color = 'red';
|
|
||||||
loss.textContent = Beautify(CacheNoGoldSwitchCookiesPS * 60 * 15, 2);
|
|
||||||
conjure.appendChild(loss);
|
|
||||||
}
|
|
||||||
|
|
||||||
l('CMTooltipArea').appendChild(tooltipBox);
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function adds extra info to the Garden plots tooltips
|
|
||||||
* It adds to the additional information to l('CMTooltipArea')
|
|
||||||
*/
|
|
||||||
function GardenPlots() {
|
|
||||||
const minigame = Game.Objects.Farm.minigame;
|
|
||||||
if (
|
|
||||||
CMOptions.TooltipPlots &&
|
|
||||||
minigame.plot[TooltipName[1]][TooltipName[0]][0] !== 0
|
|
||||||
) {
|
|
||||||
const mature =
|
|
||||||
minigame.plot[TooltipName[1]][TooltipName[0]][1] >
|
|
||||||
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1]
|
|
||||||
.matureBase;
|
|
||||||
const plantName =
|
|
||||||
minigame.plantsById[minigame.plot[TooltipName[1]][TooltipName[0]][0] - 1]
|
|
||||||
.name;
|
|
||||||
l('CMTooltipBorder').appendChild(
|
|
||||||
Create.TooltipCreateHeader('Reward (Current / Maximum)'),
|
|
||||||
);
|
|
||||||
const reward = document.createElement('div');
|
|
||||||
reward.id = 'CMTooltipPlantReward';
|
|
||||||
l('CMTooltipBorder').appendChild(reward);
|
|
||||||
if (plantName === 'Bakeberry') {
|
|
||||||
l('CMTooltipPlantReward').textContent = `${
|
|
||||||
mature
|
|
||||||
? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 30))
|
|
||||||
: '0'
|
|
||||||
} / ${Beautify(Game.cookiesPs * 60 * 30)}`;
|
|
||||||
} else if (plantName === 'Chocoroot' || plantName === 'White chocoroot') {
|
|
||||||
l('CMTooltipPlantReward').textContent = `${
|
|
||||||
mature
|
|
||||||
? Beautify(Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 3))
|
|
||||||
: '0'
|
|
||||||
} / ${Beautify(Game.cookiesPs * 60 * 3)}`;
|
|
||||||
} else if (plantName === 'Queenbeet') {
|
|
||||||
l('CMTooltipPlantReward').textContent = `${
|
|
||||||
mature
|
|
||||||
? Beautify(Math.min(Game.cookies * 0.04, Game.cookiesPs * 60 * 60))
|
|
||||||
: '0'
|
|
||||||
} / ${Beautify(Game.cookiesPs * 60 * 60)}`;
|
|
||||||
} else if (plantName === 'Duketater') {
|
|
||||||
l('CMTooltipPlantReward').textContent = `${
|
|
||||||
mature
|
|
||||||
? Beautify(Math.min(Game.cookies * 0.08, Game.cookiesPs * 60 * 120))
|
|
||||||
: '0'
|
|
||||||
} / ${Beautify(Game.cookiesPs * 60 * 120)}`;
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function adds extra info to the Garden Harvest All tooltip
|
|
||||||
* It is called when the Harvest All tooltip is created or refreshed by CM.Disp.UpdateTooltip()
|
|
||||||
* It adds to the additional information to l('CMTooltipArea')
|
|
||||||
*/
|
|
||||||
function HarvestAll() {
|
|
||||||
const minigame = Game.Objects.Farm.minigame;
|
|
||||||
if (CMOptions.TooltipLump) {
|
|
||||||
l('CMTooltipBorder').appendChild(
|
|
||||||
Create.TooltipCreateHeader('Cookies gained from harvesting:'),
|
|
||||||
);
|
|
||||||
let totalGain = 0;
|
|
||||||
let mortal = 0;
|
|
||||||
if (Game.keys[16] && Game.keys[17]) mortal = 1;
|
|
||||||
for (let y = 0; y < 6; y++) {
|
|
||||||
for (let x = 0; x < 6; x++) {
|
|
||||||
if (minigame.plot[y][x][0] >= 1) {
|
|
||||||
const tile = minigame.plot[y][x];
|
|
||||||
const me = minigame.plantsById[tile[0] - 1];
|
|
||||||
const plantName = me.name;
|
|
||||||
|
|
||||||
let count = true;
|
|
||||||
if (mortal && me.immortal) count = false;
|
|
||||||
if (tile[1] < me.matureBase) count = false;
|
|
||||||
if (count && plantName === 'Bakeberry') {
|
|
||||||
totalGain += Math.min(
|
|
||||||
Game.cookies * 0.03,
|
|
||||||
Game.cookiesPs * 60 * 30,
|
|
||||||
);
|
|
||||||
} else if (
|
|
||||||
(count && plantName === 'Chocoroot') ||
|
|
||||||
plantName === 'White chocoroot'
|
|
||||||
) {
|
|
||||||
totalGain += Math.min(Game.cookies * 0.03, Game.cookiesPs * 60 * 3);
|
|
||||||
} else if (count && plantName === 'Queenbeet') {
|
|
||||||
totalGain += Math.min(
|
|
||||||
Game.cookies * 0.04,
|
|
||||||
Game.cookiesPs * 60 * 60,
|
|
||||||
);
|
|
||||||
} else if (count && plantName === 'Duketater') {
|
|
||||||
totalGain += Math.min(
|
|
||||||
Game.cookies * 0.08,
|
|
||||||
Game.cookiesPs * 60 * 120,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
l('CMTooltipBorder').appendChild(
|
|
||||||
document.createTextNode(Beautify(totalGain)),
|
|
||||||
);
|
|
||||||
} else l('CMTooltipArea').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function adds extra info to the wrinkler button tooltip
|
|
||||||
* It adds to the additional information to l('CMTooltipArea')
|
|
||||||
*/
|
|
||||||
function WrinklerButton() {
|
|
||||||
l('tooltip').innerHTML = '';
|
|
||||||
l('tooltip').appendChild(Create.TooltipCreateHeader('Reward:'));
|
|
||||||
|
|
||||||
const WrinklerReward = document.createElement('div');
|
|
||||||
WrinklerReward.id = 'CMWrinklerReward';
|
|
||||||
if (TooltipName === 'PopAll') {
|
|
||||||
WrinklerReward.textContent = CacheWrinklersTotal;
|
|
||||||
} else if (TooltipName === 'PopFattest') {
|
|
||||||
WrinklerReward.textContent = CacheWrinklersFattest[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
l('tooltip').appendChild(WrinklerReward);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function updates the warnings section of the building and upgrade tooltips
|
|
||||||
*/
|
|
||||||
function Warnings() {
|
|
||||||
if (TooltipType === 'b' || TooltipType === 'u') {
|
|
||||||
if (document.getElementById('CMDispTooltipWarningParent') === null) {
|
|
||||||
l('tooltipAnchor').appendChild(Create.TooltipCreateWarningSection());
|
|
||||||
ToggleToolWarnPos();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CMOptions.ToolWarnPos === 0)
|
|
||||||
l('CMDispTooltipWarningParent').style.right = '0px';
|
|
||||||
else
|
|
||||||
l('CMDispTooltipWarningParent').style.top = `${
|
|
||||||
l('tooltip').offsetHeight
|
|
||||||
}px`;
|
|
||||||
|
|
||||||
l('CMDispTooltipWarningParent').style.width = `${
|
|
||||||
l('tooltip').offsetWidth - 6
|
|
||||||
}px`;
|
|
||||||
|
|
||||||
const amount = Game.cookies + GetWrinkConfigBank() - TooltipPrice;
|
|
||||||
const bonusIncomeUsed = CMOptions.ToolWarnBon ? TooltipBonusIncome : 0;
|
|
||||||
let limitLucky = CacheLucky;
|
|
||||||
if (CMOptions.ToolWarnBon === 1) {
|
|
||||||
let bonusNoFren = TooltipBonusIncome;
|
|
||||||
bonusNoFren /= GetCPSBuffMult();
|
|
||||||
limitLucky += (bonusNoFren * 60 * 15) / 0.15;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CMOptions.ToolWarnLucky === 1) {
|
|
||||||
if (amount < limitLucky && (TooltipType !== 'b' || Game.buyMode === 1)) {
|
|
||||||
l('CMDispTooltipWarnLucky').style.display = '';
|
|
||||||
l('CMDispTooltipWarnLuckyText').textContent = `${Beautify(
|
|
||||||
limitLucky - amount,
|
|
||||||
)} (${FormatTime(
|
|
||||||
(limitLucky - amount) / (GetCPS() + bonusIncomeUsed),
|
|
||||||
)})`;
|
|
||||||
} else l('CMDispTooltipWarnLucky').style.display = 'none';
|
|
||||||
} else l('CMDispTooltipWarnLucky').style.display = 'none';
|
|
||||||
|
|
||||||
if (CMOptions.ToolWarnLuckyFrenzy === 1) {
|
|
||||||
const limitLuckyFrenzy = limitLucky * 7;
|
|
||||||
if (
|
|
||||||
amount < limitLuckyFrenzy &&
|
|
||||||
(TooltipType !== 'b' || Game.buyMode === 1)
|
|
||||||
) {
|
|
||||||
l('CMDispTooltipWarnLuckyFrenzy').style.display = '';
|
|
||||||
l('CMDispTooltipWarnLuckyFrenzyText').textContent = `${Beautify(
|
|
||||||
limitLuckyFrenzy - amount,
|
|
||||||
)} (${FormatTime(
|
|
||||||
(limitLuckyFrenzy - amount) / (GetCPS() + bonusIncomeUsed),
|
|
||||||
)})`;
|
|
||||||
} else l('CMDispTooltipWarnLuckyFrenzy').style.display = 'none';
|
|
||||||
} else l('CMDispTooltipWarnLuckyFrenzy').style.display = 'none';
|
|
||||||
|
|
||||||
if (CMOptions.ToolWarnConjure === 1) {
|
|
||||||
const limitConjure = limitLucky * 2;
|
|
||||||
if (
|
|
||||||
amount < limitConjure &&
|
|
||||||
(TooltipType !== 'b' || Game.buyMode === 1)
|
|
||||||
) {
|
|
||||||
l('CMDispTooltipWarnConjure').style.display = '';
|
|
||||||
l('CMDispTooltipWarnConjureText').textContent = `${Beautify(
|
|
||||||
limitConjure - amount,
|
|
||||||
)} (${FormatTime(
|
|
||||||
(limitConjure - amount) / (GetCPS() + bonusIncomeUsed),
|
|
||||||
)})`;
|
|
||||||
} else l('CMDispTooltipWarnConjure').style.display = 'none';
|
|
||||||
} else l('CMDispTooltipWarnConjure').style.display = 'none';
|
|
||||||
|
|
||||||
if (CMOptions.ToolWarnConjureFrenzy === 1) {
|
|
||||||
const limitConjureFrenzy = limitLucky * 2 * 7;
|
|
||||||
if (
|
|
||||||
amount < limitConjureFrenzy &&
|
|
||||||
(TooltipType !== 'b' || Game.buyMode === 1)
|
|
||||||
) {
|
|
||||||
l('CMDispTooltipWarnConjureFrenzy').style.display = '';
|
|
||||||
l('CMDispTooltipWarnConjureFrenzyText').textContent = `${Beautify(
|
|
||||||
limitConjureFrenzy - amount,
|
|
||||||
)} (${FormatTime(
|
|
||||||
(limitConjureFrenzy - amount) / (GetCPS() + bonusIncomeUsed),
|
|
||||||
)})`;
|
|
||||||
} else l('CMDispTooltipWarnConjureFrenzy').style.display = 'none';
|
|
||||||
} else l('CMDispTooltipWarnConjureFrenzy').style.display = 'none';
|
|
||||||
|
|
||||||
if (
|
|
||||||
CMOptions.ToolWarnEdifice === 1 &&
|
|
||||||
Game.Objects['Wizard tower'].minigameLoaded
|
|
||||||
) {
|
|
||||||
if (
|
|
||||||
CacheEdifice &&
|
|
||||||
amount < CacheEdifice &&
|
|
||||||
(TooltipType !== 'b' || Game.buyMode === 1)
|
|
||||||
) {
|
|
||||||
l('CMDispTooltipWarnEdifice').style.display = '';
|
|
||||||
l('CMDispTooltipWarnEdificeText').textContent = `${Beautify(
|
|
||||||
CacheEdifice - amount,
|
|
||||||
)} (${FormatTime(
|
|
||||||
(CacheEdifice - amount) / (GetCPS() + bonusIncomeUsed),
|
|
||||||
)})`;
|
|
||||||
} else l('CMDispTooltipWarnEdifice').style.display = 'none';
|
|
||||||
} else l('CMDispTooltipWarnEdifice').style.display = 'none';
|
|
||||||
|
|
||||||
if (CMOptions.ToolWarnUser > 0) {
|
|
||||||
if (
|
|
||||||
amount < CMOptions.ToolWarnUser * GetCPS() &&
|
|
||||||
(TooltipType !== 'b' || Game.buyMode === 1)
|
|
||||||
) {
|
|
||||||
l('CMDispTooltipWarnUser').style.display = '';
|
|
||||||
// Need to update tooltip text dynamically
|
|
||||||
l(
|
|
||||||
'CMDispTooltipWarnUser',
|
|
||||||
).children[0].textContent = `Purchase of this item will put you under the number of Cookies equal to ${CMOptions.ToolWarnUser} seconds of CPS`;
|
|
||||||
l('CMDispTooltipWarnUserText').textContent = `${Beautify(
|
|
||||||
CMOptions.ToolWarnUser * GetCPS() - amount,
|
|
||||||
)} (${FormatTime(
|
|
||||||
(CMOptions.ToolWarnUser * GetCPS() - amount) /
|
|
||||||
(GetCPS() + bonusIncomeUsed),
|
|
||||||
)})`;
|
|
||||||
} else l('CMDispTooltipWarnUser').style.display = 'none';
|
|
||||||
} else l('CMDispTooltipWarnUser').style.display = 'none';
|
|
||||||
} else if (l('CMDispTooltipWarningParent') !== null) {
|
|
||||||
l('CMDispTooltipWarningParent').remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function updates the sections of the tooltips created by CookieMonster
|
* This function updates the sections of the tooltips created by CookieMonster
|
||||||
@@ -562,8 +34,12 @@ export default function UpdateTooltips() {
|
|||||||
} else if (TooltipType === 'ha') {
|
} else if (TooltipType === 'ha') {
|
||||||
HarvestAll();
|
HarvestAll();
|
||||||
} else if (TooltipType === 'wb') {
|
} else if (TooltipType === 'wb') {
|
||||||
l('CMTooltipArea').innerHTML = '';
|
|
||||||
WrinklerButton();
|
WrinklerButton();
|
||||||
|
} else if (
|
||||||
|
TooltipType === 'pag' ||
|
||||||
|
(TooltipType === 'pas' && TooltipName[1] !== -1)
|
||||||
|
) {
|
||||||
|
PantheonGods();
|
||||||
}
|
}
|
||||||
Warnings();
|
Warnings();
|
||||||
} else if (l('CMTooltipArea') === null) {
|
} else if (l('CMTooltipArea') === null) {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import LoopCache from '../Cache/CacheLoop';
|
|||||||
import CacheNoGoldSwitchCPS from '../Cache/CPS/NoGoldSwitchCPS';
|
import CacheNoGoldSwitchCPS from '../Cache/CPS/NoGoldSwitchCPS';
|
||||||
import CacheSellAllForChoEgg from '../Cache/CPS/SellChoEgg';
|
import CacheSellAllForChoEgg from '../Cache/CPS/SellChoEgg';
|
||||||
import CacheDragonCost from '../Cache/Dragon/Dragon';
|
import CacheDragonCost from '../Cache/Dragon/Dragon';
|
||||||
|
import CachePantheonGods from '../Cache/PantheonGods/CacheGods';
|
||||||
import {
|
import {
|
||||||
CacheBuildingsPrices,
|
CacheBuildingsPrices,
|
||||||
CacheIncome,
|
CacheIncome,
|
||||||
@@ -57,6 +58,7 @@ export default function CMLoop() {
|
|||||||
CacheAllMissingUpgrades();
|
CacheAllMissingUpgrades();
|
||||||
CacheChain();
|
CacheChain();
|
||||||
CacheDragonCost();
|
CacheDragonCost();
|
||||||
|
CachePantheonGods();
|
||||||
|
|
||||||
CacheSeasonSpec();
|
CacheSeasonSpec();
|
||||||
CacheSellAllForChoEgg();
|
CacheSellAllForChoEgg();
|
||||||
|
|||||||
@@ -86,6 +86,40 @@ function ReplaceTooltipGarden() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ReplaceTooltipPantheon() {
|
||||||
|
if (Game.Objects.Temple.minigameLoaded) {
|
||||||
|
for (let i = 0; i < 11; i += 1) {
|
||||||
|
l(`templeGod${i}`).onmouseover = function () {
|
||||||
|
Game.tooltip.dynamic = 1;
|
||||||
|
Game.tooltip.draw(
|
||||||
|
this,
|
||||||
|
function () {
|
||||||
|
return CreateTooltip('pag', i);
|
||||||
|
},
|
||||||
|
'this',
|
||||||
|
);
|
||||||
|
Game.tooltip.wobble();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
for (let i = 0; i < 3; i += 1) {
|
||||||
|
l(`templeSlot${i}`).onmouseover = function () {
|
||||||
|
Game.tooltip.dynamic = 1;
|
||||||
|
Game.tooltip.draw(
|
||||||
|
this,
|
||||||
|
function () {
|
||||||
|
return CreateTooltip('pas', [
|
||||||
|
i,
|
||||||
|
Game.Objects.Temple.minigame.slot[i],
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
'this',
|
||||||
|
);
|
||||||
|
Game.tooltip.wobble();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function call all functions that replace Game-tooltips with Cookie Monster enhanced tooltips
|
* This function call all functions that replace Game-tooltips with Cookie Monster enhanced tooltips
|
||||||
*/
|
*/
|
||||||
@@ -100,6 +134,7 @@ export default function ReplaceTooltips() {
|
|||||||
LoadMinigames();
|
LoadMinigames();
|
||||||
ReplaceTooltipGarden();
|
ReplaceTooltipGarden();
|
||||||
ReplaceTooltipGrimoire();
|
ReplaceTooltipGrimoire();
|
||||||
|
ReplaceTooltipPantheon();
|
||||||
ReplaceNativeGrimoire();
|
ReplaceNativeGrimoire();
|
||||||
};
|
};
|
||||||
Game.LoadMinigames();
|
Game.LoadMinigames();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { SimObjects } from '../VariablesAndData';
|
import { SimGod1, SimGod2, SimGod3, SimObjects } from '../VariablesAndData';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function checks for the current God level in the sim data
|
* This function checks for the current God level in the sim data
|
||||||
@@ -11,10 +11,14 @@ export default function SimHasGod(what) {
|
|||||||
SimObjects.Temple.minigame = Game.Objects.Temple.minigame;
|
SimObjects.Temple.minigame = Game.Objects.Temple.minigame;
|
||||||
}
|
}
|
||||||
const god = SimObjects.Temple.minigame.gods[what];
|
const god = SimObjects.Temple.minigame.gods[what];
|
||||||
for (let i = 0; i < 3; i++) {
|
if (SimGod1 === god.id) {
|
||||||
if (SimObjects.Temple.minigame.slot[i] === god.id) {
|
return 1;
|
||||||
return i + 1;
|
|
||||||
}
|
}
|
||||||
|
if (SimGod2 === god.id) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
if (SimGod3 === god.id) {
|
||||||
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ import {
|
|||||||
SimAchievementsOwned,
|
SimAchievementsOwned,
|
||||||
SimDragonAura,
|
SimDragonAura,
|
||||||
SimDragonAura2,
|
SimDragonAura2,
|
||||||
|
SimGod1,
|
||||||
|
SimGod2,
|
||||||
|
SimGod3,
|
||||||
SimHeavenlyPower,
|
SimHeavenlyPower,
|
||||||
SimObjects,
|
SimObjects,
|
||||||
SimPledges,
|
SimPledges,
|
||||||
@@ -49,6 +52,11 @@ export default function CopyData() {
|
|||||||
you.basePrice = me.basePrice;
|
you.basePrice = me.basePrice;
|
||||||
you.free = me.free;
|
you.free = me.free;
|
||||||
if (me.minigameLoaded) {
|
if (me.minigameLoaded) {
|
||||||
|
if (me.name === 'Temple') {
|
||||||
|
SimGod1 = me.minigame.slot[0];
|
||||||
|
SimGod2 = me.minigame.slot[1];
|
||||||
|
SimGod3 = me.minigame.slot[2];
|
||||||
|
}
|
||||||
you.minigameLoaded = me.minigameLoaded;
|
you.minigameLoaded = me.minigameLoaded;
|
||||||
you.minigame = me.minigame;
|
you.minigame = me.minigame;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/* eslint-disable no-unused-vars */
|
||||||
|
import CalculateGains from '../Calculations/CalculateGains';
|
||||||
|
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
|
||||||
|
import CopyData from '../SimulationData/CopyData';
|
||||||
|
import {
|
||||||
|
SimAchievementsOwned,
|
||||||
|
SimCookiesPs,
|
||||||
|
SimGod1,
|
||||||
|
SimGod2,
|
||||||
|
SimGod3,
|
||||||
|
} from '../VariablesAndData';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions calculates the cps and cost of changing a Dragon Aura
|
||||||
|
* It is called by CM.Disp.AddAuraInfo()
|
||||||
|
* @param {number} god The number of the slot to be swapped in
|
||||||
|
* * @param {number slot The slot the god will go to
|
||||||
|
* @returns {number} CM.Sim.cookiesPs - Game.cookiesPs The bonus cps and the price of the change
|
||||||
|
*/
|
||||||
|
export default function CalculateChangeGod(god, slot) {
|
||||||
|
CopyData();
|
||||||
|
if (slot === 0) SimGod1 = god;
|
||||||
|
else if (slot === 1) SimGod2 = god;
|
||||||
|
else if (slot === 2) SimGod3 = god;
|
||||||
|
|
||||||
|
const lastAchievementsOwned = SimAchievementsOwned;
|
||||||
|
CalculateGains();
|
||||||
|
|
||||||
|
CheckOtherAchiev();
|
||||||
|
if (lastAchievementsOwned !== SimAchievementsOwned) {
|
||||||
|
CalculateGains();
|
||||||
|
}
|
||||||
|
return SimCookiesPs - Game.cookiesPs;
|
||||||
|
}
|
||||||
@@ -12,6 +12,9 @@ export let SimHeavenlyPower;
|
|||||||
export let SimPrestige;
|
export let SimPrestige;
|
||||||
export let SimDragonAura;
|
export let SimDragonAura;
|
||||||
export let SimDragonAura2;
|
export let SimDragonAura2;
|
||||||
|
export let SimGod1;
|
||||||
|
export let SimGod2;
|
||||||
|
export let SimGod3;
|
||||||
export let SimDoSims;
|
export let SimDoSims;
|
||||||
export let SimEffs;
|
export let SimEffs;
|
||||||
export let SimDateCentury = Game.startDate;
|
export let SimDateCentury = Game.startDate;
|
||||||
|
|||||||
Reference in new issue
Block a user