diff options
| author | Radio <radiohotline@disroot.org> | 2026-06-26 16:47:44 +0300 |
|---|---|---|
| committer | Radio <radiohotline@disroot.org> | 2026-06-26 16:47:44 +0300 |
| commit | 6d53d8cac78250dc888aa49d5f9d4175c6652feb (patch) | |
| tree | f7f625e260ecc03fa5f4949495f96cdb6c35a0fb /game | |
| parent | 9d74b49ab62908d4acf53dde444413886b8b28e5 (diff) | |
Diffstat (limited to 'game')
33 files changed, 633 insertions, 153 deletions
diff --git a/game/characters/weener/weener.tscn b/game/characters/weener/weener.tscn index f23c0b6..177db42 100644 --- a/game/characters/weener/weener.tscn +++ b/game/characters/weener/weener.tscn @@ -151,10 +151,6 @@ region = Rect2(480, 0, 24, 70) atlas = ExtResource("2_36mur") region = Rect2(504, 0, 24, 70) -[sub_resource type="AtlasTexture" id="AtlasTexture_cshop"] -atlas = ExtResource("2_36mur") -region = Rect2(96, 0, 24, 70) - [sub_resource type="AtlasTexture" id="AtlasTexture_52qbr"] atlas = ExtResource("2_36mur") region = Rect2(216, 0, 24, 70) @@ -175,10 +171,6 @@ region = Rect2(288, 0, 24, 70) atlas = ExtResource("2_36mur") region = Rect2(312, 0, 24, 70) -[sub_resource type="AtlasTexture" id="AtlasTexture_l2x7x"] -atlas = ExtResource("2_36mur") -region = Rect2(48, 0, 24, 70) - [sub_resource type="SpriteFrames" id="SpriteFrames_v8qy8"] animations = [{ "frames": [{ @@ -262,9 +254,6 @@ animations = [{ }, { "duration": 1.0, "texture": SubResource("AtlasTexture_v0kwc") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_cshop") }], "loop": true, "name": &"walkleft", @@ -285,9 +274,6 @@ animations = [{ }, { "duration": 1.0, "texture": SubResource("AtlasTexture_f5jre") -}, { -"duration": 1.0, -"texture": SubResource("AtlasTexture_l2x7x") }], "loop": true, "name": &"walkright", @@ -304,6 +290,7 @@ script = ExtResource("1_sgupy") global_id = "weener" is_movable = true combine_when_selected_action_is_in = PackedStringArray() +speed = 400 animations = SubResource("Resource_n3rnq") animations = SubResource("Resource_n3rnq") metadata/_custom_type_script = "uid://btrr8e33hu0i4" @@ -313,7 +300,6 @@ position = Vector2(0, -228) scale = Vector2(6.487256, 6.487256) sprite_frames = SubResource("SpriteFrames_v8qy8") animation = &"idlefront" -frame_progress = 0.54350686 [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1357362817] position = Vector2(0, -221) diff --git a/game/items/escitems/button.tscn b/game/items/escitems/button.tscn deleted file mode 100644 index ae0e27f..0000000 --- a/game/items/escitems/button.tscn +++ /dev/null @@ -1,96 +0,0 @@ -[gd_scene load_steps=11 format=3 uid="uid://1kxo8k6wdlaq"] - -[ext_resource type="Script" uid="uid://dshelmw7y44qg" path="res://addons/escoria-core/game/core-scripts/esc_item.gd" id="1"] -[ext_resource type="Texture2D" uid="uid://cag2tv2frq5vj" path="res://game/rooms/room03/smoke.png" id="2"] - -[sub_resource type="Gradient" id="1"] -offsets = PackedFloat32Array(0, 0.830189) -colors = PackedColorArray(1, 1, 1, 1, 0.353516, 0.353516, 0.353516, 1) - -[sub_resource type="GradientTexture2D" id="8"] -gradient = SubResource("1") - -[sub_resource type="Curve" id="3"] -_data = [Vector2(0, 0.0886364), 0.0, 0.0, 0, 0, Vector2(0.612766, 1), 0.0, 0.0, 0, 0, Vector2(0.770213, 0.95), -1.55372, -1.55372, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] -point_count = 4 - -[sub_resource type="CurveTexture" id="9"] -curve = SubResource("3") - -[sub_resource type="ParticleProcessMaterial" id="5"] -lifetime_randomness = 0.2 -emission_shape = 1 -emission_sphere_radius = 1.0 -gravity = Vector3(0, -9.81, 0) -scale_min = 0.0 -scale_max = 0.0 -scale_curve = SubResource("9") -color_ramp = SubResource("8") - -[sub_resource type="Animation" id="6"] -resource_name = "button_broken" -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("GPUParticles2D:emitting") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} - -[sub_resource type="Animation" id="7"] -resource_name = "button_repaired" -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("GPUParticles2D:emitting") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_frgsd"] -_data = { -&"button_broken": SubResource("6"), -&"button_repaired": SubResource("7") -} - -[node name="button" type="Area2D"] -process_mode = 1 -script = ExtResource("1") -tooltip_name = "Button" -default_action = "use" -combine_when_selected_action_is_in = PackedStringArray() - -[node name="lines" type="Line2D" parent="."] -position = Vector2(0, -266.591) -points = PackedVector2Array(322.305, 390.985, 322.305, 439.068, 368.698, 440.037, 368.974, 392.399, 319.028, 391.549) - -[node name="Polygon2D" type="Polygon2D" parent="lines"] -visible = false -polygon = PackedVector2Array(343.993, 396.767, 323.298, 415.689, 344.585, 438.158, 365.872, 417.463) - -[node name="GPUParticles2D" type="GPUParticles2D" parent="."] -position = Vector2(344.768, 142.144) -amount = 16 -process_material = SubResource("5") -texture = ExtResource("2") -lifetime = 4.0 -preprocess = 1.99 -speed_scale = 1.39 - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_frgsd") -} - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] -polygon = PackedVector2Array(319.633, 122.126, 320.427, 177.685, 371.224, 176.098, 372.811, 121.332) diff --git a/game/items/inventory/bedroom_key.png b/game/items/inventory/bedroom_key.png Binary files differnew file mode 100644 index 0000000..923b98b --- /dev/null +++ b/game/items/inventory/bedroom_key.png diff --git a/game/items/inventory/bedroom_key.png.import b/game/items/inventory/bedroom_key.png.import new file mode 100644 index 0000000..1b37151 --- /dev/null +++ b/game/items/inventory/bedroom_key.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c8h5lqmmj85rh" +path="res://.godot/imported/bedroom_key.png-2e179147a0f3d0d8a4a5b68add31fc38.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/items/inventory/bedroom_key.png" +dest_files=["res://.godot/imported/bedroom_key.png-2e179147a0f3d0d8a4a5b68add31fc38.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/items/inventory/bedroom_key.tscn b/game/items/inventory/bedroom_key.tscn new file mode 100644 index 0000000..a000b07 --- /dev/null +++ b/game/items/inventory/bedroom_key.tscn @@ -0,0 +1,25 @@ +[gd_scene format=3 uid="uid://82ug41f2lrp0"] + +[ext_resource type="Script" uid="uid://dshelmw7y44qg" path="res://addons/escoria-core/game/core-scripts/esc_item.gd" id="1_gjb1h"] +[ext_resource type="Texture2D" uid="uid://c8h5lqmmj85rh" path="res://game/items/inventory/bedroom_key.png" id="2_yhmn0"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_h4mlh"] +size = Vector2(72, 64) + +[node name="BedroomKey" type="Area2D" unique_id=1153424946] +process_mode = 1 +script = ExtResource("1_gjb1h") +global_id = "bedroom_key" +tooltip_name = "Key" +combine_when_selected_action_is_in = PackedStringArray("use") +default_action_inventory = "use" +use_from_inventory_only = true +inventory_texture = ExtResource("2_yhmn0") +inventory_texture_hovered = ExtResource("2_yhmn0") +metadata/_custom_type_script = "uid://dshelmw7y44qg" + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1910913009] +texture = ExtResource("2_yhmn0") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1834458177] +shape = SubResource("RectangleShape2D_h4mlh") diff --git a/game/items/inventory/knife.esc b/game/items/inventory/knife.esc new file mode 100644 index 0000000..fbd0154 --- /dev/null +++ b/game/items/inventory/knife.esc @@ -0,0 +1,6 @@ +:look + say($weener, "pointy") + +:pickup + inventory_add("knife") + set_active("knife", false) diff --git a/game/items/inventory/knife.png b/game/items/inventory/knife.png Binary files differnew file mode 100644 index 0000000..cd773df --- /dev/null +++ b/game/items/inventory/knife.png diff --git a/game/items/textures/bottle.png.import b/game/items/inventory/knife.png.import index fcb5fbc..0878b18 100644 --- a/game/items/textures/bottle.png.import +++ b/game/items/inventory/knife.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://ddomp71uwr167" -path="res://.godot/imported/bottle.png-83a76946d26b818becdd62da99e8ebe6.ctex" +uid="uid://clj3yokn678qq" +path="res://.godot/imported/knife.png-dc0a03fb2c2e6f87bc9f6f18a05b7e80.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://game/items/textures/bottle.png" -dest_files=["res://.godot/imported/bottle.png-83a76946d26b818becdd62da99e8ebe6.ctex"] +source_file="res://game/items/inventory/knife.png" +dest_files=["res://.godot/imported/knife.png-dc0a03fb2c2e6f87bc9f6f18a05b7e80.ctex"] [params] diff --git a/game/items/inventory/knife.tscn b/game/items/inventory/knife.tscn new file mode 100644 index 0000000..0516711 --- /dev/null +++ b/game/items/inventory/knife.tscn @@ -0,0 +1,27 @@ +[gd_scene format=3 uid="uid://6wgnuvvjsloy"] + +[ext_resource type="Script" uid="uid://dshelmw7y44qg" path="res://addons/escoria-core/game/core-scripts/esc_item.gd" id="1_wstns"] +[ext_resource type="Texture2D" uid="uid://clj3yokn678qq" path="res://game/items/inventory/knife.png" id="2_ur0l8"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_pideq"] +size = Vector2(156, 70) + +[node name="Knife" type="Area2D" unique_id=1205297015] +process_mode = 1 +script = ExtResource("1_wstns") +global_id = "knife" +esc_script = "res://game/items/inventory/knife.esc" +tooltip_name = "Knife" +combine_when_selected_action_is_in = PackedStringArray("use") +default_action_inventory = "use" +use_from_inventory_only = true +inventory_texture = ExtResource("2_ur0l8") +inventory_texture_hovered = ExtResource("2_ur0l8") +metadata/_custom_type_script = "uid://dshelmw7y44qg" + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1569248865] +texture = ExtResource("2_ur0l8") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1118525312] +position = Vector2(1, -2) +shape = SubResource("RectangleShape2D_pideq") diff --git a/game/items/inventory/test_paper.esc b/game/items/inventory/test_paper.esc new file mode 100644 index 0000000..2a26b6e --- /dev/null +++ b/game/items/inventory/test_paper.esc @@ -0,0 +1,5 @@ +:look + say($weener, "it's a paper.") + +:pickup + say($weener, "i'll add this to my notebook.") diff --git a/game/items/inventory/test_paper.jpg b/game/items/inventory/test_paper.jpg Binary files differnew file mode 100644 index 0000000..5c41bc6 --- /dev/null +++ b/game/items/inventory/test_paper.jpg diff --git a/game/items/inventory/test_paper.jpg.import b/game/items/inventory/test_paper.jpg.import new file mode 100644 index 0000000..5e9b28a --- /dev/null +++ b/game/items/inventory/test_paper.jpg.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dm3bpd5t4oi3y" +path="res://.godot/imported/test_paper.jpg-317013e0cdccc90e909e1e88fd0d0af4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/items/inventory/test_paper.jpg" +dest_files=["res://.godot/imported/test_paper.jpg-317013e0cdccc90e909e1e88fd0d0af4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/items/inventory/test_paper.tscn b/game/items/inventory/test_paper.tscn new file mode 100644 index 0000000..8b31c26 --- /dev/null +++ b/game/items/inventory/test_paper.tscn @@ -0,0 +1,25 @@ +[gd_scene format=3 uid="uid://dsb48nt40bbpf"] + +[ext_resource type="Script" uid="uid://dshelmw7y44qg" path="res://addons/escoria-core/game/core-scripts/esc_item.gd" id="1_cdh0x"] +[ext_resource type="Texture2D" uid="uid://dm3bpd5t4oi3y" path="res://game/items/inventory/test_paper.jpg" id="2_gwc8f"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_840op"] +size = Vector2(163, 104) + +[node name="TestPaper" type="Area2D" unique_id=1483834240] +process_mode = 1 +script = ExtResource("1_cdh0x") +global_id = "test_paper" +esc_script = "res://game/items/inventory/test_paper.esc" +combine_when_selected_action_is_in = PackedStringArray() +inventory_texture = ExtResource("2_gwc8f") +inventory_texture_hovered = ExtResource("2_gwc8f") +metadata/_custom_type_script = "uid://dshelmw7y44qg" + +[node name="Sprite2D" type="Sprite2D" parent="." unique_id=961181129] +scale = Vector2(0.5536649, 0.55366486) +texture = ExtResource("2_gwc8f") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=86929053] +position = Vector2(-0.5, 0) +shape = SubResource("RectangleShape2D_840op") diff --git a/game/items/keepsakes/test_page.jpg b/game/items/keepsakes/test_page.jpg Binary files differnew file mode 100644 index 0000000..c45fd5e --- /dev/null +++ b/game/items/keepsakes/test_page.jpg diff --git a/game/items/keepsakes/test_page.jpg.import b/game/items/keepsakes/test_page.jpg.import new file mode 100644 index 0000000..18d0a37 --- /dev/null +++ b/game/items/keepsakes/test_page.jpg.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bm6tn8hhei51k" +path="res://.godot/imported/test_page.jpg-e86133b2f3039c60bd6ef2ea8846d960.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/items/keepsakes/test_page.jpg" +dest_files=["res://.godot/imported/test_page.jpg-e86133b2f3039c60bd6ef2ea8846d960.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/items/textures/bottle.png b/game/items/textures/bottle.png Binary files differdeleted file mode 100644 index 87babdd..0000000 --- a/game/items/textures/bottle.png +++ /dev/null diff --git a/game/rooms/test/exit_to_corridor.esc b/game/rooms/test/exit_to_corridor.esc new file mode 100644 index 0000000..0415c24 --- /dev/null +++ b/game/rooms/test/exit_to_corridor.esc @@ -0,0 +1,14 @@ +:use + if $bedroom_key in inventory: + say($weener, "i might have the key for this") + else: + say($weener, "it's locked") + +:use bedroom_key + say($weener, "unlocked") + inventory_remove("bedroom_key") + set_global("bedroom_door_unlocked", true) + +:exit_scene + if bedroom_door_unlocked: + say($weener, "I'm leaving now.") diff --git a/game/rooms/test/test.tscn b/game/rooms/test/test.tscn index b4e62b5..7258c1b 100644 --- a/game/rooms/test/test.tscn +++ b/game/rooms/test/test.tscn @@ -8,14 +8,13 @@ [ext_resource type="Script" uid="uid://beh3ds4eapldu" path="res://addons/escoria-core/game/core-scripts/esc_location.gd" id="6_4gqel"] [ext_resource type="Script" uid="uid://dshelmw7y44qg" path="res://addons/escoria-core/game/core-scripts/esc_item.gd" id="7_agkbc"] [ext_resource type="Script" uid="uid://chu4bvqgwxuts" path="res://addons/escoria-core/game/core-scripts/esc_interaction_location.gd" id="8_54mxh"] -[ext_resource type="Texture2D" uid="uid://ddomp71uwr167" path="res://game/items/textures/bottle.png" id="10_wafjj"] -[ext_resource type="PackedScene" uid="uid://cgs614ewjs78u" path="res://game/items/inventory/pen.tscn" id="11_co1tc"] +[ext_resource type="PackedScene" uid="uid://dsb48nt40bbpf" path="res://game/items/inventory/test_paper.tscn" id="10_vcumm"] [ext_resource type="Script" uid="uid://btt4cprco53ec" path="res://addons/escoria-core/game/core-scripts/esc_exit.gd" id="11_wafjj"] [sub_resource type="NavigationPolygon" id="NavigationPolygon_4gqel"] -vertices = PackedVector2Array(628, 674.8125, 672.3281, 669.1797, 694.1797, 842, 628, 724.78906, 1171.6484, 842, 1800.4766, 889.4375, 1911, 984.5781, 1911, 1070, 11, 1070, 11, 928.21094, 1237.8828, 683.8203, 1526.5469, 757.4375, 346.09375, 796.0469, 211.74219, 787.8828, 301.64844, 753.59375) -polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 5, 6, 7, 8, 9, 2), PackedInt32Array(4, 10, 11, 5), PackedInt32Array(12, 3, 2, 9), PackedInt32Array(13, 14, 12, 9)]) -outlines = Array[PackedVector2Array]([PackedVector2Array(1, 923, 207, 779, 304, 742, 349, 785, 618, 717, 618, 666, 681, 658, 703, 832, 1165, 832, 1232, 672, 1530, 748, 1806, 881, 1921, 980, 1921, 1080, 1, 1080)]) +vertices = PackedVector2Array(1171.6484, 842, 1800.4766, 889.4375, 1911, 984.5781, 1911, 1070, 11, 1070, 11, 928.21094, 694.1797, 842, 622, 674.89844, 672.3203, 669.0625, 622, 726.7969, 1237.8828, 683.8203, 1526.5469, 757.4375, 346.07813, 796.03906, 211.74219, 787.8828, 301.64844, 753.59375) +polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3, 4, 5, 6), PackedInt32Array(7, 8, 6, 9), PackedInt32Array(0, 10, 11, 1), PackedInt32Array(12, 9, 6, 5), PackedInt32Array(13, 14, 12, 5)]) +outlines = Array[PackedVector2Array]([PackedVector2Array(1, 923, 207, 779, 304, 742, 349, 785, 612, 719, 612, 666, 681, 658, 703, 832, 1165, 832, 1232, 672, 1530, 748, 1806, 881, 1921, 980, 1921, 1080, 1, 1080)]) [node name="Test" type="Node2D" unique_id=1166794] script = ExtResource("1_jhg43") @@ -64,37 +63,7 @@ position = Vector2(565, 767) script = ExtResource("8_54mxh") metadata/_custom_type_script = "uid://chu4bvqgwxuts" -[node name="Bottle" type="Area2D" parent="." unique_id=1730354307] -process_mode = 1 -z_index = 1048 -position = Vector2(1549, 997) -script = ExtResource("7_agkbc") -global_id = "bottle" -combine_when_selected_action_is_in = PackedStringArray() -is_interactive = false -inventory_texture = ExtResource("10_wafjj") -inventory_texture_hovered = ExtResource("10_wafjj") -metadata/_custom_type_script = "uid://dshelmw7y44qg" - -[node name="Sprite2D" type="Sprite2D" parent="Bottle" unique_id=1797859338] -position = Vector2(0, -171) -scale = Vector2(10.689665, 7.0120864) -texture = ExtResource("10_wafjj") - -[node name="Pen" parent="." unique_id=1638794728 instance=ExtResource("11_co1tc")] -position = Vector2(1824, 614) -scale = Vector2(2, 2) -tooltip_name = "Pen" -combine_when_selected_action_is_in = PackedStringArray("use") -default_action_inventory = "use" -use_from_inventory_only = true - -[node name="ESCInteractionLocation" type="Marker2D" parent="Pen" unique_id=46124229] -position = Vector2(-44.5, 141.5) -script = ExtResource("8_54mxh") -metadata/_custom_type_script = "uid://chu4bvqgwxuts" - -[node name="ESCExit" type="Area2D" parent="." unique_id=1821249842] +[node name="ToKitchen" type="Area2D" parent="." unique_id=1821249842] position = Vector2(92, 675) script = ExtResource("11_wafjj") target_scene = "uid://dw2s1aomk3k0e" @@ -102,12 +71,39 @@ global_id = "exit_to_kitchen" tooltip_name = "To kitchen" metadata/_custom_type_script = "uid://btt4cprco53ec" -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ESCExit" unique_id=1151309996] +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ToKitchen" unique_id=1151309996] position = Vector2(59, 222) polygon = PackedVector2Array(33, -544, -151, -472, -151, 48, -106, 6, -10, -63, 51, -90) -[node name="ESCInteractionLocation" type="Marker2D" parent="ESCExit" unique_id=242339506] +[node name="ESCInteractionLocation" type="Marker2D" parent="ToKitchen" unique_id=242339506] position = Vector2(73, 222) script = ExtResource("8_54mxh") global_id = "test_exit" metadata/_custom_type_script = "uid://chu4bvqgwxuts" + +[node name="ToCorridor" type="Area2D" parent="." unique_id=2025536935] +process_mode = 1 +position = Vector2(1366, 516) +script = ExtResource("7_agkbc") +global_id = "exit_to_corridor" +esc_script = "res://game/rooms/test/exit_to_corridor.esc" +tooltip_name = "To corridor" +default_action = "use" +combine_when_selected_action_is_in = PackedStringArray() +metadata/_custom_type_script = "uid://dshelmw7y44qg" + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ToCorridor" unique_id=992774431] +polygon = PackedVector2Array(-119, -217, 144, -201, 138, 230, -133, 163) + +[node name="ESCInteractionLocation" type="Marker2D" parent="ToCorridor" unique_id=1430757307] +position = Vector2(-23, 246) +script = ExtResource("8_54mxh") +metadata/_custom_type_script = "uid://chu4bvqgwxuts" + +[node name="TestPaper" parent="." unique_id=1483834240 instance=ExtResource("10_vcumm")] +position = Vector2(1749, 612) + +[node name="ESCInteractionLocation" type="Marker2D" parent="TestPaper" unique_id=1246233789] +position = Vector2(-73, 262) +script = ExtResource("8_54mxh") +metadata/_custom_type_script = "uid://chu4bvqgwxuts" diff --git a/game/rooms/test_kitchen/fridge.esc b/game/rooms/test_kitchen/fridge.esc new file mode 100644 index 0000000..2e38107 --- /dev/null +++ b/game/rooms/test_kitchen/fridge.esc @@ -0,0 +1,7 @@ +:use + if not kitchen_fridge_open: + set_global("kitchen_fridge_open", true) + set_state($fridge, "open") + set_interactive($fridge, false) + set_active("meat", true) + diff --git a/game/rooms/test_kitchen/fridge_open.png b/game/rooms/test_kitchen/fridge_open.png Binary files differnew file mode 100644 index 0000000..9280ba4 --- /dev/null +++ b/game/rooms/test_kitchen/fridge_open.png diff --git a/game/rooms/test_kitchen/fridge_open.png.import b/game/rooms/test_kitchen/fridge_open.png.import new file mode 100644 index 0000000..3c195e0 --- /dev/null +++ b/game/rooms/test_kitchen/fridge_open.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdh3khodwfocq" +path="res://.godot/imported/fridge_open.png-8d32a6ff2cc19190051418a0b06fc615.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/rooms/test_kitchen/fridge_open.png" +dest_files=["res://.godot/imported/fridge_open.png-8d32a6ff2cc19190051418a0b06fc615.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/rooms/test_kitchen/meat.esc b/game/rooms/test_kitchen/meat.esc new file mode 100644 index 0000000..05b1c95 --- /dev/null +++ b/game/rooms/test_kitchen/meat.esc @@ -0,0 +1,7 @@ +:look + say($weener, "smells meaty") + +:use $knife + say($weener, "cut meat") + inventory_add("bedroom_key") + set_state($meat, "cut") diff --git a/game/rooms/test_kitchen/meat.png b/game/rooms/test_kitchen/meat.png Binary files differnew file mode 100644 index 0000000..bd5d93b --- /dev/null +++ b/game/rooms/test_kitchen/meat.png diff --git a/game/rooms/test_kitchen/meat.png.import b/game/rooms/test_kitchen/meat.png.import new file mode 100644 index 0000000..e25b9b9 --- /dev/null +++ b/game/rooms/test_kitchen/meat.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://658831x6b335" +path="res://.godot/imported/meat.png-32034b8696612ea9d4a8dc15b76555f2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/rooms/test_kitchen/meat.png" +dest_files=["res://.godot/imported/meat.png-32034b8696612ea9d4a8dc15b76555f2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/rooms/test_kitchen/meat_cut.png b/game/rooms/test_kitchen/meat_cut.png Binary files differnew file mode 100644 index 0000000..d3987bb --- /dev/null +++ b/game/rooms/test_kitchen/meat_cut.png diff --git a/game/rooms/test_kitchen/meat_cut.png.import b/game/rooms/test_kitchen/meat_cut.png.import new file mode 100644 index 0000000..0057fe7 --- /dev/null +++ b/game/rooms/test_kitchen/meat_cut.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://6tdftr3g7sjb" +path="res://.godot/imported/meat_cut.png-e1cc44bead08b202eb55266dba12725e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/rooms/test_kitchen/meat_cut.png" +dest_files=["res://.godot/imported/meat_cut.png-e1cc44bead08b202eb55266dba12725e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/rooms/test_kitchen/room_kitchen.esc b/game/rooms/test_kitchen/room_kitchen.esc index c50f2fd..ce097c1 100644 --- a/game/rooms/test_kitchen/room_kitchen.esc +++ b/game/rooms/test_kitchen/room_kitchen.esc @@ -2,3 +2,10 @@ if ESC_LAST_SCENE == "test": teleport($weener, $kitchen_exit) set_angle($weener, 270) + global kitchen_fridge_open = false + if kitchen_fridge_open: + set_state($fridge, "open") + set_active($meat, true) + else: + set_state($fridge, "closed") + set_active($meat, false) diff --git a/game/rooms/test_kitchen/test_kitchen.tscn b/game/rooms/test_kitchen/test_kitchen.tscn index 688c363..6dfccac 100644 --- a/game/rooms/test_kitchen/test_kitchen.tscn +++ b/game/rooms/test_kitchen/test_kitchen.tscn @@ -7,12 +7,68 @@ [ext_resource type="Script" uid="uid://5pbcieq7gpdo" path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" id="5_xa5sy"] [ext_resource type="Script" uid="uid://btt4cprco53ec" path="res://addons/escoria-core/game/core-scripts/esc_exit.gd" id="6_u6s3a"] [ext_resource type="Script" uid="uid://chu4bvqgwxuts" path="res://addons/escoria-core/game/core-scripts/esc_interaction_location.gd" id="7_t26dx"] +[ext_resource type="Script" uid="uid://dshelmw7y44qg" path="res://addons/escoria-core/game/core-scripts/esc_item.gd" id="8_xa5sy"] +[ext_resource type="Script" uid="uid://bxc3dll30x8tl" path="res://addons/escoria-core/game/core-scripts/resources/esc_directionangle.gd" id="9_dt0hh"] +[ext_resource type="Script" uid="uid://clixil1u5exq7" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationname.gd" id="10_fe81x"] +[ext_resource type="Script" uid="uid://sksvt0n8gle2" path="res://addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd" id="11_amw8i"] +[ext_resource type="Texture2D" uid="uid://cdh3khodwfocq" path="res://game/rooms/test_kitchen/fridge_open.png" id="12_amw8i"] +[ext_resource type="Texture2D" uid="uid://658831x6b335" path="res://game/rooms/test_kitchen/meat.png" id="12_fe81x"] +[ext_resource type="PackedScene" uid="uid://6wgnuvvjsloy" path="res://game/items/inventory/knife.tscn" id="14_12u0m"] +[ext_resource type="Texture2D" uid="uid://6tdftr3g7sjb" path="res://game/rooms/test_kitchen/meat_cut.png" id="14_fcxgd"] [sub_resource type="NavigationPolygon" id="NavigationPolygon_kamrl"] vertices = PackedVector2Array(1910, 739.21094, 1910, 924.2969, 1732.2266, 896.4375, 1764.6719, 710.34375, 854.9922, 1028.0234, 819.60156, 981.1328, 809.28906, 895.1875, 919.78125, 897.10156, 1560.5391, 1031.9766, 1072.9063, 626.2969, 1131.9063, 571.97656, 1752.8125, 570.02344) polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3), PackedInt32Array(4, 5, 6, 7, 8), PackedInt32Array(8, 7, 9, 10, 11, 3, 2)]) outlines = Array[PackedVector2Array]([PackedVector2Array(1920, 731, 1774, 702, 1762, 560, 1128, 562, 1065, 620, 914, 887, 798, 885, 810, 985, 850, 1038, 1564, 1042, 1735, 907, 1920, 936)]) +[sub_resource type="Resource" id="Resource_12u0m"] +script = ExtResource("11_amw8i") +metadata/_custom_type_script = "uid://sksvt0n8gle2" + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_kamrl"] +size = Vector2(251, 390) + +[sub_resource type="SpriteFrames" id="SpriteFrames_12u0m"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": null +}], +"loop": true, +"name": &"closed", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("12_amw8i") +}], +"loop": true, +"name": &"open", +"speed": 5.0 +}] + +[sub_resource type="SpriteFrames" id="SpriteFrames_adbso"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("14_fcxgd") +}], +"loop": true, +"name": &"cut", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("12_fe81x") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_fe81x"] +radius = 148.05405 + [node name="TestKitchen" type="Node2D" unique_id=205166811] script = ExtResource("1_j38dn") global_id = "kitchen" @@ -51,3 +107,63 @@ position = Vector2(-92, -12) script = ExtResource("7_t26dx") global_id = "kitchen_exit" metadata/_custom_type_script = "uid://chu4bvqgwxuts" + +[node name="Fridge" type="Area2D" parent="." unique_id=116880532] +process_mode = 1 +position = Vector2(1625, 366) +script = ExtResource("8_xa5sy") +global_id = "fridge" +esc_script = "res://game/rooms/test_kitchen/fridge.esc" +tooltip_name = "Fridge" +default_action = "use" +combine_when_selected_action_is_in = PackedStringArray() +animations = SubResource("Resource_12u0m") +animations = SubResource("Resource_12u0m") +metadata/_custom_type_script = "uid://dshelmw7y44qg" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Fridge" unique_id=1589893458] +position = Vector2(-3.5, 7) +shape = SubResource("RectangleShape2D_kamrl") + +[node name="ESCInteractionLocation" type="Marker2D" parent="Fridge" unique_id=1860551682] +position = Vector2(9, 240) +script = ExtResource("7_t26dx") +metadata/_custom_type_script = "uid://chu4bvqgwxuts" + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Fridge" unique_id=882120147] +position = Vector2(-11.000012, 11.00001) +scale = Vector2(0.82963437, 0.88099635) +sprite_frames = SubResource("SpriteFrames_12u0m") +animation = &"closed" + +[node name="Meat" type="Area2D" parent="." unique_id=1963782541] +process_mode = 1 +position = Vector2(1629, 404) +script = ExtResource("8_xa5sy") +global_id = "meat" +esc_script = "res://game/rooms/test_kitchen/meat.esc" +tooltip_name = "Meat" +combine_when_selected_action_is_in = PackedStringArray() +inventory_texture = ExtResource("12_fe81x") +inventory_texture_hovered = ExtResource("12_fe81x") +metadata/_custom_type_script = "uid://dshelmw7y44qg" + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Meat" unique_id=1970847390] +sprite_frames = SubResource("SpriteFrames_adbso") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Meat" unique_id=1975018981] +shape = SubResource("CircleShape2D_fe81x") + +[node name="ESCInteractionLocation" type="Marker2D" parent="Meat" unique_id=19889791] +position = Vector2(6, 198) +script = ExtResource("7_t26dx") +metadata/_custom_type_script = "uid://chu4bvqgwxuts" + +[node name="Knife" parent="." unique_id=1205297015 instance=ExtResource("14_12u0m")] +position = Vector2(899, 539) +default_action = "pickup" + +[node name="ESCInteractionLocation" type="Marker2D" parent="Knife" unique_id=680222161] +position = Vector2(158, 195) +script = ExtResource("7_t26dx") +metadata/_custom_type_script = "uid://chu4bvqgwxuts" diff --git a/game/ui/inventory.tscn b/game/ui/inventory.tscn new file mode 100644 index 0000000..37a50eb --- /dev/null +++ b/game/ui/inventory.tscn @@ -0,0 +1,35 @@ +[gd_scene format=3 uid="uid://d0dgknfues04m"] + +[ext_resource type="Script" uid="uid://b1l4nnky23hwo" path="res://addons/escoria-core/game/scenes/inventory/inventory_ui.gd" id="1_ygmfe"] +[ext_resource type="Texture2D" uid="uid://b2c30sw6t27l" path="res://game/ui/png/inventory_placeholder.png" id="2_enaw1"] +[ext_resource type="Script" uid="uid://c4syt26p7mg66" path="res://addons/escoria-core/ui_library/inventory/esc_inventory_container.gd" id="3_pu7jy"] + +[node name="Inventory" type="Control" unique_id=792363245] +layout_mode = 3 +anchors_preset = 0 +script = ExtResource("1_ygmfe") +inventory_ui_container = NodePath("Panel/MarginContainer/container") +metadata/_custom_type_script = "uid://b1l4nnky23hwo" + +[node name="Panel" type="TextureRect" parent="." unique_id=1352621934] +layout_mode = 0 +offset_left = 294.0 +offset_top = 885.0 +offset_right = 1626.0 +offset_bottom = 1080.0 +texture = ExtResource("2_enaw1") + +[node name="MarginContainer" type="MarginContainer" parent="Panel" unique_id=1779864502] +layout_mode = 0 +offset_left = 121.0 +offset_top = 65.0 +offset_right = 1188.0 +offset_bottom = 154.0 + +[node name="container" type="HBoxContainer" parent="Panel/MarginContainer" unique_id=242007930] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +mouse_filter = 2 +theme_override_constants/separation = 20 +script = ExtResource("3_pu7jy") diff --git a/game/ui/png/inventory_placeholder.png b/game/ui/png/inventory_placeholder.png Binary files differnew file mode 100644 index 0000000..0491ebb --- /dev/null +++ b/game/ui/png/inventory_placeholder.png diff --git a/game/ui/png/inventory_placeholder.png.import b/game/ui/png/inventory_placeholder.png.import new file mode 100644 index 0000000..a8c2e29 --- /dev/null +++ b/game/ui/png/inventory_placeholder.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b2c30sw6t27l" +path="res://.godot/imported/inventory_placeholder.png-6cb5ca7014c24967f09552c464b4da29.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/ui/png/inventory_placeholder.png" +dest_files=["res://.godot/imported/inventory_placeholder.png-6cb5ca7014c24967f09552c464b4da29.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/game/ui/png/notebook.png b/game/ui/png/notebook.png Binary files differnew file mode 100644 index 0000000..f370be9 --- /dev/null +++ b/game/ui/png/notebook.png diff --git a/game/ui/png/notebook.png.import b/game/ui/png/notebook.png.import new file mode 100644 index 0000000..786467f --- /dev/null +++ b/game/ui/png/notebook.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtierwvc17mlp" +path="res://.godot/imported/notebook.png-59a6f77ce7d5133fcdaf7b1b5873b30e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://game/ui/png/notebook.png" +dest_files=["res://.godot/imported/notebook.png-59a6f77ce7d5133fcdaf7b1b5873b30e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 |
