diff --git a/make.sh b/make.sh index a03255f..47a543a 100755 --- a/make.sh +++ b/make.sh @@ -1,2 +1,2 @@ -g++-10 $1 -o $2 -O3 -std=c++20 -pthread -lgmp -lgmpxx -s -#./$2 \ No newline at end of file +g++ $1 -o $2 -O3 -std=c++20 -pthread -lgmp -lgmpxx -s +#./$2 diff --git a/save/gug.json b/save/gug.json new file mode 100644 index 0000000..7e461ad --- /dev/null +++ b/save/gug.json @@ -0,0 +1,57 @@ +{ + "achievements": null, + "buildings": { + "cursor": { + "count": "5" + }, + "largeFAB": { + "count": "0" + }, + "mediumFAB": { + "count": "0" + }, + "moss": { + "count": "4" + }, + "smallFAB": { + "count": "0" + } + }, + "totalTransistors": { + "denominator": "4", + "numerator": "7053" + }, + "transistorBalance": { + "denominator": "32000", + "numerator": "34008857" + }, + "upgrades": { + "cheap lithography machines": { + "bought": false + }, + "chippy": { + "bought": false + }, + "denser chips": { + "bought": false + }, + "endgame": { + "bought": false + }, + "faster fingers": { + "bought": false + }, + "integrated mouse": { + "bought": true + }, + "moss walls": { + "bought": false + }, + "mossier tech": { + "bought": false + }, + "mossy mossy": { + "bought": false + } + } +} \ No newline at end of file diff --git a/save/main.json b/save/main.json index 8cb9051..619167d 100644 --- a/save/main.json +++ b/save/main.json @@ -1,4 +1,5 @@ { + "achievements": null, "buildings": { "cursor": { "count": "1" @@ -7,22 +8,22 @@ "count": "0" }, "mediumFAB": { - "count": "0" + "count": "1" }, "moss": { - "count": "5" + "count": "23" }, "smallFAB": { - "count": "0" + "count": "13" } }, "totalTransistors": { "denominator": "160", - "numerator": "698821" + "numerator": "12504161" }, "transistorBalance": { - "denominator": "1600", - "numerator": "5885429" + "denominator": "167772160000000000000000000000", + "numerator": "221320933749281854631612254981359" }, "upgrades": { "cheap lithography machines": { @@ -38,19 +39,19 @@ "bought": false }, "faster fingers": { - "bought": false + "bought": true }, "integrated mouse": { - "bought": false + "bought": true }, "moss walls": { - "bought": false + "bought": true }, "mossier tech": { "bought": false }, "mossy mossy": { - "bought": false + "bought": true } } } \ No newline at end of file diff --git a/save/saveindex.json b/save/saveindex.json index 9247c41..e67c8c1 100644 --- a/save/saveindex.json +++ b/save/saveindex.json @@ -1,5 +1,6 @@ { "saves": [ - "main" + "main", + "gug" ] } \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 2e27c1b..1c09c54 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -396,9 +396,15 @@ void addTrigger(Trigger trigger) { } void testTriggers(std::vector args) { - for(Trigger trigger : triggers) { + for(int i = 0; i < triggers.size(); i++) { + Trigger trigger = triggers[i]; + if(trigger.condition(args)) { trigger.result(args); + + if(trigger.selfdelete) { + triggers.erase(triggers.begin() + i); + } } } } diff --git a/todo.txt b/todo.txt index 1ca9275..d83f704 100644 --- a/todo.txt +++ b/todo.txt @@ -19,6 +19,8 @@ - [x] add save renaming and copy } + + [ ] acheivements { - [x] add interface functions @@ -27,3 +29,4 @@ - [ ] add the rest - [ ] make acheivements save } +