diff --git a/CHANGELOG.md b/CHANGELOG.md index 36981710..4959aafd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [4.0.0-alpha.157](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.157) (2022-04-08) + + +### Bug Fixes + +* Avoid globals starting with 'i/' ([#556](https://github.com/godot-escoria/escoria-demo-game/issues/556)) ([05f139e](https://github.com/godot-escoria/escoria-demo-game/commit/05f139ef1af50a02182882e8724591d50537260f)) + + + ## [4.0.0-alpha.156](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.156) (2022-04-08) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd b/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd index b893ed56..f42f18aa 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd @@ -50,14 +50,14 @@ func run(command_params: Array) -> int: "", ESCTransitionPlayer.TRANSITION_MODE.OUT ) - + if transition_id != ESCTransitionPlayer.TRANSITION_ID_INSTANT: while yield( escoria.main.scene_transition, "transition_done" ) != transition_id: pass - + if command_params[0] == "main": escoria.game_scene.hide_main_menu() elif command_params[0] == "pause": diff --git a/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd b/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd index bed3b163..ed0c9469 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd @@ -49,14 +49,14 @@ func run(command_params: Array) -> int: "", ESCTransitionPlayer.TRANSITION_MODE.OUT ) - + if transition_id != ESCTransitionPlayer.TRANSITION_ID_INSTANT: while yield( escoria.main.scene_transition, "transition_done" ) != transition_id: pass - + if command_params[0] == "main": escoria.game_scene.show_main_menu() elif command_params[0] == "pause": diff --git a/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd index 9a44e3e6..60470f2a 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd @@ -137,7 +137,7 @@ func register_object(object: ESCObject, room: ESCRoom = null, force: bool = fals # changes. room_key.room_global_id = current_room_key.room_global_id room_key.room_instance_id = current_room_key.room_instance_id - + if not room_key.is_valid(): # This condition should very likely never happen. escoria.logger.report_errors( @@ -336,7 +336,7 @@ func unregister_object(object: ESCObject, room_key: ESCRoomObjectsKey) -> void: "part of a 'forced' registration, ignore this warning." ] ) - + return var room_objects = _get_room_objects_objects(room_key) @@ -473,13 +473,13 @@ func _object_exists_in_room(object: ESCObject, room_key: ESCRoomObjectsKey) -> b "Cannot check for null objects." ] ) - + return false for room_container in room_objects: if _compare_container_to_key(room_container, room_key) \ and room_container.objects.has(object.global_id): - + return true return false diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index d6b2f1df..8acfef83 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -84,7 +84,7 @@ func change_scene(room_path: String, enable_automatic_transitions: bool) -> void escoria.logger.debug( "Awaiting transition %s (out) to be finished." % transition_id ) - + yield(escoria.main.scene_transition, "transition_done") # Hide main and pause menus @@ -229,7 +229,7 @@ func init_room(room: ESCRoom) -> void: room, true ) - + if escoria.globals_manager.has( escoria.room_manager.GLOBAL_ANIMATION_RESOURCES ): @@ -293,7 +293,7 @@ func _perform_script_events(room: ESCRoom) -> void: rc = yield(escoria.event_manager, "event_finished") if rc[0] != ESCExecution.RC_OK: return rc[0] - + yielded = true # Hide main and pause menus @@ -364,7 +364,7 @@ func _perform_script_events(room: ESCRoom) -> void: rc = yield(escoria.event_manager, "event_finished") if rc[0] != ESCExecution.RC_OK: return rc[0] - + # Now that :ready is finished, if FORCE_LAST_SCENE_NULL was true, reset it # to false if escoria.globals_manager.get_global( \ diff --git a/addons/escoria-core/game/core-scripts/log/esc_logger.gd b/addons/escoria-core/game/core-scripts/log/esc_logger.gd index 7c5a4df2..20d309a3 100644 --- a/addons/escoria-core/game/core-scripts/log/esc_logger.gd +++ b/addons/escoria-core/game/core-scripts/log/esc_logger.gd @@ -205,7 +205,7 @@ func error(string: String, args = [], do_savegame: bool = true): _log(message, true) escoria.set_game_paused(true) - + if is_instance_valid(escoria.main.current_scene): escoria.main.current_scene.game.show_crash_popup(files_to_send) diff --git a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd index d1d91364..493db95c 100644 --- a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd +++ b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd @@ -296,7 +296,7 @@ func load_game(id: int): ## GLOBALS for k in save_game.globals.keys(): var global_value = save_game.globals[k] - + if global_value is String and global_value.empty(): global_value = "''" diff --git a/addons/escoria-core/game/escoria.gd b/addons/escoria-core/game/escoria.gd index 66a0189f..71c483ea 100644 --- a/addons/escoria-core/game/escoria.gd +++ b/addons/escoria-core/game/escoria.gd @@ -228,7 +228,7 @@ func set_game_paused(p_paused: bool): emit_signal("paused") else: emit_signal("resumed") - + var scene_tree = get_tree() if is_instance_valid(scene_tree): @@ -372,7 +372,7 @@ func _handle_direct_scene_run() -> void: if current_scene_root.filename == ProjectSettings.get_setting('application/run/main_scene'): # This is a normal, full-game run, so there's nothing to do. return - + if current_scene_root is ESCRoom: escoria.object_manager.set_current_room(current_scene_root) diff --git a/addons/escoria-core/game/main.gd b/addons/escoria-core/game/main.gd index 0480ce0b..99a46fd3 100644 --- a/addons/escoria-core/game/main.gd +++ b/addons/escoria-core/game/main.gd @@ -53,13 +53,13 @@ func set_scene(p_scene: Node) -> void: escoria.object_manager.set_current_room(p_scene) add_child(p_scene) - + # In cases where the room being created doesn't return because of a # coroutine, finish_current_scene_init() will already have been called # and so we don't want to risk repeating ourselves. if p_scene == current_scene: return - + # This actually moves the scene closest to the root node, but will # still be drawn behind the next node, which should be the previous # room. diff --git a/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd b/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd index baa372dd..52ff5187 100644 --- a/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd +++ b/addons/escoria-core/game/scenes/transitions/esc_transition_player.gd @@ -80,7 +80,7 @@ func transition( return TRANSITION_ID_INSTANT var material_path = get_transition(transition_name) - + material = ResourceLoader.load(get_transition(transition_name)) transition_id += 1 diff --git a/addons/escoria-ui-simplemouse/game.gd b/addons/escoria-ui-simplemouse/game.gd index 3a12c225..05cb75ea 100644 --- a/addons/escoria-ui-simplemouse/game.gd +++ b/addons/escoria-ui-simplemouse/game.gd @@ -209,7 +209,7 @@ func element_focused(element_id: String) -> void: if escoria.action_manager.current_action != VERB_USE \ and escoria.action_manager.current_tool == null \ and target_obj is ESCItem: - + $mouse_layer/verbs_menu.set_by_name( target_obj.default_action )