Merge branch 'develop' of github.com:godot-escoria/escoria-demo-game into develop
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## [4.0.0-alpha.3](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.3) (2021-10-19)
|
||||
|
||||
|
||||
|
||||
## [4.0.0-alpha.2](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.2) (2021-10-17)
|
||||
|
||||
|
||||
|
||||
@@ -83,6 +83,10 @@ func run(command_params: Array) -> int:
|
||||
]
|
||||
)
|
||||
|
||||
if escoria.main.current_scene \
|
||||
and escoria.game_scene.get_parent() == escoria.main.current_scene:
|
||||
escoria.main.current_scene.remove_child(escoria.game_scene)
|
||||
|
||||
# Load room scene
|
||||
var room_scene = res_room.instance()
|
||||
if room_scene:
|
||||
|
||||
@@ -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",
|
||||
[
|
||||
|
||||
@@ -40,9 +40,9 @@ func set_scene(p_scene: Node) -> void:
|
||||
if current_scene != null:
|
||||
clear_scene()
|
||||
|
||||
add_child(p_scene)
|
||||
if not p_scene in get_children():
|
||||
add_child(p_scene)
|
||||
move_child(p_scene, 0)
|
||||
|
||||
current_scene = p_scene
|
||||
check_game_scene_methods()
|
||||
|
||||
@@ -59,7 +59,8 @@ func clear_scene() -> void:
|
||||
escoria.action_manager.clear_current_action()
|
||||
escoria.action_manager.clear_current_tool()
|
||||
|
||||
current_scene.remove_child(escoria.game_scene)
|
||||
if escoria.game_scene.get_parent() == current_scene:
|
||||
current_scene.remove_child(escoria.game_scene)
|
||||
|
||||
remove_child(current_scene)
|
||||
current_scene.free()
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -39,7 +39,7 @@ onready var pause_menu = $ui/pause_menu
|
||||
onready var inventory_ui = $ui/Control/panel_down/VBoxContainer/HBoxContainer\
|
||||
/InventoryMargin/inventory_ui
|
||||
|
||||
func _ready():
|
||||
func _enter_tree():
|
||||
ProjectSettings.set_setting("escoria/ui/tooltip_follows_mouse", false)
|
||||
escoria.action_manager.connect(
|
||||
"action_finished",
|
||||
@@ -47,6 +47,13 @@ func _ready():
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
func _exit_tree():
|
||||
escoria.action_manager.disconnect(
|
||||
"action_finished",
|
||||
self,
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
|
||||
## BACKGROUND ##
|
||||
|
||||
|
||||
@@ -38,17 +38,24 @@ func _enter_tree():
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
func _exit_tree():
|
||||
escoria.action_manager.disconnect(
|
||||
"action_finished",
|
||||
self,
|
||||
"_on_action_finished"
|
||||
)
|
||||
|
||||
## 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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user