mirror of
https://github.com/moganda12/transistor-clicker.git
synced 2025-01-22 22:06:37 -05:00
end of day 2
This commit is contained in:
parent
71cbb4abb1
commit
bcbfe73d82
33
src/main.cpp
33
src/main.cpp
@ -76,7 +76,7 @@ struct Acheivement {
|
||||
str name;
|
||||
str description;
|
||||
str flavortext;
|
||||
bool completed;
|
||||
bool earned;
|
||||
};
|
||||
|
||||
struct TclickerState {
|
||||
@ -423,6 +423,12 @@ void onExit(std::vector<str>&) {
|
||||
|
||||
#pragma region THE WALL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma region for upgrades
|
||||
|
||||
void unlockCursor(std::vector<str>& args) {
|
||||
gameState.cursorUnlocked = true;
|
||||
}
|
||||
@ -550,6 +556,16 @@ void unLockEndgame(std::vector<str>& args) {
|
||||
|
||||
|
||||
|
||||
#pragma region for acheivements
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma region saves
|
||||
|
||||
integer json_read_integer_safe(json::value_type j, integer def = 0) {
|
||||
@ -1108,8 +1124,8 @@ void list(std::vector<str>& args) {
|
||||
|
||||
for(Upgrade& upgrade : upgrades) {
|
||||
if(upgrade.purchased) {
|
||||
std::cout << BOLDBLUE << upgrade.name << " - " << upgrade.description << '\n';
|
||||
std::cout << "cost " << TransitorsString(upgrade.cost, 0) << "!\n\n";
|
||||
std::cout << BOLDBLUE << upgrade.name << " - " << upgrade.description << BOLDYELLOW << "(owned)\n";
|
||||
std::cout << BOLDBLUE << "cost " << TransitorsString(upgrade.cost, 0) << "!\n\n";
|
||||
}
|
||||
}
|
||||
} else if(args[1] == "all") {
|
||||
@ -1129,7 +1145,7 @@ void list(std::vector<str>& args) {
|
||||
}
|
||||
|
||||
for(Upgrade& upgrade : owned) {
|
||||
std::cout << BOLDBLUE << upgrade.name << " - " << upgrade.description << '\n';
|
||||
std::cout << BOLDBLUE << upgrade.name << " - " << upgrade.description << BOLDYELLOW << "(owned)\n";
|
||||
std::cout << "will cost " << TransitorsString(upgrade.cost) << "!\n\n";
|
||||
}
|
||||
|
||||
@ -1139,6 +1155,15 @@ void list(std::vector<str>& args) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(args[0] == "acheivement" || args[0] == "acheivements") {
|
||||
if(args.size() >= 1) {
|
||||
std::cout << BOLDWHITE << "Acheivments:";
|
||||
|
||||
for(Acheivement& acheivement : acheivements) {
|
||||
std::cout << BOLDBLUE << acheivement.name << " - " << acheivement.description << '\n';
|
||||
std::cout << BOLDBLUE << '"' << acheivement.flavortext << "\"\n\n";
|
||||
}
|
||||
}
|
||||
} else if(args[0] == "building" || args[0] == "buildings") {
|
||||
std::cout << BOLDWHITE << "Buildings:\n\n";
|
||||
|
||||
|
4
todo.txt
4
todo.txt
@ -2,12 +2,12 @@
|
||||
|
||||
0.0.2 [ ]
|
||||
|
||||
[ ] refactoring {
|
||||
[x] refactoring {
|
||||
|
||||
- [x] move the upgrade and acheivement lists out of save
|
||||
- [x] rename save to something better
|
||||
- [x] redo the list command
|
||||
- [ ] section off code into regions
|
||||
- [x] section off code into regions
|
||||
}
|
||||
|
||||
[x] make main menu {
|
||||
|
Loading…
Reference in New Issue
Block a user