From cf4e8d0629ea2bc47c7a64276c2987e08a83b5e5 Mon Sep 17 00:00:00 2001 From: milesthenerd Date: Tue, 9 Feb 2021 15:24:03 -0600 Subject: [PATCH] Log reset save fix --- objects/oControl.object.gmx | 3 +++ rooms/rm_a1h01.room.gmx | 2 +- scripts/sv6_get_logs.gml | 21 +++++++++++++++++---- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/objects/oControl.object.gmx b/objects/oControl.object.gmx index 5c6128f7..b3afd53e 100644 --- a/objects/oControl.object.gmx +++ b/objects/oControl.object.gmx @@ -395,6 +395,9 @@ global.canConnect = true; reset_map(); load_character_vars(); + +multitroidPalette = -1; +if (file_exists("mods/palettes/sPalMultitroid.png")) multitroidPalette = sprite_add("mods/palettes/sPalMultitroid.png", 1, false, false, 0, 0); diff --git a/rooms/rm_a1h01.room.gmx b/rooms/rm_a1h01.room.gmx index 01dc7369..e971d601 100644 --- a/rooms/rm_a1h01.room.gmx +++ b/rooms/rm_a1h01.room.gmx @@ -66,7 +66,7 @@ mus_change(musCaveAmbience); - + diff --git a/scripts/sv6_get_logs.gml b/scripts/sv6_get_logs.gml index 94991b13..01cb6f65 100644 --- a/scripts/sv6_get_logs.gml +++ b/scripts/sv6_get_logs.gml @@ -3,9 +3,22 @@ list = ds_list_create(); ds_list_read(list, base64_decode(file_text_read_string(argument0))); i = 0; j = 0; -repeat (50) { - global.log[j] = readline(); - global.newlog[j] = readline(); - j += 1; +if(!instance_exists(oClient)){ + repeat (50) { + global.log[j] = readline(); + global.newlog[j] = readline(); + j += 1; + } +} else if(instance_exists(oClient) && global.lastroom == gameoverroom){ + //don't reset values +} else if(instance_exists(oClient) && global.lastroom != gameoverroom && string_count("rm_a", room_get_name(global.lastroom)) == 0){ + repeat (50) { + global.log[j] = readline(); + global.newlog[j] = readline(); + j += 1; + } +} else if(instance_exists(oClient) && global.lastroom != gameoverroom && string_count("rm_a", room_get_name(global.lastroom)) > 0){ + //don't reset values } + ds_list_clear(list);