Update to Techblox 2022.02.17.10.32

This commit is contained in:
Norbi Peti 2022-02-18 23:09:56 +01:00
parent 7b2ac973d8
commit c6dae688fe
13 changed files with 253 additions and 119 deletions

View file

@ -22,7 +22,7 @@ namespace TechbloxModdingAPI.App
harmony.Patch(AccessTools.Method(type, "StartProtectedSession"), new HarmonyMethod(((AntiAnticheatDelegate) AntiAntiCheat).Method));
harmony.Patch(AccessTools.Method(type, "StopProtectedSession"), new HarmonyMethod(((AntiAnticheatDelegateBool) AntiAntiCheat).Method));
harmony.Patch(AccessTools.Method("Techblox.Services.Eos.Anticheat.Client.EosGetPendingMessagesToSendServiceRequest:Execute"), new HarmonyMethod(((AntiAnticheatDelegateTask)AntiAntiCheatTask).Method));
harmony.Patch(AccessTools.Method("Techblox.Anticheat.Client.Engines.ShowFeedbackDialogEngine:PollAnticheatStatus"), new HarmonyMethod(((AntiAnticheatDelegateTask)AntiAntiCheatTask).Method));
harmony.Patch(AccessTools.Method("Techblox.Anticheat.Client.Engines.ProcessEACViolationEngine:PollAnticheatStatus"), new HarmonyMethod(((AntiAnticheatDelegateTask)AntiAntiCheatTask).Method));
harmony.Patch(AccessTools.Method(typeof(AnticheatClientCompositionRoot), "ClientComposeTimeRunning"), new HarmonyMethod(((Func<bool>)AntiAntiCheat).Method));
}

View file

@ -140,9 +140,8 @@ namespace TechbloxModdingAPI.App
{
var allBlocks = entitiesDB.QueryEntities<BlockTagEntityStruct>();
List<EGID> blockEGIDs = new List<EGID>();
foreach (var (blocks, _) in allBlocks)
foreach (var ((buffer, count), _) in allBlocks)
{
var (buffer, count) = blocks.ToBuffer();
for (int i = 0; i < count; i++)
{
uint dbid;

View file

@ -55,13 +55,12 @@ namespace TechbloxModdingAPI.App
public Game[] GetMyGames()
{
EntityCollection<MyGameDataEntityStruct> mgsevs = entitiesDB.QueryEntities<MyGameDataEntityStruct>(MyGamesScreenExclusiveGroups.MyGames);
var mgsevsB = mgsevs.ToBuffer().buffer;
Game[] games = new Game[mgsevs.count];
for (int i = 0; i < mgsevs.count; i++)
var (mgsevs, count) = entitiesDB.QueryEntities<MyGameDataEntityStruct>(MyGamesScreenExclusiveGroups.MyGames);
Game[] games = new Game[count];
for (int i = 0; i < count; i++)
{
Utility.Logging.MetaDebugLog($"Found game named {mgsevsB[i].GameName}");
games[i] = new Game(mgsevsB[i].ID);
Utility.Logging.MetaDebugLog($"Found game named {mgsevs[i].GameName}");
games[i] = new Game(mgsevs[i].ID);
}
return games;
}
@ -84,14 +83,13 @@ namespace TechbloxModdingAPI.App
public uint HighestID()
{
EntityCollection<MyGameDataEntityStruct> games = entitiesDB.QueryEntities<MyGameDataEntityStruct>(MyGamesScreenExclusiveGroups.MyGames);
var gamesB = games.ToBuffer().buffer;
var (games, count) = entitiesDB.QueryEntities<MyGameDataEntityStruct>(MyGamesScreenExclusiveGroups.MyGames);
uint max = 0;
for (int i = 0; i < games.count; i++)
for (int i = 0; i < count; i++)
{
if (gamesB[i].ID.entityID > max)
if (games[i].ID.entityID > max)
{
max = gamesB[i].ID.entityID;
max = games[i].ID.entityID;
}
}
return max;

View file

@ -11,8 +11,7 @@ using Unity.Mathematics;
using HarmonyLib;
using RobocraftX.PilotSeat;
using RobocraftX.Rendering;
using Techblox.BlockLabels;
using Techblox.BlockLabelsServer;
using TechbloxModdingAPI.Blocks;
using TechbloxModdingAPI.Blocks.Engines;
using TechbloxModdingAPI.Tests;

View file

@ -278,7 +278,40 @@ namespace TechbloxModdingAPI.Blocks
GravtracTextblock,
HauserTextblock,
TechnopollasTextblock,
BitBlock = 385,
Timer
DiagonalTrackTile = 381,
DiagonalTrackTile2,
DiagonalTransitionTile,
SplitLane,
BitBlock,
Timer,
CityNightAtmosphere,
FloodLight,
SoccerBall,
CircularWallLight,
DirtToGrassTransitionTile = 393,
DirtToGrassTransitionInnerTile,
DirtToGrassTransitionOuterTile,
DirtToGrassTransitionHillTile,
DirtToGrassTransitionRoadTile,
DirtHill2 = 399,
DirtHill3,
DirtInnerCorner2 = 402,
DirtInnerCorner3,
DirtOuterCorner2 = 405,
DirtOuterCorner3,
SmallGrassQuarterTile = 411,
HUDTimer = 413,
CentreHUD,
Checkpoint,
ScoreboardHUD,
GameplaySFX,
SpawnPoint,
AreaSensor,
WorldResetter,
SmallJet,
MediumJet,
LargeJet,
DistanceSensor,
Stabilizer,
}
}

View file

@ -31,5 +31,6 @@ namespace TechbloxModdingAPI.Blocks
SteelBodyworkPaintedChipped,
WoodPainted,
WoodRoughGrungy,
Boundary,
}
}

