diff --git a/godot/savegame/save_game.gd b/godot/savegame/save_game.gd index a54bfdb..bc881e3 100644 --- a/godot/savegame/save_game.gd +++ b/godot/savegame/save_game.gd @@ -24,12 +24,12 @@ static func save_game(tree:SceneTree): print("Saving game to user://" + SAVE_GAME_TEMPLATE) - var save_game = null + var save_file = null if OS.is_debug_build(): - save_game = FileAccess.open("user://" + SAVE_GAME_TEMPLATE, FileAccess.WRITE) + save_file = FileAccess.open("user://" + SAVE_GAME_TEMPLATE, FileAccess.WRITE) else: - save_game = FileAccess.open_encrypted_with_pass("user://" + SAVE_GAME_TEMPLATE, FileAccess.WRITE, ENCRYPTION_KEY) + save_file = FileAccess.open_encrypted_with_pass("user://" + SAVE_GAME_TEMPLATE, FileAccess.WRITE, ENCRYPTION_KEY) var save_nodes = tree.get_nodes_in_group(SAVE_GROUP_NAME) @@ -79,7 +79,7 @@ static func save_game(tree:SceneTree): save_data["node_data"] = node.call("save_data") # Store the save dictionary as a new line in the save file. - save_game.store_line(JSON.new().stringify(save_data)) + save_file.store_line(JSON.stringify(save_data)) static func load_game(tree:SceneTree) -> void: @@ -101,17 +101,17 @@ static func load_game(tree:SceneTree) -> void: # Load the file line by line and process that dictionary to restore # the object it represents. - var save_game = null + var save_file = null if OS.is_debug_build(): - save_game = FileAccess.open("user://" + SAVE_GAME_TEMPLATE, FileAccess.READ) + save_file = FileAccess.open("user://" + SAVE_GAME_TEMPLATE, FileAccess.READ) else: - save_game = FileAccess.open_encrypted_with_pass("user://" + SAVE_GAME_TEMPLATE, FileAccess.READ, ENCRYPTION_KEY) + save_file = FileAccess.open_encrypted_with_pass("user://" + SAVE_GAME_TEMPLATE, FileAccess.READ, ENCRYPTION_KEY) - while save_game.get_position() < save_game.get_length(): + while save_file.get_position() < save_file.get_length(): # Get the saved dictionary from the next line in the save file var test_json_conv = JSON.new() - test_json_conv.parse(save_game.get_line()) + test_json_conv.parse(save_file.get_line()) var save_data = test_json_conv.get_data() # Firstly, we need to create the object and add it to the tree and set its position. diff --git a/godot/scenes/boot/bootsplash_scene.gd b/godot/scenes/boot/bootsplash_scene.gd index 4825600..58f0858 100644 --- a/godot/scenes/boot/bootsplash_scene.gd +++ b/godot/scenes/boot/bootsplash_scene.gd @@ -20,7 +20,7 @@ func _ready(): .from(0.0)\ .finished.connect(_fade_out) -func _process(delta): +func _process(_delta): if interuptable and Input.is_action_just_pressed("exit"): _change_scene() diff --git a/godot/scenes/game_settings_scene.gd b/godot/scenes/game_settings_scene.gd index 8029a5d..fa4625d 100644 --- a/godot/scenes/game_settings_scene.gd +++ b/godot/scenes/game_settings_scene.gd @@ -11,7 +11,7 @@ func _ready(): return_button.grab_focus() func _on_fade_overlay_on_complete_fade_out(): - get_tree().change_scene_to_file("res://scenes/MainMenuScene.tscn") + get_tree().change_scene_to_file("res://scenes/main_menu_scene.tscn") func _on_return_button_pressed(): overlay.fade_out() diff --git a/godot/ui/components/float_range_game_settings_option.gd b/godot/ui/components/float_range_game_settings_option.gd index 605eaae..384c5f8 100644 --- a/godot/ui/components/float_range_game_settings_option.gd +++ b/godot/ui/components/float_range_game_settings_option.gd @@ -7,7 +7,7 @@ var initialised = false func _ready(): value = UserSettings.get_value(property) -func _on_float_range_game_settings_option_value_changed(value): +func _on_float_range_game_settings_option_value_changed(val): if !initialised: initialised = true - UserSettings.set_value(property, value) + UserSettings.set_value(property, val)