From 3bdc8cd03fb81671053a761f9cd15dbb04f0a3f4 Mon Sep 17 00:00:00 2001 From: kziolkowski Date: Tue, 16 Dec 2025 23:06:58 +0100 Subject: [PATCH] Deactivated harvestable plant on spawn --- prefabs/farm/plants/base_plant.tscn | 1 + scripts/CSharp/Common/Farming/PlantBehaviour2D.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/prefabs/farm/plants/base_plant.tscn b/prefabs/farm/plants/base_plant.tscn index f20e3ab..0247eda 100644 --- a/prefabs/farm/plants/base_plant.tscn +++ b/prefabs/farm/plants/base_plant.tscn @@ -136,6 +136,7 @@ _useOutline = false shape = SubResource("CircleShape2D_vjw4j") [node name="ReadyPlantInventoryItem" parent="." instance=ExtResource("6_gdrin")] +process_mode = 4 position = Vector2(0, 2.3) IsActive = false _saveToDisk = false diff --git a/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs b/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs index 660e304..f640695 100644 --- a/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs +++ b/scripts/CSharp/Common/Farming/PlantBehaviour2D.cs @@ -3,7 +3,6 @@ using System.Diagnostics; using Babushka.scripts.CSharp.Common.Inventory; using Babushka.scripts.CSharp.Low_Code.Variables; using Godot; -using Godot.Collections; namespace Babushka.scripts.CSharp.Common.Farming; @@ -187,6 +186,7 @@ public partial class PlantBehaviour2D : Node2D private void SetActiveHarvestablePlant(bool active) { _harvestablePlant.IsActive = active; + _harvestablePlant.ProcessMode = active ? ProcessModeEnum.Inherit : ProcessModeEnum.Disabled; _harvestablePlant.UpdateVisuals(); }