project update
This commit is contained in:
@@ -1,12 +1,17 @@
|
|||||||
|
using System.Numerics;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Skeleton.Algebra;
|
using Skeleton.Algebra;
|
||||||
using Skeleton.Algebra.DimensionProviders;
|
using Skeleton.Algebra.DimensionProviders;
|
||||||
|
|
||||||
namespace Nocturnis.DataStructures;
|
namespace Nocturnis.DataStructures;
|
||||||
using R2 = CategoryOf<IDim2>.OnField<double>.FVector;
|
using R2 = CategoryOf<IDim2>.OnField<double>.FVector;
|
||||||
|
using C2 = CategoryOf<IDim2>.OnField<Complex>.FVector;
|
||||||
public interface IDataPackage
|
public interface IDataPackage
|
||||||
{
|
{
|
||||||
void Assign(IDataPackage val, StringName key);
|
void Assign(IDataPackage val, StringName key);
|
||||||
bool Bit { get; }
|
bool Bit { get; set; }
|
||||||
R2 R2 { get; }
|
double Real { get; set; }
|
||||||
|
Complex Complex { get; set; }
|
||||||
|
R2 R2 { get; set; }
|
||||||
|
C2 C2 { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
|
using Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
namespace Nocturnis.DataStructures;
|
namespace Nocturnis.DataStructures;
|
||||||
|
|
||||||
public interface IDataPortGroup
|
public interface IDataPortGroup : IEnumerable<IDataPort>
|
||||||
{
|
{
|
||||||
StringName SelectedType { get; set; }
|
StringName SelectedType { get; set; }
|
||||||
StringName[] TypeOptions { get; set; }
|
StringName[] TypeOptions { get; set; }
|
||||||
|
|||||||
@@ -18,5 +18,6 @@ public interface IBaseModule
|
|||||||
Node AsNode { get; }
|
Node AsNode { get; }
|
||||||
Vector2 Position { get; set; }
|
Vector2 Position { get; set; }
|
||||||
string LabelString { get; set; }
|
string LabelString { get; set; }
|
||||||
|
void UpdateCables();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,5 +5,5 @@ namespace Nocturnis.Enigmos.Modules;
|
|||||||
public interface IComputationalCompositeModule : ICompositeModule
|
public interface IComputationalCompositeModule : ICompositeModule
|
||||||
{
|
{
|
||||||
void Compute(IRootModule root);
|
void Compute(IRootModule root);
|
||||||
Vector2 PositionToBoard();
|
Vector2 PositionToBoard { get; }
|
||||||
}
|
}
|
||||||
|
|||||||
6
src/Enigmos/Modules/IControllingModule.cs
Normal file
6
src/Enigmos/Modules/IControllingModule.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
|
public interface IControllingModule : IBaseModule
|
||||||
|
{
|
||||||
|
void RouteWithTimeoutHandle(IRootModule root);
|
||||||
|
}
|
||||||
6
src/Enigmos/Modules/IFilterModule.cs
Normal file
6
src/Enigmos/Modules/IFilterModule.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
|
public interface IFilterModule : IProgrammableModule
|
||||||
|
{
|
||||||
|
void FilterWithTimeoutHandle(IRootModule root);
|
||||||
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Nocturnis.Enigmos.Modules;
|
|||||||
|
|
||||||
public interface IInterlayerDataInModule : IInterlayerModule
|
public interface IInterlayerDataInModule : IInterlayerModule
|
||||||
{
|
{
|
||||||
IInterlayerDataOutModule DualModule { get; set; }
|
IInterlayerDataOutModule? DualModule { get; set; }
|
||||||
IDataInPort DataIn { get; set; }
|
IDataInPort? DataIn { get; set; }
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Nocturnis.Enigmos.Modules;
|
|||||||
|
|
||||||
public interface IInterlayerDataOutModule : IInterlayerModule
|
public interface IInterlayerDataOutModule : IInterlayerModule
|
||||||
{
|
{
|
||||||
IInterlayerDataInModule DualModule { get; set; }
|
IInterlayerDataInModule? DualModule { get; set; }
|
||||||
IDataOutPort DataOut { get; set; }
|
IDataOutPort? DataOut { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace Nocturnis.Enigmos.Modules;
|
|||||||
|
|
||||||
public interface IInterlayerModule
|
public interface IInterlayerModule
|
||||||
{
|
{
|
||||||
IBasePort UnderlyingPort();
|
IBasePort? UnderlyingPort { get; }
|
||||||
IProgrammableModule ParentModule { get; set; }
|
IProgrammableModule? ParentModule { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ namespace Nocturnis.Enigmos.Modules;
|
|||||||
|
|
||||||
public interface IInterlayerSignalInModule : IInterlayerModule
|
public interface IInterlayerSignalInModule : IInterlayerModule
|
||||||
{
|
{
|
||||||
IInterlayerSignalOutModule DualModule { get; set; }
|
IInterlayerSignalOutModule? DualModule { get; set; }
|
||||||
ISignalInPort SignalIn { get; set; }
|
ISignalInPort? SignalIn { get; set; }
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,6 @@ namespace Nocturnis.Enigmos.Modules;
|
|||||||
|
|
||||||
public interface IInterlayerSignalOutModule : IInterlayerModule
|
public interface IInterlayerSignalOutModule : IInterlayerModule
|
||||||
{
|
{
|
||||||
IInterlayerSignalInModule DualModule { get; set; }
|
IInterlayerSignalInModule? DualModule { get; set; }
|
||||||
ISignalOutPort SignalOut { get; set; }
|
ISignalOutPort? SignalOut { get; set; }
|
||||||
}
|
}
|
||||||
6
src/Enigmos/Modules/IKeyListenerModule.cs
Normal file
6
src/Enigmos/Modules/IKeyListenerModule.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
|
public interface IKeyListenerModule
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
6
src/Enigmos/Modules/IOptimizationModule.cs
Normal file
6
src/Enigmos/Modules/IOptimizationModule.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
|
public interface IOptimizationModule : IProgrammableModule
|
||||||
|
{
|
||||||
|
void OptimizeWithTimeoutHandle(IRootModule root);
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
namespace Nocturnis.Enigmos.Modules;
|
namespace Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
public interface IProgrammableModule
|
public interface IProgrammableModule : IBaseModule
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using Nocturnis.Creatures;
|
||||||
|
|
||||||
namespace Nocturnis.Enigmos.Modules;
|
namespace Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
public interface IRootModule
|
public interface IRootModule : IControllingModule
|
||||||
{
|
{
|
||||||
|
Stopwatch? Timer { get; set; }
|
||||||
|
bool ActionFinished { get; set; }
|
||||||
|
IBaseCreature ManagedBy { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -6,6 +6,7 @@ namespace Nocturnis.Enigmos.Ports;
|
|||||||
|
|
||||||
public interface IBasePort
|
public interface IBasePort
|
||||||
{
|
{
|
||||||
|
bool Connected { get; }
|
||||||
IBaseModule Module { get; set; }
|
IBaseModule Module { get; set; }
|
||||||
bool IsMatch(IBasePort oth);
|
bool IsMatch(IBasePort oth);
|
||||||
IBasePort? ConnectedPort { get; set; }
|
IBasePort? ConnectedPort { get; set; }
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
using Nocturnis.DataStructures;
|
||||||
|
using Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
namespace Nocturnis.Enigmos.Ports;
|
namespace Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
public interface IDataInPort
|
public interface IDataInPort : IDataPort
|
||||||
{
|
{
|
||||||
|
IDataPackage GetData(IRootModule root);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
using Nocturnis.DataStructures;
|
||||||
|
|
||||||
namespace Nocturnis.Enigmos.Ports;
|
namespace Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
public interface IDataOutPort
|
public interface IDataOutPort : IDataPort
|
||||||
{
|
{
|
||||||
|
IDataPackage ResultData { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace Nocturnis.Enigmos.Ports;
|
namespace Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
public interface IDataPort
|
public interface IDataPort : IBasePort
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
using Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
namespace Nocturnis.Enigmos.Ports;
|
namespace Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
public interface ISignalInPort
|
public interface ISignalInPort : ISignalPort
|
||||||
{
|
{
|
||||||
|
new IControllingModule Module { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
|
using Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
namespace Nocturnis.Enigmos.Ports;
|
namespace Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
public interface ISignalOutPort
|
public interface ISignalOutPort : ISignalPort
|
||||||
{
|
{
|
||||||
|
new IControllingModule Module { get; set; }
|
||||||
|
new ISignalInPort? ConnectedPort { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace Nocturnis.Enigmos.Ports;
|
namespace Nocturnis.Enigmos.Ports;
|
||||||
|
|
||||||
public interface ISignalPort
|
public interface ISignalPort : IBasePort
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,5 +4,5 @@ namespace Nocturnis.Inventories.ItemSlots.ItemSlots;
|
|||||||
|
|
||||||
public interface IChemicalItemSlot
|
public interface IChemicalItemSlot
|
||||||
{
|
{
|
||||||
IBaseChemicalItem Item { get; set; }
|
IBaseChemicalItem? Item { get; set; }
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,7 @@ public interface IBaseChemicalItem : IBaseItem
|
|||||||
{
|
{
|
||||||
HeterogeneousMixture ContentMaterial { get; set; }
|
HeterogeneousMixture ContentMaterial { get; set; }
|
||||||
void ConsumeFromBottom(double amount);
|
void ConsumeFromBottom(double amount);
|
||||||
|
double Amount { get; }
|
||||||
|
double BottomAmount { get; }
|
||||||
|
double BottomViscosity { get; }
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
|
using Nocturnis.UIElements;
|
||||||
|
|
||||||
namespace Nocturnis.Scenes;
|
namespace Nocturnis.Scenes;
|
||||||
|
|
||||||
public interface IRootScene
|
public interface IRootScene
|
||||||
{
|
{
|
||||||
void ChangeScene(Node scene);
|
void ChangeScene(Node scene);
|
||||||
|
IKeyListener KeyListener { get; set; }
|
||||||
}
|
}
|
||||||
8
src/UIElements/IKeyListener.cs
Normal file
8
src/UIElements/IKeyListener.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
using Nocturnis.Enigmos.Modules;
|
||||||
|
|
||||||
|
namespace Nocturnis.UIElements;
|
||||||
|
|
||||||
|
public interface IKeyListener
|
||||||
|
{
|
||||||
|
void Register(IKeyListenerModule module);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user