diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a6e495..ab148024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [4.0.0-alpha.120](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.120) (2022-03-07) + + + ## [4.0.0-alpha.119](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.119) (2022-03-07) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd index 4fcc66d9..e79f8baf 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd @@ -2,8 +2,8 @@ # # Events are triggered from various sources. Common events include # -# * :setup : This event is always the first to be called each time the room is visited. -# It allows elements in the room to be prepared *before* the room is displayed to the +# * :setup : This event is always the first to be called each time the room is visited. +# It allows elements in the room to be prepared *before* the room is displayed to the # player (e.g. starting particle effects). # * :ready : This event is the second to be called each time the room is visited. # It is run immediately after `:setup` finishes execution, if it exists. Otherwise, diff --git a/addons/escoria-ui-9verbs/game.gd b/addons/escoria-ui-9verbs/game.gd index 52c99b23..a00e936f 100644 --- a/addons/escoria-ui-9verbs/game.gd +++ b/addons/escoria-ui-9verbs/game.gd @@ -115,15 +115,15 @@ func element_focused(element_id: String) -> void: # (see element_focused() and inventory_item_focused()) ESCActionManager.ACTION_INPUT_STATE.COMPLETED: return - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM, \ ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: tooltip.set_target(target_obj.tooltip_name) - + # Hovering an ESCItem highlights its default action if escoria.action_manager.current_action != VERB_USE and target_obj is ESCItem: verbs_menu.set_by_name(target_obj.default_action) - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: tooltip.set_target2(target_obj.tooltip_name) @@ -141,7 +141,7 @@ func element_unfocused() -> void: ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: tooltip.set_target("") verbs_menu.unselect_actions() - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: tooltip.set_target2("") @@ -166,12 +166,12 @@ func left_click_on_item(item_global_id: String, event: InputEvent) -> void: # (see element_focused() and inventory_item_focused()) ESCActionManager.ACTION_INPUT_STATE.COMPLETED: return - + # Just clicked on the item ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM, \ ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: tooltip.set_target(target_obj.tooltip_name) - + # Clicked on item and now we're awaiting a target item # This means we clicked the tool and we now need a target ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: @@ -214,12 +214,12 @@ func left_click_on_inventory_item(inventory_item_global_id: String, event: Input # (see element_focused() and inventory_item_focused()) ESCActionManager.ACTION_INPUT_STATE.COMPLETED: return - + # Just clicked on the inventory item: do nothing special ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM, \ ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: return - + # Clicked on inventory item and now we're awaiting a target item # This means we clicked the tool and we now need a target ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: @@ -242,7 +242,7 @@ func inventory_item_focused(inventory_item_global_id: String) -> void: var target_obj = escoria.object_manager.get_object( inventory_item_global_id ).node - + match escoria.action_manager.action_state: # Don't change the tooltip if an action input is completed # (ie verb+item(+target)) because the action is now being executed @@ -250,15 +250,15 @@ func inventory_item_focused(inventory_item_global_id: String) -> void: # (see element_focused() and inventory_item_focused()) ESCActionManager.ACTION_INPUT_STATE.COMPLETED: return - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM, \ ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: tooltip.set_target(target_obj.tooltip_name) - + # Hovering an ESCItem highlights its default action if escoria.action_manager.current_action != VERB_USE and target_obj is ESCItem: verbs_menu.set_by_name(target_obj.default_action) - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: tooltip.set_target2(target_obj.tooltip_name) @@ -270,12 +270,12 @@ func inventory_item_unfocused() -> void: # Don't change the tooltip if an action input is completed # (ie verb+item(+target)) because the action is now being executed return - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM, \ ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: tooltip.set_target("") verbs_menu.unselect_actions() - + ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: tooltip.set_target2("") @@ -313,7 +313,7 @@ func hide_main_menu(): if get_node(main_menu).visible: get_node(main_menu).hide() show_ui() - + func show_main_menu(): if not get_node(main_menu).visible: hide_ui() diff --git a/addons/escoria-ui-9verbs/verbs_menu.gd b/addons/escoria-ui-9verbs/verbs_menu.gd index f28fdfc6..80442f4d 100644 --- a/addons/escoria-ui-9verbs/verbs_menu.gd +++ b/addons/escoria-ui-9verbs/verbs_menu.gd @@ -30,5 +30,5 @@ func set_by_name(action_name: String): selected_action = action_name for but in get_children(): but.set_pressed(but.get_name() == action_name) - + diff --git a/addons/escoria-ui-simplemouse/game.gd b/addons/escoria-ui-simplemouse/game.gd index 92a87c18..0a4ba009 100644 --- a/addons/escoria-ui-simplemouse/game.gd +++ b/addons/escoria-ui-simplemouse/game.gd @@ -140,7 +140,7 @@ func left_click_on_inventory_item(inventory_item_global_id: String, event: Input $mouse_layer/verbs_menu.set_tool_texture( item.inventory_item.texture_normal ) - + func right_click_on_inventory_item(inventory_item_global_id: String, event: InputEvent) -> void: mousewheel_action(1) diff --git a/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd b/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd index b37e2d0f..df40d821 100644 --- a/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd +++ b/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd @@ -17,7 +17,7 @@ func _on_inventory_button_pressed(): hide_inventory() else: show_inventory() - + func show_inventory(): $FloatingInventory/InventoryTween.stop_all() diff --git a/addons/escoria-ui-simplemouse/verbs_mouseicons.gd b/addons/escoria-ui-simplemouse/verbs_mouseicons.gd index 0ae7ae7d..39df5aef 100644 --- a/addons/escoria-ui-simplemouse/verbs_mouseicons.gd +++ b/addons/escoria-ui-simplemouse/verbs_mouseicons.gd @@ -29,7 +29,7 @@ func iterate_actions_cursor(direction: int): current_cursor_id = 0 elif current_cursor_id < 0: current_cursor_id = cursors.size() - 1 - + Input.set_custom_mouse_cursor(cursors[current_cursor_id].texture) escoria.action_manager.set_current_action(cursors[current_cursor_id].name) if $mouse_position/tool.texture != null: @@ -40,7 +40,7 @@ func set_by_name(name: String) -> void: if cursors[i].name == name: current_cursor_id = i break - + Input.set_custom_mouse_cursor(cursors[current_cursor_id].texture) escoria.action_manager.set_current_action(cursors[current_cursor_id].name)