Compare commits

..

2 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
81 changed files with 321 additions and 15722 deletions
-3
View File
@@ -8,7 +8,4 @@
<Folder Include="prefabs\UI\Inventory\" /> <Folder Include="prefabs\UI\Inventory\" />
<Folder Include="scripts\CSharp\Low Code\Randomizer\" /> <Folder Include="scripts\CSharp\Low Code\Randomizer\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
</Project> </Project>
+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

+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxbae280ae8yv"
path="res://.godot/imported/sk_cat.png-400ad3198e50487a16cece95aef9c056.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/animation/Cat/sk_cat.png"
dest_files=["res://.godot/imported/sk_cat.png-400ad3198e50487a16cece95aef9c056.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
+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]
@@ -4,22 +4,19 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://b3kyrsoobmkhp" uid="uid://b3kyrsoobmkhp"
path="res://.godot/imported/best_house_blender.blend-ac89c74aef2f275bdf4b4baadee17c0c.scn" valid=false
[deps] [deps]
source_file="res://art/mockups/3d/best_house_blender.blend" source_file="res://art/mockups/3d/best_house_blender.blend"
dest_files=["res://.godot/imported/best_house_blender.blend-ac89c74aef2f275bdf4b4baadee17c0c.scn"]
[params] [params]
nodes/root_type="" nodes/root_type=""
nodes/root_name="" nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true nodes/apply_root_scale=true
nodes/root_scale=1.0 nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true meshes/ensure_tangents=true
meshes/generate_lods=true meshes/generate_lods=true
@@ -34,9 +31,6 @@ animation/trimming=false
animation/remove_immutable_tracks=true animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false animation/import_rest_as_RESET=false
import_script/path="" import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={} _subresources={}
blender/nodes/visible=0 blender/nodes/visible=0
blender/nodes/active_collection_only=false blender/nodes/active_collection_only=false
@@ -56,4 +50,3 @@ blender/materials/export_materials=1
blender/animation/limit_playback=true blender/animation/limit_playback=true
blender/animation/always_sample=true blender/animation/always_sample=true
blender/animation/group_tracks=true blender/animation/group_tracks=true
gltf/naming_version=0
@@ -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.
-45
View File
@@ -26,15 +26,6 @@
&"nicknames": ["vesna"], &"nicknames": ["vesna"],
&"offset": Vector2(-300, 0), &"offset": Vector2(-300, 0),
&"portraits": { &"portraits": {
"angry": {
"export_overrides": {
"image": "\"res://art/characters/Vesna/angry.png\""
},
"mirror": false,
"offset": Vector2(150, 0),
"scale": 0.65,
"scene": ""
},
"front": { "front": {
"export_overrides": { "export_overrides": {
"image": "\"res://art/animation/Vesna2D/Vesna Anims Sequences/F01-Idle/0001.png\"" "image": "\"res://art/animation/Vesna2D/Vesna Anims Sequences/F01-Idle/0001.png\""
@@ -61,42 +52,6 @@
"offset": Vector2(0, 0), "offset": Vector2(0, 0),
"scale": 1.0, "scale": 1.0,
"scene": "" "scene": ""
},
"sad": {
"export_overrides": {
"image": "\"res://art/characters/Vesna/sad.png\""
},
"mirror": false,
"offset": Vector2(150, 0),
"scale": 0.65,
"scene": ""
},
"smile": {
"export_overrides": {
"image": "\"res://art/characters/Vesna/smile.png\""
},
"mirror": false,
"offset": Vector2(150, 0),
"scale": 0.65,
"scene": ""
},
"surprise": {
"export_overrides": {
"image": "\"res://art/characters/Vesna/surprise.png\""
},
"mirror": false,
"offset": Vector2(150, 0),
"scale": 0.65,
"scene": ""
},
"surprised": {
"export_overrides": {
"image": "\"res://art/characters/Vesna/surprised.png\""
},
"mirror": false,
"offset": Vector2(150, 0),
"scale": 0.65,
"scene": ""
} }
}, },
&"scale": 1.0 &"scale": 1.0
-15
View File
@@ -1,15 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://hdfejdnmp8sl"]
[ext_resource type="Script" uid="uid://umop2b1m1qm8" path="res://scripts/CSharp/GameEntity/Management/EntityManager.cs" id="1_2bwns"]
[ext_resource type="Script" uid="uid://bogqp274y1pgr" path="res://scripts/CSharp/GameEntity/Management/EntityNodeCreator.cs" id="2_8m173"]
[ext_resource type="PackedScene" uid="uid://sbf12hin4kes" path="res://prefabs/Interactables/trash_object.tscn" id="3_v3vdc"]
[node name="EntityManager" type="Node" node_paths=PackedStringArray("_nodeCreator")]
script = ExtResource("1_2bwns")
_nodeCreator = NodePath("EntityCreator")
[node name="EntityCreator" type="Node" parent="."]
script = ExtResource("2_8m173")
_entityPrefabs = Dictionary[String, PackedScene]({
"TrashEntity": ExtResource("3_v3vdc")
})
+2 -16
View File
@@ -25,7 +25,7 @@ buses/default_bus_layout="uid://b6dwkmkyb0axk"
[autoload] [autoload]
SceneTransition="*res://prefabs/UI/SceneTransition.tscn" SceneTransition="*res://scenes/SceneTransition.tscn"
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd" Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs" InventoryManager="*res://scripts/CSharp/Common/Inventory/InventoryManager.cs"
InputService="*res://scripts/CSharp/Common/Services/InputService.cs" InputService="*res://scripts/CSharp/Common/Services/InputService.cs"
@@ -35,7 +35,6 @@ FightWorldAutoload="*res://prefabs/fight/fight_world_autoload.tscn"
SaveGameManager="*res://scripts/CSharp/Common/Savegame/SaveGameManager.cs" SaveGameManager="*res://scripts/CSharp/Common/Savegame/SaveGameManager.cs"
SettingsSaveController="*res://scripts/CSharp/Common/Savegame/SettingsSaveController.cs" SettingsSaveController="*res://scripts/CSharp/Common/Savegame/SettingsSaveController.cs"
DayAndNight="*res://prefabs/day_and_night/day_and_night.tscn" DayAndNight="*res://prefabs/day_and_night/day_and_night.tscn"
EntityManager="*res://prefabs/entity_system/entity_manager.tscn"
[dialogic] [dialogic]
@@ -142,6 +141,7 @@ directories/tres_directory={
"beet": "res://resources/items/beet.tres", "beet": "res://resources/items/beet.tres",
"beetRoot": "res://resources/quests/beetRoot.tres", "beetRoot": "res://resources/quests/beetRoot.tres",
"beet_seed": "res://resources/items/beet_seed.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_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_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", "choice_panel_normal": "res://addons/dialogic/Modules/DefaultLayoutParts/Layer_VN_Choices/choice_panel_normal.tres",
@@ -222,10 +222,6 @@ folder_colors={
"res://shader/": "pink" "res://shader/": "pink"
} }
[filesystem]
import/blender/enabled=false
[global_group] [global_group]
Saveable="" Saveable=""
@@ -312,16 +308,6 @@ NextDayCheat={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
] ]
} }
DebugEntities={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":66,"key_label":0,"unicode":98,"location":0,"echo":false,"script":null)
]
}
SaveGame={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194336,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[internationalization] [internationalization]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-445
View File
@@ -1,445 +0,0 @@
[gd_scene load_steps=9 format=3 uid="uid://b4uito2bnud2a"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_f5860"]
[ext_resource type="Texture2D" uid="uid://c7atj6ohlmir3" path="res://art/ui/StartScreen/titlescreen.png" id="1_kesja"]
[ext_resource type="Texture2D" uid="uid://du612t3xytly3" path="res://art/ui/StartScreen/babushkalog_white.png" id="2_f5860"]
[ext_resource type="Texture2D" uid="uid://cfrhmcyhs2i53" path="res://art/ui/UI/WhiteWashBackground.png" id="3_dvwtm"]
[ext_resource type="Texture2D" uid="uid://deitc84w2byyh" path="res://art/ui/nametag.png" id="4_a8kc7"]
[ext_resource type="FontFile" uid="uid://bgmdn7uo215q2" path="res://art/fonts/RuslanDisplay-Regular.ttf" id="5_gsl3s"]
[ext_resource type="Texture2D" uid="uid://blbplxfx41f8t" path="res://art/logos/Cozy Raven Logo breit.svg" id="6_l0rmr"]
[ext_resource type="Texture2D" uid="uid://cwbv2i8ntq15d" path="res://art/logos/FS_Logo_2zeilig_rot.png" id="7_03xwf"]
[node name="BabushkaSceneCredits" type="Node2D"]
script = ExtResource("1_f5860")
_sceneNamesToLoad = PackedStringArray("res://scenes/scene_bootstrap.tscn")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(1030, 483)
scale = Vector2(0.535648, 0.535648)
texture = ExtResource("1_kesja")
[node name="BabushkaText" type="Sprite2D" parent="."]
position = Vector2(1387, 129)
scale = Vector2(0.349074, 0.349074)
texture = ExtResource("2_f5860")
[node name="WhiteWash" type="Sprite2D" parent="."]
modulate = Color(1, 1, 1, 0.0509804)
position = Vector2(1019, 930)
scale = Vector2(13.1172, 4.47852)
texture = ExtResource("3_dvwtm")
[node name="Node2D10" type="Node2D" parent="."]
position = Vector2(-18, 4)
scale = Vector2(0.93, 0.93)
[node name="Node2D2" type="Node2D" parent="Node2D10"]
position = Vector2(39, -100)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D2"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D2"]
offset_left = 296.0
offset_top = 250.0
offset_right = 898.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Producer"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D2"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D2"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Kathi"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D" type="Node2D" parent="Node2D10"]
position = Vector2(39, 15)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Programming"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Jonathan"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D3" type="Node2D" parent="Node2D10"]
position = Vector2(35, 130)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D3"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D3"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Sound Design"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D3"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D3"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Laura"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D4" type="Node2D" parent="Node2D10"]
position = Vector2(35, 244)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D4"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D4"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Project Manager"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D4"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D4"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Anna"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D5" type="Node2D" parent="Node2D10"]
position = Vector2(35, 356)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D5"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D5"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Art"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D5"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D5"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Alphawolfin"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D6" type="Node2D" parent="Node2D10"]
position = Vector2(35, 581)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D6"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D6"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Game Design"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D6"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D6"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Max"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D7" type="Node2D" parent="Node2D10"]
position = Vector2(35, 695)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D7"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D7"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Writer"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D7"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D7"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Sanel"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D8" type="Node2D" parent="Node2D10"]
position = Vector2(35, 469)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D8"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D8"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Animation"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D8"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D8"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Felix"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Node2D9" type="Node2D" parent="Node2D10"]
position = Vector2(35, 807)
scale = Vector2(0.5, 0.5)
[node name="Nametag2" type="Sprite2D" parent="Node2D10/Node2D9"]
position = Vector2(596.045, 303)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label2" type="Label" parent="Node2D10/Node2D9"]
offset_left = 295.0
offset_top = 250.0
offset_right = 897.0
offset_bottom = 377.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Music"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag3" type="Sprite2D" parent="Node2D10/Node2D9"]
position = Vector2(3726.91, 187.387)
scale = Vector2(0.636364, 0.636364)
texture = ExtResource("4_a8kc7")
[node name="Label3" type="Label" parent="Node2D10/Node2D9"]
offset_left = 3425.86
offset_top = 134.387
offset_right = 4027.86
offset_bottom = 261.387
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 56
text = "Gefördert durch"
horizontal_alignment = 1
vertical_alignment = 1
[node name="Nametag" type="Sprite2D" parent="Node2D10/Node2D9"]
position = Vector2(595, 408)
texture = ExtResource("4_a8kc7")
[node name="Label" type="Label" parent="Node2D10/Node2D9"]
offset_left = 124.0
offset_top = 359.0
offset_right = 1072.0
offset_bottom = 486.0
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_constants/shadow_offset_x = 0
theme_override_constants/shadow_offset_y = 0
theme_override_fonts/font = ExtResource("5_gsl3s")
theme_override_font_sizes/font_size = 80
text = "Felix"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CozyRavenLogoBreit" type="Sprite2D" parent="."]
position = Vector2(1044.13, 876.875)
scale = Vector2(0.150709, 0.150709)
texture = ExtResource("6_l0rmr")
[node name="fums Logo" type="Sprite2D" parent="."]
position = Vector2(1751, 917)
scale = Vector2(0.496692, 0.496693)
texture = ExtResource("7_03xwf")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="Button" type="Button" parent="CanvasLayer"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -75.0
offset_bottom = 71.0
grow_horizontal = 0
alignment = 2
[connection signal="pressed" from="CanvasLayer/Button" to="." method="LoadScene"]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-172
View File
@@ -1,172 +0,0 @@
[gd_scene load_steps=19 format=3 uid="uid://botol7aqw81n7"]
[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" 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" 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="Texture2D" uid="uid://bleimj6jr1jka" path="res://art/general/rectangle.png" id="14_axs81"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="18_3gevq"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="23_408bg"]
[ext_resource type="PackedScene" uid="uid://cgjc4wurbgimy" path="res://prefabs/UI/Inventory/Inventory.tscn" id="24_xwo8y"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_l0jrn"]
resource_local_to_scene = true
size = Vector2(3836, 1086)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2spkc"]
size = Vector2(238.25, 189.75)
[sub_resource type="CircleShape2D" id="CircleShape2D_phqdf"]
resource_local_to_scene = true
radius = 381.93
[sub_resource type="CircleShape2D" id="CircleShape2D_2spkc"]
resource_local_to_scene = true
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")
[node name="Colliders" type="Node2D" parent="."]
position = Vector2(1297, 5292)
scale = Vector2(4, 4)
[node name="SideColliderLeft" type="StaticBody2D" parent="Colliders"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Colliders/SideColliderLeft"]
position = Vector2(-2892, -1168)
shape = SubResource("RectangleShape2D_l0jrn")
[node name="SideColliderRight" type="StaticBody2D" parent="Colliders"]
position = Vector2(4858, 0)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Colliders/SideColliderRight"]
position = Vector2(-2892, -1168)
shape = SubResource("RectangleShape2D_l0jrn")
[node name="TopCollider" type="StaticBody2D" parent="Colliders"]
position = Vector2(2448.75, -595)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Colliders/TopCollider"]
position = Vector2(-2892, -1168)
shape = SubResource("RectangleShape2D_l0jrn")
[node name="BottomCollider" type="StaticBody2D" parent="Colliders"]
position = Vector2(2495.5, 757.75)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Colliders/BottomCollider"]
position = Vector2(-2892, -1168)
shape = SubResource("RectangleShape2D_l0jrn")
[node name="BedCollider" type="StaticBody2D" parent="Colliders"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Colliders/BedCollider"]
position = Vector2(-828.625, -1230.38)
shape = SubResource("RectangleShape2D_2spkc")
[node name="BackWall" type="Node" parent="."]
[node name="Room01Walls2" type="Sprite2D" parent="BackWall"]
modulate = Color(0.16470589, 0, 0.49803922, 1)
z_index = -100
position = Vector2(4992, -487)
scale = Vector2(2, 2)
texture = ExtResource("2_j25a2")
offset = Vector2(-2768, 264)
[node name="Room01Shelf" type="Sprite2D" parent="BackWall"]
modulate = Color(0.16470589, 0, 0.49803922, 1)
z_index = -50
position = Vector2(-1978, -678)
texture = ExtResource("13_11fdt")
region_enabled = true
region_rect = Rect2(1846, 471, 348, 490)
[node name="Vesna" parent="." instance=ExtResource("18_3gevq")]
position = Vector2(-471, 185)
[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("_followNode")]
position = Vector2(-1534, -26)
offset = Vector2(0, -200)
zoom = Vector2(0.5, 0.5)
limit_left = -2600
limit_top = -1400
limit_right = 1500
limit_bottom = 1400
editor_draw_limits = true
script = ExtResource("23_408bg")
_followNode = NodePath("../Vesna/CharacterBody2D")
[node name="CanvasLayer" parent="." instance=ExtResource("24_xwo8y")]
[node name="BedInteraction" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("8_phqdf")]
position = Vector2(-1415, 489)
_spritesToOutline = [NodePath("Bedsprite")]
_id = 1
[node name="CollisionShape3D" parent="BedInteraction/Area2D" index="0"]
position = Vector2(-382, 9)
shape = SubResource("CircleShape2D_phqdf")
[node name="QuestCompleter" type="Node" parent="BedInteraction"]
script = ExtResource("8_j25a2")
questResource = ExtResource("9_heyef")
toStatus = 2
[node name="Bedsprite" type="Sprite2D" parent="BedInteraction"]
modulate = Color(0.16470589, 0, 0.49803922, 1)
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")]
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"]
modulate = Color(0.16470589, 0, 0.49803922, 1)
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
[node name="CountDayUp" type="Node" parent="NightStarter"]
script = ExtResource("11_heyef")
[node name="PointLight2D" type="PointLight2D" parent="."]
position = Vector2(-630, -568)
scale = Vector2(2.5, 1.3)
color = Color(1, 0.73333335, 0.69803923, 1)
energy = 1.86
texture = ExtResource("14_axs81")
[connection signal="Interacted" from="BedInteraction" to="BedInteraction/QuestCompleter" method="Trigger"]
[connection signal="Interacted" from="BedInteraction" to="NightStarter" method="StartNight"]
[connection signal="Interacted" from="BedInteraction" to="NightStarter/CountDayUp" method="IncreaseDayCount"]
[connection signal="Interacted" from="DoorInteraction" to="." method="LoadScene"]
[connection signal="LoadScene" from="NightStarter" to="." method="LoadSceneAtIndex"]
[editable path="Vesna"]
[editable path="BedInteraction"]
[editable path="DoorInteraction"]
File diff suppressed because it is too large Load Diff
@@ -186,7 +186,7 @@ public partial class PlantBehaviour2D : Node2D
private void SetActiveHarvestablePlant(bool active) private void SetActiveHarvestablePlant(bool active)
{ {
//_harvestablePlant.IsActive = active; _harvestablePlant.IsActive = active;
_harvestablePlant.UpdateVisuals(); _harvestablePlant.UpdateVisuals();
} }
@@ -1,13 +1,10 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Godot; using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.Common.Inventory; namespace Babushka.scripts.CSharp.Common.Inventory;
// Do not instantiate this resource // Do not instantiate this resource
// But it has to be a resource because Godot // But it has to be a resource because Godot
[GlobalClass] [GlobalClass]
public partial class ItemInstance : Resource, IJsonSerializable public partial class ItemInstance: Resource
{ {
[Export] public required ItemResource blueprint; [Export] public required ItemResource blueprint;
[Export] public int amount = 1; [Export] public int amount = 1;
@@ -20,18 +17,4 @@ public partial class ItemInstance : Resource, IJsonSerializable
amount = amount amount = amount
}; };
} }
public void LoadFromJson(JObject json)
{
var blueprintPath = json.GetStringValue("blueprint");
blueprint = GD.Load<ItemResource>(blueprintPath);
amount = json.GetIntValue("amount");
}
public JObject SaveToJson()
{
return new(
new JProperty("blueprint", blueprint.ResourcePath),
new JProperty("amount", amount));
}
} }
@@ -1,16 +1,20 @@
using Babushka.scripts.CSharp.Common.Savegame; using Babushka.scripts.CSharp.Common.Savegame;
using Babushka.scripts.CSharp.GameEntity.Entities;
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Godot; using Godot;
using Godot.Collections; using Godot.Collections;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.Common.Inventory; namespace Babushka.scripts.CSharp.Common.Inventory;
public partial class ItemOnGround2D : Node2D public partial class ItemOnGround2D : Node, ISaveable
{ {
private ItemInstance _itemInstance; private ItemInstance _itemInstance;
[Export] public bool IsActive = true;
[Export] private bool _infiniteSupply = false;
[Export] private int _finiteSupply = 1;
[Export] private bool _saveToDisk = true;
private int pickUpCounter = 0;
[Signal] public delegate void SuccessfulPickUpEventHandler(); [Signal] public delegate void SuccessfulPickUpEventHandler();
@@ -30,12 +34,16 @@ public partial class ItemOnGround2D : Node2D
public override void _Ready() public override void _Ready()
{ {
LoadFromSaveData();
UpdateVisuals(); UpdateVisuals();
_pickupErrorLabel.Text = ""; _pickupErrorLabel.Text = "";
} }
public void TryPickUp() public void TryPickUp()
{ {
if (!IsActive)
return;
var result = InventoryManager.Instance.CollectItem(itemInstance.Clone()); var result = InventoryManager.Instance.CollectItem(itemInstance.Clone());
EmitSignal(SignalName.SuccessfulPickUp); EmitSignal(SignalName.SuccessfulPickUp);
if (result == InventoryActionResult.Success) if (result == InventoryActionResult.Success)
@@ -50,7 +58,16 @@ public partial class ItemOnGround2D : Node2D
private void Pickup() private void Pickup()
{ {
// remove from entity manager if (!_infiniteSupply)
{
pickUpCounter++;
if (pickUpCounter >= _finiteSupply)
{
QueueFree();
}
UpdateSaveData();
}
} }
private void FailToPickup() private void FailToPickup()
@@ -63,6 +80,9 @@ public partial class ItemOnGround2D : Node2D
public void UpdateVisuals() public void UpdateVisuals()
{ {
if (!IsActive)
return;
_iconSprite.Texture = itemInstance?.blueprint?.icon; _iconSprite.Texture = itemInstance?.blueprint?.icon;
if (_iconSprite.Texture == null) if (_iconSprite.Texture == null)
{ {
@@ -74,22 +94,7 @@ public partial class ItemOnGround2D : Node2D
} }
} }
/* // todo: What do we do with instances that are created at runtime?
protected override void LoadEntity(JObject json)
{
base.LoadEntity(json);
_itemInstance.LoadFromJson(json.GetObject("item"));
}
protected override void SaveEntity(JObject json)
{
base.SaveEntity(json);
json["item"] = _itemInstance.SaveToJson();
}
*/
// old save
/*
public void UpdateSaveData() public void UpdateSaveData()
{ {
if (!_saveToDisk) if (!_saveToDisk)
@@ -152,5 +157,5 @@ public partial class ItemOnGround2D : Node2D
} }
} }
} }
}*/ }
} }
@@ -1,6 +1,4 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave; using Godot;
using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.Common.Inventory; namespace Babushka.scripts.CSharp.Common.Inventory;
@@ -1,27 +0,0 @@
using System;
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.Entities;
public class Entity
{
public long id;
public virtual string EntityType => "";
public Entity()
{
id = new Random().NextInt64();
}
public virtual void SaveEntity(JObject json)
{
json["id"] = id;
json["type"] = EntityType;
}
public virtual void LoadEntity(JObject json)
{
id = json.GetLongValue("id");
}
}
@@ -1 +0,0 @@
uid://hnmpt23ovfgl
@@ -1,32 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Transactions;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.Entities;
public class LoadedScenesEntity : Entity
{
private HashSet<string> _loadedScenes = new();
public override string EntityType => OWN_TYPE_NAME;
public const string OWN_TYPE_NAME = "LoadedScenesEntity";
public void AddScene(string sceneName) => _loadedScenes.Add(sceneName);
public bool WasSceneLoaded(string sceneName) => _loadedScenes.Contains(sceneName);
public override void SaveEntity(JObject json)
{
base.SaveEntity(json);
json["scenes"] = new JArray(_loadedScenes);
}
public override void LoadEntity(JObject json)
{
base.LoadEntity(json);
JArray array = (JArray?) json["scenes"] ?? throw new Exception("No scenes found in LoadedScenesEntity.");
_loadedScenes = array.ToObject<HashSet<string>>()!;
}
}
@@ -1 +0,0 @@
uid://rabb1y637cm5
@@ -1,32 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.LoadSave;
using Godot;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.Entities;
public abstract class PositionalEntity : Entity
{
public Vector2 position;
public string sceneName = "none";
public override void SaveEntity(JObject json)
{
base.SaveEntity(json);
json["posx"] = position.X;
json["posy"] = position.Y;
json["scene"] = sceneName;
}
public override void LoadEntity(JObject json)
{
base.LoadEntity(json);
position = new Vector2(
json.GetFloatValue("posx"),
json.GetFloatValue("posy"));
sceneName = json.GetStringValue("scene");
}
// Deals with Instantiation of the node
public abstract void InstantiateEntityNode(Node2D parent);
}
@@ -1 +0,0 @@
uid://bs38dulqv7sop
@@ -1,23 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.Management;
using Godot;
namespace Babushka.scripts.CSharp.GameEntity.Entities;
public class TrashEntity : PositionalEntity
{
public override string EntityType => OWN_TYPE_NAME;
public const string OWN_TYPE_NAME = "TrashEntity";
private EntityNodeCreator _creator;
public TrashEntity()
{
}
public override void InstantiateEntityNode(Node2D parent)
{
if(_creator == null) _creator = EntityManager.Instance.NodeCreator;
var entityNode = _creator.InstantiateNode(EntityType);
parent.AddChild(entityNode);
entityNode.GlobalPosition = position;
}
}
@@ -1 +0,0 @@
uid://c31k34epunk5t
@@ -1,16 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.Entities;
using Godot;
namespace Babushka.scripts.CSharp.GameEntity.EntityNodes;
public partial class TrashEntityNode : Node2D
{
private TrashEntity _trashEntity;
public void Initialize(TrashEntity trashEntity)
{
_trashEntity = trashEntity;
}
}
@@ -1 +0,0 @@
uid://d3n8kwva4pxx5
@@ -1,26 +0,0 @@
using Babushka.scripts.CSharp.GameEntity.Entities;
using Babushka.scripts.CSharp.GameEntity.Management;
using Godot;
namespace Babushka.scripts.CSharp.GameEntity.EntityPlacer;
public partial class TrashEntityPlacer : Node2D
{
private string _trashEntityType = TrashEntity.OWN_TYPE_NAME;
public override void _Ready()
{
string sceneName = EntityManager.Instance.CurrentEntitySceneContainer!.sceneName;
var loadedScenesEntity = EntityManager.Instance.GetUniqueEntity<LoadedScenesEntity>();
if (!loadedScenesEntity.WasSceneLoaded(sceneName))
{
TrashEntity entity = new TrashEntity();
entity.sceneName = sceneName;
entity.position = GlobalPosition;
EntityManager.Instance.AddEntity(entity);
}
QueueFree();
}
}
@@ -1 +0,0 @@
uid://bilg7e33usxuv
@@ -1,44 +0,0 @@
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.LoadSave;
public static class EntityLoadSaveUtil
{
private static void AssertTokenType(this JObject json, string key, JTokenType type)
{
var token = json[key];
if (token == null) throw new MalformedJsonException(json, key, "does not exist");
//if (!token.HasValues) throw new MalformedJsonException(json, key, "has no value");
if (token.Type != type) throw new MalformedJsonException(json, key, $"is not of type {type}");
}
public static long GetLongValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Integer);
return json.Value<long>(key);
}
public static int GetIntValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Integer);
return json.Value<int>(key);
}
public static float GetFloatValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Float);
return json.Value<float>(key);
}
public static JObject GetObject(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.Object);
return json.Value<JObject>(key)!;
}
public static string GetStringValue(this JObject json, string key)
{
AssertTokenType(json, key, JTokenType.String);
return json.Value<string>(key)!;
}
}
@@ -1 +0,0 @@
uid://ccu6p418viliu
@@ -1,9 +0,0 @@
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.LoadSave;
public interface IJsonSerializable
{
public void LoadFromJson(JObject json);
public JObject SaveToJson();
}
@@ -1 +0,0 @@
uid://cuma3347l55mb
@@ -1,12 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace Babushka.scripts.CSharp.GameEntity.LoadSave;
public class MalformedJsonException(JObject actualJson, string key, string problem) : Exception
{
public override string Message => $"JsonObject was malformed: {key} {problem}";
public override IDictionary Data => new Dictionary<string, JObject> { { "json", actualJson } };
}
@@ -1 +0,0 @@
uid://d1o066hh84ow
@@ -1,157 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Babushka.scripts.CSharp.GameEntity.Entities;
using Godot;
using Newtonsoft.Json.Linq;
using Entity = Babushka.scripts.CSharp.GameEntity.Entities.Entity;
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
/// <summary>
/// Manages the lifecycle and interactions of all entities within the game, including their creation, retrieval,
/// and organization. The EntityManager serves as a centralized hub for managing both standard and positional entities.
/// </summary>
public partial class EntityManager : Node
{
public static EntityManager Instance;
[Export] private EntityNodeCreator _nodeCreator = null!;
[Export] private string saveDirectory = "user://save_data/";
private EntitySceneContainer? _currentEntitySceneContainer;
private readonly List<Entity> _allEntities = new();
public IEnumerable<Entity> AllEntities => _allEntities;
public IEnumerable<PositionalEntity> AllPositionalEntities => _allEntities.OfType<PositionalEntity>();
public EntitySceneContainer? CurrentEntitySceneContainer => _currentEntitySceneContainer;
public EntityNodeCreator NodeCreator => _nodeCreator;
public override void _EnterTree()
{
Instance = this;
Load();
}
public override void _Input(InputEvent @event)
{
// for debugging purposes
if (@event.IsActionPressed("DebugEntities"))
{
GD.Print("Entities:");
foreach (var entity in AllEntities)
{
GD.Print(entity.EntityType + " " + entity.id);
}
}
if(@event.IsActionPressed("SaveGame")) Save();
}
public void Save()
{
JArray array = new JArray();
foreach (var entity in AllEntities)
{
JObject saveData = new JObject();
entity.SaveEntity(saveData);
array.Add(saveData);
}
using var SaveFile = FileAccess.Open(saveDirectory + "save.json", FileAccess.ModeFlags.Write);
SaveFile.StoreString(array.ToString());
}
public void Load()
{
using var saveFile = FileAccess.Open(saveDirectory + "save.json", FileAccess.ModeFlags.Read);
if (saveFile == null) return;
JArray array = JArray.Parse(saveFile.GetAsText());
foreach (var token in array)
{
var jobj = (JObject)token;
if (jobj == null) continue;
if (jobj.TryGetValue("type", out var entityType))
{
string entityTypeString = (string) entityType!;
Entity entity = InitializeEntity(entityTypeString);
entity.LoadEntity(jobj);
AddEntity(entity);
}
}
}
private Entity InitializeEntity(string type)
{
Entity entity = type switch
{
TrashEntity.OWN_TYPE_NAME => new TrashEntity(),
LoadedScenesEntity.OWN_TYPE_NAME => new LoadedScenesEntity(),
_ => throw new Exception($"Trying to load unknown entity type: {type}")
};
return entity;
}
#region ENTITY MANAGEMENT
/// <summary>
/// Adds an entity to the list of managed entities. If the entity is a positional entity
/// and its scene matches the current scene container, it is also instantiated in the scene.
/// </summary>
/// <param name="entity">The entity to be added to the manager.</param>
public void AddEntity(Entity entity)
{
if (!_allEntities.Contains(entity))
_allEntities.Add(entity);
if(entity is PositionalEntity positionalEntity && positionalEntity.sceneName == _currentEntitySceneContainer?.sceneName)
InstantiatePositionalEntityNode(positionalEntity);
}
private void InstantiatePositionalEntityNode(PositionalEntity entity)
{
if(_currentEntitySceneContainer == null) return;
entity.InstantiateEntityNode(_currentEntitySceneContainer);
}
/// <summary>
/// Retrieves the first entity of the specified type from the list of managed entities.
/// If no such entity exists, creates a new instance of the specified type, adds it to the manager, and returns it.
/// </summary>
/// <typeparam name="T">The type of entity to retrieve or create. Must inherit from the Entity class and have a parameterless constructor.</typeparam>
/// <returns>The first entity of the specified type or a newly created entity of that type if none were found.</returns>
public T GetUniqueEntity<T>() where T : Entity, new()
{
var result = AllEntities.OfType<T>().FirstOrDefault();
if (result == null)
{
var newEntity = new T();
AddEntity(newEntity);
result = newEntity;
}
return result;
}
#endregion
#region SCENE CONTAINER ACCESS
public void SetSceneContainer(EntitySceneContainer sceneContainer)
{
_currentEntitySceneContainer = sceneContainer;
}
public void UnsetSceneContainer()
{
_currentEntitySceneContainer = null;
}
#endregion
}
@@ -1 +0,0 @@
uid://umop2b1m1qm8
@@ -1,14 +0,0 @@
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public static class EntityManagerUtil
{
public static void AddIfNeeded(this EntitySceneContainer? self, PositionalEntity entity)
{
if(self == null) return;
if(self.sceneName != entity.sceneName) return;
self.AddEntity(entity);
}
}
@@ -1 +0,0 @@
uid://dc3283h7sx4cl
@@ -1,25 +0,0 @@
using System;
using Godot;
using Godot.Collections;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public partial class EntityNodeCreator : Node
{
[Export] private Dictionary<string, PackedScene> _entityPrefabs;
public Node2D InstantiateNode(string type)
{
if (string.IsNullOrEmpty(type))
{
throw new NullReferenceException("The type provided for Node instantiation cannot be null or empty.");
}
if (!_entityPrefabs.ContainsKey(type))
{
throw new Exception($"The type provided for Node instantiation ({type}) is not specified in the EntityNodeCreator dictionary.");
}
return _entityPrefabs[type].Instantiate<Node2D>();
}
}
@@ -1 +0,0 @@
uid://bogqp274y1pgr
@@ -1,48 +0,0 @@
using System.Linq;
using Babushka.scripts.CSharp.GameEntity.Entities;
using Godot;
using PositionalEntity = Babushka.scripts.CSharp.GameEntity.Entities.PositionalEntity;
namespace Babushka.scripts.CSharp.GameEntity.Management;
public partial class EntitySceneContainer : Node2D
{
[Export] public string sceneName = "none";
public override void _EnterTree()
{
EntityManager.Instance.SetSceneContainer(this);
}
public override void _ExitTree()
{
EntityManager.Instance.Save();
EntityManager.Instance.UnsetSceneContainer();
}
public override void _Ready()
{
AddAllEntities();
CallDeferred(nameof(RegisterWithScenesEntity));
}
private void RegisterWithScenesEntity()
{
var loadedScenesEntity = EntityManager.Instance.GetUniqueEntity<LoadedScenesEntity>();
loadedScenesEntity.AddScene(sceneName);
}
public void AddAllEntities()
{
foreach (var positionalEntity in EntityManager.Instance.AllPositionalEntities.Where(x => x.sceneName == sceneName))
{
AddEntity(positionalEntity);
}
}
public void AddEntity(PositionalEntity entity)
{
entity.InstantiateEntityNode(this);
}
}
@@ -1 +0,0 @@
uid://ca1pg6k3gn47y
-9
View File
@@ -12,9 +12,6 @@ uniform float brightness_add : hint_range(-1.0, 1.0) = 0.0;
// Contrast multiplier in RGB space. 1.0 means no change. // Contrast multiplier in RGB space. 1.0 means no change.
uniform float contrast_mult : hint_range(0.0, 2.0) = 1.0; uniform float contrast_mult : hint_range(0.0, 2.0) = 1.0;
//Cached Color value to reapply modulate
varying vec4 modulate;
// Converts an RGB color to HSV. // Converts an RGB color to HSV.
vec3 rgb2hsv(vec3 c) { vec3 rgb2hsv(vec3 c) {
float cMax = max(max(c.r, c.g), c.b); float cMax = max(max(c.r, c.g), c.b);
@@ -68,10 +65,6 @@ vec3 hsv2rgb(vec3 c) {
return rgb + vec3(m); return rgb + vec3(m);
} }
void vertex(){
modulate = COLOR;
}
void fragment() { void fragment() {
// Get the original texture color. // Get the original texture color.
vec4 tex_color = texture(TEXTURE, UV); vec4 tex_color = texture(TEXTURE, UV);
@@ -96,6 +89,4 @@ void fragment() {
// Output the final color while preserving the original alpha. // Output the final color while preserving the original alpha.
COLOR = vec4(col, tex_color.a); COLOR = vec4(col, tex_color.a);
//reapply vertex color value to keep modulate changes
COLOR = COLOR * modulate;
} }
-6
View File
@@ -2,14 +2,8 @@ shader_type canvas_item;
uniform vec2 tiling_scale = vec2(5.0, 5.0); uniform vec2 tiling_scale = vec2(5.0, 5.0);
uniform sampler2D noise : repeat_enable; uniform sampler2D noise : repeat_enable;
varying vec4 modulate;
void vertex() {
modulate = COLOR;
}
void fragment() { void fragment() {
vec2 uv = vec2(UV.x * tiling_scale.x, UV.y * tiling_scale.y); // Change 10.0 to control tiling scale vec2 uv = vec2(UV.x * tiling_scale.x, UV.y * tiling_scale.y); // Change 10.0 to control tiling scale
COLOR = texture(TEXTURE, fract(uv)); COLOR = texture(TEXTURE, fract(uv));
COLOR = COLOR * modulate;
} }
-8
View File
@@ -26,9 +26,6 @@ uniform float heightOffset : hint_range(0.0, 1.0);
// With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this // With the offset value, you can if you want different moves for each asset. Just put a random value (1, 2, 3) in the editor. Don't forget to mark the material as unique if you use this
uniform float offset = 0; uniform float offset = 0;
// caching color settings to reapply modulate value
varying vec4 modulate;
float getWind(vec2 vertex, vec2 uv, float time){ float getWind(vec2 vertex, vec2 uv, float time){
float diff = pow(maxStrength - minStrength, 2.0); float diff = pow(maxStrength - minStrength, 2.0);
float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale; float strength = clamp(minStrength + diff + sin(time / interval) * diff, minStrength, maxStrength) * strengthScale;
@@ -50,13 +47,8 @@ float noise(vec2 x) {
} }
void vertex() { void vertex() {
modulate = COLOR;
vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0); vec4 pos = MODEL_MATRIX * vec4(0.0, 0.0, 0.0, 1.0);
//float time = TIME * speed + sin(VERTEX.x * noise(VERTEX.xy) * offset); //float time = TIME * speed + sin(VERTEX.x * noise(VERTEX.xy) * offset);
float time = TIME * speed + sin(pos.x * offset) * cos( pos.x * offset) ; float time = TIME * speed + sin(pos.x * offset) * cos( pos.x * offset) ;
VERTEX.x += getWind(VERTEX.xy, UV, time); VERTEX.x += getWind(VERTEX.xy, UV, time);
} }
void fragment() {
COLOR = modulate * COLOR;
}