diff --git a/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd b/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd index 41697618..d409dfa8 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd @@ -27,7 +27,7 @@ func validate(arguments: Array): ] ) return false - if not escoria.globals_manager.get(arguments[0]) is int: + if not escoria.globals_manager.get_global(arguments[0]) is int: escoria.logger.report_errors( "inc_global: invalid global", [ diff --git a/addons/escoria-core/game/scenes/camera_player/esc_camera.gd b/addons/escoria-core/game/scenes/camera_player/esc_camera.gd index a7e2914f..15d356e9 100644 --- a/addons/escoria-core/game/scenes/camera_player/esc_camera.gd +++ b/addons/escoria-core/game/scenes/camera_player/esc_camera.gd @@ -195,7 +195,7 @@ func target_reached(): func _process(_delta): zoom_transform = self.get_canvas_transform() - if follow_target and not tween.is_active() and follow_target.has_moved(): + if is_instance_valid(follow_target) and not tween.is_active() and follow_target.has_moved(): self.global_position = follow_target.global_position func _ready(): diff --git a/addons/escoria-ui-simplemouse/game.gd b/addons/escoria-ui-simplemouse/game.gd index 3c10d6f5..79aac69f 100644 --- a/addons/escoria-ui-simplemouse/game.gd +++ b/addons/escoria-ui-simplemouse/game.gd @@ -42,13 +42,14 @@ func _enter_tree(): ## BACKGROUND ## func left_click_on_bg(position: Vector2) -> void: - escoria.do( - "walk", - [escoria.main.current_scene.player.global_id, position], - true - ) - $CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name("walk") - $CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture() + if escoria.main.current_scene.player: + escoria.do( + "walk", + [escoria.main.current_scene.player.global_id, position], + true + ) + $CanvasLayer/ui/HBoxContainer/verbs_menu.set_by_name("walk") + $CanvasLayer/ui/HBoxContainer/verbs_menu.clear_tool_texture() func right_click_on_bg(position: Vector2) -> void: mousewheel_action(1) diff --git a/project.godot b/project.godot index 1cdaa405..30a33ed0 100644 --- a/project.godot +++ b/project.godot @@ -672,7 +672,6 @@ ui/default_transition="curtain" ui/transition_paths=[ "res://addons/escoria-core/game/scenes/transitions/shaders/" ] ui/main_menu_scene="res://game/ui/commons/main_menu/main_menu.tscn" ui/pause_menu_scene="res://game/ui/commons/pause_menu/pause_menu.tscn" -internals/save_data="" [input]