Browse Source

Start updating to Techblox 2022.05.25.11.05

Resolved compiler errors
Mostly by removing erroring code
master
NorbiPeti 1 year ago
parent
commit
55344d1352
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
12 changed files with 174 additions and 53 deletions
  1. +1
    -1
      CodeGenerator/BlockClassGenerator.cs
  2. +87
    -7
      CodeGenerator/CodeGenerator.csproj
  3. +3
    -3
      CodeGenerator/Program.cs
  4. +4
    -3
      TechbloxModdingAPI/Block.cs
  5. +30
    -4
      TechbloxModdingAPI/Blocks/BlockIDs.cs
  6. +9
    -1
      TechbloxModdingAPI/Blocks/BlockMaterial.cs
  7. +14
    -14
      TechbloxModdingAPI/Blocks/Engines/BlockEngine.cs
  8. +1
    -1
      TechbloxModdingAPI/Blocks/Engines/MovementEngine.cs
  9. +3
    -1
      TechbloxModdingAPI/Blocks/Engines/RotationEngine.cs
  10. +2
    -2
      TechbloxModdingAPI/Blocks/Engines/SignalEngine.cs
  11. +16
    -16
      TechbloxModdingAPI/Blocks/Servo.cs
  12. +4
    -0
      TechbloxModdingAPI/TechbloxModdingAPI.csproj

+ 1
- 1
CodeGenerator/BlockClassGenerator.cs View File

@@ -67,7 +67,7 @@ namespace CodeGenerator
codeUnit.Namespaces.Add(ns);

