Compare commits

..

17 Commits

Author SHA1 Message Date
saderako 5636c0da67 Add first two cat animations
Petting animation is still being worked on
2025-12-22 12:30:31 +01:00
kziolkowski 4578a2cfda Added Spine2D GDExtension bin to project 2025-12-22 10:48:58 +01:00
Jonathan 9032272599 Merge pull request 'BlobFighter TargetSelection ColliderShape2D Transform angepasst' (#42) from Enemy_selection_overlap into develop
Reviewed-on: #42
Reviewed-by: Jonathan <cblech@ymail.com>
2025-12-18 13:06:03 +01:00
jlink a2ef3bfaf0 Window angepasst 2025-12-18 13:02:32 +01:00
jlink 1ab1071246 HoverIndicator off 2025-12-17 15:29:58 +01:00
Jonathan e5b2b8b8ab Merge pull request 'Connect farming and fighting by making them codependent' (#44) from feature/farm_fight_loop into develop
Reviewed-on: #44
2025-12-16 20:44:26 +01:00
Jonathan 2fa8aa9fbc Merge pull request 'Vesna resets to bed after death' (#47) from Vesna_resets_to_bed_after_dead into develop
Reviewed-on: #47
Reviewed-by: Jonathan <cblech@ymail.com>
2025-12-16 19:37:29 +01:00
Jonathan 6deb6e29fd Merge pull request 'Made attack selection only select alive enemies' (#45) from bug/attack_dead_enemy into develop
Reviewed-on: #45
Reviewed-by: kziolkowski <katharina.ziolkowski@gmail.com>
2025-12-16 19:30:33 +01:00
Jonathan edc133749f Merge pull request 'Randomized who starts the fight' (#41) from randomise_fight_start into develop
Reviewed-on: #41
Reviewed-by: kziolkowski <katharina.ziolkowski@gmail.com>
2025-12-16 19:28:37 +01:00
jonathan 5f75bde317 💄 Made heal button show how many beats are left 2025-12-16 19:24:20 +01:00
jonathan 7310bfbf6e Added flying beet to the ui when used 2025-12-16 19:09:03 +01:00
jonathan fef8380a57 When beetroot is in inventory the player can heal 2025-12-16 19:09:03 +01:00
jonathan f42c2c86b1 Defeated enemygroups now drop a beet_seed 2025-12-16 19:09:03 +01:00
jlink 2ed9dbbc52 Vesna resets to bed after death 2025-12-16 15:34:52 +01:00
jonathan 6375383373 🐛Made attack selection only select alive enemies 2025-12-11 18:49:51 +01:00
jlink 09f55d3aa7 BlobFighter TargetSelection ColliderShape2D Transform angepasst 2025-12-10 15:29:56 +01:00
jonathan a736adaafb Randomized who starts the fight 2025-12-09 15:07:50 +01:00
106 changed files with 1258 additions and 996 deletions
+8
View File
@@ -0,0 +1,8 @@
[gd_resource type="SpineSkeletonDataResource" load_steps=3 format=3 uid="uid://b8320gi2iry7e"]
[ext_resource type="SpineAtlasResource" uid="uid://bp5dm6ppdxyfy" path="res://art/animation/Cat/sk_cat.atlas" id="1_silct"]
[ext_resource type="SpineSkeletonFileResource" uid="uid://dj4q5ov01nmar" path="res://art/animation/Cat/sk_cat.skel" id="2_bwfy5"]
[resource]
atlas_res = ExtResource("1_silct")
skeleton_file_res = ExtResource("2_bwfy5")
+12
View File
@@ -0,0 +1,12 @@
[gd_scene load_steps=2 format=3 uid="uid://cdqhc3rpjiod2"]
[ext_resource type="SpineSkeletonDataResource" uid="uid://b8320gi2iry7e" path="res://art/animation/Cat/cat.tres" id="1_x424w"]
[node name="Cat" type="Node2D"]
[node name="SpineSprite" type="SpineSprite" parent="."]
skeleton_data_res = ExtResource("1_x424w")
preview_skin = "Default"
preview_animation = "Idle"
preview_frame = false
preview_time = 0.0
+29
View File
@@ -0,0 +1,29 @@
sk_cat.png
size:4930,1270
filter:Linear,Linear
pma:true
cat_backleg_lower
bounds:0,0,72,113
cat_backleg_upper
bounds:493,0,181,200
offsets:0,1,181,201
cat_body
bounds:986,0,493,349
cat_eyeball
bounds:1479,0,302,155
cat_eyelashes
bounds:1972,0,331,160
cat_frontleg_lower
bounds:2465,0,84,115
offsets:0,1,84,116
cat_frontleg_upper
bounds:2958,0,76,169
cat_head
bounds:3451,0,422,575
offsets:0,2,422,577
cat_leg
bounds:3944,0,218,635
cat_nose
bounds:4437,0,294,93
cat_pupil
bounds:0,635,235,117
+16
View File
@@ -0,0 +1,16 @@
[remap]
importer="spine.atlas"
type="SpineAtlasResource"
uid="uid://bp5dm6ppdxyfy"
path="res://.godot/imported/sk_cat.atlas-209e52708ae51512bd5a9c13ecef821d.spatlas"
[deps]
source_file="res://art/animation/Cat/sk_cat.atlas"
dest_files=["res://.godot/imported/sk_cat.atlas-209e52708ae51512bd5a9c13ecef821d.spatlas"]
[params]
normal_map_prefix="n"
specular_map_prefix="s"
Binary file not shown.

After

Width:  |  Height:  |  Size: 515 KiB

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://s1yoemhrupwe"
path="res://.godot/imported/vesna_indoor_bed.png-82be6dfddfce8701f4d35f6270cb0cdb.ctex"
uid="uid://bxbae280ae8yv"
path="res://.godot/imported/sk_cat.png-400ad3198e50487a16cece95aef9c056.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/indoor/vesna_indoor_bed.png"
dest_files=["res://.godot/imported/vesna_indoor_bed.png-82be6dfddfce8701f4d35f6270cb0cdb.ctex"]
source_file="res://art/animation/Cat/sk_cat.png"
dest_files=["res://.godot/imported/sk_cat.png-400ad3198e50487a16cece95aef9c056.ctex"]
[params]
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
[remap]
importer="spine.skel"
type="SpineSkeletonFileResource"
uid="uid://dj4q5ov01nmar"
path="res://.godot/imported/sk_cat.skel-040dd3b0902fe4467d3f597cd8205232.spskel"
[deps]
source_file="res://art/animation/Cat/sk_cat.skel"
dest_files=["res://.godot/imported/sk_cat.skel-040dd3b0902fe4467d3f597cd8205232.spskel"]
[params]
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

-40
View File
@@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnlhlf1mx01h5"
path="res://.godot/imported/vesna_indoor_door.png-480faae15ccfa0c6172c753cd0b4d6a0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/indoor/vesna_indoor_door.png"
dest_files=["res://.godot/imported/vesna_indoor_door.png-480faae15ccfa0c6172c753cd0b4d6a0.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
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleExecutable</key>
<string>libspine_godot.ios.template_debug</string>
<key>CFBundleName</key>
<string>spine-godot</string>
<key>CFBundleIdentifier</key>
<string>com.esotericsoftware.spine.spine-godot</string>
<key>CFBundleVersion</key>
<string>4.2.0</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
</dict>
</plist>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleExecutable</key>
<string>libspine_godot.ios.template_release</string>
<key>CFBundleName</key>
<string>spine-godot</string>
<key>CFBundleIdentifier</key>
<string>com.esotericsoftware.spine.spine-godot</string>
<key>CFBundleVersion</key>
<string>4.2.0</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
</dict>
</plist>
Binary file not shown.
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleExecutable</key>
<string>libspine_godot.macos.editor</string>
<key>CFBundleName</key>
<string>spine-godot</string>
<key>CFBundleIdentifier</key>
<string>com.esotericsoftware.spine.spine-godot</string>
<key>CFBundleVersion</key>
<string>4.2.0</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
</dict>
</plist>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleExecutable</key>
<string>libspine_godot.macos.template_debug</string>
<key>CFBundleName</key>
<string>spine-godot</string>
<key>CFBundleIdentifier</key>
<string>com.esotericsoftware.spine.spine-godot</string>
<key>CFBundleVersion</key>
<string>4.2.0</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
</dict>
</plist>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleExecutable</key>
<string>libspine_godot.macos.template_release</string>
<key>CFBundleName</key>
<string>spine-godot</string>
<key>CFBundleIdentifier</key>
<string>com.esotericsoftware.spine.spine-godot</string>
<key>CFBundleVersion</key>
<string>4.2.0</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
</dict>
</plist>
+40
View File
@@ -0,0 +1,40 @@
[configuration]
entry_symbol = "spine_godot_library_init"
compatibility_minimum = "4.1"
[libraries]
macos.editor = "macos/libspine_godot.macos.editor.framework"
macos.debug = "macos/libspine_godot.macos.template_debug.framework"
macos.release = "macos/libspine_godot.macos.template_release.framework"
ios.debug = "ios/libspine_godot.ios.template_debug.framework"
ios.release = "ios/libspine_godot.ios.template_release.framework"
windows.editor.x86_64 = "windows/libspine_godot.windows.editor.x86_64.dll"
windows.debug.x86_64 = "windows/libspine_godot.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "windows/libspine_godot.windows.template_release.x86_64.dll"
linux.editor.x86_64 = "linux/libspine_godot.linux.editor.x86_64.so"
linux.debug.x86_64 = "linux/libspine_godot.linux.template_debug.x86_64.so"
linux.release.x86_64 = "linux/libspine_godot.linux.template_release.x86_64.so"
linux.editor.arm64 = "linux/libspine_godot.linux.editor.arm64.so"
linux.debug.arm64 = "linux/libspine_godot.linux.template_debug.arm64.so"
linux.release.arm64 = "linux/libspine_godot.linux.template_release.arm64.so"
linux.editor.rv64 = "linux/libspine_godot.linux.editor.rv64.so"
linux.debug.rv64 = "linux/libspine_godot.linux.template_debug.rv64.so"
linux.release.rv64 = "linux/libspine_godot.linux.template_release.rv64.so"
android.debug.x86_64 = "android/libspine_godot.android.template_debug.x86_64.so"
android.release.x86_64 = "android/libspine_godot.android.template_release.x86_64.so"
android.debug.arm64 = "android/libspine_godot.android.template_debug.arm64.so"
android.release.arm64 = "android/libspine_godot.android.template_release.arm64.so"
web.debug.threads.wasm32 = "web/libspine_godot.web.template_debug.wasm32.wasm"
web.release.threads.wasm32 = "web/libspine_godot.web.template_release.wasm32.wasm"
web.debug.wasm32 = "web/libspine_godot.web.template_debug.wasm32.nothreads.wasm"
web.release.wasm32 = "web/libspine_godot.web.template_release.wasm32.nothreads.wasm"
@@ -0,0 +1 @@
uid://cjp18u5g8vh2o
Binary file not shown.
+2 -4
View File
@@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="_builds/Babushka_showcase_6a/Babushka.exe"
export_path="_builds/Babushka_win_0_5/Babushka.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
@@ -26,7 +26,6 @@ debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
@@ -80,7 +79,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="_builds/Babushka_showcase_lux_06a/Babushka.x86_64"
export_path="_builds/Babushka_linux_0_5/Babushka.x86_64"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
@@ -97,7 +96,6 @@ debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
+3 -6
View File
@@ -1,8 +1,7 @@
[gd_scene load_steps=18 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="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_gcgfd"]
[ext_resource type="Script" uid="uid://c2cgj153m05sp" path="res://scripts/CSharp/Common/Interactables/TrashObject.cs" id="2_u7jgg"]
[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://br4drgupled6c" path="res://audio/sfx/Kitchen/SFX_Cooking_Pot_01.wav" id="5_dx175"]
@@ -30,15 +29,13 @@ stream_7/stream = ExtResource("10_aqih4")
stream_8/stream = ExtResource("11_kb03l")
stream_9/stream = ExtResource("12_kka6u")
[node name="trashObject" type="Sprite2D" groups=["Saveable"]]
[node name="trashObject" type="Sprite2D"]
z_index = 1
y_sort_enabled = true
texture = ExtResource("1_k4ca3")
offset = Vector2(1, -215)
region_enabled = true
region_rect = Rect2(44, 479, 356, 503)
script = ExtResource("2_u7jgg")
metadata/SaveID = ""
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("2_gcgfd")]
position = Vector2(0, -172)
@@ -54,6 +51,6 @@ script = ExtResource("13_wswkg")
script = ExtResource("14_dx175")
_eventResources = Array[Object]([ExtResource("15_u7jgg")])
[connection signal="Interacted" from="InteractionArea" to="." method="Collect"]
[connection signal="Interacted" from="InteractionArea" to="." method="queue_free"]
[connection signal="Interacted" from="InteractionArea" to="AudioStreamPlayer2D" method="PlayOneShot"]
[connection signal="Interacted" from="InteractionArea" to="PickupAnimationEventRaiser" method="RaiseEvents"]
-12
View File
@@ -1,12 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://7pvvop5hfl01"]
[ext_resource type="Script" uid="uid://iquhbkr7pqeg" path="res://scripts/CSharp/Common/Savegame/SaveCheats.cs" id="1_vcrak"]
[ext_resource type="Script" uid="uid://ca4s0algeij1h" path="res://scripts/CSharp/Common/Savegame/SaveIDProviderTool.cs" id="2_q0tmy"]
[node name="SaveSystem" type="Node"]
[node name="SaveGameCheat" type="Node" parent="."]
script = ExtResource("1_vcrak")
[node name="SaveIDProvider" type="Node" parent="."]
script = ExtResource("2_q0tmy")
+3 -3
View File
@@ -2123,6 +2123,9 @@ frame = 7
frame_progress = 0.229832
offset = Vector2(0, -450)
[node name="DetectionCross" parent="CharacterBody2D" instance=ExtResource("466_e04c3")]
position = Vector2(0, -200)
[node name="PlantCreatedEventListener" type="Node" parent="CharacterBody2D"]
script = ExtResource("467_8hbu5")
_eventResources = Array[Object]([ExtResource("468_t1d6r")])
@@ -2172,9 +2175,6 @@ scrollable = false
script = ExtResource("472_kduih")
_wateringCanFillStateNode = NodePath("../WateringCanFillState")
[node name="DetectionCross" parent="CharacterBody2D" instance=ExtResource("466_e04c3")]
position = Vector2(0, -260)
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer")]
script = ExtResource("817_6nrw3")
_sceneKeyProvider = ExtResource("471_83c4i")
+3 -1
View File
@@ -1,7 +1,8 @@
[gd_scene load_steps=24 format=3 uid="uid://muuxxgvx33fp"]
[gd_scene load_steps=25 format=3 uid="uid://muuxxgvx33fp"]
[ext_resource type="Script" uid="uid://7m1rt7agb6rm" path="res://scripts/CSharp/Common/Temp/MVPDuck.cs" id="1_54k4r"]
[ext_resource type="Texture2D" uid="uid://hvchk6t0xe7j" path="res://art/animals/Ente.png" id="1_cgxhx"]
[ext_resource type="Resource" uid="uid://tt3d166mntmi" path="res://resources/low code/farming/var_sceneNameProvider.tres" id="2_fdf3t"]
[ext_resource type="AudioStream" uid="uid://qv0aubjeyi0u" path="res://audio/sfx/Animals/SFX_Duck_Quack_01.wav" id="3_kjie1"]
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="3_rdn2q"]
[ext_resource type="AudioStream" uid="uid://da84l8e44scwh" path="res://audio/sfx/Animals/SFX_Duck_Quack_02.wav" id="4_54k4r"]
@@ -142,6 +143,7 @@ viewport_path = NodePath("SubViewport")
z_index = 1
y_sort_enabled = true
script = ExtResource("1_54k4r")
_sceneKeyProvider = ExtResource("2_fdf3t")
_transferDelayMs = 1000
_animationPlayer = NodePath("AnimationPlayer")
+5 -9
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=3 uid="uid://b1d2e7ely6hyw"]
[gd_scene load_steps=25 format=3 uid="uid://b1d2e7ely6hyw"]
[ext_resource type="Script" uid="uid://j2mhvb45egej" path="res://scripts/CSharp/Low Code/Variables/VariableNode.cs" id="1_4mg73"]
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="1_qa01x"]
@@ -23,7 +23,6 @@
[ext_resource type="Texture2D" uid="uid://l5ym7gi82l1b" path="res://art/ui/UI/Watercan-ui/Tropfen-ui-6.png" id="21_4mg73"]
[ext_resource type="Resource" uid="uid://dlcmqfjvgphqu" path="res://resources/items/rake.tres" id="21_68xcd"]
[ext_resource type="Script" uid="uid://dlbjjgbs0n4b0" path="res://scripts/CSharp/Common/Farming/FieldActivator.cs" id="22_57jmp"]
[ext_resource type="PackedScene" uid="uid://7pvvop5hfl01" path="res://prefabs/SaveSystem/save_system.tscn" id="24_avqr3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_57jmp"]
resource_local_to_scene = true
@@ -39,7 +38,7 @@ z_index = 1
scale = Vector2(1.3499999, 1.5)
texture = ExtResource("9_wx561")
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldIndex", "_saveIdHolder", "_fieldSprite", "_maskSprite", "_outlineSprite", "PlantingInteraction", "PlantingPlaceholder", "_wateringParticles")]
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldIndex", "_saveIdHolder", "_fieldSprite", "_maskSprite", "_outlineSprite", "PlantingInteraction", "FieldInteractionArea", "PlantingPlaceholder", "_wateringParticles")]
visible = false
z_index = -1
y_sort_enabled = true
@@ -57,6 +56,7 @@ _maskTexture = Array[Texture2D]([ExtResource("2_w8caw"), ExtResource("3_c014y"),
Tilled = ExtResource("5_wx561")
Watered = ExtResource("6_7m4xq")
PlantingInteraction = NodePath("InteractionArea")
FieldInteractionArea = NodePath("InteractionArea")
PlantingPlaceholder = NodePath("PlantPlaceholder")
ItemRepository = ExtResource("7_w8caw")
_wateringParticles = NodePath("../pouring water vfx")
@@ -74,11 +74,11 @@ texture = ExtResource("5_wx561")
y_sort_enabled = true
[node name="InteractionArea" parent="FieldBehaviour" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_2eegd")]
process_mode = 4
position = Vector2(-28.88889, -57)
scale = Vector2(1.1111112, 1)
_active = false
_spritesToOutline = [NodePath("../../OutlineSprite")]
_showLabel = false
[node name="PlantCreationEventRaiser" type="Node" parent="."]
script = ExtResource("9_teirr")
@@ -115,11 +115,10 @@ scale_amount_max = 0.8
color = Color(0.400601, 0.62444, 0.791217, 1)
hue_variation_max = 0.4
[node name="FieldActivator" type="Node2D" parent="." node_paths=PackedStringArray("_field", "_activatorArea") groups=["Saveable"]]
[node name="FieldActivator" type="Node2D" parent="." node_paths=PackedStringArray("_field", "_activatorArea")]
script = ExtResource("22_57jmp")
_field = NodePath("../FieldBehaviour")
_activatorArea = NodePath("InteractionArea")
metadata/SaveID = "8ac5da1c-3ddd-4b76-94c2-d655a4f369c7"
[node name="InteractionArea" parent="FieldActivator" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("7_2eegd")]
_spritesToOutline = [NodePath("../../OutlineSprite")]
@@ -130,8 +129,6 @@ shape = SubResource("CircleShape2D_57jmp")
[node name="Marker2D" type="Marker2D" parent="."]
gizmo_extents = 157.0
[node name="SaveSystem" parent="." instance=ExtResource("24_avqr3")]
[connection signal="Planted" from="FieldBehaviour" to="PlantCreationEventRaiser" method="RaiseEvents"]
[connection signal="Interacted" from="FieldBehaviour/InteractionArea" to="FieldBehaviour" method="Farm"]
[connection signal="ItemInstanceActivated" from="InventoryListener Seeds" to="FieldBehaviour" method="ActivatedSeedInInventory"]
@@ -141,4 +138,3 @@ gizmo_extents = 157.0
[connection signal="Interacted" from="FieldActivator/InteractionArea" to="FieldActivator/InteractionArea" method="ToggleActive"]
[editable path="FieldActivator/InteractionArea"]
[editable path="SaveSystem"]
+22 -2
View File
@@ -1,10 +1,30 @@
[gd_scene load_steps=2 format=3 uid="uid://l1hdihubffeg"]
[gd_scene load_steps=3 format=3 uid="uid://l1hdihubffeg"]
[ext_resource type="Script" uid="uid://b5i41b6502xam" path="res://scripts/CSharp/Common/Fight/FighterDamageIndicatorFlyingNumber.cs" id="1_m0ub6"]
[ext_resource type="Texture2D" uid="uid://do0y56t1moi2" path="res://art/mockups/erdbeeren.png" id="2_ctnqp"]
[node name="DamageFlyingNuber" type="Node2D" node_paths=PackedStringArray("_label")]
[node name="DamageFlyingNuber" type="Node2D" node_paths=PackedStringArray("_label", "_sprite")]
script = ExtResource("1_m0ub6")
_label = NodePath("Label")
_sprite = NodePath("TextureRect")
[node name="TextureRect" type="TextureRect" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -61.0
offset_top = -61.0
offset_right = 61.0
offset_bottom = 61.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2_ctnqp")
expand_mode = 1
stretch_mode = 5
[node name="Label" type="Label" parent="."]
custom_minimum_size = Vector2(200, 100)
+5 -1
View File
@@ -1,6 +1,10 @@
[gd_scene load_steps=2 format=3 uid="uid://n5cj71bxxjkk"]
[gd_scene load_steps=4 format=3 uid="uid://n5cj71bxxjkk"]
[ext_resource type="Script" uid="uid://dqe1i2qmpttwf" path="res://scripts/CSharp/Common/Fight/FightWorld.cs" id="1_tnyce"]
[ext_resource type="Resource" uid="uid://duq7tshxv6uhp" path="res://resources/items/beet_seed.tres" id="2_lxs0o"]
[ext_resource type="Resource" uid="uid://0mnsr4anoaiq" path="res://resources/items/beet.tres" id="3_008v8"]
[node name="FightWorldAutoload" type="Node2D"]
script = ExtResource("1_tnyce")
_itemToDropByEnemyGroup = ExtResource("2_lxs0o")
itemBeetrootToEatForHealth = ExtResource("3_008v8")
@@ -14,5 +14,9 @@ position = Vector2(23, -96)
scale = Vector2(0.547474, 0.547474)
texture = SubResource("AtlasTexture_ane0o")
[node name="CollisionShape2D" parent="TargetSelection/Click" index="0"]
position = Vector2(25.215, -195)
scale = Vector2(0.72370636, 1)
[node name="Sprite2D" parent="TargetSelection/HoverIndicator" index="0"]
position = Vector2(1, -126)
position = Vector2(0.84, -126)
+6 -15
View File
@@ -1,21 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://pflu0uaig7vv"]
[gd_scene load_steps=3 format=3 uid="uid://pflu0uaig7vv"]
[ext_resource type="Script" uid="uid://ccc6m6c5khd2x" path="res://scripts/CSharp/Common/CharacterControls/DetectionCross.cs" id="1_va8tx"]
[ext_resource type="PackedScene" uid="uid://dugr6ff1g7hi0" path="res://prefabs/interactions/detector.tscn" id="2_8hh05"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_va8tx"]
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_collider", "_shapeCast2D")]
[node name="DetectionCross" type="Node2D" node_paths=PackedStringArray("_detector")]
script = ExtResource("1_va8tx")
_collider = NodePath("detector")
_shapeCast2D = NodePath("ShapeCast2D")
_xOffset = 200.0
_yOffset = 200.0
_detector = NodePath("detector")
_xOffset = 400.0
_yOffset = 300.0
[node name="detector" parent="." node_paths=PackedStringArray("_shapeCast2D") instance=ExtResource("2_8hh05")]
_shapeCast2D = NodePath("../ShapeCast2D")
[node name="ShapeCast2D" type="ShapeCast2D" parent="."]
shape = SubResource("RectangleShape2D_va8tx")
target_position = Vector2(200, 0)
collide_with_areas = true
[node name="detector" parent="." instance=ExtResource("2_8hh05")]
+4 -6
View File
@@ -1,16 +1,14 @@
[gd_scene load_steps=4 format=3 uid="uid://dugr6ff1g7hi0"]
[gd_scene load_steps=3 format=3 uid="uid://dugr6ff1g7hi0"]
[ext_resource type="Script" uid="uid://c3pd60biootsx" path="res://scripts/CSharp/Common/CharacterControls/Detector.cs" id="1_6pib0"]
[ext_resource type="Resource" uid="uid://clwqh3w5aqi5e" path="res://resources/low code/interactables/var_interactableToTrigger.tres" id="2_3fanv"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6pib0"]
radius = 300.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_qwv4c"]
size = Vector2(100, 400)
[node name="detector" type="Area2D"]
collision_layer = 4
script = ExtResource("1_6pib0")
_itemToTriggerResource = ExtResource("2_3fanv")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_6pib0")
shape = SubResource("RectangleShape2D_qwv4c")
debug_color = Color(0.9459047, 7.2196126e-06, 0.5925879, 0.41960785)
+5 -12
View File
@@ -1,10 +1,8 @@
[gd_scene load_steps=8 format=3 uid="uid://cqc72e4hq6bcd"]
[gd_scene load_steps=6 format=3 uid="uid://cqc72e4hq6bcd"]
[ext_resource type="Script" uid="uid://ckp413wrub5fm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea2D.cs" id="1_5ajrf"]
[ext_resource type="Resource" uid="uid://clwqh3w5aqi5e" path="res://resources/low code/interactables/var_interactableToTrigger.tres" id="2_o1drf"]
[ext_resource type="Material" uid="uid://blch5kdhkbj75" path="res://art/materials/simple_interactable_outline.tres" id="2_qoey7"]
[ext_resource type="Script" uid="uid://cp2q4k62sjo6h" path="res://scripts/CSharp/Common/CharacterControls/DetectableInteractionArea.cs" id="3_2wrrq"]
[ext_resource type="Script" uid="uid://pqemey80frcq" path="res://scripts/CSharp/Low Code/Variables/VariableListener.cs" id="4_gj2nu"]
[sub_resource type="CircleShape2D" id="CircleShape2D_npluf"]
resource_local_to_scene = true
@@ -13,17 +11,15 @@ radius = 150.0
[sub_resource type="Theme" id="Theme_5ajrf"]
default_font_size = 30
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_selectionChangeListener", "_area", "_label")]
[node name="InteractionArea" type="Node2D" node_paths=PackedStringArray("_area", "_label")]
script = ExtResource("1_5ajrf")
_selectionChangeListener = NodePath("SelectionListener")
_area = NodePath("Area2D")
_label = NodePath("Area2D/CanvasLayer/MarginContainer/Label")
_outlineMaterial = ExtResource("2_qoey7")
[node name="Area2D" type="Area2D" parent="." node_paths=PackedStringArray("interactionArea2D")]
[node name="Area2D" type="Area2D" parent="."]
collision_mask = 4
script = ExtResource("3_2wrrq")
interactionArea2D = NodePath("..")
[node name="CollisionShape3D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_npluf")
@@ -55,8 +51,5 @@ text = "[E]"
horizontal_alignment = 2
vertical_alignment = 2
[node name="SelectionListener" type="Node" parent="."]
script = ExtResource("4_gj2nu")
_variableResources = Array[Object]([ExtResource("2_o1drf")])
[connection signal="NewEventPayload" from="SelectionListener" to="Area2D" method="InteractionAreaSelectionChanged"]
[connection signal="area_entered" from="Area2D" to="." method="OnPlayerEntered"]
[connection signal="area_exited" from="Area2D" to="." method="OnPlayerExited"]
+2 -2
View File
@@ -25,7 +25,7 @@ buses/default_bus_layout="uid://b6dwkmkyb0axk"
[autoload]
SceneTransition="*res://prefabs/UI/SceneTransition.tscn"
SceneTransition="*res://scenes/SceneTransition.tscn"
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs"
InputService="*res://scripts/CSharp/Common/Services/InputService.cs"
@@ -141,6 +141,7 @@ directories/tres_directory={
"beet": "res://resources/items/beet.tres",
"beetRoot": "res://resources/quests/beetRoot.tres",
"beet_seed": "res://resources/items/beet_seed.tres",
"cat": "res://art/animation/Cat/cat.tres",
"choice_panel_focus": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_focus.tres",
"choice_panel_hover": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_hover.tres",
"choice_panel_normal": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_normal.tres",
@@ -176,7 +177,6 @@ directories/tres_directory={
"unselected_stylebox": "res://addons/dialogic/Editor/Events/styles/unselected_stylebox.tres",
"var_ColorTestValue": "res://resources/low code/test/var_ColorTestValue.tres",
"var_Counter": "res://resources/low code/test/var_Counter.tres",
"var_interactableToTrigger": "res://resources/low code/interactables/var_interactableToTrigger.tres",
"var_sceneNameProvider": "res://resources/low code/farming/var_sceneNameProvider.tres",
"var_wateredFieldPosition": "res://resources/low code/farming/var_wateredFieldPosition.tres",
"vesna_style": "res://addons/dialogic/vesna_style.tres",
@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="VariableResource" load_steps=2 format=3 uid="uid://clwqh3w5aqi5e"]
[ext_resource type="Script" uid="uid://dtvx2cakx0bey" path="res://scripts/CSharp/Low Code/Variables/VariableResource.cs" id="1_casar"]
[resource]
script = ExtResource("1_casar")
Payload = null
metadata/_custom_type_script = "uid://dtvx2cakx0bey"
+23
View File
@@ -0,0 +1,23 @@
[gd_scene load_steps=5 format=3 uid="uid://bopv10dqm1knc"]
[ext_resource type="PackedScene" uid="uid://c6wnoif01ltld" path="res://scenes/Babushka_scene_startMenu.tscn" id="1_15ton"]
[ext_resource type="Script" uid="uid://bbp0dyddwdbl8" path="res://scripts/CSharp/Common/Savegame/WindowSettingsSync.cs" id="2_d3jfo"]
[ext_resource type="Script" uid="uid://iquhbkr7pqeg" path="res://scripts/CSharp/Common/Savegame/SaveCheats.cs" id="4_ocsjo"]
[ext_resource type="Script" uid="uid://ca4s0algeij1h" path="res://scripts/CSharp/Common/Savegame/SaveIDProviderTool.cs" id="5_iyo8m"]
[node name="BabushkaSceneBootstrap" type="Node2D"]
[node name="BabushkaSceneStartMenu" parent="." instance=ExtResource("1_15ton")]
[node name="SceneParent" type="Node" parent="."]
[node name="WindowSettings" type="Node" parent="."]
script = ExtResource("2_d3jfo")
[node name="SaveSystem" type="Node" parent="."]
[node name="SaveGameCheat" type="Node" parent="SaveSystem"]
script = ExtResource("4_ocsjo")
[node name="SaveIDProvider" type="Node" parent="SaveSystem"]
script = ExtResource("5_iyo8m")
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://cjshlwk8ajpnp"]
[gd_scene load_steps=20 format=3 uid="uid://cjshlwk8ajpnp"]
[ext_resource type="Script" uid="uid://cnhpnn8o0gybd" path="res://scripts/CSharp/Common/Fight/FightHappeningSceneSetup.cs" id="1_fiutj"]
[ext_resource type="Script" uid="uid://c76mhhqyk4lgh" path="res://scripts/CSharp/Common/Fight/FightHappening.cs" id="1_gsk03"]
@@ -6,6 +6,7 @@
[ext_resource type="Script" uid="uid://dwsqst8fhhqlc" path="res://scripts/CSharp/Common/Fight/AllFightersVisual.cs" id="2_lu4y4"]
[ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="2_phrlx"]
[ext_resource type="PackedScene" uid="uid://7jsxokx67gpq" path="res://prefabs/fight/fighterVisuals/vesna_fighter_visual.tscn" id="4_qo0gi"]
[ext_resource type="Script" uid="uid://cdrjvgm82pxoj" path="res://scripts/CSharp/Common/Fight/FightHappeningAnimationContext.cs" id="4_v5rv6"]
[ext_resource type="PackedScene" uid="uid://0vm3jb1hnkkb" path="res://prefabs/fight/fighterVisuals/blob_fighter_visual.tscn" id="4_vp8s0"]
[ext_resource type="Script" uid="uid://buiwuf7pjfq8" path="res://scripts/CSharp/Common/Fight/FightHappeningStateReaction.cs" id="4_ydj1i"]
[ext_resource type="PackedScene" uid="uid://bydwj3pbvqrhb" path="res://prefabs/minigame/minigame.tscn" id="8_2b3cf"]
@@ -13,20 +14,30 @@
[ext_resource type="Script" uid="uid://bwm0nhvt1083k" path="res://scripts/CSharp/Common/Fight/FightMinigameHandler.cs" id="8_falfe"]
[ext_resource type="Script" uid="uid://d2ugtb3dalrg3" path="res://scripts/CSharp/Common/Fight/FightHappeningStateDebugger.cs" id="8_tv7cl"]
[ext_resource type="Script" uid="uid://2f7rqk50gtdg" path="res://scripts/CSharp/Common/Fight/SwitchSceneOnFightEnd.cs" id="10_qqd8u"]
[ext_resource type="Script" uid="uid://6nniwfxye8ss" path="res://scripts/CSharp/Common/Fight/UsedItemIndicatorVisual.cs" id="14_b4ll5"]
[ext_resource type="Script" uid="uid://71mdwp2m4rta" path="res://scripts/CSharp/Common/Fight/UI/HealButtonVisual.cs" id="14_oy2wu"]
[ext_resource type="Resource" uid="uid://0mnsr4anoaiq" path="res://resources/items/beet.tres" id="15_k4fcr"]
[ext_resource type="PackedScene" uid="uid://l1hdihubffeg" path="res://prefabs/fight/damage_flying_nuber.tscn" id="15_oy2wu"]
[ext_resource type="Texture2D" uid="uid://djewfwrdt4iv3" path="res://art/ui/UI/icons/icon-fruit-beetroot.png" id="16_k4fcr"]
[node name="BabushkaSceneFightHappening" type="Node2D"]
[node name="FightHappening" type="Node" parent="."]
script = ExtResource("1_gsk03")
[node name="ActionAnimationController" type="Node" parent="." node_paths=PackedStringArray("_allFightersVisual")]
[node name="ActionAnimationController" type="Node" parent="." node_paths=PackedStringArray("_allFightersVisual", "_animationContext")]
script = ExtResource("2_7kjgs")
_allFightersVisual = NodePath("../FightVisuals")
_animationContext = NodePath("AnimationContext")
[node name="StateReactionActionAnimation" type="Node" parent="ActionAnimationController"]
script = ExtResource("4_ydj1i")
_fightState = 10
[node name="AnimationContext" type="Node" parent="ActionAnimationController" node_paths=PackedStringArray("useHealItemIndicator")]
script = ExtResource("4_v5rv6")
useHealItemIndicator = NodePath("../../UseItemIndicator")
[node name="Camera2D" type="Camera2D" parent="."]
[node name="FightSetup" type="Node2D" parent="."]
@@ -146,7 +157,12 @@ theme_override_constants/margin_bottom = 10
[node name="Talk Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3"]
layout_mode = 2
theme_override_font_sizes/font_size = 41
text = "Talk"
text = "x19 - Heal"
icon = ExtResource("16_k4fcr")
alignment = 0
expand_icon = true
script = ExtResource("14_oy2wu")
_healItemBlueprint = ExtResource("15_k4fcr")
[node name="MarginContainer4" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
@@ -207,6 +223,12 @@ offset_right = 794.0
offset_bottom = -472.0
text = "Hello world"
[node name="UseItemIndicator" type="Node2D" parent="."]
position = Vector2(214, 319)
script = ExtResource("14_b4ll5")
_flyingIndicatorPrefab = ExtResource("15_oy2wu")
_itemTexture = ExtResource("16_k4fcr")
[connection signal="SignalTransitionState" from="FightHappening" to="ActionAnimationController/StateReactionActionAnimation" method="FightHappeningStateTransitioned"]
[connection signal="SignalTransitionState" from="FightHappening" to="FightVisuals" method="FightHappeningStateChange"]
[connection signal="SignalTransitionState" from="FightHappening" to="ActionSelect/StateReactionInputActionSelect" method="FightHappeningStateTransitioned"]
@@ -221,4 +243,5 @@ text = "Hello world"
[connection signal="pressed" from="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer4/Flee Button" to="ActionSelect" method="SelectAction" binds= [4]]
[connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="show"]
[connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="StateEntered"]
[connection signal="OnStateEntered" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3/Talk Button" method="UpdateText"]
[connection signal="OnStateExited" from="ActionSelect/StateReactionInputActionSelect" to="ActionSelect" method="hide"]
@@ -40,6 +40,7 @@
[ext_resource type="Script" uid="uid://dbu8afaiohpdh" path="res://scripts/CSharp/Common/Fight/FightRoomSceneSetup.cs" id="40_cvg1r"]
[ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="40_elhbh"]
[ext_resource type="PackedScene" uid="uid://qfdiudt3vpai" path="res://prefabs/fight/roaming_enemy_group.tscn" id="41_cvg1r"]
[ext_resource type="PackedScene" uid="uid://dpbbroif2tnil" path="res://prefabs/interactions/generic_item_on_ground_2d.tscn" id="41_x3yi1"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ruj2u"]
shader = ExtResource("16_0fard")
@@ -2175,6 +2176,7 @@ _sceneRoot = NodePath("..")
script = ExtResource("40_cvg1r")
_enemyGroupSpawns = [NodePath("../YSorted/EnemyGroupSpawns/Spawn1"), NodePath("../YSorted/EnemyGroupSpawns/Spawn2"), NodePath("../YSorted/EnemyGroupSpawns/Spawn3"), NodePath("../YSorted/EnemyGroupSpawns/Spawn4")]
_roamingEnemyGroupPrefab = ExtResource("41_cvg1r")
_itemOnGroundPrefab = ExtResource("41_x3yi1")
_fightSceneSwitcher = NodePath("../FightSceneSwitcher")
[editable path="YSorted/Vesna"]
@@ -1,37 +1,37 @@
[gd_scene load_steps=41 format=3 uid="uid://bm21nqepnwaik"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_3al6t"]
[ext_resource type="Texture2D" uid="uid://cnhsxxps2cw5" path="res://art/indoor/room export/Room_01_table.png" id="2_ufnxe"]
[ext_resource type="Texture2D" uid="uid://blg50is4kuh2f" path="res://art/indoor/room export/Room_01_chair.png" id="3_pejp6"]
[ext_resource type="Texture2D" uid="uid://x7trh4dgsvoe" path="res://art/indoor/room export/Room_01_assets.png" id="4_nc3ef"]
[ext_resource type="Texture2D" uid="uid://waqmjrxduxfq" path="res://art/indoor/room export/Room_01_walls.png" id="5_cpb5b"]
[ext_resource type="Texture2D" uid="uid://b2rj7wkyu6ehy" path="res://art/indoor/room export/Room_01_pechka.png" id="6_ecq66"]
[ext_resource type="Texture2D" uid="uid://dhvi5404cqioa" path="res://art/indoor/room export/Room_01_window.png" id="7_8mqg7"]
[ext_resource type="Texture2D" uid="uid://bpi35nxbhput8" path="res://art/indoor/room export/Room_01_pechkaDoor.png" id="8_bv3pn"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="9_qaiit"]
[ext_resource type="Texture2D" uid="uid://tyypifpte0pb" path="res://art/indoor/room export/Room_01_chugun.png" id="10_rj4v5"]
[ext_resource type="Texture2D" uid="uid://404glx32r1w8" path="res://art/indoor/room export/Room_01_bench.png" id="11_7ohth"]
[ext_resource type="Texture2D" uid="uid://c4q12jiligcl7" path="res://art/animals/katze.png" id="12_dckqa"]
[ext_resource type="AudioStream" uid="uid://cohyenfo1rtxh" path="res://audio/sfx/Animals/SFX_Cat_Meow_01.wav" id="13_65rkx"]
[ext_resource type="AudioStream" uid="uid://b2cmf5ie7cwka" path="res://audio/sfx/Animals/SFX_Cat_Meow_02.wav" id="14_mse84"]
[ext_resource type="AudioStream" uid="uid://cttisejnt2l8f" path="res://audio/sfx/Animals/SFX_Cat_Meow_03.wav" id="15_26mhc"]
[ext_resource type="AudioStream" uid="uid://cbmagiou0n0t3" path="res://audio/sfx/Animals/SFX_Cat_Meow_04.wav" id="16_vt5fp"]
[ext_resource type="AudioStream" uid="uid://bk1bj01fokjp7" path="res://audio/sfx/Animals/SFX_Cat_Meow_05.wav" id="17_n8vep"]
[ext_resource type="AudioStream" uid="uid://r2f6xmjvyyjv" path="res://audio/sfx/Animals/SFX_Cat_Purr_01.wav" id="18_3oexm"]
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="19_a2xrf"]
[ext_resource type="Script" uid="uid://31p67cdowuw4" path="res://scripts/CSharp/Common/Animation/AnimationStarter.cs" id="20_lkkn4"]
[ext_resource type="Texture2D" uid="uid://ckvytnpi8gcxq" path="res://art/eyes_atlas.png" id="21_m0gmu"]
[ext_resource type="Texture2D" uid="uid://bqwhptcgg5ons" path="res://art/indoor/room export/Room_01_dorr_R.png" id="22_ahl31"]
[ext_resource type="Texture2D" uid="uid://da67c7avarwq2" path="res://art/indoor/kitchen_bgAssets.png" id="23_hgs5o"]
[ext_resource type="Texture2D" uid="uid://vyk63d0pgqm5" path="res://art/indoor/room export/Room_01_dioor L.png" id="24_t86aa"]
[ext_resource type="Texture2D" uid="uid://cop1vjvhwlsec" path="res://art/indoor/room export/Room_01_shelf.png" id="25_0pvxk"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="26_yq173"]
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="27_pfr1s"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="28_l3q6o"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="29_6elg7"]
[ext_resource type="Resource" uid="uid://cbpurnewhyefa" path="res://resources/quests/beetRoot.tres" id="30_pd0e4"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="31_x6an5"]
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="32_i4hb6"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_3vr4f"]
[ext_resource type="Texture2D" uid="uid://cnhsxxps2cw5" path="res://art/indoor/room export/Room_01_table.png" id="2_ubg3a"]
[ext_resource type="Texture2D" uid="uid://blg50is4kuh2f" path="res://art/indoor/room export/Room_01_chair.png" id="3_gpagp"]
[ext_resource type="Texture2D" uid="uid://x7trh4dgsvoe" path="res://art/indoor/room export/Room_01_assets.png" id="4_27bwy"]
[ext_resource type="Texture2D" uid="uid://waqmjrxduxfq" path="res://art/indoor/room export/Room_01_walls.png" id="5_sndxu"]
[ext_resource type="Texture2D" uid="uid://bqwhptcgg5ons" path="res://art/indoor/room export/Room_01_dorr_R.png" id="6_blyw3"]
[ext_resource type="Texture2D" uid="uid://vyk63d0pgqm5" path="res://art/indoor/room export/Room_01_dioor L.png" id="7_yd2gv"]
[ext_resource type="Texture2D" uid="uid://b2rj7wkyu6ehy" path="res://art/indoor/room export/Room_01_pechka.png" id="8_ofqcg"]
[ext_resource type="Texture2D" uid="uid://dhvi5404cqioa" path="res://art/indoor/room export/Room_01_window.png" id="9_aoesu"]
[ext_resource type="Texture2D" uid="uid://bpi35nxbhput8" path="res://art/indoor/room export/Room_01_pechkaDoor.png" id="10_xcryd"]
[ext_resource type="Texture2D" uid="uid://tyypifpte0pb" path="res://art/indoor/room export/Room_01_chugun.png" id="11_as3nm"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="11_gpagp"]
[ext_resource type="Texture2D" uid="uid://cop1vjvhwlsec" path="res://art/indoor/room export/Room_01_shelf.png" id="12_bu2a1"]
[ext_resource type="Texture2D" uid="uid://404glx32r1w8" path="res://art/indoor/room export/Room_01_bench.png" id="13_rongr"]
[ext_resource type="Texture2D" uid="uid://ckvytnpi8gcxq" path="res://art/eyes_atlas.png" id="14_d7yky"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="15_7a68a"]
[ext_resource type="Script" uid="uid://31p67cdowuw4" path="res://scripts/CSharp/Common/Animation/AnimationStarter.cs" id="15_27bwy"]
[ext_resource type="Texture2D" uid="uid://c4q12jiligcl7" path="res://art/animals/katze.png" id="15_sndxu"]
[ext_resource type="AudioStream" uid="uid://cohyenfo1rtxh" path="res://audio/sfx/Animals/SFX_Cat_Meow_01.wav" id="16_d7yky"]
[ext_resource type="PackedScene" uid="uid://dfvgp1my5rydh" path="res://prefabs/characters/Yeli.tscn" id="16_dhsxs"]
[ext_resource type="AudioStream" uid="uid://b2cmf5ie7cwka" path="res://audio/sfx/Animals/SFX_Cat_Meow_02.wav" id="17_7a68a"]
[ext_resource type="Script" uid="uid://cvkw4qd2hxksi" path="res://scripts/GdScript/dialogic_toggle.gd" id="17_k0k8c"]
[ext_resource type="AudioStream" uid="uid://cttisejnt2l8f" path="res://audio/sfx/Animals/SFX_Cat_Meow_03.wav" id="18_dhsxs"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="18_dw4nn"]
[ext_resource type="AudioStream" uid="uid://cbmagiou0n0t3" path="res://audio/sfx/Animals/SFX_Cat_Meow_04.wav" id="19_k0k8c"]
[ext_resource type="AudioStream" uid="uid://bk1bj01fokjp7" path="res://audio/sfx/Animals/SFX_Cat_Meow_05.wav" id="20_dw4nn"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="21_blyw3"]
[ext_resource type="AudioStream" uid="uid://r2f6xmjvyyjv" path="res://audio/sfx/Animals/SFX_Cat_Purr_01.wav" id="21_ytap8"]
[ext_resource type="Script" uid="uid://cfnrd5k1k0gxw" path="res://scripts/CSharp/Common/AudioPlayer2D.cs" id="22_tggq2"]
[ext_resource type="Resource" uid="uid://cbpurnewhyefa" path="res://resources/quests/beetRoot.tres" id="22_yd2gv"]
[ext_resource type="Texture2D" uid="uid://da67c7avarwq2" path="res://art/indoor/kitchen_bgAssets.png" id="23_d7yky"]
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="24_yd2gv"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_a2ood"]
resource_local_to_scene = true
@@ -43,12 +43,12 @@ radius = 300.0
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_b6vf7"]
streams_count = 6
stream_0/stream = ExtResource("13_65rkx")
stream_1/stream = ExtResource("14_mse84")
stream_2/stream = ExtResource("15_26mhc")
stream_3/stream = ExtResource("16_vt5fp")
stream_4/stream = ExtResource("17_n8vep")
stream_5/stream = ExtResource("18_3oexm")
stream_0/stream = ExtResource("16_d7yky")
stream_1/stream = ExtResource("17_7a68a")
stream_2/stream = ExtResource("18_dhsxs")
stream_3/stream = ExtResource("19_k0k8c")
stream_4/stream = ExtResource("20_dw4nn")
stream_5/stream = ExtResource("21_ytap8")
[sub_resource type="Animation" id="Animation_j5d18"]
length = 0.001
@@ -218,8 +218,8 @@ radius = 400.0
[node name="Common Room" type="Node2D"]
z_index = 1
y_sort_enabled = true
script = ExtResource("1_3al6t")
_sceneNamesToLoad = PackedStringArray("res://scenes/scene_indoor_vesnas_room.tscn", "res://scenes/scene_indoor_kitchen.tscn", "res://scenes/scene_farm_outside_2d.tscn")
script = ExtResource("1_3vr4f")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_vesnas_room.tscn", "res://scenes/Babushka_scene_indoor_kitchen.tscn", "res://scenes/Babushka_scene_farm_outside_2d.tscn")
[node name="Foreground" type="Node" parent="."]
@@ -227,7 +227,7 @@ _sceneNamesToLoad = PackedStringArray("res://scenes/scene_indoor_vesnas_room.tsc
z_index = 2
y_sort_enabled = true
position = Vector2(-1888, 1112)
texture = ExtResource("2_ufnxe")
texture = ExtResource("2_ubg3a")
offset = Vector2(0, -200)
region_enabled = true
region_rect = Rect2(1012, 1743, 1470, 417)
@@ -236,7 +236,7 @@ region_rect = Rect2(1012, 1743, 1470, 417)
z_index = 3
y_sort_enabled = true
position = Vector2(-3032, 2096)
texture = ExtResource("3_pejp6")
texture = ExtResource("3_gpagp")
offset = Vector2(216, -1064)
region_enabled = true
region_rect = Rect2(1534, 1976, 379, 184)
@@ -244,7 +244,7 @@ region_rect = Rect2(1534, 1976, 379, 184)
[node name="Chair2" type="Sprite2D" parent="Foreground"]
y_sort_enabled = true
position = Vector2(-1064, 2064)
texture = ExtResource("3_pejp6")
texture = ExtResource("3_gpagp")
offset = Vector2(184, -1056)
region_enabled = true
region_rect = Rect2(1534, 1976, 379, 184)
@@ -253,7 +253,7 @@ region_rect = Rect2(1534, 1976, 379, 184)
z_index = 1
y_sort_enabled = true
position = Vector2(-1904, 1192)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -800)
region_enabled = true
region_rect = Rect2(2093, 49, 421, 630)
@@ -288,14 +288,14 @@ shape = SubResource("RectangleShape2D_a2ood")
z_index = -100
position = Vector2(4992, -487)
scale = Vector2(2, 2)
texture = ExtResource("5_cpb5b")
texture = ExtResource("5_sndxu")
offset = Vector2(-2768, 264)
[node name="wall 1" type="Sprite2D" parent="BackWall"]
z_index = -100
position = Vector2(-4368, 40)
scale = Vector2(2, 2)
texture = ExtResource("5_cpb5b")
texture = ExtResource("5_sndxu")
flip_h = true
region_rect = Rect2(111, 292, 3323, 2160)
@@ -308,32 +308,32 @@ shape = SubResource("RectangleShape2D_a2ood")
[node name="Room01Pechka" type="Sprite2D" parent="BackWall"]
z_index = -80
position = Vector2(-224, -392)
texture = ExtResource("6_ecq66")
texture = ExtResource("8_ofqcg")
region_enabled = true
region_rect = Rect2(2236, 0, 724, 1392)
[node name="Room01Window2" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-5870, -408)
texture = ExtResource("7_8mqg7")
texture = ExtResource("9_aoesu")
region_enabled = true
region_rect = Rect2(1020, 338, 607, 757)
[node name="Room01Window3" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-3931, -397)
texture = ExtResource("7_8mqg7")
texture = ExtResource("9_aoesu")
region_enabled = true
region_rect = Rect2(1020, 338, 607, 757)
[node name="Room01PechkaDoor" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-240, -100)
texture = ExtResource("8_bv3pn")
texture = ExtResource("10_xcryd")
region_enabled = true
region_rect = Rect2(2360, 864, 356, 251)
[node name="InteractionArea" parent="BackWall/Room01PechkaDoor" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("9_qaiit")]
[node name="InteractionArea" parent="BackWall/Room01PechkaDoor" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(0, -3)
_spritesToOutline = [NodePath("..")]
@@ -343,7 +343,7 @@ shape = SubResource("CircleShape2D_gpagp")
[node name="Room01Chugun" type="Sprite2D" parent="BackWall"]
z_index = -40
position = Vector2(16, -560)
texture = ExtResource("10_rj4v5")
texture = ExtResource("11_as3nm")
region_enabled = true
region_rect = Rect2(2469, 459, 247, 131)
@@ -351,24 +351,24 @@ region_rect = Rect2(2469, 459, 247, 131)
z_index = -10
y_sort_enabled = true
position = Vector2(-5070, 1051)
texture = ExtResource("11_7ohth")
texture = ExtResource("13_rongr")
flip_h = true
region_enabled = true
region_rect = Rect2(1156, 1185, 940, 189)
[node name="Katze" type="Sprite2D" parent="BackWall/Bench"]
z_index = 10
z_index = -10
position = Vector2(61, -87)
scale = Vector2(2, 2)
texture = ExtResource("12_dckqa")
texture = ExtResource("15_sndxu")
offset = Vector2(-8, -126)
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="BackWall/Bench/Katze"]
stream = SubResource("AudioStreamRandomizer_b6vf7")
bus = &"SFX"
script = ExtResource("19_a2xrf")
script = ExtResource("22_tggq2")
[node name="InteractionArea" parent="BackWall/Bench/Katze" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("9_qaiit")]
[node name="InteractionArea" parent="BackWall/Bench/Katze" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-6.5, -44)
scale = Vector2(0.5, 0.5)
_spritesToOutline = [NodePath("..")]
@@ -376,7 +376,7 @@ _spritesToOutline = [NodePath("..")]
[node name="Bench2" type="Sprite2D" parent="BackWall"]
z_index = -10
position = Vector2(-2906, 243)
texture = ExtResource("11_7ohth")
texture = ExtResource("13_rongr")
region_enabled = true
region_rect = Rect2(1156, 1185, 940, 189)
@@ -386,7 +386,7 @@ region_rect = Rect2(1156, 1185, 940, 189)
z_index = -10
y_sort_enabled = true
position = Vector2(-177, 554.5)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2244, 763, 274, 91)
@@ -395,7 +395,7 @@ region_rect = Rect2(2244, 763, 274, 91)
z_index = -10
y_sort_enabled = true
position = Vector2(336.487, 275.616)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(-14.6475, -97.651)
region_enabled = true
region_rect = Rect2(3157, 688, 118.519, 221)
@@ -405,7 +405,7 @@ z_index = -10
y_sort_enabled = true
position = Vector2(-852, -187)
rotation = -0.0663225
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2624, 435, 49, 76)
@@ -416,11 +416,11 @@ y_sort_enabled = true
position = Vector2(-101, -6)
rotation = -0.0663225
scale = Vector2(1e-05, 1e-05)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(43.3898, 128.128)
region_enabled = true
region_rect = Rect2(3362, 139, 101, 269)
script = ExtResource("20_lkkn4")
script = ExtResource("15_27bwy")
_animationPlayer = NodePath("SpiritAnimation")
_animationName = "hand_stretch"
_repeatable = false
@@ -436,7 +436,7 @@ playback_auto_capture = false
z_index = -10
y_sort_enabled = true
position = Vector2(287, -157.5)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2964, 137, 321, 213)
@@ -444,7 +444,7 @@ region_rect = Rect2(2964, 137, 321, 213)
[node name="herb 1" type="Sprite2D" parent="BackWall/Room assets/herbsline"]
y_sort_enabled = true
position = Vector2(-72, 136)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2600, 165, 127, 199)
@@ -452,7 +452,7 @@ region_rect = Rect2(2600, 165, 127, 199)
[node name="herb 2" type="Sprite2D" parent="BackWall/Room assets/herbsline"]
y_sort_enabled = true
position = Vector2(64, 80)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2761, 161, 135, 199)
@@ -462,7 +462,7 @@ visible = false
z_index = -10
position = Vector2(-169, -80)
scale = Vector2(0.4, 0.4)
texture = ExtResource("21_m0gmu")
texture = ExtResource("14_d7yky")
region_enabled = true
region_rect = Rect2(2647, 15, 286, 183)
@@ -472,21 +472,21 @@ position = Vector2(-205, -8)
[node name="apple" type="Sprite2D" parent="BackWall/Room assets/offerings"]
z_index = -1
position = Vector2(229.5, 331.5)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
region_enabled = true
region_rect = Rect2(2822, 764, 93, 87)
[node name="bread" type="Sprite2D" parent="BackWall/Room assets/offerings"]
z_index = -2
position = Vector2(157.5, 339.5)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
region_enabled = true
region_rect = Rect2(2951, 783, 155, 78)
[node name="plate" type="Sprite2D" parent="BackWall/Room assets/offerings"]
z_index = -20
position = Vector2(189.5, 659.5)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2576, 802, 219, 64)
@@ -496,11 +496,11 @@ region_rect = Rect2(2576, 802, 219, 64)
[node name="Door_Kitchen" type="Sprite2D" parent="BackWall/Doors"]
z_index = -50
position = Vector2(923, -221)
texture = ExtResource("22_ahl31")
texture = ExtResource("6_blyw3")
region_enabled = true
region_rect = Rect2(3161, 313, 679, 1050)
[node name="KitchendoorInteraction" parent="BackWall/Doors/Door_Kitchen" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("9_qaiit")]
[node name="KitchendoorInteraction" parent="BackWall/Doors/Door_Kitchen" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-7, 248)
scale = Vector2(1.5, 1.5)
_spritesToOutline = [NodePath("..")]
@@ -509,11 +509,11 @@ _id = 1
[node name="Door_Outside" type="Sprite2D" parent="BackWall/Doors"]
z_index = -50
position = Vector2(-4917, -226)
texture = ExtResource("23_hgs5o")
texture = ExtResource("23_d7yky")
region_enabled = true
region_rect = Rect2(3009, 666, 679, 1050)
[node name="OutsideDoor" parent="BackWall/Doors/Door_Outside" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("9_qaiit")]
[node name="OutsideDoor" parent="BackWall/Doors/Door_Outside" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(-7, 248)
scale = Vector2(1.5, 1.5)
_spritesToOutline = [NodePath("..")]
@@ -522,11 +522,11 @@ _id = 2
[node name="Door_Bedroom" type="Sprite2D" parent="BackWall/Doors"]
z_index = -50
position = Vector2(-1620, -259)
texture = ExtResource("24_t86aa")
texture = ExtResource("7_yd2gv")
region_enabled = true
region_rect = Rect2(0, 165, 763, 1224)
[node name="VesnasRoomDoor" parent="BackWall/Doors/Door_Bedroom" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("9_qaiit")]
[node name="VesnasRoomDoor" parent="BackWall/Doors/Door_Bedroom" node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("11_gpagp")]
position = Vector2(2, 233)
_spritesToOutline = [NodePath("..")]
_id = 0
@@ -537,7 +537,7 @@ shape = SubResource("CircleShape2D_yd2gv")
[node name="Shelf" type="Sprite2D" parent="BackWall"]
z_index = -50
position = Vector2(-880, -416)
texture = ExtResource("25_0pvxk")
texture = ExtResource("12_bu2a1")
region_enabled = true
region_rect = Rect2(1846, 471, 348, 490)
@@ -546,16 +546,16 @@ visible = false
z_index = -10
y_sort_enabled = true
position = Vector2(23, 378.5)
texture = ExtResource("4_nc3ef")
texture = ExtResource("4_27bwy")
offset = Vector2(0, -296)
region_enabled = true
region_rect = Rect2(2748, 432, 174, 191)
[node name="Vesna" parent="." instance=ExtResource("26_yq173")]
[node name="Vesna" parent="." instance=ExtResource("15_7a68a")]
y_sort_enabled = false
position = Vector2(-4473, 319)
position = Vector2(-920, 319)
[node name="Yeli" parent="." instance=ExtResource("27_pfr1s")]
[node name="Yeli" parent="." instance=ExtResource("16_dhsxs")]
z_index = 0
y_sort_enabled = false
position = Vector2(-2841, 198)
@@ -575,11 +575,11 @@ position = Vector2(-224, 373)
position = Vector2(-565, 464)
[node name="dialogic_toggle" type="Node2D" parent="Yeli"]
script = ExtResource("28_l3q6o")
script = ExtResource("17_k0k8c")
[node name="Beetroot Quest trigger" type="Node2D" parent="Yeli"]
script = ExtResource("29_6elg7")
questResource = ExtResource("30_pd0e4")
script = ExtResource("21_blyw3")
questResource = ExtResource("22_yd2gv")
toStatus = 1
makeActive = true
@@ -592,10 +592,10 @@ limit_top = -1050
limit_right = 1400
limit_bottom = 1150
editor_draw_limits = true
script = ExtResource("31_x6an5")
script = ExtResource("18_dw4nn")
_followNode = NodePath("../Vesna/CharacterBody2D")
[node name="CanvasLayer" parent="." instance=ExtResource("32_i4hb6")]
[node name="CanvasLayer" parent="." instance=ExtResource("24_yd2gv")]
[connection signal="Interacted" from="BackWall/Room01PechkaDoor/InteractionArea" to="BackWall/Room01PechkaDoor/InteractionArea" method="ToggleActive"]
[connection signal="Interacted" from="BackWall/Room01PechkaDoor/InteractionArea" to="BackWall/Room assets/hand" method="PlayAnimation"]
@@ -20,7 +20,7 @@ radius = 300.0
z_index = 1
y_sort_enabled = true
script = ExtResource("1_ftmt4")
_sceneNamesToLoad = PackedStringArray("res://scenes/scene_indoor_common_room.tscn")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_common_room.tscn")
[node name="Foreground" type="Node" parent="."]
@@ -53,7 +53,7 @@ z_index = -100
[node name="Ceiling" type="Sprite2D" parent="Background"]
z_index = -100
position = Vector2(-2453, -1303)
position = Vector2(-2453, -1419)
scale = Vector2(2, 2)
texture = ExtResource("2_qsw8g")
region_enabled = true
@@ -61,7 +61,7 @@ region_rect = Rect2(0, 1749.6222, 3840, 358.11316)
[node name="WallUpper" type="Sprite2D" parent="Background"]
z_index = -100
position = Vector2(-2469, -975)
position = Vector2(-2469, -969)
scale = Vector2(26, 2)
texture = ExtResource("2_qsw8g")
region_enabled = true
@@ -1,13 +1,11 @@
[gd_scene load_steps=18 format=3 uid="uid://ceaa2qj2bmw43"]
[gd_scene load_steps=16 format=3 uid="uid://ceaa2qj2bmw43"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_c6eln"]
[ext_resource type="Texture2D" uid="uid://cugtxcfuds31r" path="res://art/indoor/Babushka_bg_01.png" id="2_j25a2"]
[ext_resource type="Script" uid="uid://cldtt4atgymm5" path="res://scripts/CSharp/Common/Quest/QuestTrigger.cs" id="8_j25a2"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="8_phqdf"]
[ext_resource type="Resource" uid="uid://csj15gnlx1jmx" path="res://resources/quests/demo/8_goto_bed.tres" id="9_heyef"]
[ext_resource type="Texture2D" uid="uid://s1yoemhrupwe" path="res://art/indoor/vesna_indoor_bed.png" id="10_hryl5"]
[ext_resource type="Script" uid="uid://puw74w6lmcvl" path="res://scripts/CSharp/Common/Fight/NightStarter.cs" id="10_j25a2"]
[ext_resource type="Texture2D" uid="uid://dnlhlf1mx01h5" path="res://art/indoor/vesna_indoor_door.png" id="11_axs81"]
[ext_resource type="Script" uid="uid://jg4jryfus3bw" path="res://scripts/CSharp/Common/DayAndNight/DayAndNightHelper.cs" id="11_heyef"]
[ext_resource type="Texture2D" uid="uid://cop1vjvhwlsec" path="res://art/indoor/room export/Room_01_shelf.png" id="13_11fdt"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="18_3gevq"]
@@ -32,7 +30,7 @@ radius = 509.071
[node name="VesnasRoom" type="Node2D"]
y_sort_enabled = true
script = ExtResource("1_c6eln")
_sceneNamesToLoad = PackedStringArray("res://scenes/scene_indoor_common_room.tscn", "res://scenes/scene_fight_world_room.tscn")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_common_room.tscn", "res://scenes/Babushka_scene_fight_world_room.tscn")
[node name="Colliders" type="Node2D" parent="."]
position = Vector2(1297, 5292)
@@ -104,9 +102,8 @@ _followNode = NodePath("../Vesna/CharacterBody2D")
[node name="CanvasLayer" parent="." instance=ExtResource("24_xwo8y")]
[node name="BedInteraction" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("8_phqdf")]
[node name="BedInteraction" parent="." instance=ExtResource("8_phqdf")]
position = Vector2(-1415, 489)
_spritesToOutline = [NodePath("Bedsprite")]
_id = 1
[node name="CollisionShape3D" parent="BedInteraction/Area2D" index="0"]
@@ -118,30 +115,13 @@ script = ExtResource("8_j25a2")
questResource = ExtResource("9_heyef")
toStatus = 2
[node name="Bedsprite" type="Sprite2D" parent="BedInteraction"]
z_index = -99
position = Vector2(4925, -967)
scale = Vector2(2, 2)
texture = ExtResource("10_hryl5")
offset = Vector2(-2768, 264)
region_rect = Rect2(36.702454, 566.3165, 492.73346, 422.25665)
[node name="DoorInteraction" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("8_phqdf")]
[node name="DoorInteraction" parent="." instance=ExtResource("8_phqdf")]
position = Vector2(777, 201)
_spritesToOutline = [NodePath("Doorsprite")]
_id = 0
[node name="CollisionShape3D" parent="DoorInteraction/Area2D" index="0"]
shape = SubResource("CircleShape2D_2spkc")
[node name="Doorsprite" type="Sprite2D" parent="DoorInteraction"]
z_index = -99
position = Vector2(5559, -961)
scale = Vector2(2, 2)
texture = ExtResource("11_axs81")
offset = Vector2(-2768, 264)
region_rect = Rect2(1517.5891, 258.72107, 356.62732, 741.81134)
[node name="NightStarter" type="Node" parent="."]
script = ExtResource("10_j25a2")
_sceneIndexToLoad = 1
@@ -1,4 +1,4 @@
[gd_scene load_steps=98 format=3 uid="uid://b3ibx4resa1f3"]
[gd_scene load_steps=99 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://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="2_4ktoi"]
@@ -201,6 +201,10 @@ radius = 325.2599
resource_local_to_scene = true
radius = 325.2599
[sub_resource type="CircleShape2D" id="CircleShape2D_4pibb"]
resource_local_to_scene = true
radius = 325.2599
[sub_resource type="CircleShape2D" id="CircleShape2D_dr6bm"]
resource_local_to_scene = true
radius = 335.72162
@@ -247,7 +251,7 @@ stream_2/stream = ExtResource("63_td2xu")
[node name="BabushkaSceneBeets" type="Node2D"]
script = ExtResource("1_6krrk")
_sceneNamesToLoad = PackedStringArray("res://scenes/scene_farm_outside_2d.tscn")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_farm_outside_2d.tscn")
[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("_followNode")]
position = Vector2(3180, 1961)
@@ -1761,7 +1765,6 @@ metadata/SaveID = "b3b47e69-6115-4405-8da6-508b783823d2"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField" index="1"]
visible = true
FieldState = 1
metadata/SaveID = "7a8210bf-479d-4b4c-9758-98d23e59d5d7"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField/FieldBehaviour" index="1"]
@@ -1774,7 +1777,6 @@ _field = NodePath("../..")
_daysWatered = 6
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1790,7 +1792,6 @@ metadata/SaveID = "f536efd3-3da8-4ef5-a520-570220e6c19f"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField2" index="1"]
visible = true
FieldState = 1
metadata/SaveID = "a1d8a0a2-c51c-4410-83c3-0edb31cbf2de"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField2/FieldBehaviour" index="1"]
@@ -1803,7 +1804,6 @@ _field = NodePath("../..")
_daysWatered = 6
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField2" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField2/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1819,7 +1819,6 @@ metadata/SaveID = "14ce64d5-8a4d-43b9-a8ff-3a57725c4dc8"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField3" index="1"]
visible = true
FieldState = 1
metadata/SaveID = "79a65532-cb2b-4268-8eb0-8c41a3935cbb"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField3/FieldBehaviour" index="1"]
@@ -1831,11 +1830,7 @@ _state = 2
_field = NodePath("../..")
_daysWatered = 5
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField3/FieldBehaviour" index="2"]
_active = true
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField3" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField3/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1851,7 +1846,7 @@ metadata/SaveID = "6872ce5d-6f42-47d7-97e2-a7214ff3b08c"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField4" index="1"]
visible = true
FieldState = 1
FieldState = 3
metadata/SaveID = "13fa64a3-01dc-4fd8-822e-0839c0da3163"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField4/FieldBehaviour" index="1"]
@@ -1864,7 +1859,6 @@ _field = NodePath("../..")
_daysWatered = 7
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField4" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField4/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1880,7 +1874,7 @@ metadata/SaveID = "f163c38d-9ee0-4844-9def-479833febb4e"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField5" index="1"]
visible = true
FieldState = 1
FieldState = 3
metadata/SaveID = "414ecdb9-f3c4-4fb9-81bd-6ca575784f78"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField5/FieldBehaviour" index="1"]
@@ -1893,7 +1887,6 @@ _field = NodePath("../..")
_daysWatered = 6
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField5" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField5/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1909,7 +1902,7 @@ metadata/SaveID = "da691381-ee82-4f86-abf3-dda2c9f19337"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField6" index="1"]
visible = true
FieldState = 1
FieldState = 3
metadata/SaveID = "b235febb-b231-4f8c-94e9-1f9d9f115b08"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField6/FieldBehaviour" index="1"]
@@ -1922,7 +1915,6 @@ _field = NodePath("../..")
_daysWatered = 5
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField6" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField6/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1938,7 +1930,7 @@ metadata/SaveID = "8116fa8b-b164-4d39-a1ed-6cd476d18f94"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField7" index="1"]
visible = true
FieldState = 1
FieldState = 3
metadata/SaveID = "9ccdba91-812a-4c13-9ee0-12472e174fc9"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField7/FieldBehaviour" index="1"]
@@ -1951,7 +1943,6 @@ _field = NodePath("../..")
_daysWatered = 6
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField7" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField7/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1967,7 +1958,7 @@ metadata/SaveID = "5298f423-4c3b-45b5-94fb-d4aef36bac21"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField8" index="1"]
visible = true
FieldState = 1
FieldState = 3
metadata/SaveID = "da44e54a-0b76-4888-ad8b-782a9d146fa3"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField8/FieldBehaviour" index="1"]
@@ -1980,7 +1971,6 @@ _field = NodePath("../..")
_daysWatered = 6
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField8" index="7"]
process_mode = 4
visible = false
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField8/FieldActivator/InteractionArea/Area2D" index="0"]
@@ -1989,28 +1979,23 @@ shape = SubResource("CircleShape2D_v10dc")
[node name="BaseField9" parent="YSorted/Farm visuals/FieldParent" instance=ExtResource("40_efblm")]
z_index = -1
y_sort_enabled = true
position = Vector2(5368, 3226.9458)
position = Vector2(5317, 3208.83)
scale = Vector2(1, 1.00622)
Payload = 7
metadata/SaveID = ""
Payload = 8
metadata/SaveID = "0de8dc13-5851-4471-be35-309cd6687ebc"
[node name="FieldBehaviour" parent="YSorted/Farm visuals/FieldParent/BaseField9" index="1"]
visible = true
FieldState = 1
metadata/SaveID = "da44e54a-0b76-4888-ad8b-782a9d146fa3"
metadata/SaveID = "9919b294-04a1-4a16-9783-38c8aa0e291c"
[node name="PlantPlaceholder" parent="YSorted/Farm visuals/FieldParent/BaseField9/FieldBehaviour" index="1"]
z_index = 1
[node name="FieldActivator" parent="YSorted/Farm visuals/FieldParent/BaseField9" index="7"]
process_mode = 4
visible = false
[node name="InteractionArea" parent="YSorted/Farm visuals/FieldParent/BaseField9/FieldActivator" index="0" node_paths=PackedStringArray("_spritesToOutline")]
_spritesToOutline = [NodePath("../../../BaseField8/OutlineSprite")]
[node name="CollisionShape3D" parent="YSorted/Farm visuals/FieldParent/BaseField9/FieldActivator/InteractionArea/Area2D" index="0"]
shape = SubResource("CircleShape2D_v10dc")
shape = SubResource("CircleShape2D_4pibb")
[node name="Blocker" type="Node2D" parent="YSorted"]
@@ -2170,31 +2155,22 @@ script = ExtResource("59_njxly")
[editable path="YSorted/Brünnen/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField2"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField2/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField2/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField3"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField3/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField3/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField4"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField4/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField4/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField5"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField5/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField5/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField6"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField6/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField6/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField7"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField7/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField7/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField8"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField8/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField8/SaveSystem"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField9"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField9/FieldActivator/InteractionArea"]
[editable path="YSorted/Farm visuals/FieldParent/BaseField9/SaveSystem"]
[editable path="YSorted/Blocker/BackToFarm"]
[editable path="YSorted/RakeGenericPickup"]
[editable path="YSorted/RakeGenericPickup/PickupInteractionArea"]
@@ -7,7 +7,7 @@
[node name="BabushkaSceneStartMenu" type="Node2D"]
script = ExtResource("1_fj2fh")
_sceneNamesToLoad = PackedStringArray("res://scenes/scene_farm_outside_2d.tscn")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_farm_outside_2d.tscn")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
-16
View File
@@ -1,16 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://bopv10dqm1knc"]
[ext_resource type="PackedScene" uid="uid://c6wnoif01ltld" path="res://scenes/scene_startMenu.tscn" id="1_15ton"]
[ext_resource type="Script" uid="uid://bbp0dyddwdbl8" path="res://scripts/CSharp/Common/Savegame/WindowSettingsSync.cs" id="2_d3jfo"]
[ext_resource type="PackedScene" uid="uid://7pvvop5hfl01" path="res://prefabs/SaveSystem/save_system.tscn" id="3_s8cy4"]
[node name="BabushkaSceneBootstrap" type="Node2D"]
[node name="BabushkaSceneStartMenu" parent="." instance=ExtResource("1_15ton")]
[node name="SceneParent" type="Node" parent="."]
[node name="WindowSettings" type="Node" parent="."]
script = ExtResource("2_d3jfo")
[node name="SaveSystem" parent="." instance=ExtResource("3_s8cy4")]
@@ -7,17 +7,4 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
/// </summary>
public partial class DetectableInteractionArea : Area2D
{
[Export] public InteractionArea2D interactionArea2D;
public void InteractionAreaSelectionChanged(Variant instanceID)
{
if (instanceID.AsString() == GetInstanceId().ToString())
{
interactionArea2D.HighlightInteractable();
}
else
{
interactionArea2D.ResetHighlight();
}
}
}
@@ -7,8 +7,7 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
/// </summary>
public partial class DetectionCross : Node2D
{
[Export] private Detector _collider;
[Export] private ShapeCast2D _shapeCast2D;
[Export] private Detector _detector;
[Export] private float _xOffset;
[Export] private float _yOffset;
@@ -18,8 +17,6 @@ public partial class DetectionCross : Node2D
/// <param name="direction"></param>
public void SetDirection(Vector2 direction)
{
Vector2 newPos = new Vector2(direction.X * _xOffset, direction.Y * _yOffset);
_collider.Position = newPos;
_shapeCast2D.TargetPosition = newPos;
_detector.Position = new Vector2(direction.X * _xOffset, direction.Y * _yOffset);
}
}
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using Babushka.scripts.CSharp.Common.Services;
using Babushka.scripts.CSharp.Low_Code.Variables;
using Godot;
namespace Babushka.scripts.CSharp.Common.CharacterControls;
@@ -10,11 +8,18 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
/// </summary>
public partial class Detector : Area2D
{
[Export] private bool _active = true;
[Export] private ShapeCast2D _shapeCast2D;
[Export] private VariableResource _itemToTriggerResource;
private List<ulong> _areasInDetector = new();
/// <summary>
/// Called when entering an interactionArea node.
/// </summary>
[Signal] public delegate void InteractableEnteredEventHandler();
/// <summary>
/// Called when exiting an interactionArea node.
/// </summary>
[Signal] public delegate void InteractableExitedEventHandler();
public bool IsActive
{
@@ -36,62 +41,29 @@ public partial class Detector : Area2D
/// Called every time this node enters an Area2D.
/// </summary>
/// <param name="area"></param>
public void OnEnteredInteractable(Area2D area)
public void OnEnteredInteractable(Node area)
{
if (!_active || !InputService.Instance.InputEnabled)
return;
PopulateList();
CalculateClosestInteractable();
if (area is DetectableInteractionArea interactionArea2D)
{
EmitSignal(SignalName.InteractableEntered);
}
}
/// <summary>
/// Called whenever this node exits an Area2D.
/// </summary>
/// <param name="area"></param>
public void OnExitedInteractable(Area2D area)
public void OnExitedInteractable(Node area)
{
if (!_active || !InputService.Instance.InputEnabled)
return;
PopulateList();
CalculateClosestInteractable();
}
private void PopulateList()
{
// repopulate the list of areas in the detector to account for enabled / disabled areas
var currentOverlap = GetOverlappingAreas();
_areasInDetector = new List<ulong>();
foreach (var area2D in currentOverlap)
if (area is DetectableInteractionArea interactionArea2D)
{
if (area2D is DetectableInteractionArea detectable)
{
ulong id = detectable.GetInstanceId();
_areasInDetector.Add(id);
}
EmitSignal(SignalName.InteractableExited);
}
}
private void CalculateClosestInteractable()
{
float smallestDistance = float.MaxValue;
string closestInteractable = null;
foreach (var area in _areasInDetector)
{
Area2D? area2D = InstanceFromId(area) as Area2D;
if(area2D == null)
continue;
float distance = area2D.GlobalPosition.DistanceSquaredTo(ToGlobal(_shapeCast2D.TargetPosition));
if (distance < smallestDistance)
{
closestInteractable = area.ToString();
smallestDistance = distance;
}
}
_itemToTriggerResource.Payload = closestInteractable;
}
}
@@ -1,14 +1,12 @@
using System.Linq;
using Babushka.scripts.CSharp.Common.Services;
using Babushka.scripts.CSharp.Low_Code.Variables;
using Godot;
namespace Babushka.scripts.CSharp.Common.CharacterControls;
public partial class InteractionArea2D : Node2D
{
[ExportGroup("Settings")]
[Export] private VariableListener _selectionChangeListener;
[ExportGroup("Settings")]
[Export] private Area2D _area;
[Export] private Label _label;
[Export] private bool _active = true;
@@ -27,17 +25,9 @@ public partial class InteractionArea2D : Node2D
public bool IsActive
{
get => _active;
set
{
ProcessMode = value ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled;
Visible = value;
_selectionChangeListener.ProcessMode = value ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled;
_active = value;
}
set => _active = value;
}
public bool IsSelectedByDetector { get; set; } = false;
public void SetActiveInverse(bool active)
{
IsActive = !active;
@@ -51,10 +41,8 @@ public partial class InteractionArea2D : Node2D
}
}
public void HighlightInteractable()
public void OnPlayerEntered(Node2D player)
{
IsSelectedByDetector = true;
if (!_active || !InputService.Instance.InputEnabled)
return;
@@ -63,16 +51,15 @@ public partial class InteractionArea2D : Node2D
if (!_useOutline)
return;
foreach (var sprite in _spritesToOutline)
{
sprite.Material = _outlineMaterial;
}
}
public void ResetHighlight()
public void OnPlayerExited(Node2D player)
{
IsSelectedByDetector = false;
_label.Hide();
if (!_useOutline)
@@ -89,9 +76,6 @@ public partial class InteractionArea2D : Node2D
{
if (!_active || !InputService.Instance.InputEnabled)
return;
if(!IsSelectedByDetector)
return;
if (@event.IsAction("interact") && @event.IsPressed())
{
@@ -108,7 +92,16 @@ public partial class InteractionArea2D : Node2D
{
if (_area.HasOverlappingAreas())
{
ResetHighlight();
_label.Hide();
if (_useOutline)
{
for (var i = 0; i < _spritesToOutline.Length; i++)
{
var sprite = _spritesToOutline[i];
sprite.Material = _backupMaterials[i];
}
}
Interact();
}
}
@@ -131,5 +124,4 @@ public partial class InteractionArea2D : Node2D
_label.Hide();
}
}
@@ -1,14 +1,12 @@
using Babushka.scripts.CSharp.Common.CharacterControls;
using Babushka.scripts.CSharp.Common.Savegame;
using Godot;
using Godot.Collections;
namespace Babushka.scripts.CSharp.Common.Farming;
/// <summary>
/// Enables a preset field in the scene sothat it can be used for farming.
/// </summary>
public partial class FieldActivator : Node, ISaveable
public partial class FieldActivator : Node
{
[Export] private FieldBehaviour2D _field;
[Export] private InteractionArea2D _activatorArea;
@@ -20,7 +18,6 @@ public partial class FieldActivator : Node, ISaveable
public override void _Ready()
{
LoadFromSaveData();
ToggleInteractionArea();
}
@@ -35,8 +32,6 @@ public partial class FieldActivator : Node, ISaveable
_field.UpdateFieldState(FieldState.Tilled);
EmitSignal(SignalName.FieldCreated, _field);
_used = true;
ToggleInteractionArea();
UpdateSaveData();
}
}
@@ -47,8 +42,6 @@ public partial class FieldActivator : Node, ISaveable
/// <param name="activated"></param>
public void RakeActivated(bool activated)
{
if (_used || ProcessMode == ProcessModeEnum.Disabled)
return;
_rakeInHand = activated;
ToggleInteractionArea();
}
@@ -57,29 +50,5 @@ public partial class FieldActivator : Node, ISaveable
{
_activatorArea.IsActive = !_used && _rakeInHand;
}
public void UpdateSaveData()
{
var payloadData = new Dictionary<string, Variant>
{
{ "field_activator_used", _used }
};
string id = GetMeta("SaveID").AsString();
SavegameService.AppendDataToSave( id, payloadData);
}
public void LoadFromSaveData()
{
string id = GetMeta("SaveID").AsString();
Dictionary<string, Variant> save = SavegameService.GetSaveData(id);
if (save.Count > 0)
{
if (save.TryGetValue("field_activator_used", out Variant usedVar))
{
_used = usedVar.AsBool();
}
}
}
}
@@ -33,6 +33,7 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
[ExportGroup("Field Interactions")]
[Export] public InteractionArea2D PlantingInteraction;
[Export] public InteractionArea2D FieldInteractionArea;
[ExportGroup("Configuration")]
[Export] public Node2D PlantingPlaceholder;
@@ -47,8 +48,6 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
private bool _canWater;
private int _currentDay;
public bool IsPlanted;
private PlantBehaviour2D? _currentPlant;
private const string DAY_COUNTER_SAVE_ID = "12c6da2e-fc71-4281-a04a-dfd3c7943975";
@@ -60,9 +59,9 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
// fieldstate == tilled / watered && samen im Inventar
_canPlant = (FieldState == FieldState.Tilled || FieldState == FieldState.Watered) && _seedsActive;
// fieldstate == tilled && watering can ausgewählt
_canWater = (FieldState == FieldState.Tilled || IsPlanted) && _wateringCanActive && WateringCanState.GetFillState() > 0;
_canWater = (FieldState == FieldState.Tilled || FieldState == FieldState.Planted) && _wateringCanActive;
PlantingInteraction.IsActive = _canPlant || _canWater;
FieldInteractionArea.IsActive = _canPlant || _canWater;
}
public void ActivatedSeedInInventory(bool activated)
@@ -105,14 +104,17 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
case FieldState.Tilled:
FieldState = FieldState.Tilled;
_fieldSprite.Texture = Tilled;
if(!IsPlanted)
PlantingInteraction.IsActive = true;
PlantingInteraction.IsActive = true;
break;
case FieldState.Watered:
FieldState = FieldState.Watered;
_fieldSprite.Texture = Watered;
if(!IsPlanted)
PlantingInteraction.IsActive = true;
PlantingInteraction.IsActive = true;
break;
case FieldState.Planted:
FieldState = FieldState.Planted;
_fieldSprite.Texture = Tilled;
PlantingInteraction.IsActive = false;
break;
default:
FieldState = FieldState.NotFound;
@@ -123,6 +125,7 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
UpdateSaveData();
}
public void Water()
{
if (WateringCanState.GetFillState() > 0 && FieldState != FieldState.Watered)
@@ -148,7 +151,7 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
if (_canPlant && TryPlant())
{
EmitSignal(SignalName.Planted);
UpdateSaveData();
UpdateFieldState(FieldState.Planted);
}
if (_canWater)
@@ -156,16 +159,6 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
Water();
}
}
public void ChangePlantedState()
{
IsPlanted = true;
if(FieldState == FieldState.Tilled)
_fieldSprite.Texture = Tilled;
if(FieldState == FieldState.Watered)
_fieldSprite.Texture = Watered;
PlantingInteraction.IsActive = false;
}
private bool TryPlant()
{
@@ -194,7 +187,6 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
if (_currentPlant != null)
{
ChangePlantedState();
_currentPlant.DayPlanted = _currentDay;
}
}
@@ -217,7 +209,6 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
{
_currentPlant = null;
UpdateFieldState(FieldState.Empty, true);
IsPlanted = false;
}
#region SAVE AND LOAD
@@ -230,10 +221,10 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
var payloadData = new Dictionary<string, Variant>
{
{ "field_state", (int)FieldState },
{ "day_count_on_last_exit", _currentDay},
{ "day_count_on_last_exit", _currentDay}
};
if (IsPlanted)
if (_currentPlant != null)
{
payloadData.Add(
"plant_data", new Dictionary<string, Variant>()
@@ -267,7 +258,6 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
// get plant first because it's also relevant for the field state
if (save.TryGetValue("plant_data", out Variant plantDataVar))
{
IsPlanted = true;
Dictionary<string, Variant> plantDataDict = plantDataVar.AsGodotDictionary<string, Variant>();
if (plantDataDict.TryGetValue("prefab_path", out Variant prefabPathVar))
@@ -324,10 +314,17 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
// if day is today, then just use the provided field state as is.
if (CalendarController.Instance != null && _currentDay != lastDayCount)
{
// if the field was watered the day before, set it to tilled
// if the field was watered the day before, set it to tilled or planted.
if (fieldStateInt == 3)
{
fieldStateInt = 1;
if (_currentPlant != null)
{
fieldStateInt = 2;
}
else
{
fieldStateInt = 1;
}
}
}
}
@@ -7,6 +7,7 @@ public enum FieldState
{
Empty = 0,
Tilled = 1,
Planted = 2,
Watered = 3,
NotFound = 99
}
@@ -7,16 +7,11 @@ public partial class WellBehaviour : Node2D
{
[Export] private InteractionArea2D _interactionArea;
public override void _EnterTree()
public override void _Ready()
{
WateringCanState.WateringCanActiveStateChanged += OnWateringCanStateChanged;
}
public override void _ExitTree()
{
WateringCanState.WateringCanActiveStateChanged -= OnWateringCanStateChanged;
}
private void OnWateringCanStateChanged(bool state)
{
_interactionArea.IsActive = state;
@@ -11,11 +11,11 @@ public partial class ActionAnimationController : Node
#endregion
[Export] private AllFightersVisual _allFightersVisual = null!;
[Export] private FightHappeningAnimationContext _animationContext = null!;
public void StateEnter()
{
_ = HappeningData.actionStaging!.AnimateAction(_allFightersVisual);
_ = HappeningData.actionStaging!.AnimateAction(_allFightersVisual,_animationContext);
}
public void StateExit()
@@ -12,6 +12,7 @@ public class TargetSelectActionDetail : FighterAction.FighterActionDetail
// settings
public required bool selectEnemy;
public required bool selectAlly;
public required bool aliveOnly;
public VisualRange visualRange = VisualRange.Single;
// result
@@ -13,7 +13,8 @@ public class AllyAttackAction : FighterAction
public TargetSelectActionDetail targetSelect = new()
{
selectEnemy = true,
selectAlly = false
selectAlly = false,
aliveOnly = true
};
public MinigameActionDetail minigameDetail = new();
@@ -47,10 +48,11 @@ public class AllyAttackAction : FighterAction
public override void ExecuteAction()
{
var totalDamage = minigameDetail.damageHits!.Sum(dh => dh);
targetSelect.GetTarget().AddHealth(-totalDamage);
targetSelect.GetTarget().ChangeHealth(-totalDamage);
}
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
public override async Task AnimateAction(AllFightersVisual allFightersVisual,
FightHappeningAnimationContext animationContext)
{
var currentFighter = HappeningData.fighterTurn.Current;
var targetFighter = targetSelect.GetTarget();
@@ -63,7 +65,7 @@ public class AllyAttackAction : FighterAction
foreach (var hit in minigameDetail.damageHits!)
{
targetFighterVisual.SpawnDamageIndicatorNumber(hit);
targetFighterVisual.SpawnDamageIndicatorNumber($"-{hit}");
}
await currentFighterVisual.AnimatePosToBase();
@@ -18,10 +18,11 @@ public class BlobAttackAction(int damage = 3) : FighterAction
public override void ExecuteAction()
{
FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-damage);
FightWorld.Instance.allyFighters.vesnaFighter.ChangeHealth(-damage);
}
public override async Task AnimateAction(AllFightersVisual allFightersVisual)
public override async Task AnimateAction(AllFightersVisual allFightersVisual,
FightHappeningAnimationContext animationContext)
{
var currentFighter = HappeningData.fighterTurn.Current;
var targetFighter = FightWorld.Instance.allyFighters.vesnaFighter;
@@ -31,7 +32,7 @@ public class BlobAttackAction(int damage = 3) : FighterAction
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
_ = targetFighterVisual.AnimateHit();
targetFighterVisual.SpawnDamageIndicatorNumber(damage);
targetFighterVisual.SpawnDamageIndicatorNumber($"-{damage}");
await currentFighterVisual.AnimatePosToBase();
}
}
@@ -0,0 +1,48 @@
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.Util;
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
public class EatBeetrootAction : FighterAction
{
public override Variant<float, Func<bool>> GetAnimationEnd() => 1;
public override bool NextDetail() => false;
private const int HealAmount = 20;
public override bool ShouldAbort()
{
Debug.Assert(FightWorld.Instance.itemBeetrootToEatForHealth != null,
"Item to eat for health has not been set in the FightWorld autoload");
return !InventoryManager.Instance.playerInventory!.HasItems(new ItemInstance
{ blueprint = FightWorld.Instance.itemBeetrootToEatForHealth });
}
public override async Task AnimateAction(AllFightersVisual allFightersVisual,
FightHappeningAnimationContext animationContext)
{
var fighter = HappeningData.fighterTurn.Current;
var fighterVisual = allFightersVisual.GetVisualForFighter(fighter);
fighterVisual.SpawnDamageIndicatorNumber($"+{HealAmount}");
animationContext.useHealItemIndicator.SpawnIndicator();
await fighterVisual.AnimateHeal();
}
public override void ExecuteAction()
{
var fighter = HappeningData.fighterTurn.Current;
var result = InventoryManager.Instance.playerInventory!.TryRemoveAllItems(
new ItemInstance { blueprint = FightWorld.Instance.itemBeetrootToEatForHealth! });
if (result != InventoryActionResult.Success)
throw new Exception("No Beetroot in inventory. This case should have been handled earlier");
fighter.ChangeHealth(HealAmount);
}
public override AllyActionButton BindToActionButton() => AllyActionButton.Talk; // Temporarily bound to talk button
}
@@ -0,0 +1 @@
uid://b2463q1waqvdu
@@ -117,11 +117,13 @@ public partial class AllFightersVisual : Node
if (targetDetail.selectEnemy)
_fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation))
.Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive
.ForEach(kv => kv.Value.SetTargetSelectionActive(true));
if (targetDetail.selectAlly)
_fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.allyFighterFormation))
.Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive
.ForEach(kv => kv.Value.SetTargetSelectionActive(true));
}
+2 -1
View File
@@ -10,7 +10,8 @@ public class AllyFighters
maxHealth = 60,
availableActions =
[
new AllyAttackAction()
new AllyAttackAction(),
new EatBeetrootAction()
]
};
public FightWorld.Fighter chuhaFighter = new()
+11 -6
View File
@@ -222,9 +222,9 @@ public partial class FightHappening : Node
case FightState.ActionCheckDetails:
RequireNotNull(HappeningData.actionStaging);
if (ActionAbort())
if (ShouldActionAbort())
ChangeState(FightState.InputActionSelect);
else if (ActionNeededDetail())
else if (DoesActionNeededDetail())
ChangeState(FightState.InputActionDetail);
else
ChangeState(FightState.ActionExecute);
@@ -307,6 +307,11 @@ public partial class FightHappening : Node
HappeningData.enemyFighterFormation.SetFighterAtPosition(emptySlotIndex, fighter);
HappeningData.fighterTurn.AddAsLast(fighter);
}
if (GD.RandRange(0, 2) != 0) // 2/3 chance for vesna to start
{
HappeningData.fighterTurn.SpinBack();
}
}
private void ExecuteNextFighter()
@@ -328,13 +333,13 @@ public partial class FightHappening : Node
return HappeningData.actionStaging.GetAnimationEnd();
}
private bool ActionAbort()
private bool ShouldActionAbort()
{
Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.MarkedForAbort();
return HappeningData.actionStaging.ShouldAbort();
}
private bool ActionNeededDetail()
private bool DoesActionNeededDetail()
{
Debug.Assert(HappeningData.actionStaging != null);
return HappeningData.actionStaging.NextDetail();
@@ -344,7 +349,7 @@ public partial class FightHappening : Node
private void ReviveVesna()
{
var vesnaFighter = FightWorld.Instance.allyFighters.vesnaFighter;
vesnaFighter.health = vesnaFighter.maxHealth;
vesnaFighter.Health = vesnaFighter.maxHealth;
GD.Print("Vesna has been revived. This is for the current prototype only");
}
@@ -0,0 +1,8 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightHappeningAnimationContext : Node
{
[Export] public UsedItemIndicatorVisual useHealItemIndicator = null!;
}
@@ -0,0 +1 @@
uid://cdrjvgm82pxoj
@@ -1,15 +1,16 @@
using System.Collections.Generic;
using System.Linq;
using Babushka.scripts.CSharp.Common.Util;
using Babushka.scripts.CSharp.Common.Inventory;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FightRoomSceneSetup : Node
{
[Export(PropertyHint.ArrayType)] private Node2D[] _enemyGroupSpawns;
[Export] private PackedScene _roamingEnemyGroupPrefab;
[Export] private FightSceneSwitcher _fightSceneSwitcher;
[Export(PropertyHint.ArrayType)] private Node2D[] _enemyGroupSpawns = null!;
[Export] private PackedScene _roamingEnemyGroupPrefab = null!;
[Export] private PackedScene _itemOnGroundPrefab = null!;
[Export] private FightSceneSwitcher _fightSceneSwitcher = null!;
public override void _Ready()
@@ -19,11 +20,30 @@ public partial class FightRoomSceneSetup : Node
foreach (var (parent, group) in _enemyGroupSpawns.Zip(room.enemyGroups))
{
if (group.AreAllDead())
continue;
var roamingEnemyGroup = _roamingEnemyGroupPrefab.Instantiate<RoamingEnemyGroup>();
roamingEnemyGroup.Initialize(group, _fightSceneSwitcher);
parent.AddChild(roamingEnemyGroup);
{
SpawnLoot(group, parent);
}
else
{
SpawnEnemies(group, parent);
}
}
}
private void SpawnEnemies(FightWorld.FighterGroup group, Node2D parent)
{
var roamingEnemyGroup = _roamingEnemyGroupPrefab.Instantiate<RoamingEnemyGroup>();
roamingEnemyGroup.Initialize(group, _fightSceneSwitcher);
parent.AddChild(roamingEnemyGroup);
}
private void SpawnLoot(FightWorld.FighterGroup group, Node2D parent)
{
if (group.lootToDrop == null)
return;
var onGroundInstance = _itemOnGroundPrefab.Instantiate<ItemOnGround2D>();
onGroundInstance.itemInstance = group.lootToDrop;
parent.AddChild(onGroundInstance);
}
}
+11 -10
View File
@@ -10,15 +10,16 @@ public static class FightUtils
{
return self.Where(e => e.IsAlive());
}
public static IEnumerable<FightWorld.Fighter> WhereIsNotInFormation(this IEnumerable<FightWorld.Fighter> self, FighterFormation formation)
public static IEnumerable<FightWorld.Fighter> WhereIsNotInFormation(this IEnumerable<FightWorld.Fighter> self,
FighterFormation formation)
{
return self.Where(e => !e.IsInFormation(formation));
}
public static bool IsAlive(this FightWorld.Fighter self)
{
return self.GetHealth() > 0;
return self.Health > 0;
}
public static bool IsDead(this FightWorld.Fighter self)
@@ -26,16 +27,16 @@ public static class FightUtils
return !self.IsAlive();
}
public static int GetHealth(this FightWorld.Fighter self)
/// <summary>
/// Changes the health of a fighter
/// </summary>
/// <param name="self">The fighter itself</param>
/// <param name="amount">The amount of health to add. Make negative to remove health</param>
public static void ChangeHealth(this FightWorld.Fighter self, int amount)
{
return Math.Max(self.health ?? self.maxHealth, 0);
self.Health += amount;
}
public static void AddHealth(this FightWorld.Fighter self, int addHealth)
{
self.health = self.GetHealth() + addHealth;
}
public static bool IsInFormation(this FightWorld.Fighter self, FighterFormation formation)
{
return formation.ContainsFighter(self);
+25 -5
View File
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using Babushka.scripts.CSharp.Common.Fight.Actions;
using Babushka.scripts.CSharp.Common.Inventory;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
@@ -19,6 +21,7 @@ public partial class FightWorld : Node
None,
EndOfNight
}
public required Dictionary<int, Room> paths;
public required List<FighterGroup> enemyGroups;
public Special specialRoom = Special.None;
@@ -27,6 +30,7 @@ public partial class FightWorld : Node
public class FighterGroup
{
public required List<Fighter> fighters;
public ItemInstance? lootToDrop = null;
}
public class FightHappeningData
@@ -56,9 +60,17 @@ public partial class FightWorld : Node
public required int maxHealth;
public required List<FighterAction> availableActions;
public const int MaxActionPoints = 1;
public int? health = null; // null => initialize to full health on spawn
public int actionPointsLeft;
private int? _healthBacking = null;
public int Health
{
get => _healthBacking ?? maxHealth;
set => _healthBacking = Math.Clamp(value, 0, maxHealth);
}
public FighterAction AutoSelectAction()
{
return availableActions.Random() ?? new FighterAction.Skip();
@@ -81,6 +93,10 @@ public partial class FightWorld : Node
public FightHappeningData? fightHappeningData = null;
public AllyFighters allyFighters = new();
// settings
[Export] private ItemResource? _itemToDropByEnemyGroup;
[Export] public ItemResource? itemBeetrootToEatForHealth;
public void ResetFightWorld()
{
Generate();
@@ -89,10 +105,10 @@ public partial class FightWorld : Node
public void Generate()
{
world = new Generator().GenerateWorld();
world = new Generator(this).GenerateWorld();
}
private class Generator
private class Generator(FightWorld fightWorld)
{
public World GenerateWorld()
{
@@ -113,7 +129,7 @@ public partial class FightWorld : Node
{
rooms.Add(GenerateDisconnectedRoom());
}
rooms.Add(new Room
{
paths = [],
@@ -162,6 +178,11 @@ public partial class FightWorld : Node
fighters = []
};
if (fightWorld._itemToDropByEnemyGroup != null)
{
enemyGroup.lootToDrop = new ItemInstance { blueprint = fightWorld._itemToDropByEnemyGroup };
}
var enemyCount = GD.RandRange(2, 3);
for (var i = 0; i < enemyCount; i++)
@@ -189,7 +210,6 @@ public partial class FightWorld : Node
var enemy = new Fighter
{
type = type,
health = null,
maxHealth = GD.RandRange(8, 20),
availableActions =
[
+4 -12
View File
@@ -30,8 +30,6 @@ public abstract class FighterAction
public abstract bool DetailComplete();
}
private bool _abort = false;
#region Shortcuts
protected static FightWorld.FightHappeningData HappeningData =>
@@ -61,19 +59,13 @@ public abstract class FighterAction
/// Animates the action.
/// </summary>
/// <param name="allFightersVisual"></param>
public virtual async Task AnimateAction(AllFightersVisual allFightersVisual)
/// <param name="animationContext"></param>
public virtual async Task AnimateAction(AllFightersVisual allFightersVisual,
FightHappeningAnimationContext animationContext)
{
}
public void MarkAbort()
{
_abort = true;
}
public bool MarkedForAbort()
{
return _abort;
}
public virtual bool ShouldAbort() => false;
/// <summary>
/// Returns the FighterActionDetail, that is currently handled.
@@ -4,13 +4,13 @@ namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FighterDamageIndicatorVisual : Node2D
{
[Export] private PackedScene _flyingNumberPrefab;
[Export] private PackedScene _flyingNumberPrefab = null!;
public void SpawnFlyingNumber(int number)
public void SpawnFlyingNumber(string text)
{
var flyingNumberInstance = _flyingNumberPrefab.Instantiate<FighterDamageIndicatorFlyingNumber>();
var flyingNumberInstance = _flyingNumberPrefab.Instantiate<FlyingIndicator>();
AddChild(flyingNumberInstance);
flyingNumberInstance.Initialize(number);
flyingNumberInstance.Initialize(text);
}
}
@@ -99,6 +99,23 @@ public class FighterTurn : IEnumerable<FightWorld.Fighter>
return false;
}
/// <summary>
/// Sets the current one back
/// This is an expensive operation, because the entire data structure needs to be circled
/// </summary>
public void SpinBack()
{
if (_currentNode == null) return;
var node = _currentNode;
while (node.next != _currentNode)
{
node = node.next;
}
_currentNode = node;
}
public IEnumerator<FightWorld.Fighter> GetEnumerator()
{
if (_currentNode == null) return Enumerable.Empty<FightWorld.Fighter>().GetEnumerator();
+20 -13
View File
@@ -42,7 +42,12 @@ public partial class FighterVisual : Node2D
_boundFighter.IsInFormation(HappeningData.enemyFighterFormation) ? -1 : 1,
_boundFighter.IsDead() ? .3f : 1);
healthBarVisual.UpdateHealth(_boundFighter.GetHealth(), _boundFighter.maxHealth);
UpdateHealthBarVisuals();
}
private void UpdateHealthBarVisuals()
{
healthBarVisual.UpdateHealth(_boundFighter.Health, _boundFighter.maxHealth);
}
public void SetTargetSelectionActive(bool value)
@@ -78,24 +83,26 @@ public partial class FighterVisual : Node2D
public async Task AnimateHit()
{
UpdateHealthBarVisuals();
var tween = GetTree().CreateTween();
tween.TweenProperty(_squashParent, "scale", new Vector2(1.4f, 0.6f), 0.15);
tween.TweenProperty(_squashParent, "scale", new Vector2(1, 1), 0.4)
.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
await ToSignal(tween, "finished");
}
// Keep for reference for new Heal animation
//public void HealAnimation()
//{
// EmitSignalHealed();
// var tween = GetTree().CreateTween();
// tween.TweenProperty(this, "scale", new Vector2(0.6f, 1.4f), 0.15);
// tween.TweenProperty(this, "scale", new Vector2(1, 1), 0.4)
// .SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
//}
public void SpawnDamageIndicatorNumber(int number)
public async Task AnimateHeal()
{
_fighterDamageIndicatorVisual.SpawnFlyingNumber(number);
UpdateHealthBarVisuals();
var tween = GetTree().CreateTween();
tween.TweenProperty(_squashParent, "scale", new Vector2(0.6f, 1.4f), 0.15);
tween.TweenProperty(_squashParent, "scale", new Vector2(1, 1), 0.4)
.SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
await ToSignal(tween, "finished");
}
public void SpawnDamageIndicatorNumber(string text)
{
_fighterDamageIndicatorVisual.SpawnFlyingNumber(text);
}
}
@@ -3,13 +3,19 @@ using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class FighterDamageIndicatorFlyingNumber : Node2D
public partial class FlyingIndicator : Node2D
{
[Export] private Label _label;
public void Initialize(int number)
[Export] private Label _label = null!;
[Export] private TextureRect _sprite = null!;
public void Initialize(string? text = null, Texture2D? icon = null)
{
_label.Text = number.ToString();
_label.Visible = text != null;
_sprite.Visible = icon != null;
if (text != null) _label.Text = text;
if (icon != null) _sprite.Texture = icon;
var tween = CreateTween();
var xMovement = GD.RandRange(-150, 150);
@@ -9,9 +9,15 @@ public partial class SwitchSceneOnFightEnd : Node
public void OnFightStateEnter(FightHappening.FightState to)
{
if (to is FightHappening.FightState.PlayerWin
or FightHappening.FightState.EnemyWin)
if (to is FightHappening.FightState.PlayerWin )
_ = SwitchSceneAfterTime(2.0f);
if (to is FightHappening.FightState.EnemyWin)
{
_fightSceneSwitcher.ExitFight();
_fightSceneSwitcher.ExitFightWorld();
}
}
private async Task SwitchSceneAfterTime(float seconds)
@@ -0,0 +1,15 @@
using Babushka.scripts.CSharp.Common.Inventory;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight.UI;
public partial class HealButtonVisual : Button
{
[Export] private ItemResource _healItemBlueprint = null!;
public void UpdateText()
{
var healItemsLeft = InventoryManager.Instance.playerInventory!.TotalItemsOfBlueprint(_healItemBlueprint);
Text = $"x{healItemsLeft} - Heal";
}
}
@@ -0,0 +1 @@
uid://71mdwp2m4rta
@@ -0,0 +1,17 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight;
public partial class UsedItemIndicatorVisual : Node2D
{
[Export] private PackedScene _flyingIndicatorPrefab = null!;
[Export] private Texture2D _itemTexture = null!;
public void SpawnIndicator()
{
var flyingNumberInstance = _flyingIndicatorPrefab.Instantiate<FlyingIndicator>();
AddChild(flyingNumberInstance);
flyingNumberInstance.Initialize(icon: _itemTexture);
}
}
@@ -0,0 +1 @@
uid://6nniwfxye8ss

Some files were not shown because too many files have changed in this diff Show More