feat: Rewrote inventory handling basing on ESCItems (#417)

Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
Dennis Ploeger
2021-10-21 21:56:25 +02:00
committed by GitHub
parent 0271046421
commit af26521d3d
35 changed files with 245 additions and 336 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

View File

@@ -7,9 +7,9 @@
[ext_resource path="res://game/rooms/room05/item_wall/item_wall.tscn" type="PackedScene" id=5]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=6]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_item.gd" type="Script" id=7]
[ext_resource path="res://game/items/escitems/r5_wrench.tscn" type="PackedScene" id=8]
[ext_resource path="res://game/items/escitems/r5_empty_sheet.tscn" type="PackedScene" id=9]
[ext_resource path="res://game/items/escitems/r5_pen.tscn" type="PackedScene" id=10]
[ext_resource path="res://game/items/inventory/r5_wrench.tscn" type="PackedScene" id=8]
[ext_resource path="res://game/items/inventory/r5_empty_sheet.tscn" type="PackedScene" id=9]
[ext_resource path="res://game/items/inventory/r5_pen.tscn" type="PackedScene" id=10]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=11]
[sub_resource type="NavigationPolygon" id=1]
@@ -140,24 +140,18 @@ __meta__ = {
}
[node name="wrench" parent="Hotspots" instance=ExtResource( 8 )]
pause_mode = 1
position = Vector2( 257.269, 435.892 )
interaction_direction = 2
animations = null
[node name="Position2D" type="Position2D" parent="Hotspots/wrench"]
position = Vector2( -77.4207, 0 )
script = ExtResource( 11 )
[node name="pen" parent="Hotspots" instance=ExtResource( 10 )]
pause_mode = 1
position = Vector2( 909.908, 443.451 )
animations = null
[node name="empty_sheet" parent="Hotspots" instance=ExtResource( 9 )]
pause_mode = 1
position = Vector2( 1059.84, 440.932 )
animations = null
[node name="player_start" type="Position2D" parent="."]
position = Vector2( 76.7617, 437.649 )

View File

@@ -85,9 +85,11 @@ tracks/2/keys = {
}
[node name="closet" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
default_action = "use"
dialog_color = Color( 1, 1, 1, 1 )
animations = null
[node name="base" type="Line2D" parent="."]
position = Vector2( 1.12247, 0 )

View File

@@ -10,7 +10,7 @@
[ext_resource path="res://game/rooms/room02/button/button.tscn" type="PackedScene" id=8]
[ext_resource path="res://game/rooms/room09/r_door.tscn" type="PackedScene" id=9]
[ext_resource path="res://game/items/textures/genericItem_color_127.png" type="Texture" id=10]
[ext_resource path="res://game/items/escitems/r9_bottle.tscn" type="PackedScene" id=11]
[ext_resource path="res://game/items/inventory/r9_bottle.tscn" type="PackedScene" id=11]
[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=12]
[sub_resource type="NavigationPolygon" id=1]
@@ -95,12 +95,10 @@ position = Vector2( 1198.65, 391.058 )
script = ExtResource( 12 )
[node name="r9_closet_left" parent="Hotspots" instance=ExtResource( 5 )]
pause_mode = 1
position = Vector2( 435.233, 64.1518 )
global_id = "r9_closet_left"
esc_script = "res://game/rooms/room09/esc/closet_left.esc"
tooltip_name = "Left closet"
animations = null
[node name="Position2D" type="Position2D" parent="Hotspots/r9_closet_left"]
position = Vector2( 69.9246, 318.898 )
@@ -118,12 +116,10 @@ position = Vector2( -26.727, 543.448 )
script = ExtResource( 12 )
[node name="r9_closet_middle" parent="Hotspots" instance=ExtResource( 5 )]
pause_mode = 1
position = Vector2( 572.963, 65.2113 )
global_id = "r9_closet_middle"
esc_script = "res://game/rooms/room09/esc/closet_middle.esc"
tooltip_name = "Middle closet"
animations = null
[node name="Position2D" type="Position2D" parent="Hotspots/r9_closet_middle"]
position = Vector2( 65.6867, 317.839 )
@@ -141,12 +137,10 @@ position = Vector2( -26.727, 543.448 )
script = ExtResource( 12 )
[node name="r9_closet_right" parent="Hotspots" instance=ExtResource( 5 )]
pause_mode = 1
position = Vector2( 710.693, 66.2707 )
global_id = "r9_closet_right"
esc_script = "res://game/rooms/room09/esc/closet_right.esc"
tooltip_name = "Right closet"
animations = null
[node name="Position2D" type="Position2D" parent="Hotspots/r9_closet_right"]
position = Vector2( 64.6273, 316.779 )
@@ -194,6 +188,7 @@ esc_script = "res://game/rooms/room09/esc/stand.esc"
interaction_direction = 2
tooltip_name = "Stand"
default_action = "look"
inventory_texture = ExtResource( 10 )
dialog_color = Color( 1, 1, 1, 1 )
animations = null