From e16899a5289e86c3764f19868e4cc8ffd3eefc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20G=C3=B3mez=20Maitret?= Date: Fri, 19 Jun 2020 14:17:06 -0500 Subject: [PATCH] You can now update counters with 'C'. --- Project/DexTool.yyp | 20 ++++++++++++++++++- Project/scripts/button_do/button_do.gml | 10 ++-------- Project/scripts/counter_set/counter_set.gml | 2 ++ Project/scripts/counter_set/counter_set.yy | 8 ++++++++ .../scripts/counter_update/counter_update.gml | 3 +++ .../scripts/counter_update/counter_update.yy | 8 ++++++++ .../scripts/shortcut_check/shortcut_check.gml | 1 + .../e8dd30c9-50fd-43ce-9594-4568eb99fad7.yy | 4 +++- 8 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 Project/scripts/counter_set/counter_set.gml create mode 100644 Project/scripts/counter_set/counter_set.yy create mode 100644 Project/scripts/counter_update/counter_update.gml create mode 100644 Project/scripts/counter_update/counter_update.yy diff --git a/Project/DexTool.yyp b/Project/DexTool.yyp index de6ac70..5830d79 100644 --- a/Project/DexTool.yyp +++ b/Project/DexTool.yyp @@ -20494,6 +20494,14 @@ "resourceType": "GMIncludedFile" } }, + { + "Key": "eb71b0d2-5a4d-719e-167d-6e8e811f2d65", + "Value": { + "id": "b7bfe89c-c2e0-2f06-b9e0-17fbd86a21da", + "resourcePath": "scripts\\counter_update\\counter_update.yy", + "resourceType": "GMScript" + } + }, { "Key": "eb822fe6-ffde-4966-90c4-dee3b6e99c8a", "Value": { @@ -21054,6 +21062,14 @@ "resourceType": "GMIncludedFile" } }, + { + "Key": "f1e445e1-be26-e33a-7ab0-ce20a37f3677", + "Value": { + "id": "76b1e4a7-6df5-3875-453e-6b1f4a41bd3a", + "resourcePath": "scripts\\counter_set\\counter_set.yy", + "resourceType": "GMScript" + } + }, { "Key": "f2064518-5634-49ad-806b-24fbd289273c", "Value": { @@ -22489,7 +22505,9 @@ "a7ef39a4-ac5a-45bb-7ded-c0562f4f4d23", "4bee5f27-7512-964a-379d-a45443f42683", "9cd5f278-7287-1058-6ab4-3030cbba04a4", - "86a11d15-9ba9-ef00-cd20-52b16a03bd31" + "86a11d15-9ba9-ef00-cd20-52b16a03bd31", + "eb71b0d2-5a4d-719e-167d-6e8e811f2d65", + "f1e445e1-be26-e33a-7ab0-ce20a37f3677" ], "tutorial": "" } \ No newline at end of file diff --git a/Project/scripts/button_do/button_do.gml b/Project/scripts/button_do/button_do.gml index 274ab22..b0d61b4 100644 --- a/Project/scripts/button_do/button_do.gml +++ b/Project/scripts/button_do/button_do.gml @@ -12,19 +12,13 @@ switch(argument0) case but.plus: global.counter++; - - global.countdata[global.selecting.idno] = global.counter; - savedata_write(savedata_section_get(global.show_shiny)+" Count", global.selecting.idno, global.counter); - change_add(); + counter_update(); break; case but.minus: if (global.counter > 0) global.counter--; - - global.countdata[global.selecting.idno] = global.counter; - savedata_write(savedata_section_get(global.show_shiny)+" Count", global.selecting.idno, global.counter); - change_add(); + counter_update(); break; case but.image: diff --git a/Project/scripts/counter_set/counter_set.gml b/Project/scripts/counter_set/counter_set.gml new file mode 100644 index 0000000..e23fa1f --- /dev/null +++ b/Project/scripts/counter_set/counter_set.gml @@ -0,0 +1,2 @@ +global.counter = get_string("Set Counter:", global.counter); +counter_update(); \ No newline at end of file diff --git a/Project/scripts/counter_set/counter_set.yy b/Project/scripts/counter_set/counter_set.yy new file mode 100644 index 0000000..f9a6222 --- /dev/null +++ b/Project/scripts/counter_set/counter_set.yy @@ -0,0 +1,8 @@ +{ + "id": "f1e445e1-be26-e33a-7ab0-ce20a37f3677", + "modelName": "GMScript", + "mvc": "1.0", + "name": "counter_set", + "IsCompatibility": false, + "IsDnD": false +} \ No newline at end of file diff --git a/Project/scripts/counter_update/counter_update.gml b/Project/scripts/counter_update/counter_update.gml new file mode 100644 index 0000000..27bde66 --- /dev/null +++ b/Project/scripts/counter_update/counter_update.gml @@ -0,0 +1,3 @@ +global.countdata[global.selecting.idno] = global.counter; +savedata_write(savedata_section_get(global.show_shiny)+" Count", global.selecting.idno, global.counter); +change_add(); \ No newline at end of file diff --git a/Project/scripts/counter_update/counter_update.yy b/Project/scripts/counter_update/counter_update.yy new file mode 100644 index 0000000..36c4b69 --- /dev/null +++ b/Project/scripts/counter_update/counter_update.yy @@ -0,0 +1,8 @@ +{ + "id": "eb71b0d2-5a4d-719e-167d-6e8e811f2d65", + "modelName": "GMScript", + "mvc": "1.0", + "name": "counter_update", + "IsCompatibility": false, + "IsDnD": false +} \ No newline at end of file diff --git a/Project/scripts/shortcut_check/shortcut_check.gml b/Project/scripts/shortcut_check/shortcut_check.gml index a3135d3..bf94596 100644 --- a/Project/scripts/shortcut_check/shortcut_check.gml +++ b/Project/scripts/shortcut_check/shortcut_check.gml @@ -4,6 +4,7 @@ if (keyboard_check_pressed(ord("G"))) show_dex_toggle(); else if (keyboard_check_pressed(ord("I"))) make_screenshot(); else if (keyboard_check_pressed(ord("S"))) show_shiny_toggle(); +else if (keyboard_check_pressed(ord("C"))) counter_set(); // Plus and Minus var key_plus = 107; diff --git a/Project/views/e8dd30c9-50fd-43ce-9594-4568eb99fad7.yy b/Project/views/e8dd30c9-50fd-43ce-9594-4568eb99fad7.yy index 40a0b9b..1c057d1 100644 --- a/Project/views/e8dd30c9-50fd-43ce-9594-4568eb99fad7.yy +++ b/Project/views/e8dd30c9-50fd-43ce-9594-4568eb99fad7.yy @@ -74,7 +74,9 @@ "a7ef39a4-ac5a-45bb-7ded-c0562f4f4d23", "4bee5f27-7512-964a-379d-a45443f42683", "9cd5f278-7287-1058-6ab4-3030cbba04a4", - "86a11d15-9ba9-ef00-cd20-52b16a03bd31" + "86a11d15-9ba9-ef00-cd20-52b16a03bd31", + "eb71b0d2-5a4d-719e-167d-6e8e811f2d65", + "f1e445e1-be26-e33a-7ab0-ce20a37f3677" ], "filterType": "GMScript", "folderName": "scripts",