Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe1dd2bcc1 | |||
| 6e833a0735 | |||
| c52bfc8017 | |||
| 58c2be1db8 | |||
| c7c6e184d6 | |||
| 6a2355cf97 | |||
| 1d7f656ec4 | |||
| 1c5b585b3d | |||
| f1b980cdb6 | |||
| 8b77ca9bc5 | |||
| 8d616735f4 | |||
| 66848af8bf | |||
| 6ba26c360d | |||
| 63fd81e54d | |||
| b54f784d51 | |||
| 6194988bf0 |
@@ -17,6 +17,7 @@
|
|||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACount_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ffe5a7cee5a1771b89077bd73292de84439b4f816799e2ad6c2615c6ff5bd748e_003FCount_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACount_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ffe5a7cee5a1771b89077bd73292de84439b4f816799e2ad6c2615c6ff5bd748e_003FCount_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fjonathan_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fd4_003Fbd338aeb_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003Fhome_003Fjonathan_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fd4_003Fbd338aeb_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExportToolButtonAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003F31_003F3e05ef15_003FExportToolButtonAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExportToolButtonAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003F31_003F3e05ef15_003FExportToolButtonAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGD_005Fconstants_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fdf61b6148ca71eef8cf4e56545a9319fd2647f05d2f959dad42d9fcbe95192_003FGD_005Fconstants_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMustBeVariantAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fda_003Fbb06d681_003FMustBeVariantAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMustBeVariantAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe37dc1faf08a4d5ea030ad59bdf77522523400_003Fda_003Fbb06d681_003FMustBeVariantAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGD_005Fconstants_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4ef0bac6437b6a9567d44f62ae567d854fa7b8513ef7139ef349b49768bc9df_003FGD_005Fconstants_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGD_005Fconstants_002Ecs_002Fl_003AC_0021_003FUsers_003FJonathan_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003F4ef0bac6437b6a9567d44f62ae567d854fa7b8513ef7139ef349b49768bc9df_003FGD_005Fconstants_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ff1d69ec2da76ccf9bc8a75c8e0fdca9a7ba1adf8c8c9d5047e2fa5991c02eca_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANode_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Ff1d69ec2da76ccf9bc8a75c8e0fdca9a7ba1adf8c8c9d5047e2fa5991c02eca_003FNode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bovypw2hsn2nq"
|
||||||
|
path="res://.godot/imported/field_outline_1_outline.png-45f43538274c8b9489711c885b999170.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/masks/field_outline_1_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/field_outline_1_outline.png-45f43538274c8b9489711c885b999170.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
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://50qn027e5lvh"
|
||||||
|
path="res://.godot/imported/field_outline_2_outline.png-866d5c097a49b7c63eee72f4455558ee.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/masks/field_outline_2_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/field_outline_2_outline.png-866d5c097a49b7c63eee72f4455558ee.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
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://wjtvno2jj4nl"
|
||||||
|
path="res://.godot/imported/field_outline_3_outline.png-00e4af97c20bd898c6461491100baa4e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/masks/field_outline_3_outline.png"
|
||||||
|
dest_files=["res://.godot/imported/field_outline_3_outline.png-00e4af97c20bd898c6461491100baa4e.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
|
||||||
@@ -10,9 +10,8 @@ script = ExtResource("1_cu47d")
|
|||||||
_interactionArea = NodePath("InteractionArea")
|
_interactionArea = NodePath("InteractionArea")
|
||||||
_itemsToReactTo = Array[Object]([ExtResource("2_s5peo")])
|
_itemsToReactTo = Array[Object]([ExtResource("2_s5peo")])
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("3_wsetd")]
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("3_wsetd")]
|
||||||
_active = false
|
_spritesToOutline = [NodePath("../Sprite2D")]
|
||||||
_spriteToOutline = NodePath("../Sprite2D")
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
[gd_scene load_steps=16 format=3 uid="uid://sbf12hin4kes"]
|
[gd_scene load_steps=17 format=3 uid="uid://sbf12hin4kes"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bylgmr0skwtrs" path="res://art/farm/farming/farmobjekte/broken tools atlas.png" id="1_k4ca3"]
|
[ext_resource type="Texture2D" uid="uid://bylgmr0skwtrs" path="res://art/farm/farming/farmobjekte/broken tools atlas.png" id="1_k4ca3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_gcgfd"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_gcgfd"]
|
||||||
[ext_resource type="Script" uid="uid://dkk1vjijvgrd7" path="res://scripts/CSharp/Common/Items/NonInventoryPickup.cs" id="2_ic616"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://be6g8b3v3u1ai" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PickUp_01.wav" id="3_ktmp7"]
|
[ext_resource type="AudioStream" uid="uid://be6g8b3v3u1ai" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PickUp_01.wav" id="3_ktmp7"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cgjsajsdrrn0j" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PutDown_01.wav" id="4_ic616"]
|
[ext_resource type="AudioStream" uid="uid://cgjsajsdrrn0j" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PutDown_01.wav" id="4_ic616"]
|
||||||
[ext_resource type="AudioStream" uid="uid://br4drgupled6c" path="res://audio/sfx/Kitchen/SFX_Cooking_Pot_01.wav" id="5_dx175"]
|
[ext_resource type="AudioStream" uid="uid://br4drgupled6c" path="res://audio/sfx/Kitchen/SFX_Cooking_Pot_01.wav" id="5_dx175"]
|
||||||
@@ -14,6 +13,8 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://bc216pfieuc8h" path="res://audio/sfx/Kitchen/SFX_Cutlery_04.wav" id="11_kb03l"]
|
[ext_resource type="AudioStream" uid="uid://bc216pfieuc8h" path="res://audio/sfx/Kitchen/SFX_Cutlery_04.wav" id="11_kb03l"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dp6qen84ptlvx" path="res://audio/sfx/Kitchen/SFX_Cutlery_05.wav" id="12_kka6u"]
|
[ext_resource type="AudioStream" uid="uid://dp6qen84ptlvx" path="res://audio/sfx/Kitchen/SFX_Cutlery_05.wav" id="12_kka6u"]
|
||||||
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="13_wswkg"]
|
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="13_wswkg"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5dotkx17gvxg" path="res://scripts/CSharp/Low Code/Events/EventRaiser.cs" id="14_dx175"]
|
||||||
|
[ext_resource type="Resource" uid="uid://78t0o27g6aq6" path="res://resources/low code/interactables/event_PickedUpInteractable.tres" id="15_u7jgg"]
|
||||||
|
|
||||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_dich4"]
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_dich4"]
|
||||||
streams_count = 10
|
streams_count = 10
|
||||||
@@ -35,11 +36,10 @@ texture = ExtResource("1_k4ca3")
|
|||||||
offset = Vector2(1, -215)
|
offset = Vector2(1, -215)
|
||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(44, 479, 356, 503)
|
region_rect = Rect2(44, 479, 356, 503)
|
||||||
script = ExtResource("2_ic616")
|
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("2_gcgfd")]
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("2_gcgfd")]
|
||||||
position = Vector2(0, -172)
|
position = Vector2(0, -172)
|
||||||
_spriteToOutline = NodePath("..")
|
_spritesToOutline = [NodePath("..")]
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
||||||
stream = SubResource("AudioStreamRandomizer_dich4")
|
stream = SubResource("AudioStreamRandomizer_dich4")
|
||||||
@@ -47,6 +47,10 @@ bus = &"SFX"
|
|||||||
playback_type = 2
|
playback_type = 2
|
||||||
script = ExtResource("13_wswkg")
|
script = ExtResource("13_wswkg")
|
||||||
|
|
||||||
|
[node name="PickupAnimationEventRaiser" type="Node" parent="."]
|
||||||
|
script = ExtResource("14_dx175")
|
||||||
|
_eventResources = Array[Object]([ExtResource("15_u7jgg")])
|
||||||
|
|
||||||
[connection signal="Interacted" from="InteractionArea" to="." method="queue_free"]
|
[connection signal="Interacted" from="InteractionArea" to="." method="queue_free"]
|
||||||
[connection signal="Interacted" from="InteractionArea" to="." method="PlayPickupAnimation"]
|
|
||||||
[connection signal="Interacted" from="InteractionArea" to="AudioStreamPlayer2D" method="PlayOneShot"]
|
[connection signal="Interacted" from="InteractionArea" to="AudioStreamPlayer2D" method="PlayOneShot"]
|
||||||
|
[connection signal="Interacted" from="InteractionArea" to="PickupAnimationEventRaiser" method="RaiseEvents"]
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://ddpl8cbck7e6s"]
|
[gd_scene load_steps=8 format=3 uid="uid://ddpl8cbck7e6s"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d0kgxh4ykuv23" path="res://scripts/CSharp/Common/NPC/TalkingCharacter.cs" id="1_xix7p"]
|
[ext_resource type="Script" uid="uid://d0kgxh4ykuv23" path="res://scripts/CSharp/Common/NPC/TalkingCharacter.cs" id="1_xix7p"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_udjjv"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_udjjv"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bgba1uv0muxat" path="res://art/characters/chugeist_tmp.png" id="3_42og6"]
|
[ext_resource type="Texture2D" uid="uid://bgba1uv0muxat" path="res://art/characters/chugeist_tmp.png" id="3_42og6"]
|
||||||
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/simple_interactable_outline.tres" id="3_kd44q"]
|
|
||||||
[ext_resource type="Script" uid="uid://d2486x6upmwqq" path="res://scripts/GdScript/dialogic_starter.gd" id="43_xooq4"]
|
[ext_resource type="Script" uid="uid://d2486x6upmwqq" path="res://scripts/GdScript/dialogic_starter.gd" id="43_xooq4"]
|
||||||
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="44_v6w16"]
|
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="44_v6w16"]
|
||||||
|
|
||||||
@@ -21,11 +20,10 @@ z_index = 1
|
|||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
script = ExtResource("1_xix7p")
|
script = ExtResource("1_xix7p")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("2_udjjv")]
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("2_udjjv")]
|
||||||
position = Vector2(0, -450)
|
position = Vector2(0, -450)
|
||||||
scale = Vector2(2.805, 2.805)
|
scale = Vector2(2.805, 2.805)
|
||||||
_outlineMaterial = ExtResource("3_kd44q")
|
_spritesToOutline = [NodePath("../TalkingControl/Visual")]
|
||||||
_spriteToOutline = NodePath("../TalkingControl/Visual")
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
||||||
position = Vector2(-4.99109, 63.4581)
|
position = Vector2(-4.99109, 63.4581)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=482 format=3 uid="uid://c25udixd5m6l0"]
|
[gd_scene load_steps=486 format=3 uid="uid://c25udixd5m6l0"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b05uyj001ehwi" path="res://scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs" id="1_yd5ep"]
|
[ext_resource type="Script" uid="uid://b05uyj001ehwi" path="res://scripts/CSharp/Common/Farming/VesnaBehaviour2D.cs" id="1_yd5ep"]
|
||||||
[ext_resource type="Script" uid="uid://cjbclkxesh3hc" path="res://scripts/CSharp/Common/CharacterControls/PlayerMovement.cs" id="2_1vqmv"]
|
[ext_resource type="Script" uid="uid://cjbclkxesh3hc" path="res://scripts/CSharp/Common/CharacterControls/PlayerMovement.cs" id="2_1vqmv"]
|
||||||
@@ -272,11 +272,15 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://vahac0df0dhj" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0008.png" id="464_pbc3r"]
|
[ext_resource type="Texture2D" uid="uid://vahac0df0dhj" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0008.png" id="464_pbc3r"]
|
||||||
[ext_resource type="PackedScene" uid="uid://pflu0uaig7vv" path="res://prefabs/interactions/detection_cross.tscn" id="466_e04c3"]
|
[ext_resource type="PackedScene" uid="uid://pflu0uaig7vv" path="res://prefabs/interactions/detection_cross.tscn" id="466_e04c3"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b37lpqrsjjuc0" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0010.png" id="466_pw1ip"]
|
[ext_resource type="Texture2D" uid="uid://b37lpqrsjjuc0" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0010.png" id="466_pw1ip"]
|
||||||
|
[ext_resource type="Script" uid="uid://bc6uaaxsx5k5p" path="res://scripts/CSharp/Low Code/Events/EventListener.cs" id="467_8hbu5"]
|
||||||
[ext_resource type="Script" uid="uid://er03dkj8axlr" path="res://scripts/CSharp/Common/UI/WateringCanUi.cs" id="467_j4m0f"]
|
[ext_resource type="Script" uid="uid://er03dkj8axlr" path="res://scripts/CSharp/Common/UI/WateringCanUi.cs" id="467_j4m0f"]
|
||||||
[ext_resource type="Texture2D" uid="uid://oi11ax6tml6j" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0012.png" id="468_08021"]
|
[ext_resource type="Texture2D" uid="uid://oi11ax6tml6j" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0012.png" id="468_08021"]
|
||||||
|
[ext_resource type="Resource" uid="uid://b4hawvsc7cmkn" path="res://resources/low code/farming/event_newPlantCreated.tres" id="468_t1d6r"]
|
||||||
|
[ext_resource type="Resource" uid="uid://78t0o27g6aq6" path="res://resources/low code/interactables/event_PickedUpInteractable.tres" id="469_t1d6r"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dsjj23763pej5" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0014.png" id="470_bmmei"]
|
[ext_resource type="Texture2D" uid="uid://dsjj23763pej5" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0014.png" id="470_bmmei"]
|
||||||
[ext_resource type="AudioStream" uid="uid://ce5mxs2yrwgrh" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_01_R.wav" id="470_dnm27"]
|
[ext_resource type="AudioStream" uid="uid://ce5mxs2yrwgrh" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_01_R.wav" id="470_dnm27"]
|
||||||
[ext_resource type="Script" uid="uid://dx25g14a7xi4w" path="res://scripts/CSharp/Common/Audio/AudioPlayer.cs" id="471_2f15g"]
|
[ext_resource type="Script" uid="uid://dx25g14a7xi4w" path="res://scripts/CSharp/Common/Audio/AudioPlayer.cs" id="471_2f15g"]
|
||||||
|
[ext_resource type="Resource" uid="uid://tt3d166mntmi" path="res://resources/low code/farming/var_sceneNameProvider.tres" id="471_83c4i"]
|
||||||
[ext_resource type="AudioStream" uid="uid://fihv17va3r58" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_02_R.wav" id="471_e04c3"]
|
[ext_resource type="AudioStream" uid="uid://fihv17va3r58" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_02_R.wav" id="471_e04c3"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cvvjd2i6x047n" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_03_R.wav" id="472_g32y8"]
|
[ext_resource type="AudioStream" uid="uid://cvvjd2i6x047n" path="res://audio/sfx/Footsteps/Single/Gravel/Reverb/SFX_Footstep_Gravel_03_R.wav" id="472_g32y8"]
|
||||||
[ext_resource type="Texture2D" uid="uid://blh0t2ofqj2uq" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0016.png" id="472_wdxsr"]
|
[ext_resource type="Texture2D" uid="uid://blh0t2ofqj2uq" path="res://art/animation/Vesna2D/Vesna Anims Tools/F01-Idle-Gießkanne/0016.png" id="472_wdxsr"]
|
||||||
@@ -2082,6 +2086,7 @@ stream_6/stream = ExtResource("476_deeju")
|
|||||||
|
|
||||||
[node name="Vesna" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d", "_vesnaAnimations")]
|
[node name="Vesna" type="Node2D" node_paths=PackedStringArray("_farmingControls", "_player2d", "_vesnaAnimations")]
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
position = Vector2(0, 2)
|
||||||
script = ExtResource("1_yd5ep")
|
script = ExtResource("1_yd5ep")
|
||||||
_farmingControls = NodePath("FarmingControls")
|
_farmingControls = NodePath("FarmingControls")
|
||||||
_player2d = NodePath("CharacterBody2D")
|
_player2d = NodePath("CharacterBody2D")
|
||||||
@@ -2103,7 +2108,7 @@ position = Vector2(-24, -13)
|
|||||||
shape = SubResource("CircleShape2D_ssqtd")
|
shape = SubResource("CircleShape2D_ssqtd")
|
||||||
debug_color = Color(0.923708, 0.202722, 0.475262, 0.42)
|
debug_color = Color(0.923708, 0.202722, 0.475262, 0.42)
|
||||||
|
|
||||||
[node name="visuals" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_sprite", "_wateringParticles") groups=["Pickup", "PlantGrowing"]]
|
[node name="visuals" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_sprite", "_wateringParticles")]
|
||||||
position = Vector2(0, -374)
|
position = Vector2(0, -374)
|
||||||
script = ExtResource("3_f6xmn")
|
script = ExtResource("3_f6xmn")
|
||||||
_sprite = NodePath("Animated Sprites")
|
_sprite = NodePath("Animated Sprites")
|
||||||
@@ -2142,16 +2147,22 @@ scrollable = false
|
|||||||
[node name="DetectionCross" parent="CharacterBody2D" instance=ExtResource("466_e04c3")]
|
[node name="DetectionCross" parent="CharacterBody2D" instance=ExtResource("466_e04c3")]
|
||||||
position = Vector2(0, -200)
|
position = Vector2(0, -200)
|
||||||
|
|
||||||
|
[node name="PlantCreatedEventListener" type="Node" parent="CharacterBody2D"]
|
||||||
|
script = ExtResource("467_8hbu5")
|
||||||
|
_eventResources = Array[Object]([ExtResource("468_t1d6r")])
|
||||||
|
|
||||||
|
[node name="PickedUpInteractableListener" type="Node" parent="CharacterBody2D"]
|
||||||
|
script = ExtResource("467_8hbu5")
|
||||||
|
_eventResources = Array[Object]([ExtResource("469_t1d6r")])
|
||||||
|
|
||||||
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
|
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
|
||||||
script = ExtResource("817_6nrw3")
|
script = ExtResource("817_6nrw3")
|
||||||
|
_sceneKeyProvider = ExtResource("471_83c4i")
|
||||||
_fieldPrefab = ExtResource("818_16w6h")
|
_fieldPrefab = ExtResource("818_16w6h")
|
||||||
_movingPlayer = NodePath("../CharacterBody2D")
|
_movingPlayer = NodePath("../CharacterBody2D")
|
||||||
_wateringParticles = NodePath("../pouring water vfx")
|
_wateringParticles = NodePath("../pouring water vfx")
|
||||||
_wateringCanParticlesVerticalOffset = -100.0
|
_wateringCanParticlesVerticalOffset = -100.0
|
||||||
|
_fieldOffsetVector = Vector2i(735, 680)
|
||||||
[node name="dialogic toggle" type="Node2D" parent="."]
|
|
||||||
position = Vector2(0, 374)
|
|
||||||
script = ExtResource("819_4na52")
|
|
||||||
|
|
||||||
[node name="pouring water vfx" type="CPUParticles2D" parent="."]
|
[node name="pouring water vfx" type="CPUParticles2D" parent="."]
|
||||||
position = Vector2(-652, -599)
|
position = Vector2(-652, -599)
|
||||||
@@ -2192,9 +2203,9 @@ wait_time = 0.5
|
|||||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D/visuals" method="ActivateTool"]
|
[connection signal="PickedUpTool" from="." to="CharacterBody2D/visuals" method="ActivateTool"]
|
||||||
[connection signal="PickedUpTool" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
|
[connection signal="PickedUpTool" from="." to="CharacterBody2D/WateringCanUI" method="IsWateringCanActive"]
|
||||||
[connection signal="LookDirection" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="SetDirection"]
|
[connection signal="LookDirection" from="CharacterBody2D/visuals" to="CharacterBody2D/DetectionCross" method="SetDirection"]
|
||||||
|
[connection signal="EventRaised" from="CharacterBody2D/PlantCreatedEventListener" to="CharacterBody2D/visuals" method="PlayFarmingAnimation"]
|
||||||
|
[connection signal="EventRaised" from="CharacterBody2D/PickedUpInteractableListener" to="CharacterBody2D/visuals" method="PlayPickUpAnimation"]
|
||||||
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
|
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/visuals" method="PlayWateringAnimation"]
|
||||||
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/WateringCanUI" method="Water"]
|
[connection signal="WateringField" from="FarmingControls" to="CharacterBody2D/WateringCanUI" method="Water"]
|
||||||
[connection signal="timelineEnded" from="dialogic toggle" to="." method="EnableMovement"]
|
|
||||||
[connection signal="timelineStarted" from="dialogic toggle" to="." method="DisableMovement"]
|
|
||||||
[connection signal="timelineStarted" from="DialogicToggle" to="SFX/FootstepsAudio/Timer" method="stop"]
|
[connection signal="timelineStarted" from="DialogicToggle" to="SFX/FootstepsAudio/Timer" method="stop"]
|
||||||
[connection signal="timeout" from="SFX/FootstepsAudio/Timer" to="SFX/FootstepsAudio" method="PlayOneShot"]
|
[connection signal="timeout" from="SFX/FootstepsAudio/Timer" to="SFX/FootstepsAudio" method="PlayOneShot"]
|
||||||
|
|||||||
@@ -206,9 +206,9 @@ y_sort_enabled = true
|
|||||||
script = ExtResource("1_hn8at")
|
script = ExtResource("1_hn8at")
|
||||||
_sprite = NodePath("TalkingControl/AnimatedSprite")
|
_sprite = NodePath("TalkingControl/AnimatedSprite")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("42_ahrat")]
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("42_ahrat")]
|
||||||
position = Vector2(0, -450)
|
position = Vector2(0, -450)
|
||||||
_spriteToOutline = NodePath("../TalkingControl/AnimatedSprite")
|
_spritesToOutline = [NodePath("../TalkingControl/AnimatedSprite")]
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_at1n1")
|
shape = SubResource("CircleShape2D_at1n1")
|
||||||
|
|||||||
@@ -160,9 +160,9 @@ libraries = {
|
|||||||
&"": SubResource("AnimationLibrary_54k4r")
|
&"": SubResource("AnimationLibrary_54k4r")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("15_uo3dh")]
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("15_uo3dh")]
|
||||||
position = Vector2(18, -250)
|
position = Vector2(18, -250)
|
||||||
_spriteToOutline = NodePath("../Duck rendered")
|
_spritesToOutline = [NodePath("../Duck rendered")]
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="InteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_uo3dh")
|
shape = SubResource("CircleShape2D_uo3dh")
|
||||||
|
|||||||
@@ -1,28 +1,40 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://b1d2e7ely6hyw"]
|
[gd_scene load_steps=18 format=3 uid="uid://b1d2e7ely6hyw"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="1_qa01x"]
|
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="1_qa01x"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="2_w8caw"]
|
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="2_w8caw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://50qn027e5lvh" path="res://art/masks/field_outline_2_outline.png" id="3_2eegd"]
|
||||||
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="3_c014y"]
|
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="3_c014y"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://wjtvno2jj4nl" path="res://art/masks/field_outline_3_outline.png" id="4_svbd7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="4_teirr"]
|
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="4_teirr"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="5_wx561"]
|
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="5_wx561"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="6_7m4xq"]
|
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="6_7m4xq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_2eegd"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="7_2eegd"]
|
||||||
[ext_resource type="Resource" uid="uid://d284vxftxhym0" path="res://resources/itemRepository.tres" id="7_w8caw"]
|
[ext_resource type="Resource" uid="uid://d284vxftxhym0" path="res://resources/itemRepository.tres" id="7_w8caw"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5dotkx17gvxg" path="res://scripts/CSharp/Low Code/Events/EventRaiser.cs" id="9_teirr"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bovypw2hsn2nq" path="res://art/masks/field_outline_1_outline.png" id="9_wx561"]
|
||||||
|
[ext_resource type="Resource" uid="uid://b4hawvsc7cmkn" path="res://resources/low code/farming/event_newPlantCreated.tres" id="10_wx561"]
|
||||||
|
[ext_resource type="Script" uid="uid://3t0af586fimq" path="res://scripts/CSharp/Common/Inventory/InventoryListener.cs" id="14_w08sx"]
|
||||||
|
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="15_i4qwg"]
|
||||||
|
[ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="16_i4qwg"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cndd64batns31" path="res://resources/items/wateringcan.tres" id="17_1mi0u"]
|
||||||
|
|
||||||
[node name="BaseField" type="Node2D"]
|
[node name="BaseField" type="Node2D"]
|
||||||
|
|
||||||
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "PlantingInteraction", "PlantingPlaceholder")]
|
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_outlineSprite", "PlantingInteraction", "PlantingPlaceholder", "FieldInteractionArea")]
|
||||||
z_index = -1
|
z_index = -1
|
||||||
scale = Vector2(0.9, 1)
|
scale = Vector2(0.9, 1)
|
||||||
script = ExtResource("1_qa01x")
|
script = ExtResource("1_qa01x")
|
||||||
_fieldSprite = NodePath("MaskedField/FieldTexture")
|
_fieldSprite = NodePath("MaskedField/FieldTexture")
|
||||||
_maskSprite = NodePath("MaskedField")
|
_maskSprite = NodePath("MaskedField")
|
||||||
|
_outlineSprite = NodePath("OutlineSprite")
|
||||||
|
_maskOutlineTextures = Array[Texture2D]([ExtResource("9_wx561"), ExtResource("3_2eegd"), ExtResource("4_svbd7")])
|
||||||
_maskTexture = Array[Texture2D]([ExtResource("2_w8caw"), ExtResource("3_c014y"), ExtResource("4_teirr")])
|
_maskTexture = Array[Texture2D]([ExtResource("2_w8caw"), ExtResource("3_c014y"), ExtResource("4_teirr")])
|
||||||
Tilled = ExtResource("5_wx561")
|
Tilled = ExtResource("5_wx561")
|
||||||
Watered = ExtResource("6_7m4xq")
|
Watered = ExtResource("6_7m4xq")
|
||||||
PlantingInteraction = NodePath("../InteractionArea")
|
PlantingInteraction = NodePath("../InteractionArea")
|
||||||
PlantingPlaceholder = NodePath("PlantPlaceholder")
|
PlantingPlaceholder = NodePath("PlantPlaceholder")
|
||||||
ItemRepository = ExtResource("7_w8caw")
|
ItemRepository = ExtResource("7_w8caw")
|
||||||
|
FieldInteractionArea = NodePath("../InteractionArea")
|
||||||
|
|
||||||
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
|
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
|
||||||
clip_children = 1
|
clip_children = 1
|
||||||
@@ -34,9 +46,30 @@ texture = ExtResource("5_wx561")
|
|||||||
|
|
||||||
[node name="PlantPlaceholder" type="Node2D" parent="FieldBehaviour"]
|
[node name="PlantPlaceholder" type="Node2D" parent="FieldBehaviour"]
|
||||||
|
|
||||||
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("7_2eegd")]
|
[node name="OutlineSprite" type="Sprite2D" parent="FieldBehaviour"]
|
||||||
position = Vector2(-16, -54)
|
self_modulate = Color(1, 1, 1, 0)
|
||||||
_active = false
|
z_index = 1
|
||||||
_spriteToOutline = NodePath("../FieldBehaviour/MaskedField/FieldTexture")
|
scale = Vector2(1.5, 1.5)
|
||||||
|
texture = ExtResource("9_wx561")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_2eegd")]
|
||||||
|
position = Vector2(-26, -57)
|
||||||
|
_active = false
|
||||||
|
_spritesToOutline = [NodePath("../FieldBehaviour/OutlineSprite")]
|
||||||
|
|
||||||
|
[node name="PlantCreationEventRaiser" type="Node" parent="."]
|
||||||
|
script = ExtResource("9_teirr")
|
||||||
|
_eventResources = Array[Object]([ExtResource("10_wx561")])
|
||||||
|
|
||||||
|
[node name="InventoryListener Seeds" type="Node" parent="."]
|
||||||
|
script = ExtResource("14_w08sx")
|
||||||
|
_itemResourcesToListenFor = Array[Object]([ExtResource("15_i4qwg"), ExtResource("16_i4qwg")])
|
||||||
|
|
||||||
|
[node name="InventoryListener watering can" type="Node" parent="."]
|
||||||
|
script = ExtResource("14_w08sx")
|
||||||
|
_itemResourcesToListenFor = Array[Object]([ExtResource("17_1mi0u")])
|
||||||
|
|
||||||
|
[connection signal="Planted" from="FieldBehaviour" to="PlantCreationEventRaiser" method="RaiseEvents"]
|
||||||
[connection signal="Interacted" from="InteractionArea" to="FieldBehaviour" method="Farm"]
|
[connection signal="Interacted" from="InteractionArea" to="FieldBehaviour" method="Farm"]
|
||||||
|
[connection signal="ItemInstanceActivated" from="InventoryListener Seeds" to="FieldBehaviour" method="ActivatedSeedInInventory"]
|
||||||
|
[connection signal="ItemInstanceActivated" from="InventoryListener watering can" to="FieldBehaviour" method="ActivateWateringCanInInventory"]
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ _bigPlants = [NodePath("BigPlant/01"), NodePath("BigPlant/02"), NodePath("BigPla
|
|||||||
_readyPlants = [NodePath("ReadyPlantInventoryItem/ReadyPlant/01"), NodePath("ReadyPlantInventoryItem/ReadyPlant/02"), NodePath("ReadyPlantInventoryItem/ReadyPlant/03")]
|
_readyPlants = [NodePath("ReadyPlantInventoryItem/ReadyPlant/01"), NodePath("ReadyPlantInventoryItem/ReadyPlant/02"), NodePath("ReadyPlantInventoryItem/ReadyPlant/03")]
|
||||||
_harvestablePlant = NodePath("ReadyPlantInventoryItem")
|
_harvestablePlant = NodePath("ReadyPlantInventoryItem")
|
||||||
_magicEffect = NodePath("magic vfx")
|
_magicEffect = NodePath("magic vfx")
|
||||||
_magicWordNeeded = false
|
|
||||||
|
|
||||||
[node name="Seeds" type="Node2D" parent="."]
|
[node name="Seeds" type="Node2D" parent="."]
|
||||||
position = Vector2(0, 0.5)
|
position = Vector2(0, 0.5)
|
||||||
@@ -130,7 +129,6 @@ region_rect = Rect2(5416, 136, 647, 895)
|
|||||||
[node name="GrowingInteractionArea" parent="." instance=ExtResource("5_3j24b")]
|
[node name="GrowingInteractionArea" parent="." instance=ExtResource("5_3j24b")]
|
||||||
position = Vector2(0, 2.3)
|
position = Vector2(0, 2.3)
|
||||||
_useOutline = false
|
_useOutline = false
|
||||||
_useSprite = false
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="GrowingInteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="GrowingInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_vjw4j")
|
shape = SubResource("CircleShape2D_vjw4j")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ radius = 300.0
|
|||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
radius = 300.0
|
radius = 300.0
|
||||||
|
|
||||||
[node name="Beet2" instance=ExtResource("1_2u3jr")]
|
[node name="Beet" instance=ExtResource("1_2u3jr")]
|
||||||
|
|
||||||
[node name="Seed1" parent="Seeds" index="0"]
|
[node name="Seed1" parent="Seeds" index="0"]
|
||||||
texture = ExtResource("2_agmuy")
|
texture = ExtResource("2_agmuy")
|
||||||
@@ -47,6 +47,9 @@ shape = SubResource("CircleShape2D_hiixr")
|
|||||||
[node name="SpawnWithItem" parent="ReadyPlantInventoryItem" index="0"]
|
[node name="SpawnWithItem" parent="ReadyPlantInventoryItem" index="0"]
|
||||||
_blueprint = ExtResource("3_agmuy")
|
_blueprint = ExtResource("3_agmuy")
|
||||||
|
|
||||||
|
[node name="PickupInteractionArea" parent="ReadyPlantInventoryItem" index="3"]
|
||||||
|
_active = false
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="ReadyPlantInventoryItem/PickupInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_ae08q")
|
shape = SubResource("CircleShape2D_ae08q")
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=15 format=3 uid="uid://dpbbroif2tnil"]
|
[gd_scene load_steps=17 format=3 uid="uid://dpbbroif2tnil"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://btusf04xnywhm" path="res://scripts/CSharp/Common/Inventory/ItemOnGround2D.cs" id="1_tlhp6"]
|
[ext_resource type="Script" uid="uid://btusf04xnywhm" path="res://scripts/CSharp/Common/Inventory/ItemOnGround2D.cs" id="1_tlhp6"]
|
||||||
[ext_resource type="Script" uid="uid://c8suoi3i6kqai" path="res://scripts/CSharp/Common/Inventory/ItemOnGroundSpawnWith.cs" id="3_xu8me"]
|
[ext_resource type="Script" uid="uid://c8suoi3i6kqai" path="res://scripts/CSharp/Common/Inventory/ItemOnGroundSpawnWith.cs" id="3_xu8me"]
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://bqm6rchwtelxj" path="res://audio/sfx/UI/SFX_ItemPickUp_03.wav" id="8_kflfw"]
|
[ext_resource type="AudioStream" uid="uid://bqm6rchwtelxj" path="res://audio/sfx/UI/SFX_ItemPickUp_03.wav" id="8_kflfw"]
|
||||||
[ext_resource type="AudioStream" uid="uid://brsufnpmig5fv" path="res://audio/sfx/UI/SFX_ItemPickUp_04.wav" id="9_dltn0"]
|
[ext_resource type="AudioStream" uid="uid://brsufnpmig5fv" path="res://audio/sfx/UI/SFX_ItemPickUp_04.wav" id="9_dltn0"]
|
||||||
[ext_resource type="Script" uid="uid://dx25g14a7xi4w" path="res://scripts/CSharp/Common/Audio/AudioPlayer.cs" id="10_clbey"]
|
[ext_resource type="Script" uid="uid://dx25g14a7xi4w" path="res://scripts/CSharp/Common/Audio/AudioPlayer.cs" id="10_clbey"]
|
||||||
|
[ext_resource type="Script" uid="uid://b5dotkx17gvxg" path="res://scripts/CSharp/Low Code/Events/EventRaiser.cs" id="11_kflfw"]
|
||||||
|
[ext_resource type="Resource" uid="uid://78t0o27g6aq6" path="res://resources/low code/interactables/event_PickedUpInteractable.tres" id="12_dltn0"]
|
||||||
|
|
||||||
[sub_resource type="Theme" id="Theme_tlhp6"]
|
[sub_resource type="Theme" id="Theme_tlhp6"]
|
||||||
default_font_size = 80
|
default_font_size = 80
|
||||||
@@ -55,9 +57,9 @@ theme = SubResource("Theme_harr4")
|
|||||||
text = "thewe waf a pwoblem wiph picking up te item UWU"
|
text = "thewe waf a pwoblem wiph picking up te item UWU"
|
||||||
autowrap_mode = 3
|
autowrap_mode = 3
|
||||||
|
|
||||||
[node name="PickupInteractionArea" parent="." node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("4_xu8me")]
|
[node name="PickupInteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("4_xu8me")]
|
||||||
_outlineMaterial = ExtResource("4_harr4")
|
_outlineMaterial = ExtResource("4_harr4")
|
||||||
_spriteToOutline = NodePath("../Icon")
|
_spritesToOutline = [NodePath("../Icon")]
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="PickupInteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="PickupInteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_tlhp6")
|
shape = SubResource("CircleShape2D_tlhp6")
|
||||||
@@ -74,6 +76,10 @@ bus = &"SFX"
|
|||||||
playback_type = 2
|
playback_type = 2
|
||||||
script = ExtResource("10_clbey")
|
script = ExtResource("10_clbey")
|
||||||
|
|
||||||
|
[node name="PickUpEventRaiser" type="Node" parent="."]
|
||||||
|
script = ExtResource("11_kflfw")
|
||||||
|
_eventResources = Array[Object]([ExtResource("12_dltn0")])
|
||||||
|
|
||||||
[connection signal="Interacted" from="PickupInteractionArea" to="." method="TryPickUp"]
|
[connection signal="Interacted" from="PickupInteractionArea" to="." method="TryPickUp"]
|
||||||
[connection signal="Interacted" from="PickupInteractionArea" to="SFX/PickUpSound" method="PlayOneShot"]
|
[connection signal="Interacted" from="PickupInteractionArea" to="SFX/PickUpSound" method="PlayOneShot"]
|
||||||
|
|
||||||
|
|||||||
+10
-11
@@ -11,7 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Babushka"
|
config/name="Babushka"
|
||||||
run/main_scene="uid://bopv10dqm1knc"
|
run/main_scene="uid://c6wnoif01ltld"
|
||||||
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
||||||
run/max_fps=120
|
run/max_fps=120
|
||||||
boot_splash/fullsize=false
|
boot_splash/fullsize=false
|
||||||
@@ -32,6 +32,7 @@ InputService="*res://scripts/CSharp/Common/Services/InputService.cs"
|
|||||||
QuestManager="*res://prefabs/quests/quest_manager_autoload.tscn"
|
QuestManager="*res://prefabs/quests/quest_manager_autoload.tscn"
|
||||||
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
|
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
|
||||||
FightWorldAutoload="*res://prefabs/fight/fight_world_autoload.tscn"
|
FightWorldAutoload="*res://prefabs/fight/fight_world_autoload.tscn"
|
||||||
|
FieldService="*res://scripts/CSharp/Common/Farming/FieldService.cs"
|
||||||
|
|
||||||
[dialogic]
|
[dialogic]
|
||||||
|
|
||||||
@@ -144,7 +145,9 @@ directories/tres_directory={
|
|||||||
"default_bus_layout": "res://audio/default_bus_layout.tres",
|
"default_bus_layout": "res://audio/default_bus_layout.tres",
|
||||||
"default_stylebox": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_SpeakerPortraitTextbox/default_stylebox.tres",
|
"default_stylebox": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_SpeakerPortraitTextbox/default_stylebox.tres",
|
||||||
"default_vn_style": "res://addons/dialogic/Modules/DefaultLayoutParts/Style_VN_Default/default_vn_style.tres",
|
"default_vn_style": "res://addons/dialogic/Modules/DefaultLayoutParts/Style_VN_Default/default_vn_style.tres",
|
||||||
|
"event_PickedUpInteractable": "res://resources/low code/interactables/event_PickedUpInteractable.tres",
|
||||||
"event_colorButtonClicked": "res://resources/low code/test/event_colorButtonClicked.tres",
|
"event_colorButtonClicked": "res://resources/low code/test/event_colorButtonClicked.tres",
|
||||||
|
"event_newPlantCreated": "res://resources/low code/farming/event_newPlantCreated.tres",
|
||||||
"event_textLabelClicked": "res://resources/low code/test/event_textLabelClicked.tres",
|
"event_textLabelClicked": "res://resources/low code/test/event_textLabelClicked.tres",
|
||||||
"farming_equipment_glossary": "res://dialog/farming_equipment_glossary.tres",
|
"farming_equipment_glossary": "res://dialog/farming_equipment_glossary.tres",
|
||||||
"hoe": "res://resources/items/hoe.tres",
|
"hoe": "res://resources/items/hoe.tres",
|
||||||
@@ -170,6 +173,7 @@ directories/tres_directory={
|
|||||||
"unselected_stylebox": "res://addons/dialogic/Editor/Events/styles/unselected_stylebox.tres",
|
"unselected_stylebox": "res://addons/dialogic/Editor/Events/styles/unselected_stylebox.tres",
|
||||||
"var_ColorTestValue": "res://resources/low code/test/var_ColorTestValue.tres",
|
"var_ColorTestValue": "res://resources/low code/test/var_ColorTestValue.tres",
|
||||||
"var_Counter": "res://resources/low code/test/var_Counter.tres",
|
"var_Counter": "res://resources/low code/test/var_Counter.tres",
|
||||||
|
"var_sceneNameProvider": "res://resources/low code/farming/var_sceneNameProvider.tres",
|
||||||
"vesna_style": "res://addons/dialogic/vesna_style.tres",
|
"vesna_style": "res://addons/dialogic/vesna_style.tres",
|
||||||
"vn_textbox_default_panel": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_default_panel.tres",
|
"vn_textbox_default_panel": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_default_panel.tres",
|
||||||
"vn_textbox_name_label_panel": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_name_label_panel.tres",
|
"vn_textbox_name_label_panel": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Textbox/vn_textbox_name_label_panel.tres",
|
||||||
@@ -205,19 +209,14 @@ folder_colors={
|
|||||||
"res://audio/": "yellow",
|
"res://audio/": "yellow",
|
||||||
"res://dialog/": "green",
|
"res://dialog/": "green",
|
||||||
"res://fonts/": "green",
|
"res://fonts/": "green",
|
||||||
"res://logos/": "green",
|
"res://logos/": "blue",
|
||||||
"res://prefabs/": "teal",
|
"res://prefabs/": "purple",
|
||||||
"res://resources/": "teal",
|
"res://resources/": "purple",
|
||||||
"res://scenes/": "blue",
|
"res://scenes/": "purple",
|
||||||
"res://scripts/": "purple",
|
"res://scripts/": "pink",
|
||||||
"res://shader/": "pink"
|
"res://shader/": "pink"
|
||||||
}
|
}
|
||||||
|
|
||||||
[global_group]
|
|
||||||
|
|
||||||
PlantGrowing=""
|
|
||||||
Pickup=""
|
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
move_left={
|
move_left={
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Resource" script_class="EventResource" load_steps=2 format=3 uid="uid://b4hawvsc7cmkn"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ci3t5mvnopntg" path="res://scripts/CSharp/Low Code/Events/EventResource.cs" id="1_o6pnj"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_o6pnj")
|
||||||
|
metadata/_custom_type_script = "uid://ci3t5mvnopntg"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[gd_resource type="Resource" script_class="VariableResource" load_steps=2 format=3 uid="uid://tt3d166mntmi"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dtvx2cakx0bey" path="res://scripts/CSharp/Low Code/Variables/VariableResource.cs" id="1_m5pb0"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_m5pb0")
|
||||||
|
Payload = "farmOutside"
|
||||||
|
metadata/_custom_type_script = "uid://dtvx2cakx0bey"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Resource" script_class="EventResource" load_steps=2 format=3 uid="uid://78t0o27g6aq6"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://ci3t5mvnopntg" path="res://scripts/CSharp/Low Code/Events/EventResource.cs" id="1_acx84"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_acx84")
|
||||||
|
metadata/_custom_type_script = "uid://ci3t5mvnopntg"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=117 format=3 uid="uid://gigb28qk8t12"]
|
[gd_scene load_steps=115 format=3 uid="uid://gigb28qk8t12"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="1_7wfwe"]
|
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Player2D.tscn" id="1_7wfwe"]
|
||||||
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
|
[ext_resource type="Texture2D" uid="uid://8sr11ex30n0m" path="res://art/mockups/Kenney_Backgrounds/Samples/uncolored_hills.png" id="2_7b2ri"]
|
||||||
@@ -28,7 +28,6 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://dg7rlugnq0t45" path="res://art/farm/farming/farmobjekte/brünnen.png" id="21_ualyd"]
|
[ext_resource type="Texture2D" uid="uid://dg7rlugnq0t45" path="res://art/farm/farming/farmobjekte/brünnen.png" id="21_ualyd"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bcw6oeovkmiup" path="res://art/nature/baum märz 2025/sonnenblumeseamless.png" id="23_d77e7"]
|
[ext_resource type="Texture2D" uid="uid://bcw6oeovkmiup" path="res://art/nature/baum märz 2025/sonnenblumeseamless.png" id="23_d77e7"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="24_wtdui"]
|
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="24_wtdui"]
|
||||||
[ext_resource type="Script" uid="uid://dhxtdhfqx3bte" path="res://scripts/CSharp/Common/Farming/FieldService2D.cs" id="25_0qu0h"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="25_hukxv"]
|
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="25_hukxv"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="27_klb81"]
|
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="27_klb81"]
|
||||||
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="28_6b2nr"]
|
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="28_6b2nr"]
|
||||||
@@ -39,7 +38,6 @@
|
|||||||
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="35_64mdn"]
|
[ext_resource type="Resource" uid="uid://d1uuxp1lp4aro" path="res://resources/items/tomato_seed.tres" id="35_64mdn"]
|
||||||
[ext_resource type="Texture2D" uid="uid://65e44yde224q" path="res://art/farm/Babushka_house_01.png" id="36_e5b7x"]
|
[ext_resource type="Texture2D" uid="uid://65e44yde224q" path="res://art/farm/Babushka_house_01.png" id="36_e5b7x"]
|
||||||
[ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="36_fv1t2"]
|
[ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="36_fv1t2"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b4krfobwq3r3h" path="res://art/test_tomatos.png" id="36_l7ekk"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://cfqg50am0swb7" path="res://audio/Music/Farming_90BPM_69Bars_Loop.wav" id="37_8ey8m"]
|
[ext_resource type="AudioStream" uid="uid://cfqg50am0swb7" path="res://audio/Music/Farming_90BPM_69Bars_Loop.wav" id="37_8ey8m"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dku1rq5cocisg" path="res://audio/Music/Farming_90BPM_69Bars.wav" id="37_di1ed"]
|
[ext_resource type="AudioStream" uid="uid://dku1rq5cocisg" path="res://audio/Music/Farming_90BPM_69Bars.wav" id="37_di1ed"]
|
||||||
[ext_resource type="Shader" uid="uid://braevmqauoek7" path="res://shader/swaying_plant.gdshader" id="37_taxvr"]
|
[ext_resource type="Shader" uid="uid://braevmqauoek7" path="res://shader/swaying_plant.gdshader" id="37_taxvr"]
|
||||||
@@ -211,13 +209,13 @@ shader_parameter/tiling_scale = Vector2(1, 20)
|
|||||||
shader = ExtResource("13_kt1wx")
|
shader = ExtResource("13_kt1wx")
|
||||||
shader_parameter/tiling_scale = Vector2(1, 25)
|
shader_parameter/tiling_scale = Vector2(1, 25)
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2nee2"]
|
|
||||||
size = Vector2(5782, 1176)
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_p6n74"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_p6n74"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
size = Vector2(7150, 1192)
|
size = Vector2(7150, 1192)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2nee2"]
|
||||||
|
size = Vector2(5782, 1176)
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lwk6t"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lwk6t"]
|
||||||
shader = ExtResource("13_7p0hq")
|
shader = ExtResource("13_7p0hq")
|
||||||
shader_parameter/hue_shift = 0.0
|
shader_parameter/hue_shift = 0.0
|
||||||
@@ -1036,16 +1034,15 @@ position = Vector2(6403, 3362)
|
|||||||
_timelinesToPlay = PackedStringArray("yeli_quest_select")
|
_timelinesToPlay = PackedStringArray("yeli_quest_select")
|
||||||
_retriggerSameTimeline = true
|
_retriggerSameTimeline = true
|
||||||
|
|
||||||
[node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("1_7wfwe")]
|
[node name="Vesna" parent="YSorted" instance=ExtResource("1_7wfwe")]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
position = Vector2(9322, 2018)
|
position = Vector2(9322, 2018)
|
||||||
_fieldParent = NodePath("../Farm visuals/FieldParent")
|
|
||||||
_hoe = ExtResource("28_6b2nr")
|
_hoe = ExtResource("28_6b2nr")
|
||||||
|
|
||||||
[node name="FarmingControls" parent="YSorted/Vesna" index="1" node_paths=PackedStringArray("_camera")]
|
[node name="FarmingControls" parent="YSorted/Vesna" index="1" node_paths=PackedStringArray("_camera")]
|
||||||
_camera = NodePath("../../../Camera2D")
|
_camera = NodePath("../../../Camera2D")
|
||||||
|
|
||||||
[node name="Brünnen" type="Sprite2D" parent="YSorted" node_paths=PackedStringArray("_interactionArea")]
|
[node name="Well" type="Sprite2D" parent="YSorted" node_paths=PackedStringArray("_interactionArea")]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
material = SubResource("ShaderMaterial_2vojv")
|
material = SubResource("ShaderMaterial_2vojv")
|
||||||
@@ -1057,19 +1054,18 @@ region_rect = Rect2(0, 0, 1504, 1686)
|
|||||||
script = ExtResource("32_lbnqo")
|
script = ExtResource("32_lbnqo")
|
||||||
_interactionArea = NodePath("InteractionArea")
|
_interactionArea = NodePath("InteractionArea")
|
||||||
|
|
||||||
[node name="StaticBody2D" type="StaticBody2D" parent="YSorted/Brünnen"]
|
[node name="StaticBody2D" type="StaticBody2D" parent="YSorted/Well"]
|
||||||
collision_mask = 4
|
collision_mask = 4
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSorted/Brünnen/StaticBody2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSorted/Well/StaticBody2D"]
|
||||||
position = Vector2(145.5, -224)
|
position = Vector2(145.5, -224)
|
||||||
shape = SubResource("RectangleShape2D_0sfl7")
|
shape = SubResource("RectangleShape2D_0sfl7")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="YSorted/Brünnen" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("27_klb81")]
|
[node name="InteractionArea" parent="YSorted/Well" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("27_klb81")]
|
||||||
_active = false
|
_spritesToOutline = [NodePath("..")]
|
||||||
_spriteToOutline = NodePath("..")
|
|
||||||
_id = 1
|
_id = 1
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/Brünnen/InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/Well/InteractionArea/Area2D" index="0"]
|
||||||
position = Vector2(146, -130)
|
position = Vector2(146, -130)
|
||||||
shape = SubResource("CircleShape2D_p6n74")
|
shape = SubResource("CircleShape2D_p6n74")
|
||||||
|
|
||||||
@@ -1108,10 +1104,6 @@ shape = SubResource("CircleShape2D_tm0yg")
|
|||||||
[node name="Icon" parent="YSorted/SeedPickup" index="4"]
|
[node name="Icon" parent="YSorted/SeedPickup" index="4"]
|
||||||
scale = Vector2(1, 1)
|
scale = Vector2(1, 1)
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="YSorted/SeedPickup"]
|
|
||||||
texture = ExtResource("36_l7ekk")
|
|
||||||
region_enabled = true
|
|
||||||
|
|
||||||
[node name="SeedPickup2" parent="YSorted" instance=ExtResource("25_hukxv")]
|
[node name="SeedPickup2" parent="YSorted" instance=ExtResource("25_hukxv")]
|
||||||
position = Vector2(10705, 2257)
|
position = Vector2(10705, 2257)
|
||||||
_finiteSupply = 3
|
_finiteSupply = 3
|
||||||
@@ -1146,10 +1138,10 @@ collision_mask = 6
|
|||||||
position = Vector2(-252.56, 231.32)
|
position = Vector2(-252.56, 231.32)
|
||||||
polygon = PackedVector2Array(247.227, 43.5123, 44.7822, 43.5123, -87.2178, 45.123, -104.329, -55.2797, -154.107, -73.5347, -160.107, -380.38, -175.44, -400.783, -63.44, -512.461, 97.8934, -541.991, 261.671, -599.172, 374.782, -526.421, 502.338, -526.421, 637.893, -396.488, 598.56, -360.783, 596.338, -58.2327, 528.782, -58.2327, 501.449, 45.9283)
|
polygon = PackedVector2Array(247.227, 43.5123, 44.7822, 43.5123, -87.2178, 45.123, -104.329, -55.2797, -154.107, -73.5347, -160.107, -380.38, -175.44, -400.783, -63.44, -512.461, 97.8934, -541.991, 261.671, -599.172, 374.782, -526.421, 502.338, -526.421, 637.893, -396.488, 598.56, -360.783, 596.338, -58.2327, 528.782, -58.2327, 501.449, 45.9283)
|
||||||
|
|
||||||
[node name="EnterHouseInteraction" parent="YSorted/Farm visuals/Static" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("27_klb81")]
|
[node name="EnterHouseInteraction" parent="YSorted/Farm visuals/Static" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("27_klb81")]
|
||||||
position = Vector2(5834, 2354)
|
position = Vector2(5834, 2354)
|
||||||
scale = Vector2(2.425, 2.425)
|
scale = Vector2(2.425, 2.425)
|
||||||
_spriteToOutline = NodePath("DoorSprite")
|
_spritesToOutline = [NodePath("DoorSprite")]
|
||||||
_id = 0
|
_id = 0
|
||||||
|
|
||||||
[node name="DoorSprite" type="Sprite2D" parent="YSorted/Farm visuals/Static/EnterHouseInteraction"]
|
[node name="DoorSprite" type="Sprite2D" parent="YSorted/Farm visuals/Static/EnterHouseInteraction"]
|
||||||
@@ -2101,27 +2093,22 @@ rotation = 1.5708
|
|||||||
scale = Vector2(0.1, 10.8)
|
scale = Vector2(0.1, 10.8)
|
||||||
texture = ExtResource("21_if5vh")
|
texture = ExtResource("21_if5vh")
|
||||||
|
|
||||||
[node name="FieldParent" type="Node2D" parent="YSorted/Farm visuals" node_paths=PackedStringArray("fields", "_allowedArea")]
|
[node name="Area2D" type="Area2D" parent="YSorted/Farm visuals"]
|
||||||
position = Vector2(53, 20)
|
position = Vector2(5, 4.098892)
|
||||||
scale = Vector2(1, 0.993819)
|
scale = Vector2(1, 0.993819)
|
||||||
script = ExtResource("25_0qu0h")
|
|
||||||
fields = {}
|
|
||||||
_allowedArea = NodePath("Area2D")
|
|
||||||
metadata/_custom_type_script = "uid://dhxtdhfqx3bte"
|
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="YSorted/Farm visuals/FieldParent"]
|
|
||||||
position = Vector2(-48, -16)
|
|
||||||
collision_mask = 5
|
collision_mask = 5
|
||||||
collision_priority = 10.0
|
collision_priority = 10.0
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSorted/Farm visuals/FieldParent/Area2D"]
|
[node name="CollisionShape2D2" type="CollisionShape2D" parent="YSorted/Farm visuals/Area2D"]
|
||||||
position = Vector2(2896, 2949)
|
position = Vector2(11913.999, 2960)
|
||||||
shape = SubResource("RectangleShape2D_2nee2")
|
scale = Vector2(0.99999994, 0.99999994)
|
||||||
|
|
||||||
[node name="CollisionShape2D2" type="CollisionShape2D" parent="YSorted/Farm visuals/FieldParent/Area2D"]
|
|
||||||
position = Vector2(11914, 2960)
|
|
||||||
shape = SubResource("RectangleShape2D_p6n74")
|
shape = SubResource("RectangleShape2D_p6n74")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="YSorted/Farm visuals/Area2D"]
|
||||||
|
position = Vector2(2895.9998, 2949)
|
||||||
|
scale = Vector2(0.99999994, 0.99999994)
|
||||||
|
shape = SubResource("RectangleShape2D_2nee2")
|
||||||
|
|
||||||
[node name="Blocker" type="Node2D" parent="YSorted"]
|
[node name="Blocker" type="Node2D" parent="YSorted"]
|
||||||
|
|
||||||
[node name="Fence Door2" type="Sprite2D" parent="YSorted/Blocker"]
|
[node name="Fence Door2" type="Sprite2D" parent="YSorted/Blocker"]
|
||||||
@@ -2139,9 +2126,9 @@ collision_mask = 4
|
|||||||
position = Vector2(-106.663, 182.891)
|
position = Vector2(-106.663, 182.891)
|
||||||
shape = SubResource("RectangleShape2D_ycj14")
|
shape = SubResource("RectangleShape2D_ycj14")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="YSorted/Blocker" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("27_klb81")]
|
[node name="InteractionArea" parent="YSorted/Blocker" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("27_klb81")]
|
||||||
position = Vector2(11234, 1850)
|
position = Vector2(11234, 1850)
|
||||||
_spriteToOutline = NodePath("Fence Door")
|
_spritesToOutline = [NodePath("Fence Door")]
|
||||||
_id = 1
|
_id = 1
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/Blocker/InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/Blocker/InteractionArea/Area2D" index="0"]
|
||||||
@@ -2424,14 +2411,14 @@ timeline = "quest2_tomatoes_end"
|
|||||||
|
|
||||||
[connection signal="FilledWateringCan" from="YSorted/Vesna" to="Audio/SFX/FillWater SFX2" method="PlayOneShot"]
|
[connection signal="FilledWateringCan" from="YSorted/Vesna" to="Audio/SFX/FillWater SFX2" method="PlayOneShot"]
|
||||||
[connection signal="WateringField" from="YSorted/Vesna/FarmingControls" to="Audio/SFX/Watering SFX" method="PlayOneShot"]
|
[connection signal="WateringField" from="YSorted/Vesna/FarmingControls" to="Audio/SFX/Watering SFX" method="PlayOneShot"]
|
||||||
[connection signal="InteractedTool" from="YSorted/Brünnen/InteractionArea" to="YSorted/Vesna" method="TryFillWateringCan"]
|
[connection signal="InteractedTool" from="YSorted/Well/InteractionArea" to="YSorted/Vesna" method="TryFillWateringCan"]
|
||||||
[connection signal="SuccessfulPickUp" from="YSorted/CanGenericPickup" to="YSorted/Vesna" method="HandlePickUp"]
|
[connection signal="SuccessfulPickUp" from="YSorted/CanGenericPickup" to="YSorted/Vesna" method="HandlePickUp"]
|
||||||
[connection signal="SuccessfulPickUp" from="YSorted/RakeGenericPickup" to="YSorted/Vesna" method="HandlePickUp"]
|
[connection signal="SuccessfulPickUp" from="YSorted/RakeGenericPickup" to="YSorted/Vesna" method="HandlePickUp"]
|
||||||
[connection signal="SuccessfulPickUp" from="YSorted/SeedPickup" to="YSorted/Vesna" method="HandlePickUp"]
|
[connection signal="SuccessfulPickUp" from="YSorted/SeedPickup" to="YSorted/Vesna" method="HandlePickUp"]
|
||||||
[connection signal="SuccessfulPickUp" from="YSorted/SeedPickup2" to="YSorted/Vesna" method="HandlePickUp"]
|
[connection signal="SuccessfulPickUp" from="YSorted/SeedPickup2" to="YSorted/Vesna" method="HandlePickUp"]
|
||||||
[connection signal="InteractedTool" from="YSorted/Farm visuals/Static/EnterHouseInteraction" to="." method="LoadSceneAtIndex"]
|
[connection signal="InteractedTool" from="YSorted/Farm visuals/Static/EnterHouseInteraction" to="." method="LoadSceneAtIndex"]
|
||||||
[connection signal="FieldCreated" from="YSorted/Farm visuals/FieldParent" to="Audio/SFX/Farming SFX" method="PlayOneShot"]
|
[connection signal="mouse_entered" from="YSorted/Farm visuals/Area2D" to="YSorted/Vesna/FarmingControls" method="CanCreateFields"]
|
||||||
[connection signal="input_event" from="YSorted/Farm visuals/FieldParent/Area2D" to="YSorted/Vesna/FarmingControls" method="InputEventPressedOn"]
|
[connection signal="mouse_exited" from="YSorted/Farm visuals/Area2D" to="YSorted/Vesna/FarmingControls" method="CannotCreateFields"]
|
||||||
[connection signal="InteractedTool" from="YSorted/Blocker/InteractionArea" to="." method="LoadSceneAtIndex"]
|
[connection signal="InteractedTool" from="YSorted/Blocker/InteractionArea" to="." method="LoadSceneAtIndex"]
|
||||||
[connection signal="GoalReached" from="YSorted/ducks" to="YSorted/ducks/DialogicToggle" method="ToggleDialogue"]
|
[connection signal="GoalReached" from="YSorted/ducks" to="YSorted/ducks/DialogicToggle" method="ToggleDialogue"]
|
||||||
[connection signal="DuckCollected" from="YSorted/ducks/Duck2" to="YSorted/ducks" method="Increment"]
|
[connection signal="DuckCollected" from="YSorted/ducks/Duck2" to="YSorted/ducks" method="Increment"]
|
||||||
@@ -2446,7 +2433,7 @@ timeline = "quest2_tomatoes_end"
|
|||||||
[connection signal="OnFulfilled" from="SpecialQuestTrigger/FieldWorkTrigger" to="SpecialQuestTrigger/FieldWorkTrigger/StartDialog" method="open"]
|
[connection signal="OnFulfilled" from="SpecialQuestTrigger/FieldWorkTrigger" to="SpecialQuestTrigger/FieldWorkTrigger/StartDialog" method="open"]
|
||||||
|
|
||||||
[editable path="YSorted/Vesna"]
|
[editable path="YSorted/Vesna"]
|
||||||
[editable path="YSorted/Brünnen/InteractionArea"]
|
[editable path="YSorted/Well/InteractionArea"]
|
||||||
[editable path="YSorted/CanGenericPickup"]
|
[editable path="YSorted/CanGenericPickup"]
|
||||||
[editable path="YSorted/CanGenericPickup/PickupInteractionArea"]
|
[editable path="YSorted/CanGenericPickup/PickupInteractionArea"]
|
||||||
[editable path="YSorted/RakeGenericPickup"]
|
[editable path="YSorted/RakeGenericPickup"]
|
||||||
|
|||||||
@@ -309,10 +309,10 @@ texture = ExtResource("6_blyw3")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(3161, 313, 679, 1050)
|
region_rect = Rect2(3161, 313, 679, 1050)
|
||||||
|
|
||||||
[node name="OutsideDoor" parent="BackWall/Room01DorrR" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("11_gpagp")]
|
[node name="OutsideDoor" parent="BackWall/Room01DorrR" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
|
||||||
position = Vector2(-7, 248)
|
position = Vector2(-7, 248)
|
||||||
scale = Vector2(1.5, 1.5)
|
scale = Vector2(1.5, 1.5)
|
||||||
_spriteToOutline = NodePath("..")
|
_spritesToOutline = [NodePath("..")]
|
||||||
_id = 1
|
_id = 1
|
||||||
|
|
||||||
[node name="Room01DoorL" type="Sprite2D" parent="BackWall"]
|
[node name="Room01DoorL" type="Sprite2D" parent="BackWall"]
|
||||||
@@ -322,9 +322,9 @@ texture = ExtResource("7_yd2gv")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(0, 0, 3840, 2160)
|
region_rect = Rect2(0, 0, 3840, 2160)
|
||||||
|
|
||||||
[node name="VesnasRoomDoor" parent="BackWall/Room01DoorL" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("11_gpagp")]
|
[node name="VesnasRoomDoor" parent="BackWall/Room01DoorL" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
|
||||||
position = Vector2(-1559, -16)
|
position = Vector2(-1559, -16)
|
||||||
_spriteToOutline = NodePath("..")
|
_spritesToOutline = [NodePath("..")]
|
||||||
_id = 0
|
_id = 0
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="BackWall/Room01DoorL/VesnasRoomDoor/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="BackWall/Room01DoorL/VesnasRoomDoor/Area2D" index="0"]
|
||||||
@@ -358,9 +358,9 @@ texture = ExtResource("10_xcryd")
|
|||||||
region_enabled = true
|
region_enabled = true
|
||||||
region_rect = Rect2(2360, 864, 356, 251)
|
region_rect = Rect2(2360, 864, 356, 251)
|
||||||
|
|
||||||
[node name="InteractionArea" parent="BackWall/Room01PechkaDoor" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("11_gpagp")]
|
[node name="InteractionArea" parent="BackWall/Room01PechkaDoor" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
|
||||||
position = Vector2(0, -3)
|
position = Vector2(0, -3)
|
||||||
_spriteToOutline = NodePath("..")
|
_spritesToOutline = [NodePath("..")]
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="BackWall/Room01PechkaDoor/InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="BackWall/Room01PechkaDoor/InteractionArea/Area2D" index="0"]
|
||||||
shape = SubResource("CircleShape2D_gpagp")
|
shape = SubResource("CircleShape2D_gpagp")
|
||||||
@@ -407,10 +407,10 @@ stream = SubResource("AudioStreamRandomizer_b6vf7")
|
|||||||
bus = &"SFX"
|
bus = &"SFX"
|
||||||
script = ExtResource("22_tggq2")
|
script = ExtResource("22_tggq2")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="BackWall/Katze" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("11_gpagp")]
|
[node name="InteractionArea" parent="BackWall/Katze" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
|
||||||
position = Vector2(-6.5, -44)
|
position = Vector2(-6.5, -44)
|
||||||
scale = Vector2(0.5, 0.5)
|
scale = Vector2(0.5, 0.5)
|
||||||
_spriteToOutline = NodePath("..")
|
_spritesToOutline = [NodePath("..")]
|
||||||
|
|
||||||
[node name="Room assets" type="Node" parent="BackWall"]
|
[node name="Room assets" type="Node" parent="BackWall"]
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ _followNode = NodePath("../Vesna/CharacterBody2D")
|
|||||||
|
|
||||||
[node name="BedInteraction" parent="." instance=ExtResource("8_phqdf")]
|
[node name="BedInteraction" parent="." instance=ExtResource("8_phqdf")]
|
||||||
position = Vector2(-1429, 487)
|
position = Vector2(-1429, 487)
|
||||||
_useSprite = false
|
_useOutline = false
|
||||||
_id = 1
|
_id = 1
|
||||||
|
|
||||||
[node name="QuestCompleter" type="Node" parent="BedInteraction"]
|
[node name="QuestCompleter" type="Node" parent="BedInteraction"]
|
||||||
@@ -108,7 +108,7 @@ toStatus = 2
|
|||||||
|
|
||||||
[node name="DoorInteraction" parent="." instance=ExtResource("8_phqdf")]
|
[node name="DoorInteraction" parent="." instance=ExtResource("8_phqdf")]
|
||||||
position = Vector2(777, 201)
|
position = Vector2(777, 201)
|
||||||
_useSprite = false
|
_useOutline = false
|
||||||
_id = 0
|
_id = 0
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="DoorInteraction/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="DoorInteraction/Area2D" index="0"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=85 format=3 uid="uid://b3ibx4resa1f3"]
|
[gd_scene load_steps=86 format=3 uid="uid://b3ibx4resa1f3"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_6krrk"]
|
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_6krrk"]
|
||||||
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="2_4ktoi"]
|
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="2_4ktoi"]
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://badnnid7dgnpk" path="res://art/nature/grass/grass-4.png" id="42_7jeth"]
|
[ext_resource type="Texture2D" uid="uid://badnnid7dgnpk" path="res://art/nature/grass/grass-4.png" id="42_7jeth"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="43_dr6bm"]
|
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="43_dr6bm"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ct7ea8ikor5rf" path="res://art/nature/grass/grass-3.png" id="43_g8k4k"]
|
[ext_resource type="Texture2D" uid="uid://ct7ea8ikor5rf" path="res://art/nature/grass/grass-3.png" id="43_g8k4k"]
|
||||||
|
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/simple_interactable_outline.tres" id="44_34r5t"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d3dwl6ph0pu1d" path="res://art/nature/grass/grass-6.png" id="44_jgrpl"]
|
[ext_resource type="Texture2D" uid="uid://d3dwl6ph0pu1d" path="res://art/nature/grass/grass-6.png" id="44_jgrpl"]
|
||||||
[ext_resource type="Script" uid="uid://dhxtdhfqx3bte" path="res://scripts/CSharp/Common/Farming/FieldService2D.cs" id="46_xkmgh"]
|
[ext_resource type="Script" uid="uid://dhxtdhfqx3bte" path="res://scripts/CSharp/Common/Farming/FieldService2D.cs" id="46_xkmgh"]
|
||||||
[ext_resource type="Texture2D" uid="uid://blb3agipyxnal" path="res://art/farm/farming/farmobjekte/zaun/fence_door.png" id="47_xfjh2"]
|
[ext_resource type="Texture2D" uid="uid://blb3agipyxnal" path="res://art/farm/farming/farmobjekte/zaun/fence_door.png" id="47_xfjh2"]
|
||||||
@@ -918,10 +919,9 @@ shape = SubResource("RectangleShape2D_0qu0h")
|
|||||||
z_index = 1
|
z_index = 1
|
||||||
y_sort_enabled = true
|
y_sort_enabled = true
|
||||||
|
|
||||||
[node name="Vesna" parent="YSorted" node_paths=PackedStringArray("_fieldParent") instance=ExtResource("27_qtaxr")]
|
[node name="Vesna" parent="YSorted" instance=ExtResource("27_qtaxr")]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
position = Vector2(2693, 1876)
|
position = Vector2(2693, 1876)
|
||||||
_fieldParent = NodePath("../Farm visuals/FieldParent")
|
|
||||||
_hoe = ExtResource("28_le48k")
|
_hoe = ExtResource("28_le48k")
|
||||||
|
|
||||||
[node name="Animated Sprites" parent="YSorted/Vesna/CharacterBody2D/visuals" index="0"]
|
[node name="Animated Sprites" parent="YSorted/Vesna/CharacterBody2D/visuals" index="0"]
|
||||||
@@ -956,9 +956,8 @@ collision_mask = 4
|
|||||||
position = Vector2(145.5, -224)
|
position = Vector2(145.5, -224)
|
||||||
shape = SubResource("RectangleShape2D_0sfl7")
|
shape = SubResource("RectangleShape2D_0sfl7")
|
||||||
|
|
||||||
[node name="InteractionArea" parent="YSorted/Brünnen" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("31_xcb8u")]
|
[node name="InteractionArea" parent="YSorted/Brünnen" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("31_xcb8u")]
|
||||||
_spriteToOutline = NodePath("..")
|
_spritesToOutline = [NodePath("..")]
|
||||||
_id = 1
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/Brünnen/InteractionArea/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/Brünnen/InteractionArea/Area2D" index="0"]
|
||||||
position = Vector2(146, -130)
|
position = Vector2(146, -130)
|
||||||
@@ -1717,6 +1716,9 @@ scale = Vector2(1, 1.00622)
|
|||||||
_state = 2
|
_state = 2
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField2" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField2" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(1226, 3098.15)
|
position = Vector2(1226, 3098.15)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1728,6 +1730,9 @@ FieldState = 3
|
|||||||
_state = 1
|
_state = 1
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField2" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField3" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField3" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(1782, 2606.11)
|
position = Vector2(1782, 2606.11)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1739,6 +1744,9 @@ FieldState = 3
|
|||||||
_state = 2
|
_state = 2
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField3" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField4" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField4" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(2559, 2624.22)
|
position = Vector2(2559, 2624.22)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1750,6 +1758,9 @@ FieldState = 3
|
|||||||
_state = 2
|
_state = 2
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField4" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField5" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField5" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(3305, 2624.22)
|
position = Vector2(3305, 2624.22)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1761,6 +1772,9 @@ FieldState = 3
|
|||||||
_state = 2
|
_state = 2
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField5" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField6" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField6" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(4033, 2618.18)
|
position = Vector2(4033, 2618.18)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1772,6 +1786,9 @@ FieldState = 3
|
|||||||
_state = 1
|
_state = 1
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField6" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField7" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField7" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(4755, 2630.26)
|
position = Vector2(4755, 2630.26)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1783,6 +1800,9 @@ FieldState = 3
|
|||||||
_state = 2
|
_state = 2
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField7" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField8" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField8" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(4418, 3226.95)
|
position = Vector2(4418, 3226.95)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1794,6 +1814,9 @@ FieldState = 3
|
|||||||
_state = 2
|
_state = 2
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField8" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="BaseField9" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
[node name="BaseField9" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
|
||||||
position = Vector2(5317, 3208.83)
|
position = Vector2(5317, 3208.83)
|
||||||
scale = Vector2(1, 1.00622)
|
scale = Vector2(1, 1.00622)
|
||||||
@@ -1805,11 +1828,14 @@ FieldState = 3
|
|||||||
_state = 1
|
_state = 1
|
||||||
_field = NodePath("../..")
|
_field = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField9" index="1"]
|
||||||
|
_outlineMaterial = ExtResource("44_34r5t")
|
||||||
|
|
||||||
[node name="Blocker" type="Node2D" parent="YSorted"]
|
[node name="Blocker" type="Node2D" parent="YSorted"]
|
||||||
|
|
||||||
[node name="BackToFarm" parent="YSorted/Blocker" node_paths=PackedStringArray("_spriteToOutline") instance=ExtResource("31_xcb8u")]
|
[node name="BackToFarm" parent="YSorted/Blocker" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("31_xcb8u")]
|
||||||
position = Vector2(3774, 2025)
|
position = Vector2(3774, 2025)
|
||||||
_spriteToOutline = NodePath("Fence Door2")
|
_spritesToOutline = [NodePath("Fence Door2")]
|
||||||
_id = 0
|
_id = 0
|
||||||
|
|
||||||
[node name="CollisionShape3D" parent="YSorted/Blocker/BackToFarm/Area2D" index="0"]
|
[node name="CollisionShape3D" parent="YSorted/Blocker/BackToFarm/Area2D" index="0"]
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
|||||||
|
|
||||||
public partial class InteractionArea2D : Node2D
|
public partial class InteractionArea2D : Node2D
|
||||||
{
|
{
|
||||||
|
|
||||||
[Export] private Area2D _area;
|
[Export] private Area2D _area;
|
||||||
[Export] private Label _label;
|
[Export] private Label _label;
|
||||||
[Export] private bool _active = true;
|
[Export] private bool _active = true;
|
||||||
[Export] private bool _useOutline = true;
|
[Export] private bool _useOutline = true;
|
||||||
[Export] private ShaderMaterial _outlineMaterial;
|
[Export] private ShaderMaterial _outlineMaterial;
|
||||||
[Export] private CanvasItem? _spriteToOutline; // keep to not break old usages. TODO: remove later
|
[Export] private CanvasItem[] _spritesToOutline = [];
|
||||||
[Export] private CanvasItem[] _spritesToOutline;
|
|
||||||
[Export] private bool _showLabel = true;
|
[Export] private bool _showLabel = true;
|
||||||
[Export] private int _id = -1; // TODO: remove
|
[Export] private int _id = -1; // TODO: remove
|
||||||
|
|
||||||
@@ -38,21 +38,7 @@ public partial class InteractionArea2D : Node2D
|
|||||||
{
|
{
|
||||||
if (_useOutline)
|
if (_useOutline)
|
||||||
{
|
{
|
||||||
try
|
_backupMaterials = _spritesToOutline.Select(s => s.Material).ToArray();
|
||||||
{
|
|
||||||
// support old implementations of the script. If the sprite to outline is set, add it to the array
|
|
||||||
if (_spriteToOutline != null)
|
|
||||||
{
|
|
||||||
Array.Resize(ref _spritesToOutline, _spritesToOutline.Length + 1);
|
|
||||||
_spritesToOutline[^1] = _spriteToOutline;
|
|
||||||
}
|
|
||||||
|
|
||||||
_backupMaterials = _spritesToOutline.Select(s => s.Material).ToArray();
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
{
|
|
||||||
GD.PrintErr($"No sprite to outline found on: {GetParent().Name}" + exception.Message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,9 +62,6 @@ public partial class InteractionArea2D : Node2D
|
|||||||
|
|
||||||
public void OnPlayerExited(Node2D player)
|
public void OnPlayerExited(Node2D player)
|
||||||
{
|
{
|
||||||
if (!_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_label.Hide();
|
_label.Hide();
|
||||||
|
|
||||||
if (!_useOutline)
|
if (!_useOutline)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using System;
|
||||||
|
using Babushka.scripts.CSharp.Low_Code.Variables;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Godot.Collections;
|
using Godot.Collections;
|
||||||
|
|
||||||
@@ -6,20 +8,22 @@ namespace Babushka.scripts.CSharp.Common.Farming;
|
|||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
public partial class FarmingControls2D : Node2D
|
public partial class FarmingControls2D : Node2D
|
||||||
{
|
{
|
||||||
[Export] private PackedScene _fieldPrefab;
|
[Export] private VariableResource _sceneKeyProvider;
|
||||||
|
[Export] private PackedScene? _fieldPrefab = null!;
|
||||||
[Export] private Node2D _movingPlayer;
|
[Export] private Node2D _movingPlayer;
|
||||||
[Export] private Camera2D _camera;
|
[Export] private Camera2D _camera;
|
||||||
[Export] private CpuParticles2D _wateringParticles;
|
[Export] private CpuParticles2D _wateringParticles;
|
||||||
[Export] private float _wateringCanParticlesVerticalOffset = 50f;
|
[Export] private float _wateringCanParticlesVerticalOffset = 50f;
|
||||||
|
[Export] private Vector2I _fieldOffsetVector = new Vector2I(735, 651);
|
||||||
public FieldService2D FieldService;
|
|
||||||
|
|
||||||
private int _toolId = -1;
|
private int _toolId = -1;
|
||||||
private bool _wateringCanFilled = false;
|
private bool _wateringCanFilled = false;
|
||||||
|
private bool _canCreateFields = false;
|
||||||
|
|
||||||
[Signal] public delegate void WateringFieldEventHandler();
|
[Signal] public delegate void WateringFieldEventHandler();
|
||||||
|
|
||||||
|
[Signal] public delegate void FieldCreatedEventHandler();
|
||||||
|
|
||||||
#region Tools
|
#region Tools
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -52,12 +56,20 @@ public partial class FarmingControls2D : Node2D
|
|||||||
|
|
||||||
public override void _Input(InputEvent @event)
|
public override void _Input(InputEvent @event)
|
||||||
{
|
{
|
||||||
if (@event.IsActionPressed("click")
|
if (@event.IsActionPressed("click"))
|
||||||
&& _toolId == WateringCanState.WATERING_CAN_ID
|
|
||||||
&& WateringCanState.GetFillState() > 0)
|
|
||||||
{
|
{
|
||||||
Vector2I adjustedPosition = GetAdjustedMousePosition();
|
if (_toolId == WateringCanState.WATERING_CAN_ID
|
||||||
WaterTheField(adjustedPosition);
|
&& WateringCanState.GetFillState() > 0)
|
||||||
|
{
|
||||||
|
Vector2I adjustedPosition = GetAdjustedMousePosition();
|
||||||
|
WaterTheField(adjustedPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_canCreateFields && _toolId == 0)
|
||||||
|
{
|
||||||
|
Vector2I adjustedPosition = GetAdjustedMousePosition();
|
||||||
|
MakeField(adjustedPosition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,43 +77,23 @@ public partial class FarmingControls2D : Node2D
|
|||||||
{
|
{
|
||||||
Vector2 mousePosition = _camera.GetGlobalMousePosition();
|
Vector2 mousePosition = _camera.GetGlobalMousePosition();
|
||||||
Vector2I mousePositionInteger = (Vector2I) mousePosition;
|
Vector2I mousePositionInteger = (Vector2I) mousePosition;
|
||||||
Vector2I adjustedPosition = AdjustValue(mousePositionInteger, new Vector2I(735, 651));
|
Vector2I adjustedPosition = AdjustValue(mousePositionInteger, _fieldOffsetVector);
|
||||||
return adjustedPosition;
|
return adjustedPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
private Vector2I AdjustValue(Vector2I input, Vector2I step)
|
||||||
/// Called by the allowed farming area collision area 2d.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="node"></param>
|
|
||||||
/// <param name="inputEvent"></param>
|
|
||||||
/// <param name="shapeIndex"></param>
|
|
||||||
public void InputEventPressedOn(Node node, InputEvent inputEvent, int shapeIndex)
|
|
||||||
{
|
{
|
||||||
if (!inputEvent.IsPressed())
|
return input.Snapped(step);
|
||||||
{
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!inputEvent.IsActionPressed("click"))
|
public void CanCreateFields()
|
||||||
return;
|
{
|
||||||
|
_canCreateFields = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (inputEvent is InputEventMouseButton inputEventMouseButton)
|
public void CannotCreateFields()
|
||||||
{
|
{
|
||||||
if (!inputEventMouseButton.Pressed)
|
_canCreateFields = false;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_toolId == 0)
|
|
||||||
{
|
|
||||||
Vector2I adjustedPosition = GetAdjustedMousePosition();
|
|
||||||
MakeField(adjustedPosition);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region WATERING
|
#region WATERING
|
||||||
@@ -115,9 +107,11 @@ public partial class FarmingControls2D : Node2D
|
|||||||
|
|
||||||
private void WaterTheField(Vector2I fieldPosition)
|
private void WaterTheField(Vector2I fieldPosition)
|
||||||
{
|
{
|
||||||
FieldBehaviour2D field = FieldService.Get(fieldPosition);
|
FieldBehaviour2D? field = FieldService.Instance.TryGet(_sceneKeyProvider.Payload.AsString(), fieldPosition);
|
||||||
if (field == null || field.FieldState == FieldState.Watered)
|
if (field == null || field.FieldState == FieldState.Watered)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
field.Water();
|
field.Water();
|
||||||
_wateringParticles.GlobalPosition = new Vector2(field.GlobalPosition.X, field.GlobalPosition.Y + _wateringCanParticlesVerticalOffset);
|
_wateringParticles.GlobalPosition = new Vector2(field.GlobalPosition.X, field.GlobalPosition.Y + _wateringCanParticlesVerticalOffset);
|
||||||
@@ -130,11 +124,11 @@ public partial class FarmingControls2D : Node2D
|
|||||||
#region FIELD CREATION
|
#region FIELD CREATION
|
||||||
private void MakeField(Vector2I fieldPosition)
|
private void MakeField(Vector2I fieldPosition)
|
||||||
{
|
{
|
||||||
if(FieldService == null || _fieldPrefab == null)
|
if(_fieldPrefab == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// only instantiate a field if there isn't one already.
|
// only instantiate a field if there isn't one already.
|
||||||
if(FieldService.Get(fieldPosition) == null)
|
if(FieldService.Instance.TryGet(_sceneKeyProvider.Payload.AsString(), fieldPosition) == null)
|
||||||
{
|
{
|
||||||
Node fieldInstance = _fieldPrefab.Instantiate();
|
Node fieldInstance = _fieldPrefab.Instantiate();
|
||||||
if (fieldInstance is Node2D field2d)
|
if (fieldInstance is Node2D field2d)
|
||||||
@@ -142,27 +136,20 @@ public partial class FarmingControls2D : Node2D
|
|||||||
// add dictionary entry for the field
|
// add dictionary entry for the field
|
||||||
Array<Node> fields = field2d.FindChildren("*", nameof(FieldBehaviour2D));
|
Array<Node> fields = field2d.FindChildren("*", nameof(FieldBehaviour2D));
|
||||||
if (fields.Count > 0)
|
if (fields.Count > 0)
|
||||||
FieldService.TryAddEntry(fieldPosition, fields[0] as FieldBehaviour2D);
|
{
|
||||||
|
FieldService.Instance.TryAddEntry(_sceneKeyProvider.Payload.AsString(), fieldPosition, fields[0] as FieldBehaviour2D);
|
||||||
|
}
|
||||||
|
|
||||||
// reposition and reparent the instance
|
// reposition and reparent the instance
|
||||||
field2d.Position = new Vector2(fieldPosition.X, fieldPosition.Y);;
|
field2d.Position = new Vector2(fieldPosition.X, fieldPosition.Y);
|
||||||
FieldService.AddChild(fieldInstance);
|
|
||||||
|
FieldService.Instance.AddChild(fieldInstance);
|
||||||
|
EmitSignal(SignalName.FieldCreated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int AdjustValue(float value)
|
|
||||||
{
|
|
||||||
float adjustedValue = value / 500;
|
|
||||||
adjustedValue = Mathf.RoundToInt(adjustedValue);
|
|
||||||
adjustedValue *= 500;
|
|
||||||
return (int)adjustedValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Vector2I AdjustValue(Vector2I input, Vector2I step)
|
|
||||||
{
|
|
||||||
return input.Snapped(step);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,8 @@ public partial class FieldBehaviour2D : Sprite2D
|
|||||||
{
|
{
|
||||||
[Export] private Sprite2D _fieldSprite;
|
[Export] private Sprite2D _fieldSprite;
|
||||||
[Export] private Sprite2D _maskSprite;
|
[Export] private Sprite2D _maskSprite;
|
||||||
|
[Export] private Sprite2D _outlineSprite;
|
||||||
|
[Export] private Texture2D[] _maskOutlineTextures;
|
||||||
[Export] private Texture2D[] _maskTexture;
|
[Export] private Texture2D[] _maskTexture;
|
||||||
[Export] private Texture2D Tilled;
|
[Export] private Texture2D Tilled;
|
||||||
[Export] private Texture2D Watered;
|
[Export] private Texture2D Watered;
|
||||||
@@ -17,15 +19,42 @@ public partial class FieldBehaviour2D : Sprite2D
|
|||||||
[Export] public InteractionArea2D PlantingInteraction;
|
[Export] public InteractionArea2D PlantingInteraction;
|
||||||
[Export] public Node2D PlantingPlaceholder;
|
[Export] public Node2D PlantingPlaceholder;
|
||||||
[Export] public ItemRepository ItemRepository;
|
[Export] public ItemRepository ItemRepository;
|
||||||
|
[Export] public InteractionArea2D FieldInteractionArea;
|
||||||
|
|
||||||
public Vector2 FieldPosition;
|
public Vector2 FieldPosition;
|
||||||
|
|
||||||
|
private bool _seedsActive;
|
||||||
|
private bool _wateringCanActive;
|
||||||
|
|
||||||
|
[Signal] public delegate void PlantedEventHandler();
|
||||||
|
|
||||||
|
private void UpdateInteractionArea()
|
||||||
|
{
|
||||||
|
// fieldstate == tilled / watered && samen im Inventar
|
||||||
|
bool canPlant = (FieldState == FieldState.Tilled || FieldState == FieldState.Watered) && _seedsActive;
|
||||||
|
// fieldstate == tilled && watering can ausgewählt
|
||||||
|
bool canWater = FieldState == FieldState.Tilled && _wateringCanActive;
|
||||||
|
FieldInteractionArea.IsActive = canPlant || canWater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ActivatedSeedInInventory(bool activated)
|
||||||
|
{
|
||||||
|
_seedsActive = activated;
|
||||||
|
UpdateInteractionArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ActivateWateringCanInInventory(bool activated)
|
||||||
|
{
|
||||||
|
_wateringCanActive = activated;
|
||||||
|
UpdateInteractionArea();
|
||||||
|
}
|
||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
UpdateFieldState(FieldState);
|
UpdateFieldState(FieldState);
|
||||||
int randomIndex = new Random().Next(0, _maskTexture.Length);
|
int randomIndex = new Random().Next(0, _maskTexture.Length);
|
||||||
_maskSprite.Texture = _maskTexture[randomIndex];
|
_maskSprite.Texture = _maskTexture[randomIndex];
|
||||||
|
_outlineSprite.Texture = _maskOutlineTextures[randomIndex];
|
||||||
base._Ready();
|
base._Ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +85,7 @@ public partial class FieldBehaviour2D : Sprite2D
|
|||||||
FieldState = FieldState.NotFound;
|
FieldState = FieldState.NotFound;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
UpdateInteractionArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -65,13 +95,14 @@ public partial class FieldBehaviour2D : Sprite2D
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the player enters the field's interaction area and presses <E>.
|
/// Called when the player enters the field's interaction area and presses <E> or clicks.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Farm()
|
public void Farm()
|
||||||
{
|
{
|
||||||
if (TryPlant())
|
if (TryPlant())
|
||||||
{
|
{
|
||||||
UpdateFieldState(FieldState.Planted);
|
EmitSignal(SignalName.Planted);
|
||||||
|
UpdateFieldState(FieldState.Planted);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Babushka.scripts.CSharp.Common.Farming;
|
||||||
|
|
||||||
|
public partial class FieldService : Node
|
||||||
|
{
|
||||||
|
private Dictionary<string, FieldsInScene>? _outerDict = null!;
|
||||||
|
public static FieldService Instance { get; private set; } = null!;
|
||||||
|
|
||||||
|
public override void _EnterTree()
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
_outerDict = new Dictionary<string, FieldsInScene>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _ExitTree()
|
||||||
|
{
|
||||||
|
Instance = null;
|
||||||
|
_outerDict = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Create
|
||||||
|
public bool TryAddEntry(string sceneName, Vector2I position, FieldBehaviour2D field)
|
||||||
|
{
|
||||||
|
if (_outerDict != null )
|
||||||
|
{
|
||||||
|
FieldsInScene innerDict;
|
||||||
|
bool outerDictEntryExists = _outerDict.TryGetValue(sceneName, out innerDict);
|
||||||
|
|
||||||
|
if (!outerDictEntryExists)
|
||||||
|
{
|
||||||
|
innerDict = new FieldsInScene();
|
||||||
|
_outerDict.Add(sceneName, innerDict);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!innerDict.fields.ContainsKey(position))
|
||||||
|
{
|
||||||
|
innerDict.fields.Add(position, field);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read
|
||||||
|
public FieldBehaviour2D? TryGet(string key, Vector2I fieldPosition)
|
||||||
|
{
|
||||||
|
if (_outerDict != null && _outerDict.TryGetValue(key, out FieldsInScene? field))
|
||||||
|
{
|
||||||
|
if (field.fields.TryGetValue(fieldPosition, out FieldBehaviour2D? fieldInstance))
|
||||||
|
{
|
||||||
|
return fieldInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Update
|
||||||
|
public void UpdateEntry(string key, Vector2I fieldPosition, FieldBehaviour2D state)
|
||||||
|
{
|
||||||
|
if (_outerDict != null && _outerDict.TryGetValue(key, out FieldsInScene? field))
|
||||||
|
{
|
||||||
|
if (field.fields.ContainsKey(fieldPosition))
|
||||||
|
{
|
||||||
|
field.fields[fieldPosition] = state;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TryAddEntry(key, fieldPosition, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Delete
|
||||||
|
|
||||||
|
public void RemoveEntry(string key, Vector2I fieldPosition)
|
||||||
|
{
|
||||||
|
if (_outerDict != null && _outerDict.TryGetValue(key, out FieldsInScene? field))
|
||||||
|
{
|
||||||
|
if (field.fields.ContainsKey(fieldPosition))
|
||||||
|
{
|
||||||
|
field.fields.Remove(fieldPosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class FieldsInScene
|
||||||
|
{
|
||||||
|
public Dictionary<Vector2I, FieldBehaviour2D?> fields;
|
||||||
|
|
||||||
|
public FieldsInScene()
|
||||||
|
{
|
||||||
|
fields = new Dictionary<Vector2I, FieldBehaviour2D?>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://slo0uydmmvnu
|
||||||
@@ -39,7 +39,6 @@ public partial class PlantBehaviour2D : Node2D
|
|||||||
{
|
{
|
||||||
if (_state == PlantState.None)
|
if (_state == PlantState.None)
|
||||||
{
|
{
|
||||||
GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation);
|
|
||||||
_state = PlantState.Planted;
|
_state = PlantState.Planted;
|
||||||
_currentPlantSprite = GetRandomSprite(_seeds);
|
_currentPlantSprite = GetRandomSprite(_seeds);
|
||||||
_currentPlantSprite.Visible = true;
|
_currentPlantSprite.Visible = true;
|
||||||
@@ -52,7 +51,6 @@ public partial class PlantBehaviour2D : Node2D
|
|||||||
|
|
||||||
public void Grow()
|
public void Grow()
|
||||||
{
|
{
|
||||||
GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation);
|
|
||||||
GrowPlant();
|
GrowPlant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ namespace Babushka.scripts.CSharp.Common.Farming;
|
|||||||
public partial class VesnaBehaviour2D : Node
|
public partial class VesnaBehaviour2D : Node
|
||||||
{
|
{
|
||||||
[ExportGroup("Farming")]
|
[ExportGroup("Farming")]
|
||||||
[Export] private FieldService2D _fieldParent;
|
|
||||||
[Export] private FarmingControls2D _farmingControls;
|
[Export] private FarmingControls2D _farmingControls;
|
||||||
[Export] private PlayerMovement _player2d;
|
[Export] private PlayerMovement _player2d;
|
||||||
[Export] private VesnaAnimations _vesnaAnimations;
|
[Export] private VesnaAnimations _vesnaAnimations;
|
||||||
@@ -26,7 +25,6 @@ public partial class VesnaBehaviour2D : Node
|
|||||||
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
_farmingControls.FieldService = _fieldParent;
|
|
||||||
_inventoryManager = InventoryManager.Instance;
|
_inventoryManager = InventoryManager.Instance;
|
||||||
_inventoryInstance = _inventoryManager.playerInventory;
|
_inventoryInstance = _inventoryManager.playerInventory;
|
||||||
_inventoryManager.SlotIndexChanged += HandleInventorySelectedSlotIndexChanged;
|
_inventoryManager.SlotIndexChanged += HandleInventorySelectedSlotIndexChanged;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Babushka.scripts.CSharp.Common.Inventory;
|
||||||
|
|
||||||
|
public partial class InventoryListener : Node
|
||||||
|
{
|
||||||
|
[Export] private ItemResource[] _itemResourcesToListenFor;
|
||||||
|
|
||||||
|
[Signal] public delegate void ItemInstanceActivatedEventHandler(bool activated);
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
InventoryManager.Instance.playerInventory.InventoryContentsChanged += HandleNewItemInInventory;
|
||||||
|
InventoryManager.Instance.SlotIndexChanged += HandleNewItemInInventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _ExitTree()
|
||||||
|
{
|
||||||
|
InventoryManager.Instance.playerInventory.InventoryContentsChanged -= HandleNewItemInInventory;
|
||||||
|
InventoryManager.Instance.SlotIndexChanged -= HandleNewItemInInventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleNewItemInInventory(int newIndex)
|
||||||
|
{
|
||||||
|
HandleNewItemInInventory();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleNewItemInInventory()
|
||||||
|
{
|
||||||
|
int currentSlotIndex = InventoryManager.Instance.CurrentSelectedSlotIndex;
|
||||||
|
ItemInstance? instance = InventoryManager.Instance.playerInventory.Slots[currentSlotIndex].itemInstance;
|
||||||
|
if (instance != null)
|
||||||
|
{
|
||||||
|
ItemResource? item = instance.blueprint;
|
||||||
|
|
||||||
|
foreach (var res in _itemResourcesToListenFor)
|
||||||
|
{
|
||||||
|
if (item == res)
|
||||||
|
{
|
||||||
|
EmitSignal(SignalName.ItemInstanceActivated, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EmitSignal(SignalName.ItemInstanceActivated, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://3t0af586fimq
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
using Babushka.scripts.CSharp.Common.Animation;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Babushka.scripts.CSharp.Common.Items;
|
|
||||||
|
|
||||||
public partial class NonInventoryPickup : Node2D
|
|
||||||
{
|
|
||||||
public void PlayPickupAnimation()
|
|
||||||
{
|
|
||||||
// todo: replace with EventBus implementation as soon as this is possible
|
|
||||||
GetTree().CallGroup("Pickup", VesnaAnimations.MethodName.PlayPickUpAnimation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dkk1vjijvgrd7
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Godot;
|
using Godot;
|
||||||
namespace Babushka.scripts.CSharp.Common.Util;
|
namespace Babushka.scripts.CSharp.Common.Util;
|
||||||
|
|
||||||
@@ -23,4 +24,54 @@ public static class NodeExtension
|
|||||||
}
|
}
|
||||||
throw new Exception($"Parent of type {typeof(T)} not found for node {self.Name}");
|
throw new Exception($"Parent of type {typeof(T)} not found for node {self.Name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//acts like Unity's GetComponent<T> / GetComponentInChildren<T>
|
||||||
|
// only works with Godot's built-in types.
|
||||||
|
public static T GetChildByType<T>(this Node node, bool recursive = true)
|
||||||
|
where T : Node
|
||||||
|
{
|
||||||
|
int childCount = node.GetChildCount();
|
||||||
|
|
||||||
|
for (int i = 0; i < childCount; i++)
|
||||||
|
{
|
||||||
|
Node child = node.GetChild(i);
|
||||||
|
if (child is T childT)
|
||||||
|
return childT;
|
||||||
|
|
||||||
|
if (recursive && child.GetChildCount() > 0)
|
||||||
|
{
|
||||||
|
T recursiveResult = child.GetChildByType<T>(true);
|
||||||
|
if (recursiveResult != null)
|
||||||
|
return recursiveResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Another reimplementation of Unity's GetComponent<T>.
|
||||||
|
/// Verified to work with all types, also derived ones, but only when used from within a scene and at runtime.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="node"></param>
|
||||||
|
/// <typeparam name="T"></typeparam>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static T GetComponent<T>(Node node)
|
||||||
|
{
|
||||||
|
if (node is T)
|
||||||
|
{
|
||||||
|
return (T)(object)node;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Node child in node.GetChildren())
|
||||||
|
{
|
||||||
|
if (child is T)
|
||||||
|
{
|
||||||
|
return (T)(object)child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (T)(object)null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user