Update to Techblox 2021.06.08.16.19

Added check for time mode toggle to avoid crashing the game
Added support for having the ref folder outside the solution in gen_csproj.py
Removed BlockIdentifiers class
Added check for invalid player ID when placing blocks
Resolved compilation errors
This commit is contained in:
Norbi Peti 2021-06-09 20:11:31 +02:00
parent c1c226ef2a
commit 99f077a917
19 changed files with 181 additions and 192 deletions

View file

@ -3,15 +3,22 @@
import argparse
from pathlib import Path, PurePath
import re
import os
DLL_EXCLUSIONS_REGEX = r"(System|Microsoft|Mono|IronPython|DiscordRPC)\."
def getAssemblyReferences(path):
asmDir = Path(path)
result = list()
addedPath = ""
if not asmDir.exists():
addedPath = "../"
asmDir = Path(addedPath + path)
for child in asmDir.iterdir():
if child.is_file() and re.search(DLL_EXCLUSIONS_REGEX, str(child), re.I) is None and str(child).lower().endswith(".dll"):
result.append(str(child).replace("\\", "/"))
childstr = str(child)
childstr = os.path.relpath(childstr, addedPath).replace("\\", "/")
result.append(childstr)
return result
def buildReferencesXml(path):

View file

@ -91,7 +91,9 @@ namespace TechbloxModdingAPI.App
}
public void ToggleTimeMode()
{
{
if (!entitiesDB.FoundInGroups<BlockTagEntityStruct>())
throw new AppStateException("At least one block must exist in the world to enter simulation");
TimeRunningModeUtil.ToggleTimeRunningState(entitiesDB);
}

View file

@ -9,6 +9,7 @@ using RobocraftX.Common;
using RobocraftX.Blocks;
using Unity.Mathematics;
using Gamecraft.Blocks.GUI;
using HarmonyLib;
using TechbloxModdingAPI.Blocks;
using TechbloxModdingAPI.Blocks.Engines;
@ -65,7 +66,8 @@ namespace TechbloxModdingAPI
/// <returns>The block object or null if doesn't exist</returns>
public static Block GetLastPlacedBlock()
{
EGID? egid = BlockEngine.FindBlockEGID(BlockIdentifiers.LatestBlockID);
uint lastBlockID = (uint) AccessTools.Field(typeof(CommonExclusiveGroups), "_nextBlockEntityID").GetValue(null) - 1;
EGID? egid = BlockEngine.FindBlockEGID(lastBlockID);
return egid.HasValue ? New(egid.Value) : null;
}

View file

@ -1,43 +0,0 @@
using Svelto.ECS;
using RobocraftX.Common;
using HarmonyLib;
using Svelto.DataStructures;
namespace TechbloxModdingAPI.Blocks
{
/// <summary>
/// ExclusiveGroups and IDs used with blocks
/// </summary>
public static class BlockIdentifiers
{
/// <summary>
/// Blocks placed by the player
/// </summary>
public static FasterReadOnlyList<ExclusiveGroupStruct> OWNED_BLOCKS { get { return CommonExclusiveGroups.REAL_BLOCKS_GROUPS_DON_T_USE_IN_NEW_CODE; } }
/// <summary>
/// Extra parts used in functional blocks
/// </summary>
public static ExclusiveGroup FUNCTIONAL_BLOCK_PARTS { get { return CommonExclusiveGroups.FUNCTIONAL_BLOCK_PART_GROUP; } }
/// <summary>
/// Blocks which are disabled in Simulation mode
/// </summary>
public static ExclusiveGroup SIM_BLOCKS_DISABLED { get { return CommonExclusiveGroups.DISABLED_JOINTS_IN_SIM_GROUP; } }
//public static ExclusiveGroup SPAWN_POINTS { get { return CommonExclusiveGroups.SPAWN_POINTS_GROUP; } }
//public static ExclusiveGroup SPAWN_POINTS_DISABLED { get { return CommonExclusiveGroups.SPAWN_POINTS_DISABLED_GROUP; } }
/// <summary>
/// The ID of the most recently placed block
/// </summary>
public static uint LatestBlockID {
get
{ //Need the private field as the property increments itself
return ((uint) AccessTools.Field(typeof(CommonExclusiveGroups), "_nextBlockEntityID").GetValue(null)) - 1;
}
}
}
}

View file

@ -15,13 +15,13 @@ namespace TechbloxModdingAPI.Blocks
}
/// <summary>
/// The spring frequency.
/// The spring's stiffness.
/// </summary>
public float SpringFrequency
public float Stiffness
{
get => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springFrequency;
get => BlockEngine.GetBlockInfo<TweakableJointDampingComponent>(this).stiffness;
set => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springFrequency = value;
set => BlockEngine.GetBlockInfo<TweakableJointDampingComponent>(this).stiffness = value;
}
/// <summary>
@ -29,9 +29,9 @@ namespace TechbloxModdingAPI.Blocks
/// </summary>
public float Damping
{
get => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springDamping;
get => BlockEngine.GetBlockInfo<TweakableJointDampingComponent>(this).damping;
set => BlockEngine.GetBlockInfo<DampedSpringReadOnlyStruct>(this).springDamping = value;
set => BlockEngine.GetBlockInfo<TweakableJointDampingComponent>(this).damping = value;
}
/// <summary>

View file

@ -20,10 +20,10 @@ namespace TechbloxModdingAPI.Blocks
set => BlockEngine.GetBlockInfo<EngineBlockComponent>(this).engineOn = value;
}
public int TorqueDirection
public float CurrentTorque
{
get => BlockEngine.GetBlockInfo<EngineBlockComponent>(this).torqueDirection;
set => BlockEngine.GetBlockInfo<EngineBlockComponent>(this).torqueDirection = value;
get => BlockEngine.GetBlockInfo<EngineBlockComponent>(this).currentTorque;
set => BlockEngine.GetBlockInfo<EngineBlockComponent>(this).currentTorque = value;
}
public int CurrentGear

View file

@ -12,6 +12,7 @@ using Svelto.DataStructures;
using Svelto.ECS;
using Svelto.ECS.DataStructures;
using Svelto.ECS.EntityStructs;
using Svelto.ECS.Native;
using Svelto.ECS.Serialization;
using TechbloxModdingAPI.Engines;
using TechbloxModdingAPI.Utility;
@ -160,10 +161,14 @@ namespace TechbloxModdingAPI.Blocks.Engines
private void BuildGhostBlueprint(ICollection<Block> blocks, float3 pos, quaternion rot, uint playerID)
{
GhostChildUtility.ClearGhostChildren(playerID, entitiesDB, entityFunctions);
var bssesopt = entitiesDB.QueryEntityOptional<BoxSelectStateEntityStruct>(new EGID(playerID,
BoxSelectExclusiveGroups.BoxSelectVolumeExclusiveGroup));
if (!bssesopt)
return;
foreach (var block in blocks)
{
GhostChildUtility.BuildGhostChild(in playerID, block.Id, in pos, in rot, entitiesDB,
BuildGhostBlueprintFactory, false);
BuildGhostBlueprintFactory, false, bssesopt.Get().buildingDroneReference);
}
}

View file

@ -7,6 +7,7 @@ using HarmonyLib;
using RobocraftX.Blocks;
using RobocraftX.Character;
using RobocraftX.Common;
using RobocraftX.CR.MachineEditing.BoxSelect;
using RobocraftX.Rendering;
using RobocraftX.Rendering.GPUI;
using Svelto.ECS;
@ -70,10 +71,14 @@ namespace TechbloxModdingAPI.Blocks.Engines
});
structInitializer.Init(new UniformBlockScaleEntityStruct {scaleFactor = 1});
structInitializer.Get<CubeMaterialStruct>().materialId = (byte) BlockMaterial.SteelBodywork;
var bssesopt = entitiesDB.QueryEntityOptional<BoxSelectStateEntityStruct>(new EGID(playerId,
BoxSelectExclusiveGroups.BoxSelectVolumeExclusiveGroup));
if (!bssesopt)
throw new BlockException("Invalid player ID specified for block placement");
structInitializer.Init(new BlockPlacementInfoStruct
{
loadedFromDisk = false,
placedBy = playerId,
placedByBuildingDrone = bssesopt.Get().buildingDroneReference,
triggerAutoWiring = autoWire && structInitializer.Has<BlockPortsStruct>()
});

View file

@ -4,6 +4,7 @@ using HarmonyLib;
using RobocraftX.Blocks;
using RobocraftX.Common;
using Svelto.ECS;
using Svelto.ECS.Native;
using TechbloxModdingAPI.Engines;
using TechbloxModdingAPI.Utility;

View file

@ -15,7 +15,7 @@ namespace TechbloxModdingAPI.Input
/// Customize the local input.
/// </summary>
/// <param name="input">The custom input.</param>
public static void CustomInput(LocalInputEntityStruct input)
public static void CustomInput(LocalCosmeticInputEntityComponent input)
{
inputEngine.SendCustomInput(input);
}
@ -34,7 +34,7 @@ namespace TechbloxModdingAPI.Input
inputEngine.SendCustomPlayerInput(input, playerID);
}
public static LocalInputEntityStruct GetInput()
public static LocalCosmeticInputEntityComponent GetInput()
{
return inputEngine.GetInput();
}
@ -48,31 +48,23 @@ namespace TechbloxModdingAPI.Input
return inputEngine.GetPlayerInput(playerID);
}
/// <summary>
/// Fake a GUI input.
/// <summary>
/// Fake a GUI input.
/// Omit any parameter you do not want to affect.
/// Parameters that end with "?" don't do anything... yet.
/// </summary>
/// <param name="playerID">The player. Omit this to use the local player.</param>
/// <param name="hotbar">Select the hotbar slot by number.</param>
/// <param name="commandLine">Toggle the command line?</param>
/// <param name="escape">Open escape menu?</param>
/// <param name="enter">Page return?</param>
/// <param name="debug">Toggle debug display?</param>
/// <param name="next">Select next?</param>
/// <param name="previous">Select previous?</param>
/// <param name="tab">Tab?</param>
/// <param name="colour">Toggle to hotbar colour mode?</param>
/// <param name="hotbarPage">Select the hotbar page by number?</param>
/// <param name="quickSave">Quicksave?</param>
/// <param name="paste">Paste?</param>
public static void GuiInput(uint playerID = uint.MaxValue, int hotbar = -1, bool escape = false, bool enter = false, bool debug = false, bool next = false, bool previous = false, bool tab = false, int hotbarPage = -1, bool quickSave = false, bool paste = false)
/// </summary>
/// <param name="hotbar">Select the hotbar slot by number.</param>
/// <param name="commandLine">Toggle the command line?</param>
/// <param name="escape">Open escape menu?</param>
/// <param name="enter">Page return?</param>
/// <param name="debug">Toggle debug display?</param>
/// <param name="colour">Toggle to hotbar colour mode?</param>
/// <param name="hotbarPage">Select the hotbar page by number?</param>
/// <param name="quickSave">Quicksave?</param>
/// <param name="paste">Paste?</param>
public static void GuiInput(int hotbar = -1, bool escape = false, bool enter = false, bool debug = false, int hotbarPage = -1, bool quickSave = false, bool paste = false)
{
if (playerID == uint.MaxValue)
{
playerID = inputEngine.GetLocalPlayerID();
}
ref LocalInputEntityStruct currentInput = ref inputEngine.GetInputRef();
ref LocalCosmeticInputEntityComponent currentInput = ref inputEngine.GetInputRef();
//Utility.Logging.CommandLog($"Current sim frame {currentInput.frame}");
// set inputs
switch(hotbar)
@ -92,9 +84,6 @@ namespace TechbloxModdingAPI.Input
if (escape) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.Escape;
if (enter) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.Return;
if (debug) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.ToggleDebugDisplay;
if (next) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.SelectNext;
if (previous) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.SelectPrev;
if (tab) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.Tab;
switch (hotbarPage)
{
case 1: currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.HotbarPage1; break;
@ -107,11 +96,10 @@ namespace TechbloxModdingAPI.Input
case 8: currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.HotbarPage8; break;
case 9: currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.HotbarPage9; break;
case 10: currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.HotbarPage10; break;
default: break;
}
//RewiredConsts.Action
if (quickSave) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.QuickSave;
if (paste) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.PasteSelection;
if (paste) currentInput.guiMask |= RobocraftX.Common.Input.GuiInput.SelectLastCopiedBlueprint;
}
public static void ActionInput(uint playerID = uint.MaxValue, bool toggleMode = false, bool forward = false, bool backward = false, bool up = false, bool down = false, bool left = false, bool right = false, bool sprint = false, bool toggleFly = false, bool alt = false, bool primary = false, bool secondary = false, bool tertiary = false, bool primaryHeld = false, bool secondaryHeld = false, bool toggleUnitGrid = false, bool ctrl = false, bool toggleColourMode = false, bool scaleBlockUp = false, bool scaleBlockDown = false, bool rotateBlockClockwise = false, bool rotateBlockCounterclockwise = false, bool cutSelection = false, bool copySelection = false, bool deleteSelection = false)

View file

@ -30,12 +30,12 @@ namespace TechbloxModdingAPI.Input
IsReady = true;
}
public bool SendCustomInput(LocalInputEntityStruct input)
public bool SendCustomInput(LocalCosmeticInputEntityComponent input)
{
EGID egid = CommonExclusiveGroups.GameStateEGID;
if (entitiesDB.Exists<LocalInputEntityStruct>(egid))
if (entitiesDB.Exists<LocalCosmeticInputEntityComponent>(egid))
{
ref LocalInputEntityStruct ies = ref entitiesDB.QueryEntity<LocalInputEntityStruct>(egid);
ref LocalCosmeticInputEntityComponent ies = ref entitiesDB.QueryEntity<LocalCosmeticInputEntityComponent>(egid);
ies = input;
return true;
}
@ -54,14 +54,14 @@ namespace TechbloxModdingAPI.Input
else return false;
}
public LocalInputEntityStruct GetInput()
public LocalCosmeticInputEntityComponent GetInput()
{
EGID egid = CommonExclusiveGroups.GameStateEGID;
if (entitiesDB.Exists<LocalInputEntityStruct>(egid))
if (entitiesDB.Exists<LocalCosmeticInputEntityComponent>(egid))
{
return entitiesDB.QueryEntity<LocalInputEntityStruct>(egid);
return entitiesDB.QueryEntity<LocalCosmeticInputEntityComponent>(egid);
}
else return default(LocalInputEntityStruct);
else return default(LocalCosmeticInputEntityComponent);
}
public LocalPlayerInputEntityStruct GetPlayerInput(uint playerID, bool remote = false)
@ -74,10 +74,10 @@ namespace TechbloxModdingAPI.Input
else return default;
}
public ref LocalInputEntityStruct GetInputRef()
public ref LocalCosmeticInputEntityComponent GetInputRef()
{
EGID egid = CommonExclusiveGroups.GameStateEGID;
return ref entitiesDB.QueryEntity<LocalInputEntityStruct>(egid);
return ref entitiesDB.QueryEntity<LocalCosmeticInputEntityComponent>(egid);
}
public ref LocalPlayerInputEntityStruct GetPlayerInputRef(uint playerID, bool remote = false)

View file

@ -25,7 +25,7 @@ namespace TechbloxModdingAPI.Interface.IMGUI
/*if (Constants.Default == null) return;
if (Constants.Default.box == null) return;*/
GUIStyle guiStyle = Constants.Default.box;
UIElement[] elems = elements.ToArrayFast(out uint count);
UIElement[] elems = elements.ToArrayFast(out int count);
if (automaticLayout)
{
GUILayout.BeginArea(Box, guiStyle);
@ -132,7 +132,7 @@ namespace TechbloxModdingAPI.Interface.IMGUI
{
if (index < 0 || index >= elements.count) return false;
IMGUIManager.AddElement(elements[index]); // re-add to global manager
elements.RemoveAt(index);
elements.RemoveAt((uint) index);
return true;
}
@ -143,7 +143,7 @@ namespace TechbloxModdingAPI.Interface.IMGUI
/// <returns>The element's index, or -1 if not found.</returns>
public int IndexOf(UIElement element)
{
UIElement[] elems = elements.ToArrayFast(out uint count);
UIElement[] elems = elements.ToArrayFast(out int count);
for (int i = 0; i < count; i++)
{
if (elems[i].Name == element.Name)

View file

@ -26,7 +26,7 @@ namespace TechbloxModdingAPI.Persistence
SerializerManager.RegisterSerializers(SaveAndLoadCompositionRootPatch.currentEnginesRoot);
uint originalPos = ____serializationData.dataPos;
Logging.MetaDebugLog($"dataPos: {originalPos}");
BinaryBufferReader bbr = new BinaryBufferReader(____bytesStream.ToArrayFast(out uint count), ____serializationData.dataPos);
BinaryBufferReader bbr = new BinaryBufferReader(____bytesStream.ToArrayFast(out int count), ____serializationData.dataPos);
byte[] frameBuffer = new byte[frameStart.Length];
Logging.MetaDebugLog($"serial data count: {____serializationData.data.count} capacity: {____serializationData.data.capacity}");
int i = 0;

View file

@ -26,7 +26,7 @@ namespace TechbloxModdingAPI.Persistence
return;
}
serializationData.data.ExpandBy((uint)frameStart.Length);
BinaryBufferWriter bbw = new BinaryBufferWriter(serializationData.data.ToArrayFast(out uint buffLen), serializationData.dataPos);
BinaryBufferWriter bbw = new BinaryBufferWriter(serializationData.data.ToArrayFast(out int buffLen), serializationData.dataPos);
uint originalPos = serializationData.dataPos;
Logging.MetaDebugLog($"dataPos: {originalPos}");
// Add frame start so it's easier to find TechbloxModdingAPI-serialized components

View file

@ -32,7 +32,7 @@ namespace TechbloxModdingAPI.Persistence
public bool Deserialize(ref ISerializationData serializationData, IEntitySerialization entitySerializer)
{
BinaryBufferReader bbr = new BinaryBufferReader(serializationData.data.ToArrayFast(out uint count), serializationData.dataPos);
BinaryBufferReader bbr = new BinaryBufferReader(serializationData.data.ToArrayFast(out int count), serializationData.dataPos);
uint entityCount = bbr.ReadUint();
serializationData.dataPos = bbr.Position;
for (uint i = 0; i < entityCount; i++)
@ -47,7 +47,7 @@ namespace TechbloxModdingAPI.Persistence
public bool Serialize(ref ISerializationData serializationData, EntitiesDB entitiesDB, IEntitySerialization entitySerializer)
{
serializationData.data.ExpandBy(4u);
BinaryBufferWriter bbw = new BinaryBufferWriter(serializationData.data.ToArrayFast(out uint count), serializationData.dataPos);
BinaryBufferWriter bbw = new BinaryBufferWriter(serializationData.data.ToArrayFast(out int count), serializationData.dataPos);
EGID[] toSerialize = getEntitiesToSerialize(entitiesDB);
bbw.Write((uint)toSerialize.Length);
serializationData.dataPos = bbw.Position;

View file

@ -6,8 +6,8 @@ using RobocraftX.Common;
using RobocraftX.Common.Players;
using RobocraftX.Physics;
using Svelto.ECS;
using Techblox.BuildingDrone;
using Techblox.Camera;
using Techblox.FlyCam;
using TechbloxModdingAPI.Blocks;
using TechbloxModdingAPI.Players;
using TechbloxModdingAPI.Utility;
@ -141,10 +141,10 @@ namespace TechbloxModdingAPI
public float3 Rotation
{
get => ((Quaternion) (GameState.IsBuildMode()
? playerEngine.GetCameraStruct<CharacterCameraEntityStruct>(Id).Get().rotation
? playerEngine.GetCameraStruct<CameraEntityStruct>(Id).Get().rotation
: playerEngine.GetCharacterStruct<RigidBodyEntityStruct>(Id).Get().rotation)).eulerAngles;
set => _ = GameState.IsBuildMode()
? playerEngine.GetCameraStruct<CharacterCameraEntityStruct>(Id).Get().rotation = quaternion.Euler(value)
? playerEngine.GetCameraStruct<CameraEntityStruct>(Id).Get().rotation = quaternion.Euler(value)
: playerEngine.GetCharacterStruct<RigidBodyEntityStruct>(Id).Get().rotation = quaternion.Euler(value);
}
@ -349,7 +349,7 @@ namespace TechbloxModdingAPI
/// The player's mode in time stopped mode, determining what they place.
/// </summary>
public PlayerBuildingMode BuildingMode => (PlayerBuildingMode) playerEngine
.GetCharacterStruct<PlayerInputTimeStoppedContextStruct>(Id).Get().timeStoppedContext;
.GetCharacterStruct<TimeStoppedModeComponent>(Id).Get().timeStoppedContext;
/// <summary>
/// Whether the player is sprinting.
@ -357,10 +357,10 @@ namespace TechbloxModdingAPI
public bool Sprinting
{
get => GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementComponent>(Id).Get().sprinting
? playerEngine.GetCharacterStruct<BuildingDroneMovementComponent>(Id).Get().sprinting
: playerEngine.GetCharacterStruct<CharacterMovementEntityStruct>(Id).Get().isSprinting;
set => _ = GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementComponent>(Id).Get().sprinting = value
? playerEngine.GetCharacterStruct<BuildingDroneMovementComponent>(Id).Get().sprinting = value
: playerEngine.GetCharacterStruct<CharacterMovementEntityStruct>(Id).Get().isSprinting = value;
}
@ -370,10 +370,10 @@ namespace TechbloxModdingAPI
public float SpeedSetting
{
get => GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementSettingsComponent>(Id).Get().speed
? playerEngine.GetCharacterStruct<BuildingDroneMovementSettingsComponent>(Id).Get().speed
: playerEngine.GetCharacterStruct<CharacterMovementSettingsEntityStruct>(Id).Get().moveSpeed;
set => _ = GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementSettingsComponent>(Id).Get().speed = value
? playerEngine.GetCharacterStruct<BuildingDroneMovementSettingsComponent>(Id).Get().speed = value
: playerEngine.GetCharacterStruct<CharacterMovementSettingsEntityStruct>(Id).Get().moveSpeed = value;
}
@ -383,10 +383,10 @@ namespace TechbloxModdingAPI
public float SpeedSprintMultiplierSetting
{
get => GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementSettingsComponent>(Id).Get().speedSprintMultiplier
? playerEngine.GetCharacterStruct<BuildingDroneMovementSettingsComponent>(Id).Get().speedSprintMultiplier
: playerEngine.GetCharacterStruct<CharacterMovementSettingsEntityStruct>(Id).Get().sprintSpeedMultiplier;
set => _ = GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementSettingsComponent>(Id).Get().speedSprintMultiplier = value
? playerEngine.GetCharacterStruct<BuildingDroneMovementSettingsComponent>(Id).Get().speedSprintMultiplier = value
: playerEngine.GetCharacterStruct<CharacterMovementSettingsEntityStruct>(Id).Get().sprintSpeedMultiplier = value;
}
@ -396,10 +396,10 @@ namespace TechbloxModdingAPI
public float AccelerationSetting
{
get => GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementSettingsComponent>(Id).Get().acceleration
? playerEngine.GetCharacterStruct<BuildingDroneMovementSettingsComponent>(Id).Get().acceleration
: playerEngine.GetCharacterStruct<CharacterMovementSettingsEntityStruct>(Id).Get().acceleration;
set => _ = GameState.IsBuildMode()
? playerEngine.GetCharacterStruct<FlyCamMovementSettingsComponent>(Id).Get().acceleration = value
? playerEngine.GetCharacterStruct<BuildingDroneMovementSettingsComponent>(Id).Get().acceleration = value
: playerEngine.GetCharacterStruct<CharacterMovementSettingsEntityStruct>(Id).Get().acceleration = value;
}

View file

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using RobocraftX.Character;
using RobocraftX.Character.Movement;
@ -13,13 +10,10 @@ using RobocraftX.Blocks.Ghost;
using Gamecraft.GUI.HUDFeedbackBlocks;
using Svelto.ECS;
using Techblox.Camera;
using Techblox.FlyCam;
using Unity.Mathematics;
using Unity.Physics;
using UnityEngine;
using HarmonyLib;
using RobocraftX.Common;
using Svelto.ECS.DataStructures;
using Techblox.BuildingDrone;
using TechbloxModdingAPI.Engines;
using TechbloxModdingAPI.Utility;
@ -140,7 +134,7 @@ namespace TechbloxModdingAPI.Players
{
group = default;
if (GameState.IsBuildMode())
return entitiesDB.QueryEntityOptional<T>(new EGID(playerId, Techblox.FlyCam.FlyCam.Group));
return entitiesDB.QueryEntityOptional<T>(new EGID(playerId, LocalBuildingDrone.BuildGroup));
var characterGroups = CharacterExclusiveGroups.AllCharacters;
for (int i = 0; i < characterGroups.count; i++)
@ -167,14 +161,14 @@ namespace TechbloxModdingAPI.Players
public OptionalRef<T> GetCameraStruct<T>(uint playerId) where T : unmanaged, IEntityComponent
{
return entitiesDB.QueryEntityOptional<T>(new EGID(playerId, CameraExclusiveGroups.CameraGroup));
return entitiesDB.QueryEntityOptional<T>(new EGID(playerId, CameraExclusiveGroups.PhysicCameraGroup));
}
public EGID GetThingLookedAt(uint playerId, float maxDistance = -1f)
{
var opt = GetCameraStruct<CharacterCameraRayCastEntityStruct>(playerId);
var opt = GetCameraStruct<PhysicCameraRayCastEntityStruct>(playerId);
if (!opt) return EGID.Empty;
CharacterCameraRayCastEntityStruct rayCast = opt;
PhysicCameraRayCastEntityStruct rayCast = opt;
float distance = maxDistance < 0
? GhostBlockUtils.GetBuildInteractionDistance(entitiesDB, rayCast,
GhostBlockUtils.GhostCastMethod.GhostCastProportionalToBlockSize)

View file

@ -72,6 +72,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\DDNA.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\DDNA.dll</HintPath>
</Reference>
<Reference Include="EOSSDK">
<HintPath>..\ref\TechbloxPreview_Data\Managed\EOSSDK.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\EOSSDK.dll</HintPath>
</Reference>
<Reference Include="FMODUnity">
<HintPath>..\ref\TechbloxPreview_Data\Managed\FMODUnity.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\FMODUnity.dll</HintPath>
@ -92,6 +96,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.BlockEntityFactory.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.BlockEntityFactory.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.BlockGroups">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.BlockGroups.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.BlockGroups.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.Blocks.DamagingSurfaceBlock">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.Blocks.DamagingSurfaceBlock.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.Blocks.DamagingSurfaceBlock.dll</HintPath>
@ -144,6 +152,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.Damage.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.Damage.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.Effects">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.Effects.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.Effects.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.ExplosionFragments">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.ExplosionFragments.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.ExplosionFragments.dll</HintPath>
@ -196,6 +208,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.ModeBar.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.ModeBar.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.GUI.OptionsScreen">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.OptionsScreen.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.OptionsScreen.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.GUI.TabsBar.Blocks">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.TabsBar.Blocks.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.TabsBar.Blocks.dll</HintPath>
@ -252,74 +268,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.PerformanceWarnings.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.PerformanceWarnings.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.BlockGroups">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.BlockGroups.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.BlockGroups.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.Effects">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.Effects.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.Effects.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.GUI.OptionsScreen">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.OptionsScreen.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.GUI.OptionsScreen.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.PickupBlck">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.PickupBlck.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.PickupBlck.dll</HintPath>
</Reference>
<Reference Include="Havok.Physics.Hybrid">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Havok.Physics.Hybrid.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Havok.Physics.Hybrid.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.Blocks.Ghost">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.Ghost.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.Ghost.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.Inventory.ColourInventory">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.ColourInventory.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.ColourInventory.dll</HintPath>
</Reference>
<Reference Include="Robocraftx.ObjectIdBlocks">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Robocraftx.ObjectIdBlocks.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Robocraftx.ObjectIdBlocks.dll</HintPath>
</Reference>
<Reference Include="StringFormatter">
<HintPath>..\ref\TechbloxPreview_Data\Managed\StringFormatter.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\StringFormatter.dll</HintPath>
</Reference>
<Reference Include="Techblox.FlyCam">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.FlyCam.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.FlyCam.dll</HintPath>
</Reference>
<Reference Include="Unity.Addressables">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Addressables.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Addressables.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics.Extensions">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.Extensions.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.Extensions.dll</HintPath>
</Reference>
<Reference Include="Unity.ResourceManager">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.ResourceManager.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.ResourceManager.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteShapeModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UmbraModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.UmbraModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.UmbraModule.dll</HintPath>
</Reference>
<Reference Include="Gamecraft.PickupsCommon">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Gamecraft.PickupsCommon.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Gamecraft.PickupsCommon.dll</HintPath>
@ -380,6 +332,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Havok.Physics.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Havok.Physics.dll</HintPath>
</Reference>
<Reference Include="Havok.Physics.Hybrid">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Havok.Physics.Hybrid.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Havok.Physics.Hybrid.dll</HintPath>
</Reference>
<Reference Include="JWT">
<HintPath>..\ref\TechbloxPreview_Data\Managed\JWT.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\JWT.dll</HintPath>
@ -432,6 +388,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.Blocks.Ghost">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.Ghost.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.Ghost.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.Blocks.Triggers">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.Triggers.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.Blocks.Triggers.dll</HintPath>
@ -484,6 +444,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.BlocksInventory.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.BlocksInventory.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.Inventory.ColourInventory">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.ColourInventory.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.ColourInventory.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.GUI.Inventory">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.GUI.Inventory.dll</HintPath>
@ -540,6 +504,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.MultiplayerInput.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.MultiplayerInput.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.ObjectIdBlocks">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.ObjectIdBlocks.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.ObjectIdBlocks.dll</HintPath>
</Reference>
<Reference Include="RobocraftX.Party">
<HintPath>..\ref\TechbloxPreview_Data\Managed\RobocraftX.Party.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\RobocraftX.Party.dll</HintPath>
@ -600,6 +568,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\SpecializedDescriptors.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\SpecializedDescriptors.dll</HintPath>
</Reference>
<Reference Include="StringFormatter">
<HintPath>..\ref\TechbloxPreview_Data\Managed\StringFormatter.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\StringFormatter.dll</HintPath>
</Reference>
<Reference Include="Svelto.Common">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Svelto.Common.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Svelto.Common.dll</HintPath>
@ -620,6 +592,14 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.AutoForward.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.AutoForward.dll</HintPath>
</Reference>
<Reference Include="Techblox.Backend">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Backend.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Backend.dll</HintPath>
</Reference>
<Reference Include="Techblox.BuildingDrone">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.BuildingDrone.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.BuildingDrone.dll</HintPath>
</Reference>
<Reference Include="Techblox.Camera">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Camera.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Camera.dll</HintPath>
@ -632,6 +612,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Environment.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Environment.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Hotbar.Materials">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Hotbar.Materials.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Hotbar.Materials.dll</HintPath>
@ -644,10 +628,22 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Inventory.Materials.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Inventory.Materials.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Login">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Login.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Login.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.MyGamesScreen">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.MyGamesScreen.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.MyGamesScreen.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Notifications">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Notifications.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Notifications.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.Notifications.MockUps">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Notifications.MockUps.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.Notifications.MockUps.dll</HintPath>
</Reference>
<Reference Include="Techblox.GUI.TabsBar.Materials">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.TabsBar.Materials.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.GUI.TabsBar.Materials.dll</HintPath>
@ -660,6 +656,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Pointer.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Pointer.dll</HintPath>
</Reference>
<Reference Include="Techblox.Services.Eos">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.Services.Eos.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.Services.Eos.dll</HintPath>
</Reference>
<Reference Include="Techblox.SwitchAnimation">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Techblox.SwitchAnimation.dll</HintPath>
@ -688,6 +688,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\UniTask.TextMeshPro.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UniTask.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="Unity.Addressables">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Addressables.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Addressables.dll</HintPath>
</Reference>
<Reference Include="Unity.Burst.Cecil">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Burst.Cecil.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Burst.Cecil.dll</HintPath>
@ -744,6 +748,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics.Extensions">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.Extensions.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.Extensions.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics.Extensions.Hybrid">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.Extensions.Hybrid.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Mathematics.Extensions.Hybrid.dll</HintPath>
@ -796,6 +804,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll</HintPath>
</Reference>
<Reference Include="Unity.ResourceManager">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.ResourceManager.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.ResourceManager.dll</HintPath>
</Reference>
<Reference Include="Unity.Scenes">
<HintPath>..\ref\TechbloxPreview_Data\Managed\Unity.Scenes.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\Unity.Scenes.dll</HintPath>
@ -852,6 +864,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClothModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.ClothModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.ClothModule.dll</HintPath>
@ -904,6 +920,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
@ -956,6 +976,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.SpriteMaskModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.SpriteMaskModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteShapeModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StreamingModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.StreamingModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.StreamingModule.dll</HintPath>
@ -1008,6 +1032,10 @@
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.UIModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UmbraModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.UmbraModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.UmbraModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UNETModule">
<HintPath>..\ref\TechbloxPreview_Data\Managed\UnityEngine.UNETModule.dll</HintPath>
<HintPath>..\..\ref\TechbloxPreview_Data\Managed\UnityEngine.UNETModule.dll</HintPath>

View file

@ -267,7 +267,7 @@ namespace TechbloxModdingAPI.Tests
if (UnityEngine.Input.GetKeyDown(KeyCode.End))
{
Console.WriteLine("Pressed button to toggle console");
FakeInput.CustomInput(new LocalInputEntityStruct {commandLineToggleInput = true});
FakeInput.CustomInput(new LocalCosmeticInputEntityComponent {commandLineToggleInput = true});
}
}