Add NPC and items walking.
This commit is contained in:
@@ -85,12 +85,12 @@ func left_double_click_on_item(item_global_id : String, event : InputEvent) -> v
|
||||
## INVENTORY ##
|
||||
func left_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
|
||||
escoria.do("item_left_click", [inventory_item_global_id, event])
|
||||
if escoria.esc_runner.current_action == "use":
|
||||
var item = escoria.esc_runner.get_object(inventory_item_global_id)
|
||||
if item.texture:
|
||||
$ui/verbs_layer/verbs_menu.set_tool_texture(item.texture)
|
||||
elif item.inventory_item_scene_file.instance().texture_normal:
|
||||
$ui/verbs_layer/verbs_menu.set_tool_texture(item.inventory_item_scene_file.instance().texture_normal)
|
||||
# if escoria.esc_runner.current_action == "use":
|
||||
# var item = escoria.esc_runner.get_object(inventory_item_global_id)
|
||||
# if item.texture:
|
||||
# $ui/verbs_layer/verbs_menu.set_tool_texture(item.texture)
|
||||
# elif item.inventory_item_scene_file.instance().texture_normal:
|
||||
# $ui/verbs_layer/verbs_menu.set_tool_texture(item.inventory_item_scene_file.instance().texture_normal)
|
||||
|
||||
|
||||
func right_click_on_inventory_item(inventory_item_global_id : String, event : InputEvent) -> void:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/template_scenes/label/action_target_tooltip.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory_ui.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory/inventory_ui.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/verbs_menu.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://addons/escoria-core/game/scenes/dialogs/dialog_player.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/game.gd" type="Script" id=5]
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
[ext_resource path="res://addons/escoria-core/game/scenes/inventory/inventory_ui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://game/items/ESCORIA_ALL_ITEMS.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory_ui_container.gd" type="Script" id=3]
|
||||
|
||||
[ext_resource path="res://game/ui/ui_9verbs/inventory/inventory_ui_container.gd" type="Script" id=3]
|
||||
|
||||
[node name="inventory_ui" type="Control"]
|
||||
script = ExtResource( 1 )
|
||||
@@ -33,5 +32,5 @@ custom_constants/hseparation = 16
|
||||
columns = 4
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="all_items" parent="." instance=ExtResource( 2 )]
|
||||
[node name="ESCORIA_ALL_ITEMS" parent="." instance=ExtResource( 2 )]
|
||||
position = Vector2( 269.391, 275.003 )
|
||||
Reference in New Issue
Block a user