From 6175d29b3dc57b808b50f6ead089638fcba722ce Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:19:04 +0200 Subject: [PATCH] Add modding support --- .../{Interfaces => }/LogicGate.cs | 2 +- .../Content/WorldScreen.xmmp | 9 +++-- StoneRed.LogicSimulator/Misc/Paths.cs | 36 ++++++++++++++--- .../Simulation/LogicGateSimulator.cs | 2 +- .../Simulation/LogicGates/AndGate.cs | 18 +++++++++ .../Simulation/LogicGates/Button.cs | 2 +- .../Simulation/LogicGates/Clock.cs | 2 +- .../Simulation/LogicGates/Lamp.cs | 2 +- .../Simulation/LogicGates/NotGate.cs | 4 +- .../Simulation/LogicGates/OrGate.cs | 18 +++++++++ .../Simulation/LogicGates/Pin.cs | 4 +- .../Simulation/LogicGates/Switch.cs | 1 + .../Simulation/LogicGates/TestLogicGate.cs | 39 ++++++++++++++++--- .../UserInterface/Screens/WorldScreen.cs | 17 ++++---- .../UserInterface/Windows/LoadWorldWindow.cs | 4 +- .../UserInterface/Windows/SaveWorldWindow.cs | 4 +- .../Utilities/LogicGatesManager.cs | 24 ++++++++++-- .../WorldSaveSystem/WorldData.cs | 3 +- .../WorldReaders/WorldReaderV1.cs | 3 +- .../WorldWriters/WorldWriterV1.cs | 3 +- 20 files changed, 151 insertions(+), 46 deletions(-) rename StoneRed.LogicSimulator.Api/{Interfaces => }/LogicGate.cs (99%) create mode 100644 StoneRed.LogicSimulator/Simulation/LogicGates/AndGate.cs create mode 100644 StoneRed.LogicSimulator/Simulation/LogicGates/OrGate.cs diff --git a/StoneRed.LogicSimulator.Api/Interfaces/LogicGate.cs b/StoneRed.LogicSimulator.Api/LogicGate.cs similarity index 99% rename from StoneRed.LogicSimulator.Api/Interfaces/LogicGate.cs rename to StoneRed.LogicSimulator.Api/LogicGate.cs index 0fd4ec9..6dabdaf 100644 --- a/StoneRed.LogicSimulator.Api/Interfaces/LogicGate.cs +++ b/StoneRed.LogicSimulator.Api/LogicGate.cs @@ -2,7 +2,7 @@ using StoneRed.LogicSimulator.Api.Utilities; -namespace StoneRed.LogicSimulator.Api.Interfaces; +namespace StoneRed.LogicSimulator.Api; #pragma warning disable S112 // General exceptions should never be thrown internal abstract class LogicGate diff --git a/StoneRed.LogicSimulator/Content/WorldScreen.xmmp b/StoneRed.LogicSimulator/Content/WorldScreen.xmmp index 1ca7e50..79f7226 100644 --- a/StoneRed.LogicSimulator/Content/WorldScreen.xmmp +++ b/StoneRed.LogicSimulator/Content/WorldScreen.xmmp @@ -13,12 +13,13 @@ -