Skip to content

Commit

Permalink
changed conversion of creditstr
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-leong authored Jun 17, 2021
1 parent 5b71d19 commit 542f00f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ void startScreen() {
usr.username = cryptor::decrypt(usr.username);
jobs.currentJobStatus = cryptor::decrypt(jobs.currentJobStatus);
usr.difficultyLvl = cryptor::decrypt(usr.difficultyLvl);
usr.creditstr = cryptor::decrypt(usr.creditstr);
if (!usr.creditstr.empty()) {
usr.credits = std::stoi(cryptor::decrypt(usr.creditstr));
}

init();

Expand Down Expand Up @@ -76,8 +78,6 @@ void init() {
if (usr.difficultyLvl == "Easy" || usr.difficultyLvl == "easy") {
if (usr.creditstr.empty()) {
usr.credits *= 2;
} else {
usr.credits = std::stoi(usr.creditstr);
}
pwrWait.maxCommands *= 2;
pwrUps.incomeMultiplier *= 2;
Expand All @@ -91,14 +91,10 @@ void init() {
} else if (usr.difficultyLvl == "Normal" || usr.difficultyLvl == "normal") {
if (usr.creditstr.empty()) {
usr.credits = usr.starterCredits;
} else {
usr.credits = std::stoi(usr.creditstr);
}
} else if (usr.difficultyLvl == "Impossible" || usr.difficultyLvl == "impossible") {
if (usr.creditstr.empty()) {
usr.credits = 0;
} else {
usr.credits = std::stoi(usr.creditstr);
}

shop.item1Amount *= 100;
Expand Down

0 comments on commit 542f00f

Please sign in to comment.