var provider = CodeDomProvider.CreateProvider("CSharp");
var path = $@"..\..\..\..\TechbloxModdingAPI\Blocks\{name}.cs";
var path = $@"../../../../TechbloxModdingAPI/Blocks/{name}.cs";
using (var sw = new StreamWriter(path))
{
provider.GenerateCodeFromCompileUnit(codeUnit, sw, new CodeGeneratorOptions {BracingStyle = "C"});


+ 87
- 7
CodeGenerator/CodeGenerator.csproj View File

@@ -419,6 +419,10 @@
<HintPath>..\ref\Techblox_Data\Managed\RobocraftX.GUI.PauseMenu.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\RobocraftX.GUI.PauseMenu.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.QuitConfirmation">
<HintPath>..\ref\Techblox_Data\Managed\RobocraftX.GUI.QuitConfirmation.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\RobocraftX.GUI.QuitConfirmation.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.ScaleGhost">
<HintPath>..\ref\Techblox_Data\Managed\RobocraftX.GUI.ScaleGhost.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\RobocraftX.GUI.ScaleGhost.dll</HintPath>
@@ -595,10 +599,6 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Blocks.Connections.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Blocks.Connections.dll</HintPath>
</Reference>
<Reference Include="Techblox.Blocks.Debug.Client.Monobehaviours">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Blocks.Debug.Client.Monobehaviours.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Blocks.Debug.Client.Monobehaviours.dll</HintPath>
</Reference>
<Reference Include="Techblox.Blocks.LightBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Blocks.LightBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Blocks.LightBlock.dll</HintPath>
@@ -607,6 +607,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Building.Rules.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Building.Rules.dll</HintPath>
</Reference>
<Reference Include="Techblox.Building.Shift">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Building.Shift.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Building.Shift.dll</HintPath>
</Reference>
<Reference Include="Techblox.BuildingDrone">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.BuildingDrone.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.BuildingDrone.dll</HintPath>
@@ -731,6 +735,14 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.BuildRules.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.BuildRules.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Collection">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.Collection.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.Collection.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Commands">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.Commands.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.Commands.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Controls">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.Controls.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.Controls.dll</HintPath>
@@ -775,18 +787,26 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.MainGame.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.MainGame.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.MainGame.StateMachine">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.MainGame.StateMachine.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.MainGame.StateMachine.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.MyGamesScreen">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.MyGamesScreen.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.MyGamesScreen.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.PauseMenuCommands">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.PauseMenuCommands.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.PauseMenuCommands.dll</HintPath>
<Reference Include="Techblox.GUI.PauseMenu">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.PauseMenu.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.PauseMenu.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Progression">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.Progression.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.Progression.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.ScreenCanvas">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.ScreenCanvas.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.ScreenCanvas.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.TabsBar.Landscapes">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.TabsBar.Landscapes.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.TabsBar.Landscapes.dll</HintPath>
@@ -799,6 +819,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.UsernameDisplay.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.UsernameDisplay.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.WorldCanvas">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GUI.WorldCanvas.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GUI.WorldCanvas.dll</HintPath>
</Reference>
<Reference Include="Techblox.InputCapture">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.InputCapture.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.InputCapture.dll</HintPath>
@@ -947,10 +971,30 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Services.Progression.Client.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Services.Progression.Client.dll</HintPath>
</Reference>
<Reference Include="Techblox.Services.Progression">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Services.Progression.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Services.Progression.dll</HintPath>
</Reference>
<Reference Include="Techblox.Services.Storage">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Services.Storage.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Services.Storage.dll</HintPath>
</Reference>
<Reference Include="Techblox.Services.Users.Client">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Services.Users.Client.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Services.Users.Client.dll</HintPath>
</Reference>
<Reference Include="Techblox.Services.Users">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Services.Users.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Services.Users.dll</HintPath>
</Reference>
<Reference Include="Techblox.ServoBlocksServer">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.ServoBlocksServer.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.ServoBlocksServer.dll</HintPath>
</Reference>
<Reference Include="Techblox.ServosServer">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.ServosServer.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.ServosServer.dll</HintPath>
</Reference>
<Reference Include="Techblox.SignalHandling.Audio">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Audio.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Audio.dll</HintPath>
@@ -959,6 +1003,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Common.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Common.dll</HintPath>
</Reference>
<Reference Include="Techblox.Simulation.Clusters">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Simulation.Clusters.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Simulation.Clusters.dll</HintPath>
</Reference>
<Reference Include="Techblox.SpawnBlock.Client">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Client.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Client.dll</HintPath>
@@ -1027,6 +1075,30 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.VisualEffects.VFXGraph.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.VisualEffects.VFXGraph.dll</HintPath>
</Reference>
<Reference Include="Techblox.Weapons.Aiming">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Weapons.Aiming.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Weapons.Aiming.dll</HintPath>
</Reference>
<Reference Include="Techblox.Weapons.DisablerBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Weapons.DisablerBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Weapons.DisablerBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.Weapons">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Weapons.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Weapons.dll</HintPath>
</Reference>
<Reference Include="Techblox.Weapons.Projectiles">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Weapons.Projectiles.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Weapons.Projectiles.dll</HintPath>
</Reference>
<Reference Include="Techblox.Weapons.Projectiles.Server">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Weapons.Projectiles.Server.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Weapons.Projectiles.Server.dll</HintPath>
</Reference>
<Reference Include="Techblox.Weapons.Server">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Weapons.Server.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Weapons.Server.dll</HintPath>
</Reference>
<Reference Include="Techblox.WheelFX">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.WheelFX.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.WheelFX.dll</HintPath>
@@ -1407,6 +1479,10 @@
<HintPath>..\ref\Techblox_Data\Managed\UnityEngine.TextCoreFontEngineModule.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\UnityEngine.TextCoreFontEngineModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextCoreModule">
<HintPath>..\ref\Techblox_Data\Managed\UnityEngine.TextCoreModule.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\UnityEngine.TextCoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextCoreTextEngineModule">
<HintPath>..\ref\Techblox_Data\Managed\UnityEngine.TextCoreTextEngineModule.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\UnityEngine.TextCoreTextEngineModule.dll</HintPath>
@@ -1523,6 +1599,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Whinarn.UnityMeshSimplifier.Runtime.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Whinarn.UnityMeshSimplifier.Runtime.dll</HintPath>
</Reference>
<Reference Include="ZFBrowser">
<HintPath>..\ref\Techblox_Data\Managed\ZFBrowser.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\ZFBrowser.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties" />


+ 3
- 3
CodeGenerator/Program.cs View File

@@ -3,7 +3,7 @@ using HarmonyLib;
using RobocraftX.Blocks;
using RobocraftX.PilotSeat;
using Techblox.EngineBlock;
using Techblox.ObjectIDBlockServer;
using Techblox.ServoBlocksServer;
using Techblox.WheelRigBlock;

namespace CodeGenerator
@@ -24,7 +24,7 @@ namespace CodeGenerator
},
typeof(TweakableJointDampingComponent), typeof(DampedSpringReadOnlyStruct));
bcg.Generate("LogicGate", "LOGIC_BLOCK_GROUP");
bcg.Generate("Servo", types: typeof(ServoReadOnlyStruct), renames: new Dictionary<string, string>
bcg.Generate("Servo", types: typeof(ServoReadOnlyTweakableComponent), renames: new Dictionary<string, string>
{
{"minDeviation", "MinimumAngle"},
{"maxDeviation", "MaximumAngle"},
@@ -39,7 +39,7 @@ namespace CodeGenerator
{"pistonVelocity", "MaximumForce"}
}, typeof(PistonReadOnlyStruct));
bcg.Generate("Motor", null, null, typeof(MotorReadOnlyStruct));
bcg.Generate("ObjectID", "ObjectIDBlockExclusiveGroups.OBJECT_ID_BLOCK_GROUP", null, typeof(ObjectIDTweakableComponent));
//bcg.Generate("ObjectID", "ObjectIDBlockExclusiveGroups.OBJECT_ID_BLOCK_GROUP", null, typeof(ObjectIDTweakableComponent));
}
}
}

