enabled overwrite of existing pixels

This commit is contained in:
2025-04-27 15:21:56 +02:00
parent 202e71d97e
commit 2e4fc22263
2 changed files with 3 additions and 2 deletions

View File

@@ -76,8 +76,8 @@ public class Chunk {
Type type = typeof(T);
object o = Activator.CreateInstance(type, x, y, this);
// check if not empty:
if (Elements[x,y].GetType() != typeof(Element)) {
// check if not empty and overwrite not allowed:
if (Elements[x,y].GetType() != typeof(Element) && !Main.Instance.AllowOverwrite) {
return;
}

View File

@@ -4,6 +4,7 @@ using Godot;
public partial class Main : Node2D {
[Export] public bool DebugMode = false;
[Export] public bool AllowOverwrite = true;
[Export] public int BrushSize = 5;
[Export] public float TextureResolution = 0.5f;