diff --git a/CogsPartyLauncher/scenes/main.tscn b/CogsPartyLauncher/scenes/main.tscn index 33a7b1b..1efe3fe 100644 --- a/CogsPartyLauncher/scenes/main.tscn +++ b/CogsPartyLauncher/scenes/main.tscn @@ -219,6 +219,7 @@ layout_mode = 2 size_flags_horizontal = 3 [node name="PlayButton" type="Button" parent="Menus/PlayerSelectMenu/HBoxContainer"] +custom_minimum_size = Vector2(200, 80) layout_mode = 2 size_flags_horizontal = 4 theme_override_font_sizes/font_size = 36 diff --git a/CogsPartyLauncher/scripts/game_entry.gd b/CogsPartyLauncher/scripts/game_entry.gd index eb2df33..3c5bab2 100644 --- a/CogsPartyLauncher/scripts/game_entry.gd +++ b/CogsPartyLauncher/scripts/game_entry.gd @@ -70,8 +70,8 @@ func construct(_game_data: Dictionary): if rel_build_location is String: if build is String and build in SUPPORTED_BUILDS: var build_location = game_data.directory_path + "/" + rel_build_location - if not FileAccess.file_exists(build_location): - errors.append("No file found at location '%s'" % build_location) + if not FileAccess.file_exists(build_location) and not DirAccess.dir_exists_absolute(build_location): + errors.append("No file/folder found at location '%s'" % build_location) else: errors.append("Failed to parse build: '%s'" % build) else: diff --git a/GameMakerTestGame/objects/o_minigame_manager/Create_0.gml b/GameMakerTestGame/objects/o_minigame_manager/Create_0.gml index ad4bfca..d13ef68 100644 --- a/GameMakerTestGame/objects/o_minigame_manager/Create_0.gml +++ b/GameMakerTestGame/objects/o_minigame_manager/Create_0.gml @@ -82,6 +82,7 @@ function apply_results(_results) { for (var i = 0; i < array_length(_results); i++) { var player_result = _results[i]; save_data.players[player_result.player].points += player_result.points; + player_data_array[player_result.player].points = save_data.players[player_result.player].points } // Add result to save_data games var game_result = { @@ -103,14 +104,15 @@ function apply_results(_results) { } var _init = function() { - // Parse cmd paramters for save file path + // Parse cmd parameters for save file path var p_num = parameter_count(); var file_path = ""; if (p_num > 0) { - for (var i = 0; i < p_num; i += 1) + for (var i = 0; i < p_num; i++) { var p_string = parameter_string(i + 1); + _print(string(" Arg[{0}]: {1}", i, p_string)); if (string_starts_with(p_string, "--savefile=")) { file_path = string_split(p_string, "=")[1]; } @@ -123,12 +125,13 @@ var _init = function() { try { if (file_path != "") { // String exists - var file = file_text_open_read(file_path); - var load_data = file_text_read_string(file); - file_text_close(file); + var file_buffer = buffer_load(file_path); + var load_data = buffer_read(file_buffer, buffer_string); + _print("Raw save file text:\n" + load_data); + buffer_delete(file_buffer); save_file_path = file_path; save_data = json_parse(load_data); - _print("Loaded save file data"); + _print("Loaded save file data from: " + file_path); } else { _print("Loaded dummy data"); } diff --git a/GodotTestGame/assets/rainbow_material.tres b/GodotTestGame/assets/rainbow_material.tres index 6c20c22..c201df3 100644 --- a/GodotTestGame/assets/rainbow_material.tres +++ b/GodotTestGame/assets/rainbow_material.tres @@ -1,4 +1,4 @@ -[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://b87yd308vxbfo"] +[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dhjxc32vn50nn"] [ext_resource type="Shader" path="res://assets/rainbow.gdshader" id="1_isb4a"]