Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int CalculateProfit(double timeInSeconds, bool withIdle, int town = -1)
- {
- if (town == -1)
- {
- town = CurrentWorld;
- }
- int prestige = GameProgress.GetPrestigeLevel(town);
- float waitressAmount = ((WaitressUpgrade)GetUpgrade(GameProgress.GetWaitressLvl(town), UpgradeType.waitress, prestige)).WaitressAmount;
- float waitressTime = _CurrentCoffeeShop.WaitressDuration * 2.0f;
- float seetsAmount = GameProgress.GetSeatsLvl(town);
- float coffeesAmount = ((CoffeeGeneratorUpgrade)GetUpgrade(GameProgress.GetGeneratorLvl(town), UpgradeType.generator, prestige)).CoffeeMadePerOverflow;
- float seetsTime = waitressTime * 2.0f;
- float kurwa1 = 0;
- if (seetsAmount > 0)
- {
- kurwa1 = coffeesAmount / seetsAmount;
- kurwa1 = kurwa1 > 1 ? 1 : kurwa1;
- }
- float kurwa2 = 0;
- if (waitressTime > 0)
- {
- kurwa2 = seetsTime / waitressTime;
- }
- float kurwa3 = 0;
- if (seetsAmount > 0)
- {
- kurwa3 = ((waitressAmount * kurwa2) / seetsAmount);
- kurwa3 = kurwa3 > 1 ? 1 : kurwa3;
- }
- float kurwa4 = seetsAmount * Mathf.Min(kurwa1, kurwa3);
- float timeToEarn = seetsTime / kurwa4;
- int coffeePrice = UpgradeManager.GetWorld(GameProgress.GetPrestigeLevel(town), town).CoffePrice;
- int moneyEarned = CalculateEarnings(timeInSeconds, timeToEarn, coffeePrice, 1, town, withIdle);
- return moneyEarned;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement