Implemented PR feedback + made sure initial farming quests run smoothly

This commit is contained in:
2025-08-19 23:02:14 +02:00
parent f6e0c4e615
commit 378bf45c49
8 changed files with 22 additions and 15 deletions
@@ -1,4 +1,5 @@
using System;
using Babushka.scripts.CSharp.Common.Services;
using Godot;
namespace Babushka.scripts.CSharp.Common.CharacterControls;
@@ -28,7 +29,6 @@ public partial class InteractionArea2D : Node2D
public override void _Ready()
{
if (_useSprite && _useOutline)
{
try
@@ -40,12 +40,12 @@ public partial class InteractionArea2D : Node2D
GD.PrintErr($"No sprite to outline found on: {GetParent().Name}" + exception.Message);
}
}
}
public void OnPlayerEntered(Node2D player)
{
if (!_active)
if (!_active || !InputService.Instance.InputEnabled)
return;
if(_showLabel)
@@ -72,7 +72,7 @@ public partial class InteractionArea2D : Node2D
public override void _Input(InputEvent @event)
{
if (!_active)
if (!_active || !InputService.Instance.InputEnabled)
return;
if (@event.IsAction("interact") && @event.IsPressed())
@@ -165,5 +165,4 @@ public partial class FarmingControls2D : Node2D
}
#endregion
}
@@ -52,6 +52,7 @@ public partial class PlantBehaviour2D : Node2D
if (_field.FieldState != FieldState.Watered || _magicWordSaid != _magicWordNeeded)
return;
// todo: replace with EventBus when possible
GetTree().CallGroup("PlantGrowing", VesnaAnimations.MethodName.PlayFarmingAnimation);
switch (_state)
{
@@ -7,6 +7,7 @@ public partial class NonInventoryPickup : Node2D
{
public void PlayPickupAnimation()
{
// todo: replace with EventBus implementation as soon as this is possible
GetTree().CallGroup("Pickup", VesnaAnimations.MethodName.PlayPickUpAnimation);
}
}
@@ -1,6 +1,5 @@
using Godot;
using System;
using System.Net.Mime;
using Babushka.scripts.CSharp.Common.Quest;
public partial class QuestMessagePopup : Control