From c6dae688fef721499990ac71521a2921e72d77d0 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 18 Feb 2022 23:09:56 +0100 Subject: [PATCH] Update to Techblox 2022.02.17.10.32 --- TechbloxModdingAPI/App/AntiAntiCheatPatch.cs | 2 +- TechbloxModdingAPI/App/GameGameEngine.cs | 3 +- TechbloxModdingAPI/App/GameMenuEngine.cs | 20 ++- TechbloxModdingAPI/Block.cs | 3 +- TechbloxModdingAPI/Blocks/BlockIDs.cs | 37 ++++- TechbloxModdingAPI/Blocks/BlockMaterial.cs | 1 + .../Blocks/Engines/BlockEngine.cs | 61 ++----- .../Blocks/Engines/SignalEngine.cs | 62 ++++---- .../SaveAndLoadCompositionRootPatch.cs | 7 +- TechbloxModdingAPI/Players/PlayerEngine.cs | 12 +- TechbloxModdingAPI/Tasks/OnGuiRunner.cs | 3 +- TechbloxModdingAPI/TechbloxModdingAPI.csproj | 149 +++++++++++++++++- .../Tests/TechbloxModdingAPIPluginTest.cs | 12 +- 13 files changed, 253 insertions(+), 119 deletions(-) diff --git a/TechbloxModdingAPI/App/AntiAntiCheatPatch.cs b/TechbloxModdingAPI/App/AntiAntiCheatPatch.cs index d0aa1df..8a6e24a 100644 --- a/TechbloxModdingAPI/App/AntiAntiCheatPatch.cs +++ b/TechbloxModdingAPI/App/AntiAntiCheatPatch.cs @@ -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)AntiAntiCheat).Method)); } diff --git a/TechbloxModdingAPI/App/GameGameEngine.cs b/TechbloxModdingAPI/App/GameGameEngine.cs index 1431eb4..a07bed8 100644 --- a/TechbloxModdingAPI/App/GameGameEngine.cs +++ b/TechbloxModdingAPI/App/GameGameEngine.cs @@ -140,9 +140,8 @@ namespace TechbloxModdingAPI.App { var allBlocks = entitiesDB.QueryEntities(); List blockEGIDs = new List(); - 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; diff --git a/TechbloxModdingAPI/App/GameMenuEngine.cs b/TechbloxModdingAPI/App/GameMenuEngine.cs index 533b112..0f68299 100644 --- a/TechbloxModdingAPI/App/GameMenuEngine.cs +++ b/TechbloxModdingAPI/App/GameMenuEngine.cs @@ -55,13 +55,12 @@ namespace TechbloxModdingAPI.App public Game[] GetMyGames() { - EntityCollection mgsevs = entitiesDB.QueryEntities(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(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 games = entitiesDB.QueryEntities(MyGamesScreenExclusiveGroups.MyGames); - var gamesB = games.ToBuffer().buffer; + var (games, count) = entitiesDB.QueryEntities(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; diff --git a/TechbloxModdingAPI/Block.cs b/TechbloxModdingAPI/Block.cs index 5917668..1b1cd23 100644 --- a/TechbloxModdingAPI/Block.cs +++ b/TechbloxModdingAPI/Block.cs @@ -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; diff --git a/TechbloxModdingAPI/Blocks/BlockIDs.cs b/TechbloxModdingAPI/Blocks/BlockIDs.cs index 2e3618f..3bf837a 100644 --- a/TechbloxModdingAPI/Blocks/BlockIDs.cs +++ b/TechbloxModdingAPI/Blocks/BlockIDs.cs @@ -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, } } \ No newline at end of file diff --git a/TechbloxModdingAPI/Blocks/BlockMaterial.cs b/TechbloxModdingAPI/Blocks/BlockMaterial.cs index 777845a..32bd967 100644 --- a/TechbloxModdingAPI/Blocks/BlockMaterial.cs +++ b/TechbloxModdingAPI/Blocks/BlockMaterial.cs @@ -31,5 +31,6 @@ namespace TechbloxModdingAPI.Blocks SteelBodyworkPaintedChipped, WoodPainted, WoodRoughGrungy, + Boundary, } } \ No newline at end of file diff --git a/TechbloxModdingAPI/Blocks/Engines/BlockEngine.cs b/TechbloxModdingAPI/Blocks/Engines/BlockEngine.cs index 7b83b1e..5d6162c 100644 --- a/TechbloxModdingAPI/Blocks/Engines/BlockEngine.cs +++ b/TechbloxModdingAPI/Blocks/Engines/BlockEngine.cs @@ -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(); Stack cubeStack = new Stack(); FasterList cubes = new FasterList(10); var coll = entitiesDB.QueryEntities(); - 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(MachineSimulationGroups.JOINTS_GROUP).ToBuffer(); + var (joints, count) = entitiesDB.QueryEntities(MachineSimulationGroups.JOINTS_GROUP); var list = new FasterList(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(); var bodies = new HashSet(); - 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(); - 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(); var set = new HashSet(); - 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)); - } - } } } \ No newline at end of file diff --git a/TechbloxModdingAPI/Blocks/Engines/SignalEngine.cs b/TechbloxModdingAPI/Blocks/Engines/SignalEngine.cs index a612ea2..1f89816 100644 --- a/TechbloxModdingAPI/Blocks/Engines/SignalEngine.cs +++ b/TechbloxModdingAPI/Blocks/Engines/SignalEngine.cs @@ -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(NamedExclusiveGroup.Group); - var wiresB = wires.ToBuffer().buffer; - for (uint i = 0; i < wires.count; i++) + var (wires, count) = entitiesDB.QueryEntities(NamedExclusiveGroup.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.Group) }; } - EntityCollection wires = entitiesDB.QueryEntities(NamedExclusiveGroup.Group); - var wiresB = wires.ToBuffer().buffer; + var (wires, count) = entitiesDB.QueryEntities(NamedExclusiveGroup.Group); for (int endIndex = 0; endIndex < endPorts.Length; endIndex++) { PortEntityStruct endPES = entitiesDB.QueryEntity(endPorts[endIndex]); for (int startIndex = 0; startIndex < startPorts.Length; startIndex++) { PortEntityStruct startPES = entitiesDB.QueryEntity(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 GetChannelDataStruct(EGID portID) { var port = GetPort(portID); - var channels = entitiesDB.QueryEntities(NamedExclusiveGroup.Group); - var channelsB = channels.ToBuffer(); - return port.firstChannelIndexCachedInSim < channels.count - ? new OptionalRef(channelsB.buffer, port.firstChannelIndexCachedInSim) + var (channels, count) = entitiesDB.QueryEntities(NamedExclusiveGroup.Group); + return port.firstChannelIndexCachedInSim < count + ? new OptionalRef(channels, port.firstChannelIndexCachedInSim) : default; } public EGID[] GetElectricBlocks() { var res = new FasterList(); - foreach (var (coll, _) in entitiesDB.QueryEntities()) + foreach (var ((coll, count), _) in entitiesDB.QueryEntities()) { - 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(ExclusiveGroup group, Func isMatch) where T : unmanaged, IEntityComponent { FasterList results = new FasterList(); - EntityCollection components = entitiesDB.QueryEntities(group); - var componentsB = components.ToBuffer(); - for (uint i = 0; i < components.count; i++) + var (components, count) = entitiesDB.QueryEntities(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(); diff --git a/TechbloxModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs b/TechbloxModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs index b9139a6..5b65834 100644 --- a/TechbloxModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs +++ b/TechbloxModdingAPI/Persistence/SaveAndLoadCompositionRootPatch.cs @@ -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); } } diff --git a/TechbloxModdingAPI/Players/PlayerEngine.cs b/TechbloxModdingAPI/Players/PlayerEngine.cs index 441d3ac..728f93f 100644 --- a/TechbloxModdingAPI/Players/PlayerEngine.cs +++ b/TechbloxModdingAPI/Players/PlayerEngine.cs @@ -50,10 +50,10 @@ namespace TechbloxModdingAPI.Players public uint GetLocalPlayer() { if (!isReady) return uint.MaxValue; - var localPlayers = entitiesDB.QueryEntities(PlayersExclusiveGroups.LocalPlayers).ToBuffer(); - if (localPlayers.count > 0) + var (localPlayers, count) = entitiesDB.QueryEntities(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(PlayersExclusiveGroups.RemotePlayers).ToBuffer(); - if (localPlayers.count > 0) + var (localPlayers, count) = entitiesDB.QueryEntities(PlayersExclusiveGroups.RemotePlayers); + if (count > 0) { - return localPlayers.buffer[0].ID.entityID; + return localPlayers[0].ID.entityID; } return uint.MaxValue; } diff --git a/TechbloxModdingAPI/Tasks/OnGuiRunner.cs b/TechbloxModdingAPI/Tasks/OnGuiRunner.cs index b3c4000..c1cc689 100644 --- a/TechbloxModdingAPI/Tasks/OnGuiRunner.cs +++ b/TechbloxModdingAPI/Tasks/OnGuiRunner.cs @@ -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> + public class OnGuiRunner : SteppableRunner> { public OnGuiRunner(string name, uint runningOrder = 0) : base(name) diff --git a/TechbloxModdingAPI/TechbloxModdingAPI.csproj b/TechbloxModdingAPI/TechbloxModdingAPI.csproj index 8e8153a..ff031a7 100644 --- a/TechbloxModdingAPI/TechbloxModdingAPI.csproj +++ b/TechbloxModdingAPI/TechbloxModdingAPI.csproj @@ -26,16 +26,9 @@ + - - ..\ref\Techblox_Data\Managed\IllusionInjector.dll - ..\..\ref\Techblox_Data\Managed\IllusionInjector.dll - - - ..\ref\Techblox_Data\Managed\IllusionPlugin.dll - ..\..\ref\Techblox_Data\Managed\IllusionPlugin.dll - ..\ref\Techblox_Data\Managed\Analytics.dll ..\..\ref\Techblox_Data\Managed\Analytics.dll @@ -356,6 +349,14 @@ ..\ref\Techblox_Data\Managed\Havok.Physics.Hybrid.dll ..\..\ref\Techblox_Data\Managed\Havok.Physics.Hybrid.dll + + ..\ref\Techblox_Data\Managed\IllusionInjector.dll + ..\..\ref\Techblox_Data\Managed\IllusionInjector.dll + + + ..\ref\Techblox_Data\Managed\IllusionPlugin.dll + ..\..\ref\Techblox_Data\Managed\IllusionPlugin.dll + ..\ref\Techblox_Data\Managed\JWT.dll ..\..\ref\Techblox_Data\Managed\JWT.dll @@ -660,6 +661,14 @@ ..\ref\Techblox_Data\Managed\Techblox.AtmosphereBlock.dll ..\..\ref\Techblox_Data\Managed\Techblox.AtmosphereBlock.dll + + ..\ref\Techblox_Data\Managed\Techblox.AudioBlocks.dll + ..\..\ref\Techblox_Data\Managed\Techblox.AudioBlocks.dll + + + ..\ref\Techblox_Data\Managed\Techblox.AudioBlocksClient.dll + ..\..\ref\Techblox_Data\Managed\Techblox.AudioBlocksClient.dll + ..\ref\Techblox_Data\Managed\Techblox.AutoForward.dll ..\..\ref\Techblox_Data\Managed\Techblox.AutoForward.dll @@ -680,6 +689,14 @@ ..\ref\Techblox_Data\Managed\Techblox.BlockLabels.dll ..\..\ref\Techblox_Data\Managed\Techblox.BlockLabels.dll + + ..\ref\Techblox_Data\Managed\Techblox.BlockLabelsServer.dll + ..\..\ref\Techblox_Data\Managed\Techblox.BlockLabelsServer.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Blocks.Connections.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Blocks.Connections.dll + ..\ref\Techblox_Data\Managed\Techblox.Blocks.LightBlock.dll ..\..\ref\Techblox_Data\Managed\Techblox.Blocks.LightBlock.dll @@ -696,6 +713,22 @@ ..\ref\Techblox_Data\Managed\Techblox.Camera.dll ..\..\ref\Techblox_Data\Managed\Techblox.Camera.dll + + ..\ref\Techblox_Data\Managed\Techblox.CentreHUDBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.CentreHUDBlock.dll + + + ..\ref\Techblox_Data\Managed\Techblox.CentreHUDGUI.dll + ..\..\ref\Techblox_Data\Managed\Techblox.CentreHUDGUI.dll + + + ..\ref\Techblox_Data\Managed\Techblox.CheckpointBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.CheckpointBlock.dll + + + ..\ref\Techblox_Data\Managed\Techblox.CheckpointBlockClient.dll + ..\..\ref\Techblox_Data\Managed\Techblox.CheckpointBlockClient.dll + ..\ref\Techblox_Data\Managed\Techblox.Common.Audio.dll ..\..\ref\Techblox_Data\Managed\Techblox.Common.Audio.dll @@ -704,6 +737,10 @@ ..\ref\Techblox_Data\Managed\Techblox.ContextSensitiveTextHint.dll ..\..\ref\Techblox_Data\Managed\Techblox.ContextSensitiveTextHint.dll + + ..\ref\Techblox_Data\Managed\Techblox.DistanceSensorBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.DistanceSensorBlock.dll + ..\ref\Techblox_Data\Managed\Techblox.ECSResourceManagers.dll ..\..\ref\Techblox_Data\Managed\Techblox.ECSResourceManagers.dll @@ -728,6 +765,46 @@ ..\ref\Techblox_Data\Managed\Techblox.EnvironmentBlocks.SimulationWorldEnvironment.dll ..\..\ref\Techblox_Data\Managed\Techblox.EnvironmentBlocks.SimulationWorldEnvironment.dll + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.Client.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Client.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.Client.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.Client.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.GameState.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.PlayerGameplayDetails.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.PlayerGameplayDetails.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.Score.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Score.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.Spawning.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Spawning.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.Teams.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.Teams.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.Client.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.Client.dll + + + ..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Gameplay.WorldResetting.dll + ..\ref\Techblox_Data\Managed\Techblox.GameSelection.dll ..\..\ref\Techblox_Data\Managed\Techblox.GameSelection.dll @@ -832,6 +909,18 @@ ..\ref\Techblox_Data\Managed\Techblox.InputCapture.dll ..\..\ref\Techblox_Data\Managed\Techblox.InputCapture.dll + + ..\ref\Techblox_Data\Managed\Techblox.JetBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.JetBlock.dll + + + ..\ref\Techblox_Data\Managed\Techblox.JetBlockClient.dll + ..\..\ref\Techblox_Data\Managed\Techblox.JetBlockClient.dll + + + ..\ref\Techblox_Data\Managed\Techblox.MachineProcessingService.dll + ..\..\ref\Techblox_Data\Managed\Techblox.MachineProcessingService.dll + ..\ref\Techblox_Data\Managed\Techblox.MachineSimulationPreprocessing.dll ..\..\ref\Techblox_Data\Managed\Techblox.MachineSimulationPreprocessing.dll @@ -840,6 +929,10 @@ ..\ref\Techblox_Data\Managed\Techblox.MachineSpawning.dll ..\..\ref\Techblox_Data\Managed\Techblox.MachineSpawning.dll + + ..\ref\Techblox_Data\Managed\Techblox.MachineVelocityCameraEffects.dll + ..\..\ref\Techblox_Data\Managed\Techblox.MachineVelocityCameraEffects.dll + ..\ref\Techblox_Data\Managed\Techblox.Matchmaking.dll ..\..\ref\Techblox_Data\Managed\Techblox.Matchmaking.dll @@ -848,6 +941,10 @@ ..\ref\Techblox_Data\Managed\Techblox.Multiplayer.UsernameMessages.dll ..\..\ref\Techblox_Data\Managed\Techblox.Multiplayer.UsernameMessages.dll + + ..\ref\Techblox_Data\Managed\Techblox.Particles.dll + ..\..\ref\Techblox_Data\Managed\Techblox.Particles.dll + ..\ref\Techblox_Data\Managed\Techblox.PlayUX.dll ..\..\ref\Techblox_Data\Managed\Techblox.PlayUX.dll @@ -884,6 +981,14 @@ ..\ref\Techblox_Data\Managed\Techblox.SaveGamesConversion.dll ..\..\ref\Techblox_Data\Managed\Techblox.SaveGamesConversion.dll + + ..\ref\Techblox_Data\Managed\Techblox.ScoreHUDBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.ScoreHUDBlock.dll + + + ..\ref\Techblox_Data\Managed\Techblox.ScoreHUDGUI.dll + ..\..\ref\Techblox_Data\Managed\Techblox.ScoreHUDGUI.dll + ..\ref\Techblox_Data\Managed\Techblox.Server.dll ..\..\ref\Techblox_Data\Managed\Techblox.Server.dll @@ -932,6 +1037,22 @@ ..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Common.dll ..\..\ref\Techblox_Data\Managed\Techblox.SignalHandling.Common.dll + + ..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Client.dll + ..\..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Client.dll + + + ..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Server.dll + ..\..\ref\Techblox_Data\Managed\Techblox.SpawnBlock.Server.dll + + + ..\ref\Techblox_Data\Managed\Techblox.StabilizerBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.StabilizerBlock.dll + + + ..\ref\Techblox_Data\Managed\Techblox.StabilizerBlockClient.dll + ..\..\ref\Techblox_Data\Managed\Techblox.StabilizerBlockClient.dll + ..\ref\Techblox_Data\Managed\Techblox.SwitchAnimation.dll ..\..\ref\Techblox_Data\Managed\Techblox.SwitchAnimation.dll @@ -944,10 +1065,18 @@ ..\ref\Techblox_Data\Managed\Techblox.TimerBlock.dll ..\..\ref\Techblox_Data\Managed\Techblox.TimerBlock.dll + + ..\ref\Techblox_Data\Managed\Techblox.TriggerBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.TriggerBlock.dll + ..\ref\Techblox_Data\Managed\Techblox.WheelRigBlock.dll ..\..\ref\Techblox_Data\Managed\Techblox.WheelRigBlock.dll + + ..\ref\Techblox_Data\Managed\Techblox.WorldResetterBlock.dll + ..\..\ref\Techblox_Data\Managed\Techblox.WorldResetterBlock.dll + ..\ref\Techblox_Data\Managed\UniTask.Addressables.dll ..\..\ref\Techblox_Data\Managed\UniTask.Addressables.dll @@ -1052,6 +1181,10 @@ ..\ref\Techblox_Data\Managed\Unity.Platforms.Common.dll ..\..\ref\Techblox_Data\Managed\Unity.Platforms.Common.dll + + ..\ref\Techblox_Data\Managed\Unity.Profiling.Core.dll + ..\..\ref\Techblox_Data\Managed\Unity.Profiling.Core.dll + ..\ref\Techblox_Data\Managed\Unity.Properties.dll ..\..\ref\Techblox_Data\Managed\Unity.Properties.dll diff --git a/TechbloxModdingAPI/Tests/TechbloxModdingAPIPluginTest.cs b/TechbloxModdingAPI/Tests/TechbloxModdingAPIPluginTest.cs index 7b225d0..12ae6e4 100644 --- a/TechbloxModdingAPI/Tests/TechbloxModdingAPIPluginTest.cs +++ b/TechbloxModdingAPI/Tests/TechbloxModdingAPIPluginTest.cs @@ -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)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() @@ -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() @@ -295,7 +299,7 @@ namespace TechbloxModdingAPI.Tests return result; }) .Aggregate((a, b) => a + "\n" + b)); - };*/ + }; CommandBuilder.Builder("takeScreenshot", "Enables the screenshot taker") .Action(() =>