+ 4
- 3
TechbloxModdingAPI/Block.cs View File

@@ -441,9 +441,10 @@ namespace TechbloxModdingAPI
public SimBody GetSimBody()
{
var st = BlockEngine.GetBlockInfo<GridConnectionsEntityStruct>(this);
return st.machineRigidBodyId != uint.MaxValue
? new SimBody(st.machineRigidBodyId, st.clusterId)
: null;
/*return st.machineRigidBodyId != uint.MaxValue
? new SimBody(st.machineRigidBodyId, st.clusterId) - TODO:
: null;*/
return null;
}

/// <summary>


+ 30
- 4
TechbloxModdingAPI/Blocks/BlockIDs.cs View File

@@ -333,13 +333,39 @@ namespace TechbloxModdingAPI.Blocks
DistanceSensor,
Stabilizer,
ObjectID,
TeamScore = 428,
ScoreToTechpointConversion,
TeamScore,
ScorePickupBlock,
StreetLamp = 435,
ConstantBlock = 452,
SportyHatchbackDriverSeat,
SportyHatchbackPassengerSeat,
FlamingExhaust = 433,
SmokingExhaust,
StreetLamp,
Vector7HatchbackWheel,
Vector7HatchbackWheelWideProfile,
Vector7SedanWheel,
Vector7SedanWideProfile,
Vector7FormulaWheel,
Vector7FormulaWheelRear,
Vector7MonsterTruckWheel,
Vector7TruckWheel,
Vector7TruckWheelDouble,
BusSeat,
XLJet,
XXLJet,
ElectricSedanEngine,
HeadlampIndicator,
HeadlampSrip,
HeadlampStripEdge,
ConstantBlock,
CounterBlock,
SmallGridHill,
SmallGridHillInnerCorner,
SmallGridHillOuterCorner
SmallGridHillOuterCorner,
Vector7SmallJet = 460,
Vector7MediumJet,
Vector7LargeJet,
Vector7XLJet,
Vector7XXLJet
}
}

+ 9
- 1
TechbloxModdingAPI/Blocks/BlockMaterial.cs View File

