🐛 planting seeds works again

pull/48/head
kziolkowski 4 weeks ago
parent c55e527bf4
commit ce113e16da

@ -33,7 +33,6 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
[ExportGroup("Field Interactions")] [ExportGroup("Field Interactions")]
[Export] public InteractionArea2D PlantingInteraction; [Export] public InteractionArea2D PlantingInteraction;
[Export] public InteractionArea2D FieldInteractionArea;
[ExportGroup("Configuration")] [ExportGroup("Configuration")]
[Export] public Node2D PlantingPlaceholder; [Export] public Node2D PlantingPlaceholder;
@ -61,7 +60,7 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
// fieldstate == tilled && watering can ausgewählt // fieldstate == tilled && watering can ausgewählt
_canWater = (FieldState == FieldState.Tilled || FieldState == FieldState.Planted) && _wateringCanActive; _canWater = (FieldState == FieldState.Tilled || FieldState == FieldState.Planted) && _wateringCanActive;
FieldInteractionArea.IsActive = _canPlant || _canWater; PlantingInteraction.IsActive = _canPlant || _canWater;
} }
public void ActivatedSeedInInventory(bool activated) public void ActivatedSeedInInventory(bool activated)
@ -100,21 +99,25 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
case FieldState.Empty: case FieldState.Empty:
FieldState = FieldState.Empty; FieldState = FieldState.Empty;
PlantingInteraction.IsActive = false; PlantingInteraction.IsActive = false;
PlantingInteraction.ProcessMode = ProcessModeEnum.Disabled;
break; break;
case FieldState.Tilled: case FieldState.Tilled:
FieldState = FieldState.Tilled; FieldState = FieldState.Tilled;
_fieldSprite.Texture = Tilled; _fieldSprite.Texture = Tilled;
PlantingInteraction.IsActive = true; PlantingInteraction.IsActive = true;
PlantingInteraction.ProcessMode = ProcessModeEnum.Inherit;
break; break;
case FieldState.Watered: case FieldState.Watered:
FieldState = FieldState.Watered; FieldState = FieldState.Watered;
_fieldSprite.Texture = Watered; _fieldSprite.Texture = Watered;
PlantingInteraction.IsActive = true; PlantingInteraction.IsActive = true;
PlantingInteraction.ProcessMode = ProcessModeEnum.Inherit;
break; break;
case FieldState.Planted: case FieldState.Planted:
FieldState = FieldState.Planted; FieldState = FieldState.Planted;
_fieldSprite.Texture = Tilled; _fieldSprite.Texture = Tilled;
PlantingInteraction.IsActive = false; PlantingInteraction.IsActive = false;
PlantingInteraction.ProcessMode = ProcessModeEnum.Disabled;
break; break;
default: default:
FieldState = FieldState.NotFound; FieldState = FieldState.NotFound;

Loading…
Cancel
Save