enabled overwrite of existing pixels
This commit is contained in:
@@ -76,8 +76,8 @@ public class Chunk {
|
|||||||
Type type = typeof(T);
|
Type type = typeof(T);
|
||||||
object o = Activator.CreateInstance(type, x, y, this);
|
object o = Activator.CreateInstance(type, x, y, this);
|
||||||
|
|
||||||
// check if not empty:
|
// check if not empty and overwrite not allowed:
|
||||||
if (Elements[x,y].GetType() != typeof(Element)) {
|
if (Elements[x,y].GetType() != typeof(Element) && !Main.Instance.AllowOverwrite) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using Godot;
|
|||||||
|
|
||||||
public partial class Main : Node2D {
|
public partial class Main : Node2D {
|
||||||
[Export] public bool DebugMode = false;
|
[Export] public bool DebugMode = false;
|
||||||
|
[Export] public bool AllowOverwrite = true;
|
||||||
|
|
||||||
[Export] public int BrushSize = 5;
|
[Export] public int BrushSize = 5;
|
||||||
[Export] public float TextureResolution = 0.5f;
|
[Export] public float TextureResolution = 0.5f;
|
||||||
|
|||||||
Reference in New Issue
Block a user