@@ -32,6 +32,14 @@ namespace TechbloxModdingAPI.Blocks
WoodPainted,
WoodRoughGrungy,
Boundary,
Emissive
Emissive,
AircraftPaneling_Riveted_Painted,
AircraftPaneling_Riveted_Metallic,
Steel_Bodywork_Pearlescent,
Steel_Bodywork_RadWrap,
Steel_Bodywork_Glitter,
BouncyRubber,
BouncyRubber_TieDye,
FuturisticPaneling_Riveted_Painted = 40
}
}

+ 14
- 14
TechbloxModdingAPI/Blocks/Engines/BlockEngine.cs View File

@@ -53,13 +53,13 @@ namespace TechbloxModdingAPI.Blocks.Engines
{
for(int i = 0; i < count; i++)
{
ecoll[i].isProcessed = false;
ecoll[i].areConnectionsAssigned = false;
}
}
//TODO: GetConnectedCubesUtility
ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubeStack, cubes,
(in GridConnectionsEntityStruct _) => false);
/*ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubeStack, cubes,
(in GridConnectionsEntityStruct _) => false);*/

var ret = new Block[cubes.count];
for (int i = 0; i < cubes.count; i++)
@@ -179,15 +179,15 @@ namespace TechbloxModdingAPI.Blocks.Engines
var tag = tags[i];
if (!connections.HasValue) //Would need reflection to get the group from the build group otherwise
connections = entitiesDB.QueryMappedEntities<GridConnectionsEntityStruct>(tag.ID.groupID);
var rid = connections.Value.Entity(tag.ID.entityID).machineRigidBodyId;
foreach (var rb in ret)
//var rid = connections.Value.Entity(tag.ID.entityID).machineRigidBodyId;
/*foreach (var rb in ret) - TODO
{
if (rb.Id.entityID == rid)
goto DUPLICATE; //Multiple Object Identifiers on one rigid body
}

ret.Add(new SimBody(rid));
DUPLICATE: ;
DUPLICATE: ;*/
}
return ret.ToArray();
@@ -201,8 +201,8 @@ namespace TechbloxModdingAPI.Blocks.Engines
{
ref var joint = ref joints[i];
if (joint.isBroken) continue;
if (joint.connectedEntityA == id) list.Add(new SimBody(joint.connectedEntityB));
else if (joint.connectedEntityB == id) list.Add(new SimBody(joint.connectedEntityA));
/*if (joint.connectedEntityA == id) list.Add(new SimBody(joint.connectedEntityB)); - TODO:
else if (joint.connectedEntityB == id) list.Add(new SimBody(joint.connectedEntityA));*/
}

return list.ToArray();
@@ -217,8 +217,8 @@ namespace TechbloxModdingAPI.Blocks.Engines
for (var index = 0; index < count; index++)
{
var conn = coll[index];
if (conn.clusterId == cid)
bodies.Add(conn.machineRigidBodyId);
/*if (conn.clusterId == cid) - TODO
bodies.Add(conn.machineRigidBodyId);*/
}
}

@@ -246,8 +246,8 @@ namespace TechbloxModdingAPI.Blocks.Engines
{
var conn = coll[index];
//Static blocks don't have a cluster ID but the cluster destruction manager should have one
if (conn.machineRigidBodyId == sbid && conn.clusterId != uint.MaxValue)
return new Cluster(conn.clusterId);
/*if (conn.machineRigidBodyId == sbid && conn.clusterId != uint.MaxValue) - TODO:
return new Cluster(conn.clusterId);*/
}
}

@@ -264,8 +264,8 @@ namespace TechbloxModdingAPI.Blocks.Engines
for (var index = 0; index < count; index++)
{
var conn = coll[index];
if (conn.machineRigidBodyId == sbid)
set.Add(Block.New(tags[index].ID));
/*if (conn.machineRigidBodyId == sbid) - TODO
set.Add(Block.New(tags[index].ID));*/
}
}



+ 1
- 1
TechbloxModdingAPI/Blocks/Engines/MovementEngine.cs View File

