Refine editor inspector and drag painting

This commit is contained in:
2026-05-11 23:18:47 +02:00
parent dfe0cb3b6a
commit fbb7c0490c
3 changed files with 201 additions and 28 deletions

View File

@@ -42,6 +42,21 @@ public sealed class LevelEditorTests
Assert.Equal(EUndergroundState.Intact, next.GetUnderground(position, ECarrierType.Electricity).State);
}
[Fact]
public void UndergroundToolCanPaintAdjacentCellsRepeatedly()
{
var level = LevelState.Create("Network editor", 6, 6);
var command = new EditorToolCommand { Tool = EEditorTool.Underground, Carrier = ECarrierType.Fuel };
level = LevelEditor.Apply(level, new(1, 1), command);
level = LevelEditor.Apply(level, new(2, 1), command);
level = LevelEditor.Apply(level, new(3, 1), command);
Assert.Equal(EUndergroundState.Intact, level.GetUnderground(new(1, 1), ECarrierType.Fuel).State);
Assert.Equal(EUndergroundState.Intact, level.GetUnderground(new(2, 1), ECarrierType.Fuel).State);
Assert.Equal(EUndergroundState.Intact, level.GetUnderground(new(3, 1), ECarrierType.Fuel).State);
}
[Fact]
public void ConsumerToolPlacesCarrierAgnosticConsumer()
{