Complete overhaul of code structure and relevant files (#639)
This commit is contained in:
14
src/Cache/CPS/NoGoldSwitchCPS.js
Normal file
14
src/Cache/CPS/NoGoldSwitchCPS.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import CalcNoGoldSwitchCPS from '../../Sim/Calculations/NoGoldenSwitchCalc';
|
||||
import { CacheNoGoldSwitchCookiesPS } from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This function calculates CPS without the Golden Switch as it might be needed in other functions
|
||||
* If so it CM.Sim.Win()'s them and the caller function will know to recall CM.Sim.CalculateGains()
|
||||
* It is called at the end of any functions that simulates certain behaviour
|
||||
*/
|
||||
export default function CacheNoGoldSwitchCPS() {
|
||||
if (Game.Has('Golden switch [off]')) {
|
||||
CacheNoGoldSwitchCookiesPS = CalcNoGoldSwitchCPS();
|
||||
} else CacheNoGoldSwitchCookiesPS = Game.cookiesPs;
|
||||
}
|
||||
Reference in New Issue
Block a user