View file

@ -45,22 +45,20 @@ namespace TechbloxModdingAPI.Blocks.Engines
public Block[] GetConnectedBlocks(EGID blockID)
{
if (!BlockExists(blockID)) return new Block[0];
if (!BlockExists(blockID)) return Array.Empty<Block>();
Stack<EGID> cubeStack = new Stack<EGID>();
FasterList<EGID> cubes = new FasterList<EGID>(10);
var coll = entitiesDB.QueryEntities<GridConnectionsEntityStruct>();
foreach (var (ecoll, _) in coll)
foreach (var ((ecoll, count), _) in coll)
{
var ecollB = ecoll.ToBuffer();
for(int i = 0; i < ecoll.count; i++)
for(int i = 0; i < count; i++)
{
ref var conn = ref ecollB.buffer[i];
conn.isProcessed = false;
ecoll[i].isProcessed = false;
}
}
ConnectedCubesUtility.TreeTraversal.GetConnectedCubes(entitiesDB, blockID, cubeStack, cubes,
(in GridConnectionsEntityStruct g) => { return false; });
(in GridConnectionsEntityStruct _) => false);
var ret = new Block[cubes.count];
for (int i = 0; i < cubes.count; i++)
@ -197,11 +195,11 @@ namespace TechbloxModdingAPI.Blocks.Engines
public SimBody[] GetConnectedSimBodies(uint id)
{
var joints = entitiesDB.QueryEntities<JointEntityStruct>(MachineSimulationGroups.JOINTS_GROUP).ToBuffer();
var (joints, count) = entitiesDB.QueryEntities<JointEntityStruct>(MachineSimulationGroups.JOINTS_GROUP);
var list = new FasterList<SimBody>(4);
for (int i = 0; i < joints.count; i++)
for (int i = 0; i < count; i++)
{
ref var joint = ref joints.buffer[i];
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));
@ -214,12 +212,11 @@ namespace TechbloxModdingAPI.Blocks.Engines
{
var groups = entitiesDB.QueryEntities<GridConnectionsEntityStruct>();
var bodies = new HashSet<uint>();
foreach (var (coll, _) in groups)
foreach (var ((coll, count), _) in groups)
{
var array = coll.ToBuffer().buffer;
for (var index = 0; index < array.capacity; index++)
for (var index = 0; index < count; index++)
{
var conn = array[index];
var conn = coll[index];
if (conn.clusterId == cid)
bodies.Add(conn.machineRigidBodyId);
}
@ -243,12 +240,11 @@ namespace TechbloxModdingAPI.Blocks.Engines
public Cluster GetCluster(uint sbid)
{
var groups = entitiesDB.QueryEntities<GridConnectionsEntityStruct>();
foreach (var (coll, _) in groups)
foreach (var ((coll, count), _) in groups)
{
var array = coll.ToBuffer().buffer;
for (var index = 0; index < array.capacity; index++)
for (var index = 0; index < count; index++)
{
var conn = array[index];
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);
@ -262,12 +258,11 @@ namespace TechbloxModdingAPI.Blocks.Engines
{
var groups = entitiesDB.QueryEntities<GridConnectionsEntityStruct>();
var set = new HashSet<Block>();
foreach (var (coll, _) in groups)
foreach (var ((coll, count), _) in groups)
{
var array = coll.ToBuffer().buffer;
for (var index = 0; index < array.capacity; index++)
for (var index = 0; index < count; index++)
{
var conn = array[index];
var conn = coll[index];
if (conn.machineRigidBodyId == sbid)
set.Add(Block.New(conn.ID));
}
@ -282,27 +277,5 @@ namespace TechbloxModdingAPI.Blocks.Engines
return entitiesDB;
}
#endif
[HarmonyPatch]
public static class RenderingPatch
{
private static ComputeRenderingEntitiesMatricesEngine Engine;
public static void Postfix(ComputeRenderingEntitiesMatricesEngine __instance)
{
Engine = __instance;
}
public static MethodBase TargetMethod()
{
return typeof(ComputeRenderingEntitiesMatricesEngine).GetConstructors()[0];
}
public static void UpdateBlocks()
{
var data = new RenderingDataStruct();
Engine.Add(ref data, new EGID(0, CommonExclusiveGroups.BUTTON_BLOCK_GROUP));
}
}
}
}

View file

@ -116,9 +116,8 @@ namespace TechbloxModdingAPI.Blocks.Engines
public bool SetSignal(uint signalID, float signal, bool input = true)
{
var array = GetSignalStruct(signalID, out uint index, input);
var arrayB = array.ToBuffer();
if (array.count > 0) arrayB.buffer[index].valueAsFloat = signal;
var (array, count) = GetSignalStruct(signalID, out uint index, input);
if (count > 0) array[index].valueAsFloat = signal;
return false;
}
@ -130,11 +129,10 @@ namespace TechbloxModdingAPI.Blocks.Engines
public float AddSignal(uint signalID, float signal, bool clamp = true, bool input = true)
{
var array = GetSignalStruct(signalID, out uint index, input);
var arrayB = array.ToBuffer();
if (array.count > 0)
var (array, count) = GetSignalStruct(signalID, out uint index, input);
if (count > 0)
{
ref var channelData = ref arrayB.buffer[index];
ref var channelData = ref array[index];
channelData.valueAsFloat += signal;
if (clamp)
{
@ -162,9 +160,8 @@ namespace TechbloxModdingAPI.Blocks.Engines
public float GetSignal(uint signalID, bool input = true)
{
var array = GetSignalStruct(signalID, out uint index, input);
var arrayB = array.ToBuffer();
return array.count > 0 ? arrayB.buffer[index].valueAsFloat : 0f;
var (array, count) = GetSignalStruct(signalID, out uint index, input);
return count > 0 ? array[index].valueAsFloat : 0f;
}
public uint[] GetSignalIDs(EGID blockID, bool input = true)
@ -237,15 +234,14 @@ namespace TechbloxModdingAPI.Blocks.Engines
public ref WireEntityStruct MatchPortToWire(PortEntityStruct port, EGID blockID, out bool exists)
{
var wires = entitiesDB.QueryEntities<WireEntityStruct>(NamedExclusiveGroup<BuildModeWiresGroups.WiresGroup>.Group);
var wiresB = wires.ToBuffer().buffer;
for (uint i = 0; i < wires.count; i++)
var (wires, count) = entitiesDB.QueryEntities<WireEntityStruct>(NamedExclusiveGroup<BuildModeWiresGroups.WiresGroup>.Group);
for (uint i = 0; i < count; i++)
{
if ((wiresB[i].destinationPortUsage == port.usage && wiresB[i].destinationBlockEGID == blockID)
|| (wiresB[i].sourcePortUsage == port.usage && wiresB[i].sourceBlockEGID == blockID))
if ((wires[i].destinationPortUsage == port.usage && wires[i].destinationBlockEGID == blockID)
|| (wires[i].sourcePortUsage == port.usage && wires[i].sourceBlockEGID == blockID))
{
exists = true;
return ref wiresB[i];
return ref wires[i];
}
}
exists = false;
@ -279,20 +275,19 @@ namespace TechbloxModdingAPI.Blocks.Engines
endPorts = new EGID[] {new EGID(ports.firstInputID + endPort, NamedExclusiveGroup<BuildModeWiresGroups.InputPortsGroup>.Group) };
}
EntityCollection<WireEntityStruct> wires = entitiesDB.QueryEntities<WireEntityStruct>(NamedExclusiveGroup<BuildModeWiresGroups.WiresGroup>.Group);
var wiresB = wires.ToBuffer().buffer;
var (wires, count) = entitiesDB.QueryEntities<WireEntityStruct>(NamedExclusiveGroup<BuildModeWiresGroups.WiresGroup>.Group);
for (int endIndex = 0; endIndex < endPorts.Length; endIndex++)
{
PortEntityStruct endPES = entitiesDB.QueryEntity<PortEntityStruct>(endPorts[endIndex]);
for (int startIndex = 0; startIndex < startPorts.Length; startIndex++)
{
PortEntityStruct startPES = entitiesDB.QueryEntity<PortEntityStruct>(startPorts[startIndex]);
for (int w = 0; w < wires.count; w++)
for (int w = 0; w < count; w++)
{
if ((wiresB[w].destinationPortUsage == endPES.usage && wiresB[w].destinationBlockEGID == endBlock)
&& (wiresB[w].sourcePortUsage == startPES.usage && wiresB[w].sourceBlockEGID == startBlock))
if ((wires[w].destinationPortUsage == endPES.usage && wires[w].destinationBlockEGID == endBlock)
&& (wires[w].sourcePortUsage == startPES.usage && wires[w].sourceBlockEGID == startBlock))
{
return wiresB[w].ID;
return wires[w].ID;
}
}
}
@ -304,22 +299,20 @@ namespace TechbloxModdingAPI.Blocks.Engines
public OptionalRef<ChannelDataStruct> GetChannelDataStruct(EGID portID)
{
var port = GetPort(portID);
var channels = entitiesDB.QueryEntities<ChannelDataStruct>(NamedExclusiveGroup<BuildModeWiresGroups.ChannelDataGroup>.Group);
var channelsB = channels.ToBuffer();
return port.firstChannelIndexCachedInSim < channels.count
? new OptionalRef<ChannelDataStruct>(channelsB.buffer, port.firstChannelIndexCachedInSim)
var (channels, count) = entitiesDB.QueryEntities<ChannelDataStruct>(NamedExclusiveGroup<BuildModeWiresGroups.ChannelDataGroup>.Group);
return port.firstChannelIndexCachedInSim < count
? new OptionalRef<ChannelDataStruct>(channels, port.firstChannelIndexCachedInSim)
: default;
}
public EGID[] GetElectricBlocks()
{
var res = new FasterList<EGID>();
foreach (var (coll, _) in entitiesDB.QueryEntities<BlockPortsStruct>())
foreach (var ((coll, count), _) in entitiesDB.QueryEntities<BlockPortsStruct>())
{
var collB = coll.ToBuffer();
for (int i = 0; i < coll.count; i++)
for (int i = 0; i < count; i++)
{
ref BlockPortsStruct s = ref collB.buffer[i];
ref BlockPortsStruct s = ref coll[i];
res.Add(s.ID);
}
}
@ -356,13 +349,12 @@ namespace TechbloxModdingAPI.Blocks.Engines
private T[] Search<T>(ExclusiveGroup group, Func<T, bool> isMatch) where T : unmanaged, IEntityComponent
{
FasterList<T> results = new FasterList<T>();
EntityCollection<T> components = entitiesDB.QueryEntities<T>(group);
var componentsB = components.ToBuffer();
for (uint i = 0; i < components.count; i++)
var (components, count) = entitiesDB.QueryEntities<T>(group);
for (uint i = 0; i < count; i++)
{
if (isMatch(componentsB.buffer[i]))
if (isMatch(components[i]))
{
results.Add(componentsB.buffer[i]);
results.Add(components[i]);
}
}
return results.ToArray();

View file

@ -4,17 +4,18 @@ using RobocraftX.SaveAndLoad;
using Svelto.ECS;
using HarmonyLib;
using RobocraftX.StateSync;
namespace TechbloxModdingAPI.Persistence
{
[HarmonyPatch(typeof(SaveAndLoadCompositionRoot), "ServerCompose")]
[HarmonyPatch(typeof(SaveAndLoadCompositionRoot), "ClientComposeTimeStopped")]
class SaveAndLoadCompositionRootPatch
{
public static EnginesRoot currentEnginesRoot;
public static void Prefix(EnginesRoot enginesRoot)
public static void Prefix(StateSyncRegistrationHelper stateSyncHelper)
{
currentEnginesRoot = enginesRoot;
currentEnginesRoot = stateSyncHelper.enginesRoot;
//SerializerManager.RegisterSerializers(enginesRoot);
}
}

View file

@ -50,10 +50,10 @@ namespace TechbloxModdingAPI.Players
public uint GetLocalPlayer()
{
if (!isReady) return uint.MaxValue;
var localPlayers = entitiesDB.QueryEntities<PlayerIDStruct>(PlayersExclusiveGroups.LocalPlayers).ToBuffer();
if (localPlayers.count > 0)
var (localPlayers, count) = entitiesDB.QueryEntities<PlayerIDStruct>(PlayersExclusiveGroups.LocalPlayers);
if (count > 0)
{
return localPlayers.buffer[0].ID.entityID;
return localPlayers[0].ID.entityID;
}
return uint.MaxValue;
}
@ -61,10 +61,10 @@ namespace TechbloxModdingAPI.Players
public uint GetRemotePlayer()
{
if (!isReady) return uint.MaxValue;
var localPlayers = entitiesDB.QueryEntities<PlayerIDStruct>(PlayersExclusiveGroups.RemotePlayers).ToBuffer();
if (localPlayers.count > 0)
var (localPlayers, count) = entitiesDB.QueryEntities<PlayerIDStruct>(PlayersExclusiveGroups.RemotePlayers);
if (count > 0)
{
return localPlayers.buffer[0].ID.entityID;
return localPlayers[0].ID.entityID;
}
return uint.MaxValue;
}

View file

@ -1,11 +1,12 @@
using System.Collections;
using RobocraftX.Schedulers;
using Svelto.Tasks;
using Svelto.Tasks.ExtraLean;
using Svelto.Tasks.Unity.Internal;
namespace TechbloxModdingAPI.Tasks
{
public class OnGuiRunner : BaseRunner<ExtraLeanSveltoTask<IEnumerator>>
public class OnGuiRunner : SteppableRunner<ExtraLeanSveltoTask<IEnumerator>>
{
public OnGuiRunner(string name, uint runningOrder = 0)
: base(name)

View file

@ -26,16 +26,9 @@
<!--Start Dependencies-->
<ItemGroup>
<Reference Include="IllusionInjector">
<HintPath>..\ref\Techblox_Data\Managed\IllusionInjector.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\IllusionInjector.dll</HintPath>
</Reference>
<Reference Include="IllusionPlugin">
<HintPath>..\ref\Techblox_Data\Managed\IllusionPlugin.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\IllusionPlugin.dll</HintPath>
</Reference>
<Reference Include="Analytics">
<HintPath>..\ref\Techblox_Data\Managed\Analytics.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Analytics.dll</HintPath>
@ -356,6 +349,14 @@
<HintPath>..\ref\Techblox_Data\Managed\Havok.Physics.Hybrid.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Havok.Physics.Hybrid.dll</HintPath>
</Reference>
<Reference Include="IllusionInjector">
<HintPath>..\ref\Techblox_Data\Managed\IllusionInjector.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\IllusionInjector.dll</HintPath>
</Reference>
<Reference Include="IllusionPlugin">
<HintPath>..\ref\Techblox_Data\Managed\IllusionPlugin.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\IllusionPlugin.dll</HintPath>
</Reference>
<Reference Include="JWT">
<HintPath>..\ref\Techblox_Data\Managed\JWT.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\JWT.dll</HintPath>
@ -660,6 +661,14 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.AtmosphereBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.AtmosphereBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.AudioBlocks">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.AudioBlocks.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.AudioBlocks.dll</HintPath>
</Reference>
<Reference Include="Techblox.AudioBlocksClient">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.AudioBlocksClient.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.AudioBlocksClient.dll</HintPath>
</Reference>
<Reference Include="Techblox.AutoForward">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.AutoForward.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.AutoForward.dll</HintPath>
@ -680,6 +689,14 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.BlockLabels.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.BlockLabels.dll</HintPath>
</Reference>
<Reference Include="Techblox.BlockLabelsServer">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.BlockLabelsServer.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.BlockLabelsServer.dll</HintPath>
</Reference>
<Reference Include="Techblox.Blocks.Connections">
<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.LightBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Blocks.LightBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Blocks.LightBlock.dll</HintPath>
@ -696,6 +713,22 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Camera.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Camera.dll</HintPath>
</Reference>
<Reference Include="Techblox.CentreHUDBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.CentreHUDBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.CentreHUDBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.CentreHUDGUI">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.CentreHUDGUI.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.CentreHUDGUI.dll</HintPath>
</Reference>
<Reference Include="Techblox.CheckpointBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.CheckpointBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.CheckpointBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.CheckpointBlockClient">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.CheckpointBlockClient.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.CheckpointBlockClient.dll</HintPath>
</Reference>
<Reference Include="Techblox.Common.Audio">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Common.Audio.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Common.Audio.dll</HintPath>
@ -704,6 +737,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.ContextSensitiveTextHint.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.ContextSensitiveTextHint.dll</HintPath>
</Reference>
<Reference Include="Techblox.DistanceSensorBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.DistanceSensorBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.DistanceSensorBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.ECSResourceManagers">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.ECSResourceManagers.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.ECSResourceManagers.dll</HintPath>
@ -728,6 +765,46 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.EnvironmentBlocks.SimulationWorldEnvironment.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.EnvironmentBlocks.SimulationWorldEnvironment.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.Client">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.Client.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Client.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.GameState.Client">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.Client.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.Client.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.GameState">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.PlayerGameplayDetails">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.PlayerGameplayDetails.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.PlayerGameplayDetails.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.Score">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.Score.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Score.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.Spawning">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.Spawning.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Spawning.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.Teams">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.Teams.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Teams.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.WorldResetting.Client">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.Client.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.Client.dll</HintPath>
</Reference>
<Reference Include="Techblox.Gameplay.WorldResetting">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.dll</HintPath>
</Reference>
<Reference Include="Techblox.GameSelection">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.GameSelection.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.GameSelection.dll</HintPath>
@ -832,6 +909,18 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.InputCapture.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.InputCapture.dll</HintPath>
</Reference>
<Reference Include="Techblox.JetBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.JetBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.JetBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.JetBlockClient">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.JetBlockClient.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.JetBlockClient.dll</HintPath>
</Reference>
<Reference Include="Techblox.MachineProcessingService">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.MachineProcessingService.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.MachineProcessingService.dll</HintPath>
</Reference>
<Reference Include="Techblox.MachineSimulationPreprocessing">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.MachineSimulationPreprocessing.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.MachineSimulationPreprocessing.dll</HintPath>
@ -840,6 +929,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.MachineSpawning.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.MachineSpawning.dll</HintPath>
</Reference>
<Reference Include="Techblox.MachineVelocityCameraEffects">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.MachineVelocityCameraEffects.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.MachineVelocityCameraEffects.dll</HintPath>
</Reference>
<Reference Include="Techblox.Matchmaking">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Matchmaking.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Matchmaking.dll</HintPath>
@ -848,6 +941,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Multiplayer.UsernameMessages.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Multiplayer.UsernameMessages.dll</HintPath>
</Reference>
<Reference Include="Techblox.Particles">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Particles.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Particles.dll</HintPath>
</Reference>
<Reference Include="Techblox.PlayUX">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.PlayUX.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.PlayUX.dll</HintPath>
@ -884,6 +981,14 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SaveGamesConversion.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SaveGamesConversion.dll</HintPath>
</Reference>
<Reference Include="Techblox.ScoreHUDBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.ScoreHUDBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.ScoreHUDBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.ScoreHUDGUI">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.ScoreHUDGUI.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.ScoreHUDGUI.dll</HintPath>
</Reference>
<Reference Include="Techblox.Server">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.Server.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.Server.dll</HintPath>
@ -932,6 +1037,22 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Common.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Common.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>
</Reference>
<Reference Include="Techblox.SpawnBlock.Server">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Server.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Server.dll</HintPath>
</Reference>
<Reference Include="Techblox.StabilizerBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.StabilizerBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.StabilizerBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.StabilizerBlockClient">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.StabilizerBlockClient.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.StabilizerBlockClient.dll</HintPath>
</Reference>
<Reference Include="Techblox.SwitchAnimation">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>
@ -944,10 +1065,18 @@
<HintPath>..\ref\Techblox_Data\Managed\Techblox.TimerBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.TimerBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.TriggerBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.TriggerBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.TriggerBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.WheelRigBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.WheelRigBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.WheelRigBlock.dll</HintPath>
</Reference>
<Reference Include="Techblox.WorldResetterBlock">
<HintPath>..\ref\Techblox_Data\Managed\Techblox.WorldResetterBlock.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Techblox.WorldResetterBlock.dll</HintPath>
</Reference>
<Reference Include="UniTask.Addressables">
<HintPath>..\ref\Techblox_Data\Managed\UniTask.Addressables.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\UniTask.Addressables.dll</HintPath>
@ -1052,6 +1181,10 @@
<HintPath>..\ref\Techblox_Data\Managed\Unity.Platforms.Common.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Unity.Platforms.Common.dll</HintPath>
</Reference>
<Reference Include="Unity.Profiling.Core">
<HintPath>..\ref\Techblox_Data\Managed\Unity.Profiling.Core.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Unity.Profiling.Core.dll</HintPath>
</Reference>
<Reference Include="Unity.Properties">
<HintPath>..\ref\Techblox_Data\Managed\Unity.Properties.dll</HintPath>
<HintPath>..\..\ref\Techblox_Data\Managed\Unity.Properties.dll</HintPath>

View file

@ -1,13 +1,17 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using DataLoader;
using TechbloxModdingAPI.App;
using HarmonyLib;
using IllusionInjector;
// test
using RobocraftX.FrontEnd;
using ServiceLayer;
using Unity.Mathematics;
using UnityEngine;
using Svelto.Tasks;
@ -257,7 +261,7 @@ namespace TechbloxModdingAPI.Tests
/*((FasterList<GuiInputMap.GuiInputMapElement>)AccessTools.Property(typeof(GuiInputMap), "GuiInputsButtonDown").GetValue(null))
.Add(new GuiInputMap.GuiInputMapElement(RewiredConsts.Action.ToggleCommandLine, GuiIn))*/
/*Game.Enter += (sender, e) =>
Game.Enter += (sender, e) =>
{
ushort lastKey = ushort.MaxValue;
foreach (var kv in FullGameFields._dataDb.GetValues<CubeListData>()
@ -281,8 +285,8 @@ namespace TechbloxModdingAPI.Tests
Console.WriteLine($"{name}{(currentKey != lastKey + 1 ? $" = {currentKey}" : "")},");
lastKey = currentKey;
}
};*/
/*Game.Enter += (sender, e) =>
};
Game.Enter += (sender, e) =>
{
ushort lastKey = ushort.MaxValue;
Console.WriteLine("Materials:\n" + FullGameFields._dataDb.GetValues<MaterialPropertiesData>()
@ -295,7 +299,7 @@ namespace TechbloxModdingAPI.Tests
return result;
})
.Aggregate((a, b) => a + "\n" + b));
};*/
};
CommandBuilder.Builder("takeScreenshot", "Enables the screenshot taker")
.Action(() =>