diff --git a/GamecraftModdingAPI/Block.cs b/GamecraftModdingAPI/Block.cs
index f63e96c..408304d 100644
--- a/GamecraftModdingAPI/Block.cs
+++ b/GamecraftModdingAPI/Block.cs
@@ -139,6 +139,7 @@ namespace GamecraftModdingAPI
CommonExclusiveGroups.BUILD_LOOPEDSFX_BLOCK_GROUP
}
},
+ {typeof(DampedSpring), new [] {CommonExclusiveGroups.BUILD_DAMPEDSPRING_BLOCK_GROUP}},
{typeof(TextBlock), new[] {CommonExclusiveGroups.BUILD_TEXT_BLOCK_GROUP}},
{typeof(Timer), new[] {CommonExclusiveGroups.BUILD_TIMER_BLOCK_GROUP}}
};
@@ -372,11 +373,13 @@ namespace GamecraftModdingAPI
/// Returns the rigid body of the chunk of blocks this one belongs to during simulation.
/// Can be used to apply forces or move the block around while the simulation is running.
///
- /// The SimBody of the chunk or null if the block doesn't exist.
+ /// The SimBody of the chunk or null if the block doesn't exist or not in simulation mode.
public SimBody GetSimBody()
{
return BlockEngine.GetBlockInfo(this,
- (GridConnectionsEntityStruct st) => new SimBody(st.machineRigidBodyId, st.clusterId));
+ (GridConnectionsEntityStruct st) => st.machineRigidBodyId != uint.MaxValue
+ ? new SimBody(st.machineRigidBodyId, st.clusterId)
+ : null);
}
private void OnPlacedInit(object sender, BlockPlacedRemovedEventArgs e)
diff --git a/GamecraftModdingAPI/Blocks/BlockColor.cs b/GamecraftModdingAPI/Blocks/BlockColor.cs
index 46a5dc4..4461f91 100644
--- a/GamecraftModdingAPI/Blocks/BlockColor.cs
+++ b/GamecraftModdingAPI/Blocks/BlockColor.cs
@@ -9,6 +9,10 @@ namespace GamecraftModdingAPI.Blocks
public byte Darkness;
public byte Index;
+ public byte Index => Color == BlockColors.Default
+ ? byte.MaxValue
+ : (byte) (Darkness * 10 + Color);
+
public BlockColor(byte index)
{
if (index == byte.MaxValue)
diff --git a/GamecraftModdingAPI/Blocks/BlockEngine.cs b/GamecraftModdingAPI/Blocks/BlockEngine.cs
index 3a979fe..929a65f 100644
--- a/GamecraftModdingAPI/Blocks/BlockEngine.cs
+++ b/GamecraftModdingAPI/Blocks/BlockEngine.cs
@@ -218,7 +218,7 @@ namespace GamecraftModdingAPI.Blocks
}
}
- return bodies.Select(id => new SimBody(id)).ToArray();
+ return bodies.Select(id => new SimBody(id, cid)).ToArray();
}
public EGID? FindBlockEGID(uint id)
@@ -239,8 +239,8 @@ namespace GamecraftModdingAPI.Blocks
foreach (var (coll, _) in groups)
{
foreach (var conn in coll)
- {
- if (conn.machineRigidBodyId == sbid)
+ { //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);
}
}
@@ -248,6 +248,22 @@ namespace GamecraftModdingAPI.Blocks
return null;
}
+ public Block[] GetBodyBlocks(uint sbid)
+ {
+ var groups = entitiesDB.QueryEntities();
+ var set = new HashSet();
+ foreach (var (coll, _) in groups)
+ {
+ foreach (var conn in coll)
+ {
+ if (conn.machineRigidBodyId == sbid)
+ set.Add(new Block(conn.ID));
+ }
+ }
+
+ return set.ToArray();
+ }
+
#if DEBUG
public EntitiesDB GetEntitiesDB()
{
diff --git a/GamecraftModdingAPI/Blocks/DampedSpring.cs b/GamecraftModdingAPI/Blocks/DampedSpring.cs
new file mode 100644
index 0000000..96e628d
--- /dev/null
+++ b/GamecraftModdingAPI/Blocks/DampedSpring.cs
@@ -0,0 +1,48 @@
+using RobocraftX.Blocks;
+using RobocraftX.Common;
+using Svelto.ECS;
+
+namespace GamecraftModdingAPI.Blocks
+{
+ public class DampedSpring : Block
+ {
+ public DampedSpring(EGID id) : base(id)
+ {
+ }
+
+ public DampedSpring(uint id) : base(new EGID(id, CommonExclusiveGroups.BUILD_DAMPEDSPRING_BLOCK_GROUP))
+ {
+ }
+
+ ///
+ /// The spring's maximum force. This is known as Stiffness in-game
+ ///
+ public float MaxForce
+ {
+ get => BlockEngine.GetBlockInfo(this, (DampedSpringReadOnlyStruct dsrs) => dsrs.maxForce);
+
+ set => BlockEngine.SetBlockInfo(this,
+ (ref DampedSpringReadOnlyStruct dsrs, float val) => dsrs.maxForce = val, value);
+ }
+
+ ///
+ /// Alias of MaxForce.
+ ///
+ public float Stiffness
+ {
+ get => MaxForce;
+ set => MaxForce = value;
+ }
+
+ ///
+ /// The spring's maximum damping force.
+ ///
+ public float Damping
+ {
+ get => BlockEngine.GetBlockInfo(this, (LinearJointForcesReadOnlyStruct ljf) => ljf.dampingForceMagnitude);
+
+ set => BlockEngine.SetBlockInfo(this,
+ (ref LinearJointForcesReadOnlyStruct ljf, float val) => ljf.dampingForceMagnitude = val, value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/GamecraftModdingAPI/Blocks/TextBlock.cs b/GamecraftModdingAPI/Blocks/TextBlock.cs
index ea5e089..e696dda 100644
--- a/GamecraftModdingAPI/Blocks/TextBlock.cs
+++ b/GamecraftModdingAPI/Blocks/TextBlock.cs
@@ -31,6 +31,7 @@ namespace GamecraftModdingAPI.Blocks
set
{
+ if (value == null) value = "";
BlockEngine.SetBlockInfo(this, (ref TextBlockDataStruct tbds, string val) =>
{
if (val == null) val = "";
@@ -51,6 +52,7 @@ namespace GamecraftModdingAPI.Blocks
set
{
+ if (value == null) value = "";
BlockEngine.SetBlockInfo(this, (ref TextBlockDataStruct tbds, string val) =>
tbds.textBlockID.Set(val), value);
BlockEngine.SetBlockInfo(this,
diff --git a/GamecraftModdingAPI/Cluster.cs b/GamecraftModdingAPI/Cluster.cs
index 074c26c..79b5822 100644
--- a/GamecraftModdingAPI/Cluster.cs
+++ b/GamecraftModdingAPI/Cluster.cs
@@ -6,6 +6,7 @@ namespace GamecraftModdingAPI
{
///
/// Represnts a cluster of blocks in time running mode, meaning blocks that are connected either directly or via joints.
+ /// Only exists if a cluster destruction manager is present. Static blocks like grass and dirt aren't part of a cluster.
///
public class Cluster
{
@@ -37,5 +38,37 @@ namespace GamecraftModdingAPI
get => Block.BlockEngine.GetBlockInfo(Id).healthMultiplier;
set => Block.BlockEngine.GetBlockInfo(Id).healthMultiplier = value;
}
+
+ ///
+ /// Returns the simulation-time rigid bodies for the chunks in this cluster.
+ ///
+ /// An array of sim-bodies
+ public SimBody[] GetSimBodies()
+ {
+ return Block.BlockEngine.GetClusterBodies(Id.entityID);
+ }
+
+ public override string ToString()
+ {
+ return $"{nameof(Id)}: {Id}";
+ }
+
+ protected bool Equals(Cluster other)
+ {
+ return Id.Equals(other.Id);
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != this.GetType()) return false;
+ return Equals((Cluster) obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return Id.GetHashCode();
+ }
}
}
\ No newline at end of file
diff --git a/GamecraftModdingAPI/GamecraftModdingAPI.csproj b/GamecraftModdingAPI/GamecraftModdingAPI.csproj
index 193a14f..59de2af 100644
--- a/GamecraftModdingAPI/GamecraftModdingAPI.csproj
+++ b/GamecraftModdingAPI/GamecraftModdingAPI.csproj
@@ -2,7 +2,7 @@
net472
true
- 1.6.0-preview
+ 1.7.0
Exmods
GNU General Public Licence 3+
https://git.exmods.org/modtainers/GamecraftModdingAPI
@@ -23,18 +23,13 @@
-
-
+
-
- ..\ref\GamecraftPreview_Data\Managed\IllusionInjector.dll
- ..\..\ref\GamecraftPreview_Data\Managed\IllusionInjector.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\IllusionPlugin.dll
- ..\..\ref\GamecraftPreview_Data\Managed\IllusionPlugin.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Accessibility.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Accessibility.dll
..\ref\GamecraftPreview_Data\Managed\Analytics.dll
@@ -80,14 +75,14 @@
..\ref\GamecraftPreview_Data\Managed\DDNA.dll
..\..\ref\GamecraftPreview_Data\Managed\DDNA.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Facepunch.Steamworks.Win64.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Facepunch.Steamworks.Win64.dll
+
..\ref\GamecraftPreview_Data\Managed\FMOD.dll
..\..\ref\GamecraftPreview_Data\Managed\FMOD.dll
-
- ..\ref\GamecraftPreview_Data\Managed\FullGame.dll
- ..\..\ref\GamecraftPreview_Data\Managed\FullGame.dll
-
..\ref\GamecraftPreview_Data\Managed\Gamecraft.AudioBlocks.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.AudioBlocks.dll
@@ -100,6 +95,10 @@
..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlockEntityFactory.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlockEntityFactory.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlockGroups.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlockGroups.dll
+
..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.ConsoleBlock.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.ConsoleBlock.dll
@@ -116,6 +115,10 @@
..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.GenericPhysicsBlocks.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.GenericPhysicsBlocks.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.LightBlock.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.LightBlock.dll
+
..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.LogicBlock.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.LogicBlock.dll
@@ -132,10 +135,6 @@
..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.TimerBlock.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.Blocks.TimerBlock.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlocksEntityDescriptors.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlocksEntityDescriptors.dll
-
..\ref\GamecraftPreview_Data\Managed\Gamecraft.CharacterVulnerability.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.CharacterVulnerability.dll
@@ -144,6 +143,10 @@
..\ref\GamecraftPreview_Data\Managed\Gamecraft.CharacterVulnerabilityGui.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.CharacterVulnerabilityGui.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.ColourPalette.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.ColourPalette.dll
+
..\ref\GamecraftPreview_Data\Managed\Gamecraft.Damage.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.Damage.dll
@@ -160,18 +163,70 @@
..\ref\GamecraftPreview_Data\Managed\Gamecraft.GraphicsSettings.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GraphicsSettings.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.BlueprintInventory.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.BlueprintInventory.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.BlueprintInventoryMock.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.BlueprintInventoryMock.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Blueprints.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Blueprints.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.BlueprintSets.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.BlueprintSets.dll
+
..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.ConsoleBlock.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.ConsoleBlock.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.GraphicsScreen.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.GraphicsScreen.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.GameOptionsScreen.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.GameOptionsScreen.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Hotbar.Blocks.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Hotbar.Blocks.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Hotbar.Colours.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Hotbar.Colours.dll
..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.HUDFeedbackBlocks.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.HUDFeedbackBlocks.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.ModeBar.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.ModeBar.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.OptionsScreen.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.OptionsScreen.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Blocks.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Blocks.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Blueprints.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Blueprints.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Colours.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Colours.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Common.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TabsBar.Common.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TimeModeClock.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.TimeModeClock.dll
+
..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Tweaks.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.Tweaks.dll
@@ -188,6 +243,66 @@
..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.WorldSpaceGuis.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.WorldSpaceGuis.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\FullGame.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\FullGame.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlocksEntityDescriptors.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.BlocksEntityDescriptors.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.GraphicsScreen.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUI.GraphicsScreen.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUIs.Hotbar.BlueprintsHotbar.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.GUIs.Hotbar.BlueprintsHotbar.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\IllusionInjector.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\IllusionInjector.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Common.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Common.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Input.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Input.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Rendering.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Rendering.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Svelto.ECS.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Svelto.ECS.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.DataFlowGraph.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.DataFlowGraph.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Properties.UI.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Properties.UI.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Transforms.Hybrid.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Transforms.Hybrid.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\UnityEngine.TLSModule.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.TLSModule.dll
+
..\ref\GamecraftPreview_Data\Managed\Gamecraft.InventoryTimeRunning.dll
..\..\ref\GamecraftPreview_Data\Managed\Gamecraft.InventoryTimeRunning.dll
@@ -248,6 +363,10 @@
..\ref\GamecraftPreview_Data\Managed\GameState.dll
..\..\ref\GamecraftPreview_Data\Managed\GameState.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\GhostShark.Outline.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\GhostShark.Outline.dll
+
..\ref\GamecraftPreview_Data\Managed\GPUInstancer.dll
..\..\ref\GamecraftPreview_Data\Managed\GPUInstancer.dll
@@ -260,10 +379,26 @@
..\ref\GamecraftPreview_Data\Managed\Havok.Physics.Hybrid.dll
..\..\ref\GamecraftPreview_Data\Managed\Havok.Physics.Hybrid.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\IL3DN_FOG.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\IL3DN_FOG.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\IllusionPlugin.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\IllusionPlugin.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\JWT.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\JWT.dll
+
..\ref\GamecraftPreview_Data\Managed\LZ4.dll
..\..\ref\GamecraftPreview_Data\Managed\LZ4.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\mscorlib.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\mscorlib.dll
+
..\ref\GamecraftPreview_Data\Managed\MultiplayerNetworking.dll
..\..\ref\GamecraftPreview_Data\Managed\MultiplayerNetworking.dll
@@ -272,10 +407,30 @@
..\ref\GamecraftPreview_Data\Managed\MultiplayerTest.dll
..\..\ref\GamecraftPreview_Data\Managed\MultiplayerTest.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\netstandard.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\netstandard.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Newtonsoft.Json.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Newtonsoft.Json.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Novell.Directory.Ldap.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Novell.Directory.Ldap.dll
+
..\ref\GamecraftPreview_Data\Managed\RCX.ScreenshotTaker.dll
..\..\ref\GamecraftPreview_Data\Managed\RCX.ScreenshotTaker.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Rewired_Core.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Rewired_Core.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Rewired_Windows.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Rewired_Windows.dll
+
..\ref\GamecraftPreview_Data\Managed\RobocraftECS.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftECS.dll
@@ -312,10 +467,6 @@
..\ref\GamecraftPreview_Data\Managed\RobocraftX.ClusterToWireConversion.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.ClusterToWireConversion.dll
-
- ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Common.dll
- ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Common.dll
-
..\ref\GamecraftPreview_Data\Managed\RobocraftX.ControlsScreen.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.ControlsScreen.dll
@@ -340,6 +491,22 @@
..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Hotbar.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Hotbar.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Inventory.BlocksInventory.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Inventory.BlocksInventory.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Inventory.ColourInventory.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Inventory.ColourInventory.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Inventory.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.Inventory.dll
+
..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.RemoveBlock.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.RemoveBlock.dll
@@ -348,14 +515,14 @@
..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.ScaleGhost.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.ScaleGhost.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.TabsBar.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUI.TabsBar.dll
+
..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUIs.WorkshopPrefabs.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.GUIs.WorkshopPrefabs.dll
-
- ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Input.dll
- ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Input.dll
-
..\ref\GamecraftPreview_Data\Managed\RobocraftX.MachineEditor.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.MachineEditor.dll
@@ -376,6 +543,10 @@
..\ref\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.GUI.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.GUI.dll
+
..\ref\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.NetworkEntityStream.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Multiplayer.NetworkEntityStream.dll
@@ -408,10 +579,6 @@
..\ref\GamecraftPreview_Data\Managed\RobocraftX.Player.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Player.dll
-
- ..\ref\GamecraftPreview_Data\Managed\RobocraftX.Rendering.dll
- ..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Rendering.dll
-
..\ref\GamecraftPreview_Data\Managed\RobocraftX.Rendering.Mock.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX.Rendering.Mock.dll
@@ -448,9 +615,9 @@
..\ref\GamecraftPreview_Data\Managed\RobocraftX_TextBlock.dll
..\..\ref\GamecraftPreview_Data\Managed\RobocraftX_TextBlock.dll
-
- ..\ref\GamecraftPreview_Data\Managed\RobocratX.SimulationCompositionRoot.dll
- ..\..\ref\GamecraftPreview_Data\Managed\RobocratX.SimulationCompositionRoot.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\RobocratX.SimulationMockCompositionRoot.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\RobocratX.SimulationMockCompositionRoot.dll
..\ref\GamecraftPreview_Data\Managed\SpawningPointCompositionRoot.dll
@@ -468,10 +635,6 @@
..\ref\GamecraftPreview_Data\Managed\Svelto.Common_3.dll
..\..\ref\GamecraftPreview_Data\Managed\Svelto.Common_3.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Svelto.ECS.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Svelto.ECS.dll
-
..\ref\GamecraftPreview_Data\Managed\Svelto.Services.dll
..\..\ref\GamecraftPreview_Data\Managed\Svelto.Services.dll
@@ -480,58 +643,6 @@
..\ref\GamecraftPreview_Data\Managed\Svelto.Tasks.dll
..\..\ref\GamecraftPreview_Data\Managed\Svelto.Tasks.dll
-
- ..\ref\GamecraftPreview_Data\Managed\UltimateDecals.dll
- ..\..\ref\GamecraftPreview_Data\Managed\UltimateDecals.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Addressables.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Addressables.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.Hybrid.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.Hybrid.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.Hybrid.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.Hybrid.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Graph.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Graph.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Hybrid.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Hybrid.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Build.SlimPlayerRuntime.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Build.SlimPlayerRuntime.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Burst.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Burst.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Collections.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Collections.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.DataFlowGraph.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.DataFlowGraph.dll
-
..\ref\GamecraftPreview_Data\Managed\Unity.Deformations.dll
..\..\ref\GamecraftPreview_Data\Managed\Unity.Deformations.dll
@@ -588,10 +699,6 @@
..\ref\GamecraftPreview_Data\Managed\Unity.Properties.Reflection.dll
..\..\ref\GamecraftPreview_Data\Managed\Unity.Properties.Reflection.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Properties.UI.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Properties.UI.dll
-
..\ref\GamecraftPreview_Data\Managed\Unity.RenderPipeline.Universal.ShaderLibrary.dll
..\..\ref\GamecraftPreview_Data\Managed\Unity.RenderPipeline.Universal.ShaderLibrary.dll
@@ -644,66 +751,62 @@
..\ref\GamecraftPreview_Data\Managed\Unity.Transforms.dll
..\..\ref\GamecraftPreview_Data\Managed\Unity.Transforms.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.Transforms.Hybrid.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.Transforms.Hybrid.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\Unity.VisualEffectGraph.Runtime.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Unity.VisualEffectGraph.Runtime.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\UnityEngine.UI.dll
- ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.UI.dll
-
-
- ..\ref\GamecraftPreview_Data\Managed\uREPL.dll
- ..\..\ref\GamecraftPreview_Data\Managed\uREPL.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\UltimateDecals.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\UltimateDecals.dll
-
- ..\ref\GamecraftPreview_Data\Managed\VisualProfiler.dll
- ..\..\ref\GamecraftPreview_Data\Managed\VisualProfiler.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Addressables.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Addressables.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Accessibility.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Accessibility.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Facepunch.Steamworks.Win64.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Facepunch.Steamworks.Win64.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.Hybrid.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Curves.Hybrid.dll
-
- ..\ref\GamecraftPreview_Data\Managed\JWT.dll
- ..\..\ref\GamecraftPreview_Data\Managed\JWT.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.dll
-
- ..\ref\GamecraftPreview_Data\Managed\mscorlib.dll
- ..\..\ref\GamecraftPreview_Data\Managed\mscorlib.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.Hybrid.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.DefaultGraphPipeline.Hybrid.dll
-
- ..\ref\GamecraftPreview_Data\Managed\netstandard.dll
- ..\..\ref\GamecraftPreview_Data\Managed\netstandard.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Newtonsoft.Json.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Newtonsoft.Json.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Graph.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Graph.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Novell.Directory.Ldap.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Novell.Directory.Ldap.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Hybrid.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Animation.Hybrid.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Rewired_Core.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Rewired_Core.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Build.SlimPlayerRuntime.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Build.SlimPlayerRuntime.dll
-
- ..\ref\GamecraftPreview_Data\Managed\Rewired_Windows.dll
- ..\..\ref\GamecraftPreview_Data\Managed\Rewired_Windows.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Burst.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Burst.dll
..\ref\GamecraftPreview_Data\Managed\Unity.Burst.Unsafe.dll
..\..\ref\GamecraftPreview_Data\Managed\Unity.Burst.Unsafe.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.Collections.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.Collections.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\Unity.VisualEffectGraph.Runtime.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\Unity.VisualEffectGraph.Runtime.dll
+
..\ref\GamecraftPreview_Data\Managed\UnityEngine.AccessibilityModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.AccessibilityModule.dll
@@ -756,10 +859,6 @@
..\ref\GamecraftPreview_Data\Managed\UnityEngine.DirectorModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.DirectorModule.dll
-
- ..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll
- ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.dll
-
..\ref\GamecraftPreview_Data\Managed\UnityEngine.DSPGraphModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.DSPGraphModule.dll
@@ -812,10 +911,6 @@
..\ref\GamecraftPreview_Data\Managed\UnityEngine.Physics2DModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.Physics2DModule.dll
-
- ..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll
- ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.PhysicsModule.dll
-
..\ref\GamecraftPreview_Data\Managed\UnityEngine.ProfilerModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.ProfilerModule.dll
@@ -868,9 +963,9 @@
..\ref\GamecraftPreview_Data\Managed\UnityEngine.TilemapModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.TilemapModule.dll
-
- ..\ref\GamecraftPreview_Data\Managed\UnityEngine.TLSModule.dll
- ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.TLSModule.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\UnityEngine.UI.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.UI.dll
..\ref\GamecraftPreview_Data\Managed\UnityEngine.UIElementsModule.dll
@@ -944,6 +1039,14 @@
..\ref\GamecraftPreview_Data\Managed\UnityEngine.XRModule.dll
..\..\ref\GamecraftPreview_Data\Managed\UnityEngine.XRModule.dll
+
+ ..\ref\GamecraftPreview_Data\Managed\uREPL.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\uREPL.dll
+
+
+ ..\ref\GamecraftPreview_Data\Managed\VisualProfiler.dll
+ ..\..\ref\GamecraftPreview_Data\Managed\VisualProfiler.dll
+
\ No newline at end of file
diff --git a/GamecraftModdingAPI/SimBody.cs b/GamecraftModdingAPI/SimBody.cs
index a3f6d55..42812d9 100644
--- a/GamecraftModdingAPI/SimBody.cs
+++ b/GamecraftModdingAPI/SimBody.cs
@@ -17,12 +17,13 @@ namespace GamecraftModdingAPI
public EGID Id { get; }
///
- /// The cluster this chunk belongs to, or null if the chunk doesn't exist. Get the SimBody from a Block if possible for good performance here.
+ /// The cluster this chunk belongs to, or null if no cluster destruction manager present or the chunk doesn't exist.
+ /// Get the SimBody from a Block if possible for good performance here.
///
public Cluster Cluster => cluster ?? (cluster = clusterId == uint.MaxValue ? Block.BlockEngine.GetCluster(Id.entityID) : new Cluster(clusterId));
private Cluster cluster;
- private uint clusterId;
+ private readonly uint clusterId = uint.MaxValue;
public SimBody(EGID id)
{
@@ -120,6 +121,15 @@ namespace GamecraftModdingAPI
return Block.BlockEngine.GetConnectedSimBodies(Id.entityID);
}
+ ///
+ /// The blocks that form this rigid body.
+ ///
+ ///
+ public Block[] GetBlocks()
+ {
+ return Block.BlockEngine.GetBodyBlocks(Id.entityID);
+ }
+
private ref RigidBodyEntityStruct GetStruct()
{
return ref Block.BlockEngine.GetBlockInfo(Id);