Space Engineers
|
Public Member Functions | |
MySlimBlock () | |
void | Init (MyObjectBuilder_CubeBlock objectBuilder, MyCubeGrid cubeGrid, MyCubeBlock fatBlock) |
void | ResumeDamageEffect () |
void | InitOrientation (Base6Directions.Direction Forward, Base6Directions.Direction Up) |
Initializes the orientation of the slim block according to the given forward and up vectors. Note that the resulting orientation can be different than the supplied orientation due to symmetries. This function chooses one canonical orientation for all orientations from one symetry equivalent group of orientations. More... | |
void | InitOrientation (MyBlockOrientation orientation) |
An argument variant of the previous function More... | |
void | InitOrientation (ref Vector3I forward, ref Vector3I up) |
MyObjectBuilder_CubeBlock | GetObjectBuilder () |
MyObjectBuilder_CubeBlock | GetCopyObjectBuilder () |
void | AddNeighbours () |
void | RemoveNeighbours () |
void | UpdateMaxDeformation () |
int | CalculateCurrentModelID () |
string | CalculateCurrentModel (out Matrix orientation) |
void | SpawnFirstItemInConstructionStockpile () |
void | FillConstructionStockpile () |
void | MoveItemsToConstructionStockpile (MyInventoryBase fromInventory) |
void | MoveItemsFromConstructionStockpile (MyInventoryBase toInventory, MyItemFlags flags=MyItemFlags.None) |
Moves items with the given flags from the construction inventory to the character. If the flags are None, all items are moved. More... | |
void | MoveUnneededItemsFromConstructionStockpile (MyInventoryBase toInventory) |
void | ClearConstructionStockpile (MyInventoryBase outputInventory) |
int | GetConstructionStockpileItemAmount (MyDefinitionId id) |
Get the amount of items in the construction stockpile More... | |
void | SetToConstructionSite () |
void | GetMissingComponents (Dictionary< string, int > addToDictionary) |
void | SpawnConstructionStockpile () |
bool | CanContinueBuild (MyInventoryBase sourceInventory) |
void | FixBones (float oldDamage, float maxAllowedBoneMovement) |
bool | DoDamage (float damage, MyStringHash damageType, bool sync, MyHitInfo?hitInfo, long attackerId) |
void | DoDamage (float damage, MyStringHash damageType, MyHitInfo?hitInfo=null, bool addDirtyParts=true, long attackerId=0) |
void | DoDamageInternal (float damage, MyStringHash damageType, bool addDirtyParts=true, MyHitInfo?hitInfo=null, long attackerId=0) |
void | ApplyDestructionDamage (float integrityRatioFromFracturedPieces) |
Destruction does not apply any damage to block (instead triggers destruction) so it is applied through this method when fracture component is created or when any of internal fratures is removed from component. More... | |
void | ApplyAccumulatedDamage (bool addDirtyParts=true, long attackerId=0) |
Do not call explicitly. Will be done automatically by the grid. More... | |
void | UpdateVisual (bool updatePhysics=true) |
void | IncreaseMountLevelToDesiredRatio (float desiredIntegrityRatio, long welderOwnerPlayerId, MyInventoryBase outputInventory=null, float maxAllowedBoneMovement=0.0f, bool isHelping=false, MyOwnershipShareModeEnum sharing=MyOwnershipShareModeEnum.Faction) |
void | DecreaseMountLevelToDesiredRatio (float desiredIntegrityRatio, MyInventoryBase outputInventory) |
void | IncreaseMountLevel (float welderMountAmount, long welderOwnerPlayerId, MyInventoryBase outputInventory=null, float maxAllowedBoneMovement=0.0f, bool isHelping=false, MyOwnershipShareModeEnum sharing=MyOwnershipShareModeEnum.Faction) |
void | DecreaseMountLevel (float grinderAmount, MyInventoryBase outputInventory, bool useDefaultDeconstructEfficiency=false) |
void | FullyDismount (MyInventory outputInventory) |
Completely deconstruct this block Intended for server-side use More... | |
override string | ToString () |
void | SetIntegrity (float buildIntegrity, float integrity, MyIntegrityChangeEnum integrityChangeType, long grinderOwner) |
void | PlayConstructionSound (MyIntegrityChangeEnum integrityChangeType, bool deconstruction=false) |
Play the construction sound associated with the integrity change More... | |
void | UpgradeBuildLevel () |
Forced change of build progress so that next model is shown. More... | |
void | RandomizeBuildLevel () |
Forced change of build progress to a random value. More... | |
void | ComputeWorldCenter (out Vector3D worldCenter) |
void | ComputeScaledCenter (out Vector3D scaledCenter) |
void | ComputeScaledHalfExtents (out Vector3 scaledHalfExtents) |
float | GetMass () |
void | GetWorldBoundingBox (out BoundingBoxD aabb, bool useAABBFromBlockCubes=false) |
Returns world AABB of the block (geometry AABB). If useAABBFromBlockCubes = true then AABB from block cubes is returned. More... | |
MyFractureComponentCubeBlock | GetFractureComponent () |
void | RepairFracturedBlockWithFullHealth (long toolOwnerId) |
void | SetGeneratedBlockIntegrity (MySlimBlock generatingBlock) |
void | GetLocalMatrix (out Matrix localMatrix) |
void | RemoveAuthorship () |
Makes sure this block no longer counts towards the block limit of the player who built it More... | |
void | AddAuthorship () |
Makes the block count towards the block limit of the player who built it More... | |
void | TransferAuthorship (long newOwner) |
Transfers the block to count towards other player's limit More... | |
![]() | |
void | GetMissingComponents (System.Collections.Generic.Dictionary< string, int > addToDictionary) |
Static Public Member Functions | |
static Vector3I | ComputePositionInGrid (MatrixI localMatrix, MyCubeBlockDefinition blockDefinition, Vector3I min) |
static void | ComputeMax (MyCubeBlockDefinition definition, MyBlockOrientation orientation, ref Vector3I min, out Vector3I max) |
Called when block is destroyed before being removed from grid More... | |
static void | SetBlockComponents (MyHudBlockInfo hudInfo, MySlimBlock block, MyInventoryBase availableInventory=null) |
static void | SetBlockComponents (MyHudBlockInfo hudInfo, MyCubeBlockDefinition blockDefinition, MyInventoryBase availableInventory=null) |
Public Attributes | |
MyCubeBlockDefinition | BlockDefinition |
Vector3I | Min |
Vector3I | Max |
MyBlockOrientation | Orientation = MyBlockOrientation.Identity |
Vector3I | Position |
float | BlockGeneralDamageModifier = 1f |
Vector3 | ColorMaskHSV |
float | Dithering = 0 |
bool | UsesDeformation = true |
float | DeformationRatio = 1.0f |
bool | HasPhysics = true |
List< MySlimBlock > | Neighbours = new List<MySlimBlock>() |
Neighbours which are connected by mount points More... | |
float | m_lastDamage = 0f |
long | m_lastAttackerId = 0 |
MyStringHash | m_lastDamageType = MyDamageType.Unknown |
MyMultiBlockDefinition | MultiBlockDefinition |
Multiblock definition which the block was created from or null. More... | |
int | MultiBlockId |
Multiblock unique identifier (all blocks in a multiblock have the same identifier). 0 means single block (default). Unique in one grid. More... | |
int | MultiBlockIndex = -1 |
Index of block in multiblock definition. More... | |
List< Vector3I > | DisconnectFaces = new List<Vector3I>() |
Events | |
Action< MySlimBlock, MyCubeGrid > | CubeGridChanged |
Definition at line 40 of file MySlimBlock.cs.
|
inline |
Definition at line 334 of file MySlimBlock.cs.
|
inline |
Makes the block count towards the block limit of the player who built it
Definition at line 2484 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 546 of file MySlimBlock.cs.
|
inline |
Do not call explicitly. Will be done automatically by the grid.
Definition at line 1339 of file MySlimBlock.cs.
|
inline |
Destruction does not apply any damage to block (instead triggers destruction) so it is applied through this method when fracture component is created or when any of internal fratures is removed from component.
Definition at line 1260 of file MySlimBlock.cs.
|
inline |
Definition at line 742 of file MySlimBlock.cs.
|
inline |
Definition at line 724 of file MySlimBlock.cs.
|
inline |
Definition at line 1069 of file MySlimBlock.cs.
|
inline |
Definition at line 906 of file MySlimBlock.cs.
|
inlinestatic |
Called when block is destroyed before being removed from grid
Definition at line 1783 of file MySlimBlock.cs.
|
inlinestatic |
Definition at line 767 of file MySlimBlock.cs.
|
inline |
Definition at line 1967 of file MySlimBlock.cs.
|
inline |
Definition at line 1972 of file MySlimBlock.cs.
|
inline |
Definition at line 1960 of file MySlimBlock.cs.
|
inline |
Definition at line 1573 of file MySlimBlock.cs.
|
inline |
Definition at line 1440 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.Interfaces.IMyDestroyableObject.
Definition at line 1104 of file MySlimBlock.cs.
|
inline |
Definition at line 1120 of file MySlimBlock.cs.
|
inline |
Definition at line 1154 of file MySlimBlock.cs.
|
inline |
Definition at line 802 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 1078 of file MySlimBlock.cs.
|
inline |
Completely deconstruct this block Intended for server-side use
Definition at line 1670 of file MySlimBlock.cs.
|
inline |
Get the amount of items in the construction stockpile
id | Definition of component in stockpile to check |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 994 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 502 of file MySlimBlock.cs.
|
inline |
Definition at line 2283 of file MySlimBlock.cs.
|
inline |
Definition at line 2411 of file MySlimBlock.cs.
|
inline |
Definition at line 1977 of file MySlimBlock.cs.
|
inline |
Definition at line 1006 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 497 of file MySlimBlock.cs.
|
inline |
Returns world AABB of the block (geometry AABB). If useAABBFromBlockCubes = true then AABB from block cubes is returned.
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 2033 of file MySlimBlock.cs.
|
inline |
Definition at line 1456 of file MySlimBlock.cs.
|
inline |
Definition at line 1428 of file MySlimBlock.cs.
|
inline |
Definition at line 340 of file MySlimBlock.cs.
|
inline |
Initializes the orientation of the slim block according to the given forward and up vectors. Note that the resulting orientation can be different than the supplied orientation due to symmetries. This function chooses one canonical orientation for all orientations from one symetry equivalent group of orientations.
Definition at line 460 of file MySlimBlock.cs.
|
inline |
An argument variant of the previous function
Definition at line 481 of file MySlimBlock.cs.
|
inline |
Definition at line 489 of file MySlimBlock.cs.
|
inline |
Moves items with the given flags from the construction inventory to the character. If the flags are None, all items are moved.
Definition at line 859 of file MySlimBlock.cs.
|
inline |
Definition at line 826 of file MySlimBlock.cs.
|
inline |
Definition at line 884 of file MySlimBlock.cs.
|
inline |
Play the construction sound associated with the integrity change
integrityChangeType | Type of integrity change |
deconstruction | Is this deconstruction? |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 1847 of file MySlimBlock.cs.
|
inline |
Forced change of build progress to a random value.
Definition at line 1919 of file MySlimBlock.cs.
|
inline |
Makes sure this block no longer counts towards the block limit of the player who built it
Definition at line 2474 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 685 of file MySlimBlock.cs.
|
inline |
Definition at line 2321 of file MySlimBlock.cs.
|
inline |
Definition at line 443 of file MySlimBlock.cs.
|
inlinestatic |
Definition at line 2048 of file MySlimBlock.cs.
|
inlinestatic |
Definition at line 2053 of file MySlimBlock.cs.
|
inline |
Definition at line 2397 of file MySlimBlock.cs.
|
inline |
Definition at line 1792 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 1001 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 1027 of file MySlimBlock.cs.
|
inline |
Implements VRage.Game.ModAPI.IMySlimBlock.
Definition at line 787 of file MySlimBlock.cs.
|
inline |
Definition at line 1765 of file MySlimBlock.cs.
|
inline |
Transfers the block to count towards other player's limit
Definition at line 2494 of file MySlimBlock.cs.
|
inline |
Definition at line 719 of file MySlimBlock.cs.
|
inline |
Definition at line 1396 of file MySlimBlock.cs.
|
inline |
Forced change of build progress so that next model is shown.
Definition at line 1900 of file MySlimBlock.cs.
MyCubeBlockDefinition Sandbox.Game.Entities.Cube.MySlimBlock.BlockDefinition |
Definition at line 86 of file MySlimBlock.cs.
float Sandbox.Game.Entities.Cube.MySlimBlock.BlockGeneralDamageModifier = 1f |
Definition at line 91 of file MySlimBlock.cs.
Vector3 Sandbox.Game.Entities.Cube.MySlimBlock.ColorMaskHSV |
Definition at line 127 of file MySlimBlock.cs.
float Sandbox.Game.Entities.Cube.MySlimBlock.DeformationRatio = 1.0f |
Definition at line 134 of file MySlimBlock.cs.
Definition at line 672 of file MySlimBlock.cs.
float Sandbox.Game.Entities.Cube.MySlimBlock.Dithering = 0 |
Definition at line 128 of file MySlimBlock.cs.
bool Sandbox.Game.Entities.Cube.MySlimBlock.HasPhysics = true |
Definition at line 137 of file MySlimBlock.cs.
long Sandbox.Game.Entities.Cube.MySlimBlock.m_lastAttackerId = 0 |
Definition at line 286 of file MySlimBlock.cs.
float Sandbox.Game.Entities.Cube.MySlimBlock.m_lastDamage = 0f |
Definition at line 284 of file MySlimBlock.cs.
MyStringHash Sandbox.Game.Entities.Cube.MySlimBlock.m_lastDamageType = MyDamageType.Unknown |
Definition at line 288 of file MySlimBlock.cs.
Vector3I Sandbox.Game.Entities.Cube.MySlimBlock.Max |
Definition at line 88 of file MySlimBlock.cs.
Vector3I Sandbox.Game.Entities.Cube.MySlimBlock.Min |
Definition at line 87 of file MySlimBlock.cs.
MyMultiBlockDefinition Sandbox.Game.Entities.Cube.MySlimBlock.MultiBlockDefinition |
Multiblock definition which the block was created from or null.
Definition at line 300 of file MySlimBlock.cs.
int Sandbox.Game.Entities.Cube.MySlimBlock.MultiBlockId |
Multiblock unique identifier (all blocks in a multiblock have the same identifier). 0 means single block (default). Unique in one grid.
Definition at line 304 of file MySlimBlock.cs.
int Sandbox.Game.Entities.Cube.MySlimBlock.MultiBlockIndex = -1 |
Index of block in multiblock definition.
Definition at line 308 of file MySlimBlock.cs.
List<MySlimBlock> Sandbox.Game.Entities.Cube.MySlimBlock.Neighbours = new List<MySlimBlock>() |
Neighbours which are connected by mount points
Definition at line 150 of file MySlimBlock.cs.
MyBlockOrientation Sandbox.Game.Entities.Cube.MySlimBlock.Orientation = MyBlockOrientation.Identity |
Definition at line 89 of file MySlimBlock.cs.
Vector3I Sandbox.Game.Entities.Cube.MySlimBlock.Position |
Definition at line 90 of file MySlimBlock.cs.
bool Sandbox.Game.Entities.Cube.MySlimBlock.UsesDeformation = true |
Definition at line 131 of file MySlimBlock.cs.
|
get |
Definition at line 70 of file MySlimBlock.cs.
|
get |
Definition at line 176 of file MySlimBlock.cs.
|
get |
Definition at line 168 of file MySlimBlock.cs.
|
get |
Definition at line 278 of file MySlimBlock.cs.
|
get |
Definition at line 270 of file MySlimBlock.cs.
|
getset |
Definition at line 109 of file MySlimBlock.cs.
|
get |
Definition at line 215 of file MySlimBlock.cs.
|
get |
Definition at line 223 of file MySlimBlock.cs.
|
get |
Definition at line 81 of file MySlimBlock.cs.
|
get |
Definition at line 320 of file MySlimBlock.cs.
|
get |
Definition at line 247 of file MySlimBlock.cs.
|
get |
Definition at line 199 of file MySlimBlock.cs.
|
get |
Definition at line 189 of file MySlimBlock.cs.
|
get |
Definition at line 153 of file MySlimBlock.cs.
|
get |
Definition at line 181 of file MySlimBlock.cs.
|
get |
Definition at line 311 of file MySlimBlock.cs.
|
get |
Definition at line 262 of file MySlimBlock.cs.
|
get |
Definition at line 207 of file MySlimBlock.cs.
|
get |
Definition at line 323 of file MySlimBlock.cs.
|
get |
Definition at line 136 of file MySlimBlock.cs.
|
get |
Definition at line 231 of file MySlimBlock.cs.
|
get |
Definition at line 239 of file MySlimBlock.cs.
|
get |
Definition at line 292 of file MySlimBlock.cs.
|
get |
Definition at line 196 of file MySlimBlock.cs.
|
get |
Definition at line 99 of file MySlimBlock.cs.
|
get |
Definition at line 94 of file MySlimBlock.cs.
Action<MySlimBlock, MyCubeGrid> Sandbox.Game.Entities.Cube.MySlimBlock.CubeGridChanged |
Definition at line 282 of file MySlimBlock.cs.