Compare commits

...

8 Commits

31 changed files with 1611 additions and 53 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://hvchk6t0xe7j"
path="res://.godot/imported/Ente.png-21ead71377d82aa0401b2345b9713a4b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/animals/Ente.png"
dest_files=["res://.godot/imported/Ente.png-21ead71377d82aa0401b2345b9713a4b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgmu3qlovdr22"
path="res://.godot/imported/field_outline_1.png-6d3fddc82592de77807ed60581b515c5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/masks/field_outline_1.png"
dest_files=["res://.godot/imported/field_outline_1.png-6d3fddc82592de77807ed60581b515c5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://eg5ej0mtuac"
path="res://.godot/imported/field_outline_2.png-e3ddb80217ba93d880ff746f003587ee.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/masks/field_outline_2.png"
dest_files=["res://.godot/imported/field_outline_2.png-e3ddb80217ba93d880ff746f003587ee.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://djpigvoyadvjs"
path="res://.godot/imported/field_outline_3.png-1ae7ea2c620df01f38d55e21a86cbf92.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/masks/field_outline_3.png"
dest_files=["res://.godot/imported/field_outline_3.png-1ae7ea2c620df01f38d55e21a86cbf92.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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.

Before

Width:  |  Height:  |  Size: 6.2 MiB

After

Width:  |  Height:  |  Size: 5.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dgavbfci8x178"
path="res://.godot/imported/grass-1.png-ca7b452843206b712388940e3c3d5532.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-1.png"
dest_files=["res://.godot/imported/grass-1.png-ca7b452843206b712388940e3c3d5532.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://h2b5aufaaw7w"
path="res://.godot/imported/grass-2.png-6f43a52066099666b3212aa92bb38a9f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-2.png"
dest_files=["res://.godot/imported/grass-2.png-6f43a52066099666b3212aa92bb38a9f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ct7ea8ikor5rf"
path="res://.godot/imported/grass-3.png-694a7f12b6e32536c4f27363ec79c45a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-3.png"
dest_files=["res://.godot/imported/grass-3.png-694a7f12b6e32536c4f27363ec79c45a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://badnnid7dgnpk"
path="res://.godot/imported/grass-4.png-e2855f1a80a4bb56abcc9b4ab623b57b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-4.png"
dest_files=["res://.godot/imported/grass-4.png-e2855f1a80a4bb56abcc9b4ab623b57b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b644ofy7fml5w"
path="res://.godot/imported/grass-5.png-415eca44a6277d6c20c8cb81e371080f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-5.png"
dest_files=["res://.godot/imported/grass-5.png-415eca44a6277d6c20c8cb81e371080f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

+34
View File
@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d3dwl6ph0pu1d"
path="res://.godot/imported/grass-6.png-78792f43caad598457a381c5989c9eb5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/nature/grass/grass-6.png"
dest_files=["res://.godot/imported/grass-6.png-78792f43caad598457a381c5989c9eb5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
+1 -1
View File
@@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="_builds/Babushka_win_0_2/Babushka.exe"
export_path="_builds/Babushka_win_0_3/Babushka.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
+1 -6
View File
@@ -2122,10 +2122,6 @@ texture = ExtResource("816_1a3c1")
region_enabled = true
region_rect = Rect2(-1, 1128, 417, 299)
[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"]
position = Vector2(26, -469)
zoom = Vector2(0.3, 0.3)
[node name="WateringCanUI" type="Node2D" parent="CharacterBody2D" node_paths=PackedStringArray("_stages")]
position = Vector2(0, -929)
scale = Vector2(2, 2)
@@ -2167,11 +2163,10 @@ visible = false
position = Vector2(3, 12)
texture = ExtResource("473_g32y8")
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_camera", "_wateringParticles")]
[node name="FarmingControls" type="Node2D" parent="." node_paths=PackedStringArray("_movingPlayer", "_wateringParticles")]
script = ExtResource("817_6nrw3")
_fieldPrefab = ExtResource("818_16w6h")
_movingPlayer = NodePath("../CharacterBody2D")
_camera = NodePath("../CharacterBody2D/Camera2D")
_wateringParticles = NodePath("../pouring water vfx")
_wateringCanParticlesVerticalOffset = -100.0
+20 -10
View File
@@ -1,10 +1,13 @@
[gd_scene load_steps=8 format=3 uid="uid://b1d2e7ely6hyw"]
[gd_scene load_steps=11 format=3 uid="uid://b1d2e7ely6hyw"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="1_femni"]
[ext_resource type="Script" uid="uid://bdffon388rkty" path="res://scripts/CSharp/Common/Farming/FieldBehaviour2D.cs" id="2_femni"]
[ext_resource type="Texture2D" uid="uid://cpxjptdjw7bi6" path="res://art/farm/tilable grounds/böden/trockene farming erde rund.png" id="2_yi42k"]
[ext_resource type="Texture2D" uid="uid://d3dq15edmgbwf" path="res://art/farm/tilable grounds/böden/nasse farming erde rund.png" id="4_lsfck"]
[ext_resource type="Texture2D" uid="uid://cgmu3qlovdr22" path="res://art/masks/field_outline_1.png" id="3_cus02"]
[ext_resource type="Texture2D" uid="uid://eg5ej0mtuac" path="res://art/masks/field_outline_2.png" id="4_msuq8"]
[ext_resource type="Texture2D" uid="uid://djpigvoyadvjs" path="res://art/masks/field_outline_3.png" id="5_21et0"]
[ext_resource type="PackedScene" uid="uid://c3hwbwo423nbm" path="res://prefabs/farm/base_plant_2d.tscn" id="5_femni"]
[ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="6_4k6eh"]
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="7_rrmd3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_yi42k"]
resource_local_to_scene = true
@@ -21,13 +24,15 @@ visible = false
z_index = 1
scale = Vector2(2.225, 2.225)
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_growingCollider")]
[node name="FieldBehaviour" type="Sprite2D" parent="." node_paths=PackedStringArray("_fieldSprite", "_maskSprite", "_growingCollider")]
z_index = -1
scale = Vector2(0.9, 1)
texture = ExtResource("2_yi42k")
script = ExtResource("2_femni")
Tilled = ExtResource("2_yi42k")
Watered = ExtResource("4_lsfck")
_fieldSprite = NodePath("MaskedField/FieldTexture")
_maskSprite = NodePath("MaskedField")
_maskTexture = Array[Texture2D]([ExtResource("3_cus02"), ExtResource("4_msuq8"), ExtResource("5_21et0")])
Tilled = ExtResource("6_4k6eh")
Watered = ExtResource("7_rrmd3")
_growingCollider = NodePath("BasePlant/InteractionArea")
[node name="BasePlant" parent="FieldBehaviour" node_paths=PackedStringArray("_field") instance=ExtResource("5_femni")]
@@ -45,12 +50,17 @@ shape = SubResource("CircleShape2D_yi42k")
[node name="CollisionShape3D" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem/InteractionArea2/Area2D" index="0"]
shape = SubResource("CircleShape2D_femni")
[node name="Label" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem/InteractionArea2" index="1"]
visible = false
[node name="ReadyPlant" parent="FieldBehaviour/BasePlant/ReadyPlantInventoryItem" index="5"]
position = Vector2(0, -291.3)
[node name="MaskedField" type="Sprite2D" parent="FieldBehaviour"]
clip_children = 1
scale = Vector2(1.5, 1.5)
texture = ExtResource("4_msuq8")
[node name="FieldTexture" type="Sprite2D" parent="FieldBehaviour/MaskedField"]
texture = ExtResource("6_4k6eh")
[connection signal="Interacted" from="InteractionArea2" to="FieldBehaviour/BasePlant" method="Grow"]
[editable path="FieldBehaviour/BasePlant"]
+122
View File
@@ -0,0 +1,122 @@
[gd_scene load_steps=2 format=3 uid="uid://muuxxgvx33fp"]
[ext_resource type="Texture2D" uid="uid://hvchk6t0xe7j" path="res://art/animals/Ente.png" id="1_cgxhx"]
[node name="Duck" type="Node2D"]
[node name="body" type="Sprite2D" parent="."]
position = Vector2(14, 222)
scale = Vector2(1.07526, 1.01724)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(30, 168, 125, 326)
[node name="head" type="Sprite2D" parent="body"]
position = Vector2(58, -166)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(45, 24, 87, 82)
[node name="beak upper" type="Sprite2D" parent="body/head"]
z_index = 1
y_sort_enabled = true
position = Vector2(28, 16)
scale = Vector2(0.585, 0.5)
texture = ExtResource("1_cgxhx")
offset = Vector2(50, 0)
region_enabled = true
region_rect = Rect2(292, 37, 152, 98)
[node name="beak lower" type="Sprite2D" parent="body/head"]
y_sort_enabled = true
position = Vector2(24, 34)
rotation = 0.0428005
scale = Vector2(0.585, 0.5)
texture = ExtResource("1_cgxhx")
offset = Vector2(50, 0)
region_enabled = true
region_rect = Rect2(295, 170, 145, 39)
[node name="wing" type="Sprite2D" parent="body"]
position = Vector2(-62, 103)
rotation = -0.41677
scale = Vector2(0.889059, 0.988488)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 180, 164)
[node name="underbelly" type="Sprite2D" parent="body"]
position = Vector2(-14.8802, 125.831)
rotation = -2.93148
scale = Vector2(0.710887, 1.04894)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 180, 164)
[node name="leg left" type="Sprite2D" parent="body"]
position = Vector2(30, 95)
rotation = 2.58706
scale = Vector2(0.679, 0.679)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 177, 161)
[node name="left thigh" type="Sprite2D" parent="body/leg left"]
position = Vector2(83.7622, -71.8698)
rotation = 0.610927
scale = Vector2(0.886555, 0.832726)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(368, 263, 81, 89)
[node name="left shin" type="Sprite2D" parent="body/leg left/left thigh"]
position = Vector2(1.60523, -73.2123)
rotation = -0.515749
scale = Vector2(1.1036, 0.96548)
skew = 0.0519596
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(360, 361, 68, 126)
[node name="left foot" type="Sprite2D" parent="body/leg left/left thigh/left shin"]
position = Vector2(-9.87654, -96.2852)
rotation = -2.49519
scale = Vector2(1.05636, 0.957748)
skew = -0.152411
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(246, 393, 111, 111)
[node name="leg right" type="Sprite2D" parent="body"]
position = Vector2(-33, 108)
rotation = 2.58706
scale = Vector2(0.67, 0.62)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(196, 231, 177, 161)
[node name="right thigh" type="Sprite2D" parent="body/leg right"]
position = Vector2(79.9638, -66.0038)
rotation = 1.02507
scale = Vector2(0.886555, 0.832726)
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(368, 263, 81, 89)
[node name="right shin" type="Sprite2D" parent="body/leg right/right thigh"]
position = Vector2(-30.7045, -51.617)
rotation = -1.27892
scale = Vector2(1.1036, 0.96548)
skew = 0.0519596
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(360, 361, 68, 126)
[node name="right foot" type="Sprite2D" parent="body/leg right/right thigh/right shin"]
position = Vector2(52.0876, -74.1994)
rotation = 0.121931
scale = Vector2(1.05636, -0.891307)
skew = -0.152411
texture = ExtResource("1_cgxhx")
region_enabled = true
region_rect = Rect2(246, 393, 111, 111)
File diff suppressed because it is too large Load Diff
@@ -4,13 +4,10 @@ namespace Babushka.scripts.CSharp.Common.Camera;
public partial class CameraController : Camera2D
{
[Export] private float _multiplier = 1.0f;
[Export] private Node2D _followNode;
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
this.Position = _followNode.Transform.Origin * _multiplier;
this.GlobalPosition = _followNode.GlobalPosition;
}
}
@@ -79,7 +79,6 @@ public partial class FarmingControls2D : Node2D
{
if (!inputEvent.IsPressed())
{
GD.Print("Input Event is not pressed." );
return;
}
@@ -88,23 +87,18 @@ public partial class FarmingControls2D : Node2D
if (inputEvent is InputEventMouseButton inputEventMouseButton)
{
GD.Print("Input Event is InputEventMouseButton." );
if (!inputEventMouseButton.Pressed)
{
GD.Print("Input Event Mouse Button is not pressed." );
return;
}
}
else
{
GD.Print("Other Input Event registered." );
return;
}
GD.Print("Current tool id: " + _toolId );
if (_toolId == 0)
{
GD.Print("Trying to create field." );
Vector2I adjustedPosition = GetAdjustedMousePosition();
MakeField(adjustedPosition);
}
@@ -1,3 +1,4 @@
using System;
using Babushka.scripts.CSharp.Common.CharacterControls;
using Godot;
@@ -15,6 +16,9 @@ public enum FieldState
[GlobalClass]
public partial class FieldBehaviour2D : Sprite2D
{
[Export] private Sprite2D _fieldSprite;
[Export] private Sprite2D _maskSprite;
[Export] private Texture2D[] _maskTexture;
[Export] private Texture2D Tilled;
[Export] private Texture2D Watered;
[Export] public FieldState FieldState = FieldState.Tilled;
@@ -25,6 +29,8 @@ public partial class FieldBehaviour2D : Sprite2D
public override void _Ready()
{
UpdateFieldState(FieldState);
int randomIndex = new Random().Next(0, _maskTexture.Length);
_maskSprite.Texture = _maskTexture[randomIndex];
base._Ready();
}
@@ -37,12 +43,12 @@ public partial class FieldBehaviour2D : Sprite2D
break;
case FieldState.Tilled:
FieldState = FieldState.Tilled;
Texture = Tilled;
_fieldSprite.Texture = Tilled;
_growingCollider.Visible = false;
break;
case FieldState.Watered:
FieldState = FieldState.Watered;
Texture = Watered;
_fieldSprite.Texture = Watered;
_growingCollider.Visible = true;
break;
case FieldState.Planted:
@@ -58,7 +64,7 @@ public partial class FieldBehaviour2D : Sprite2D
public void Water()
{
FieldState = FieldState.Watered;
Texture = Watered;
_fieldSprite.Texture = Watered;
}
/// <summary>
@@ -69,7 +75,7 @@ public partial class FieldBehaviour2D : Sprite2D
switch (FieldState)
{
case FieldState.Empty:
Texture = Tilled;
_fieldSprite.Texture = Tilled;
FieldState = FieldState.Tilled;
break;
case FieldState.Watered:
@@ -0,0 +1 @@
uid://cew02ovj51m5d