Split project
This commit is contained in:
18
src/Enigmos/Boards/IBaseBoard.cs
Normal file
18
src/Enigmos/Boards/IBaseBoard.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Nocturnis.Enigmos.Cables;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
using Nocturnis.UIElements.Layers;
|
||||
|
||||
namespace Nocturnis.Enigmos.Boards;
|
||||
|
||||
public interface IBaseBoard
|
||||
{
|
||||
IBasePort? ConnectPending { get; set; }
|
||||
Dictionary<IBasePort, IBaseCable> CablePairing { get; set; }
|
||||
void AddCable(IBaseCable cable);
|
||||
HashSet<IBaseCable> FocusedCables { get; set; }
|
||||
bool ManualOpened { get; set; }
|
||||
bool CableVisualMode { get; set; }
|
||||
IModuleManualLayer ModuleManualLayer { get; set; }
|
||||
IModuleMovingLayer ModuleMovingLayer { get; set; }
|
||||
}
|
||||
11
src/Enigmos/Cables/IBaseCable.cs
Normal file
11
src/Enigmos/Cables/IBaseCable.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
|
||||
namespace Nocturnis.Enigmos.Cables;
|
||||
|
||||
public interface IBaseCable
|
||||
{
|
||||
void Free();
|
||||
void LineUpdate();
|
||||
Color Modulate { get; set; }
|
||||
Node AsNode { get; }
|
||||
}
|
||||
6
src/Enigmos/ModuleManuals/IModuleManualTab.cs
Normal file
6
src/Enigmos/ModuleManuals/IModuleManualTab.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.ModuleManuals;
|
||||
|
||||
public interface IModuleManualTab
|
||||
{
|
||||
string FullName();
|
||||
}
|
||||
22
src/Enigmos/Modules/IBaseModule.cs
Normal file
22
src/Enigmos/Modules/IBaseModule.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Godot;
|
||||
using Nocturnis.Enigmos.Boards;
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
using Nocturnis.UIElements;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IBaseModule
|
||||
{
|
||||
IEnumerable<IBasePort> Ports { get; }
|
||||
IBaseBoard Board { get; set; }
|
||||
Vector2 PositionToBoard { get; }
|
||||
Vector2 Size { get; set; }
|
||||
double MaintenanceAlpha { get; }
|
||||
double MaintenanceBeta { get; }
|
||||
string GetDescription { get; }
|
||||
ISimpleLabel Label { get; }
|
||||
Node AsNode { get; }
|
||||
Vector2 Position { get; set; }
|
||||
string LabelString { get; set; }
|
||||
|
||||
}
|
||||
13
src/Enigmos/Modules/ICommunicateModule.cs
Normal file
13
src/Enigmos/Modules/ICommunicateModule.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Godot;
|
||||
using Nocturnis.Communicators;
|
||||
using Nocturnis.DataStructures;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface ICommunicateModule
|
||||
{
|
||||
IBaseCommunicator PairedCommunicator { get; set; }
|
||||
StringName CommunicationDataType { get; }
|
||||
StringName CommunicationDirection { get; }
|
||||
IDataPackage DataBuffer { get; set; }
|
||||
}
|
||||
6
src/Enigmos/Modules/ICompositeModule.cs
Normal file
6
src/Enigmos/Modules/ICompositeModule.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface ICompositeModule
|
||||
{
|
||||
IBaseModule[] SubModules();
|
||||
}
|
||||
9
src/Enigmos/Modules/IComputationalCompositeModule.cs
Normal file
9
src/Enigmos/Modules/IComputationalCompositeModule.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Godot;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IComputationalCompositeModule : ICompositeModule
|
||||
{
|
||||
void Compute(IRootModule root);
|
||||
Vector2 PositionToBoard();
|
||||
}
|
||||
8
src/Enigmos/Modules/IErrorHandlerModule.cs
Normal file
8
src/Enigmos/Modules/IErrorHandlerModule.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IErrorHandlerModule
|
||||
{
|
||||
void ErrorHandler(Exception error, int idx);
|
||||
string[] HandlingOptions();
|
||||
int SelectedOption { get; set; }
|
||||
}
|
||||
9
src/Enigmos/Modules/IInterlayerDataInModule.cs
Normal file
9
src/Enigmos/Modules/IInterlayerDataInModule.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IInterlayerDataInModule : IInterlayerModule
|
||||
{
|
||||
IInterlayerDataOutModule DualModule { get; set; }
|
||||
IDataInPort DataIn { get; set; }
|
||||
}
|
||||
9
src/Enigmos/Modules/IInterlayerDataOutModule.cs
Normal file
9
src/Enigmos/Modules/IInterlayerDataOutModule.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IInterlayerDataOutModule : IInterlayerModule
|
||||
{
|
||||
IInterlayerDataInModule DualModule { get; set; }
|
||||
IDataOutPort DataOut { get; set; }
|
||||
}
|
||||
10
src/Enigmos/Modules/IInterlayerModule.cs
Normal file
10
src/Enigmos/Modules/IInterlayerModule.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IInterlayerModule
|
||||
{
|
||||
IBasePort UnderlyingPort();
|
||||
IProgrammableModule ParentModule { get; set; }
|
||||
|
||||
}
|
||||
9
src/Enigmos/Modules/IInterlayerSignalInModule.cs
Normal file
9
src/Enigmos/Modules/IInterlayerSignalInModule.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IInterlayerSignalInModule : IInterlayerModule
|
||||
{
|
||||
IInterlayerSignalOutModule DualModule { get; set; }
|
||||
ISignalInPort SignalIn { get; set; }
|
||||
}
|
||||
9
src/Enigmos/Modules/IInterlayerSignalOutModule.cs
Normal file
9
src/Enigmos/Modules/IInterlayerSignalOutModule.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Nocturnis.Enigmos.Ports;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IInterlayerSignalOutModule : IInterlayerModule
|
||||
{
|
||||
IInterlayerSignalInModule DualModule { get; set; }
|
||||
ISignalOutPort SignalOut { get; set; }
|
||||
}
|
||||
10
src/Enigmos/Modules/IParameterizedModule.cs
Normal file
10
src/Enigmos/Modules/IParameterizedModule.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Nocturnis.DataStructures;
|
||||
using Nocturnis.DataStructures.ConfigurableParameters;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IParameterizedModule
|
||||
{
|
||||
HashSet<IConfigurableParameter> ConfigurableParameters { get; set; }
|
||||
|
||||
}
|
||||
12
src/Enigmos/Modules/IPolymorphismModule.cs
Normal file
12
src/Enigmos/Modules/IPolymorphismModule.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Nocturnis.DataStructures;
|
||||
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IPolymorphismModule
|
||||
{
|
||||
HashSet<IDataPortGroup> ConfigurablePortGroups { get; set; }
|
||||
/// <summary>
|
||||
/// Update type of all ports base on configurable port groups' type
|
||||
/// </summary>
|
||||
void Inference();
|
||||
}
|
||||
6
src/Enigmos/Modules/IProgrammableModule.cs
Normal file
6
src/Enigmos/Modules/IProgrammableModule.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IProgrammableModule
|
||||
{
|
||||
|
||||
}
|
||||
6
src/Enigmos/Modules/IRootModule.cs
Normal file
6
src/Enigmos/Modules/IRootModule.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Modules;
|
||||
|
||||
public interface IRootModule
|
||||
{
|
||||
|
||||
}
|
||||
19
src/Enigmos/Ports/IBasePort.cs
Normal file
19
src/Enigmos/Ports/IBasePort.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Godot;
|
||||
using Nocturnis.Enigmos.Modules;
|
||||
using Nocturnis.Inventories.Items.Items;
|
||||
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface IBasePort
|
||||
{
|
||||
IBaseModule Module { get; set; }
|
||||
bool IsMatch(IBasePort oth);
|
||||
IBasePort? ConnectedPort { get; set; }
|
||||
void SetStatusConnected();
|
||||
void SetStatusNormal();
|
||||
void SetStatusPending();
|
||||
StringName Name { get; set; }
|
||||
int Condition { get; set; }
|
||||
int Quality { get; set; }
|
||||
void FixWith(IBaseChemicalItem item);
|
||||
}
|
||||
6
src/Enigmos/Ports/IDataInPort.cs
Normal file
6
src/Enigmos/Ports/IDataInPort.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface IDataInPort
|
||||
{
|
||||
|
||||
}
|
||||
6
src/Enigmos/Ports/IDataOutPort.cs
Normal file
6
src/Enigmos/Ports/IDataOutPort.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface IDataOutPort
|
||||
{
|
||||
|
||||
}
|
||||
6
src/Enigmos/Ports/IDataPort.cs
Normal file
6
src/Enigmos/Ports/IDataPort.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface IDataPort
|
||||
{
|
||||
|
||||
}
|
||||
6
src/Enigmos/Ports/ISignalInPort.cs
Normal file
6
src/Enigmos/Ports/ISignalInPort.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface ISignalInPort
|
||||
{
|
||||
|
||||
}
|
||||
6
src/Enigmos/Ports/ISignalOutPort.cs
Normal file
6
src/Enigmos/Ports/ISignalOutPort.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface ISignalOutPort
|
||||
{
|
||||
|
||||
}
|
||||
6
src/Enigmos/Ports/ISignalPort.cs
Normal file
6
src/Enigmos/Ports/ISignalPort.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Nocturnis.Enigmos.Ports;
|
||||
|
||||
public interface ISignalPort
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user