From 8ebaa9e987639b85c216ab4a4bef519592d14ace Mon Sep 17 00:00:00 2001 From: rogo Date: Wed, 18 Dec 2024 20:48:01 +0100 Subject: [PATCH] fixed elements not simulating updated to godot 4.3 --- FOU.csproj | 2 +- Scripts/Chunk.cs | 4 ---- Scripts/Elements/Element.cs | 2 +- Scripts/Main.cs | 1 - project.godot | 2 +- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/FOU.csproj b/FOU.csproj index f39cf71..29d95d9 100644 --- a/FOU.csproj +++ b/FOU.csproj @@ -1,4 +1,4 @@ - + net6.0 true diff --git a/Scripts/Chunk.cs b/Scripts/Chunk.cs index 9050333..3af20de 100644 --- a/Scripts/Chunk.cs +++ b/Scripts/Chunk.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using FOU.Scripts.Elements; using Godot; @@ -79,9 +78,6 @@ public class Chunk { } public void SetElementActive(Element e, bool active) { - if (e.Active == active) return; - - GD.Print($"setting {e} to {active}"); if (active && e.GetType() != typeof(Element)) activeElements.Add(e); else diff --git a/Scripts/Elements/Element.cs b/Scripts/Elements/Element.cs index c0c9731..60e141a 100644 --- a/Scripts/Elements/Element.cs +++ b/Scripts/Elements/Element.cs @@ -61,7 +61,7 @@ public class Element { } public override string ToString() { - return $"{GetType()} {Position}[{Chunk.Index}]"; + return $"{GetType()} {Position}[{Chunk.Index}] {active}"; } protected virtual void Tick() { diff --git a/Scripts/Main.cs b/Scripts/Main.cs index fea1519..37dcdf9 100644 --- a/Scripts/Main.cs +++ b/Scripts/Main.cs @@ -1,4 +1,3 @@ -using System.Reflection; using FOU.Scripts; using FOU.Scripts.Elements; using Godot; diff --git a/project.godot b/project.godot index c221214..37bb172 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="FOU" run/main_scene="res://Scenes/main.tscn" -config/features=PackedStringArray("4.2", "C#", "Forward Plus") +config/features=PackedStringArray("4.3", "C#", "Forward Plus") config/icon="res://icon.svg" [dotnet]