• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

First Machine Age's Mods (Combined repo.)


Commit MetaInfo

Revisãoc3dd4196defd7cc30441e672e6e88c82c409220d (tree)
Hora2020-03-17 06:36:06
Autormelchior <melchior@user...>
Commitermelchior

Mensagem de Log

W.I.P. Added conceptual prototype MBM Interface,
minor changes

Mudança Sumário

Diff

--- a/FirstMachineAge_Common/Common.csproj
+++ b/FirstMachineAge_Common/Common.csproj
@@ -45,6 +45,7 @@
4545 <Compile Include="Helpers.cs" />
4646 <Compile Include="Properties\AssemblyInfo.cs" />
4747 <Compile Include="ILogicNetNode.cs" />
48+ <Compile Include="IMultiBlockModule.cs" />
4849 </ItemGroup>
4950 <ItemGroup>
5051 <Folder Include="vs_libs\" />
--- a/FirstMachineAge_Common/ILogicNetNode.cs
+++ b/FirstMachineAge_Common/ILogicNetNode.cs
@@ -7,7 +7,7 @@ using Vintagestory.API.MathTools;
77 namespace FirstMachineAge
88 {
99
10-
10+ //The Basis for ABSTRACT-CIRCUITS.
1111 /*
1212 Domain (LogicDomain) <- Circuits (LogicNetwork) <- Subcircuit <LogicNetworkSubcircuit) <- BlockFace; <EndpointDescriptor>
1313 */
@@ -81,6 +81,7 @@ namespace FirstMachineAge
8181 public BlockFacing ForFace { get; }
8282 public LogicIO EndKind { get; }
8383 public DefaultState Normally { get; }
84+ public LogicDomain TargetDomain { get; }//For Adaptors
8485 }
8586
8687 public enum LogicIO
@@ -102,5 +103,7 @@ namespace FirstMachineAge
102103
103104
104105
106+
107+
105108 }
106109
--- /dev/null
+++ b/FirstMachineAge_Common/IMultiBlockModule.cs
@@ -0,0 +1,54 @@
1+using System;
2+using System.Collections.Generic;
3+
4+using Vintagestory.API.Common;
5+using Vintagestory.API.MathTools;
6+using Vintagestory.Essentials;
7+
8+
9+namespace FirstMachineAge
10+{
11+
12+ /*
13+ MBM:
14+
15+ 'Cyto' block: points to Nucleus block - 'structural'
16+ 'Membrane' block: points to Nucleus block, but also is input/output point for AbstractCircuits / Power
17+ 'Nucleus' block: houses MBM state/data & definition, as well as list of component block pos, and prototype
18+ */
19+ public interface IMultiBlockModule<T> where T : Block
20+ {
21+ ulong UniqueModuleID { get; }
22+ IMultiBlockModule<T> NucleusBlock { get; }
23+ BlockPos NucleusLocation { get; }
24+ T HostBlock { get; }//The Nucleus - as block
25+
26+ ILogicNetNode<T> LogicNode { get; }//Possibly null - Only "Membrane's" should have this...
27+ MBMType ComponentType { get; }
28+
29+ IList<T> RelatedBlocks { get; }
30+ //Way to determine - annother module can connect here?
31+ bool CheckCompatibility(Block subject, BlockFacing forSide);//Could it be 'placed' if it were a "normal" block
32+ IMultiBlockModule<T> FuseBlock(Block subject, BlockFacing forSide);//Pass back resulting Complex, if fused together...
33+ IMultiBlockModule<T> FuseAt(Block subject, BlockFacing forSide, BlockPos here);//Pass back resulting Complex, if fused together...
34+ Block CleaveBlock( );//remove\extract this block from the complex
35+ Block CleaveAt(BlockPos here );//remove\extract this block from the complex
36+
37+ BlockFacing[] OuterFaces { get; }
38+ BlockFacing[] InnerFaces { get; }//What MBM's touch this ~
39+
40+ }
41+
42+
43+
44+ public enum MBMType
45+ {
46+ Cyto,
47+ Membrane,
48+ Nucleus,
49+ //Vacuole // a "empty" 'Space' for Hardpoints or Sub-modules?
50+ }
51+
52+
53+}
54+