@@ -56,7 +56,7 @@ namespace TechbloxModdingAPI.Blocks.Engines
});
}

entitiesDB.QueryEntityOrDefault<GridConnectionsEntityStruct>(block).isProcessed = false;
entitiesDB.QueryEntityOrDefault<GridConnectionsEntityStruct>(block).areConnectionsAssigned = false;
return posStruct.position;
}



+ 3
- 1
TechbloxModdingAPI/Blocks/Engines/RotationEngine.cs View File

@@ -59,7 +59,9 @@ namespace TechbloxModdingAPI.Blocks.Engines
});
}

entitiesDB.QueryEntityOrDefault<GridConnectionsEntityStruct>(block).isProcessed = false;
// TODO: Connections probably need to be assigned (maybe)
// They are assigned during machine processing anyway
entitiesDB.QueryEntityOrDefault<GridConnectionsEntityStruct>(block).areConnectionsAssigned = false;
return ((Quaternion)rotStruct.rotation).eulerAngles;

}


+ 2
- 2
TechbloxModdingAPI/Blocks/Engines/SignalEngine.cs View File

@@ -313,7 +313,7 @@ namespace TechbloxModdingAPI.Blocks.Engines
for (int i = 0; i < count; i++)
{
ref BlockPortsStruct s = ref coll[i];
res.Add(s.ID);
//res.Add(s.ID); - TODO
}
}

@@ -367,7 +367,7 @@ namespace TechbloxModdingAPI.Blocks.Engines
: NamedExclusiveGroup<BuildModeWiresGroups.OutputPortsGroup>.Group;
if (entitiesDB.Exists<PortEntityStruct>(signalID, group))
{
index = entitiesDB.QueryEntity<PortEntityStruct>(signalID, group).anyChannelIndex;
index = entitiesDB.QueryEntity<PortEntityStruct>(signalID, group).firstChannelIndexCachedInSim;
var channelData =
entitiesDB.QueryEntities<ChannelDataStruct>(NamedExclusiveGroup<BuildModeWiresGroups.ChannelDataGroup>.Group);
return channelData;


+ 16
- 16
TechbloxModdingAPI/Blocks/Servo.cs View File

@@ -30,11 +30,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).servoVelocity;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).servoVelocity;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).servoVelocity = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).servoVelocity = value;
}
}
@@ -45,11 +45,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).minDeviation;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).minDeviation;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).minDeviation = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).minDeviation = value;
}
}
@@ -60,11 +60,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).maxDeviation;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).maxDeviation;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).maxDeviation = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).maxDeviation = value;
}
}
@@ -75,11 +75,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).reverse;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).reverse;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).reverse = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).reverse = value;
}
}
@@ -90,11 +90,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).hasProportionalInput;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).hasProportionalInput;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).hasProportionalInput = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).hasProportionalInput = value;
}
}
@@ -105,11 +105,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).directionVector;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).directionVector;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).directionVector = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).directionVector = value;
}
}
@@ -120,11 +120,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).rotationAxis;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).rotationAxis;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).rotationAxis = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).rotationAxis = value;
}
}
@@ -135,11 +135,11 @@ namespace TechbloxModdingAPI.Blocks
{
get
{
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).forceAxis;
return BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).forceAxis;
}
set
{
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).forceAxis = value;
BlockEngine.GetBlockInfo<Techblox.ServoBlocksServer.ServoReadOnlyTweakableComponent>(this).forceAxis = value;
}
}
}


+ 4
- 0
TechbloxModdingAPI/TechbloxModdingAPI.csproj View File

@@ -1595,6 +1595,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Whinarn.UnityMeshSimplifier.Runtime.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Whinarn.UnityMeshSimplifier.Runtime.dll</HintPath>
</Reference>
<Reference Include="ZFBrowser">
<HintPath>..\ref\Techblox_Data\Managed\ZFBrowser.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\ZFBrowser.dll</HintPath>
</Reference>
</ItemGroup>
<!--End Dependencies-->


Loading…
Cancel
Save