Show / Hide Table of Contents

Interface IMySlimBlock

Basic block interface (Mod api interface)

Inherited Members
IMySlimBlock.GetMissingComponents(Dictionary<String, Int32>)
IMySlimBlock.AccumulatedDamage
IMySlimBlock.BuildIntegrity
IMySlimBlock.BuildLevelRatio
IMySlimBlock.CurrentDamage
IMySlimBlock.DamageRatio
IMySlimBlock.HasDeformation
IMySlimBlock.IsDestroyed
IMySlimBlock.IsFullIntegrity
IMySlimBlock.IsFullyDismounted
IMySlimBlock.MaxDeformation
IMySlimBlock.MaxIntegrity
IMySlimBlock.Mass
IMySlimBlock.OwnerId
IMySlimBlock.ShowParts
IMySlimBlock.StockpileAllocated
IMySlimBlock.StockpileEmpty
IMySlimBlock.Position
IMySlimBlock.ColorMaskHSV
IMySlimBlock.SkinSubtypeId
IMyDestroyableObject.OnDestroy()
IMyDestroyableObject.DoDamage(Single, MyStringHash, Boolean, Nullable<MyHitInfo>, Int64, Int64, Boolean, Nullable<MyStringHash>)
IMyDestroyableObject.Integrity
IMyDestroyableObject.UseDamageSystem
IMyDecalProxy.AddDecals(MyHitInfo, MyStringHash, Vector3, Object, IMyDecalHandler, MyStringHash, MyStringHash, Boolean, MyDecalFlags, Int32, List<UInt32>)
Namespace: VRage.Game.ModAPI
Assembly: VRage.Game.dll
Syntax
public interface IMySlimBlock : IMySlimBlock, IMyDestroyableObject, IMyDecalProxy

Properties

BlockDefinition

The blocks definition (cast to MyCubeBlockDefinition)

Declaration
MyDefinitionBase BlockDefinition { get; }
Property Value
Type Description
MyDefinitionBase

BlockGeneralDamageModifier

Allows you to get or set the damage modifier of a block.

Declaration
float BlockGeneralDamageModifier { get; set; }
Property Value
Type Description
System.Single

BuiltBy

Identity ID of the builder of this block.

Declaration
long BuiltBy { get; }
Property Value
Type Description
System.Int64

ComponentStack

Gets the component stack of the block

Declaration
IMyComponentStack ComponentStack { get; }
Property Value
Type Description
IMyComponentStack

CubeGrid

Gets the grid the slimblock is on

Declaration
IMyCubeGrid CubeGrid { get; }
Property Value
Type Description
IMyCubeGrid

Dithering

Sets the transparency of the block.

Declaration
float Dithering { get; set; }
Property Value
Type Description
System.Single
Remarks

Not synced.

FatBlock

Gets the fatblock if there is one

Declaration
IMyCubeBlock FatBlock { get; }
Property Value
Type Description
IMyCubeBlock

IsMovedBySplit

Gets if the block is in process of being moved from one grid to the other. Happens when grid splits to two.

Declaration
bool IsMovedBySplit { get; }
Property Value
Type Description
System.Boolean

Max

Largest part of block

Declaration
Vector3I Max { get; }
Property Value
Type Description
Vector3I

Min

Min position in the grid

Declaration
Vector3I Min { get; }
Property Value
Type Description
Vector3I

Neighbours

OBSOLETE: allocates memory use GetNeighbours function. The blocks that neighbour this block

Declaration
List<IMySlimBlock> Neighbours { get; }
Property Value
Type Description
System.Collections.Generic.List<IMySlimBlock>

Orientation

Blocks orientation

Declaration
MyBlockOrientation Orientation { get; }
Property Value
Type Description
MyBlockOrientation

Methods

AddNeighbours()

Calls function that adds neighbours to block

Declaration
void AddNeighbours()

ApplyAccumulatedDamage(Boolean)

When damage is less than threshold, applies not

Declaration
void ApplyAccumulatedDamage(bool addDirtyParts = true)
Parameters
Type Name Description
System.Boolean addDirtyParts

CalculateCurrentModel(out Matrix)

Get current model for block. When block is not functional, it would return current construction model

Declaration
string CalculateCurrentModel(out Matrix orientation)
Parameters
Type Name Description
Matrix orientation

Gets local orientation matrix

Returns
Type Description
System.String

Path to model

CanContinueBuild(IMyInventory)

Can we continue to weld this block?

Declaration
bool CanContinueBuild(IMyInventory sourceInventory)
Parameters
Type Name Description
IMyInventory sourceInventory

Source inventory that is used for components

Returns
Type Description
System.Boolean

True if block integrity not full

ClearConstructionStockpile(IMyInventory)

Clears out the construction stockpile and moves the components into a destination inventory

Declaration
void ClearConstructionStockpile(IMyInventory outputInventory)
Parameters
Type Name Description
IMyInventory outputInventory

The inventory where the components are moved into

ComputeScaledCenter(out Vector3D)

Gets the block center as a Vector3D, relative to grid WorldMatrix

Declaration
void ComputeScaledCenter(out Vector3D scaledCenter)
Parameters
Type Name Description
Vector3D scaledCenter

ComputeScaledHalfExtents(out Vector3)

Gets the half extents for the block

Declaration
void ComputeScaledHalfExtents(out Vector3 scaledHalfExtents)
Parameters
Type Name Description
Vector3 scaledHalfExtents

ComputeWorldCenter(out Vector3D)

Gets the world position for the center of the block

Declaration
void ComputeWorldCenter(out Vector3D worldCenter)
Parameters
Type Name Description
Vector3D worldCenter

Center of block in world coordinates

DecreaseMountLevel(Single, IMyInventory, Boolean)

Decreases the build level of a block

Declaration
void DecreaseMountLevel(float grinderAmount, IMyInventory outputInventory, bool useDefaultDeconstructEfficiency = false)
Parameters
Type Name Description
System.Single grinderAmount

The integrity amount of change

IMyInventory outputInventory

The inventory where output components will be sent to

System.Boolean useDefaultDeconstructEfficiency

FixBones(Single, Single)

Repair block deformation

Declaration
void FixBones(float oldDamage, float maxAllowedBoneMovement)
Parameters
Type Name Description
System.Single oldDamage

Integrity of block before repairing block. Less value, gives bigger fix bone result

System.Single maxAllowedBoneMovement

Limit of bone fix

FullyDismount(IMyInventory)

Reset built level to 0

Declaration
void FullyDismount(IMyInventory outputInventory)
Parameters
Type Name Description
IMyInventory outputInventory

Inventory that would receive items from block

GetColorMask()

Gets block color

Declaration
Vector3 GetColorMask()
Returns
Type Description
Vector3

Color

GetConstructionStockpileItemAmount(MyDefinitionId)

Get the amount of items in the construction stockpile

Declaration
int GetConstructionStockpileItemAmount(MyDefinitionId id)
Parameters
Type Name Description
MyDefinitionId id

Definition of component in stockpile to check

Returns
Type Description
System.Int32

Amount of components in the stockpile of this type

GetCopyObjectBuilder()

Declaration
MyObjectBuilder_CubeBlock GetCopyObjectBuilder()
Returns
Type Description
MyObjectBuilder_CubeBlock

GetNeighbours(ICollection<IMySlimBlock>)

The blocks that neighbour this block. Doesn't allocate memory

Declaration
void GetNeighbours(ICollection<IMySlimBlock> collection)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IMySlimBlock> collection

GetObjectBuilder(Boolean)

Gets the object builder for the slimblock

Declaration
MyObjectBuilder_CubeBlock GetObjectBuilder(bool copy = false)
Parameters
Type Name Description
System.Boolean copy

true to return a copy

Returns
Type Description
MyObjectBuilder_CubeBlock

GetWorldBoundingBox(out BoundingBoxD, Boolean)

The AABB of this block

Declaration
void GetWorldBoundingBox(out BoundingBoxD aabb, bool useAABBFromBlockCubes = false)
Parameters
Type Name Description
BoundingBoxD aabb
System.Boolean useAABBFromBlockCubes

IncreaseMountLevel(Single, Int64, IMyInventory, Single, Boolean, MyOwnershipShareModeEnum)

Increases the build level of a block

Declaration
void IncreaseMountLevel(float welderMountAmount, long welderOwnerPlayerId, IMyInventory outputInventory = null, float maxAllowedBoneMovement = 0F, bool isHelping = false, MyOwnershipShareModeEnum share)
Parameters
Type Name Description
System.Single welderMountAmount

The integrity amount of change

System.Int64 welderOwnerPlayerId

The player id of the entity increasing the mount level

IMyInventory outputInventory

The inventory where components are taken from

System.Single maxAllowedBoneMovement

Maximum movement of bones

System.Boolean isHelping

Is this increase helping another player

MyOwnershipShareModeEnum share

ShareMode used when block becomes functional

InitOrientation(Base6Directions.Direction, Base6Directions.Direction)

Sets orientation of block

Declaration
void InitOrientation(Base6Directions.Direction Forward, Base6Directions.Direction Up)
Parameters
Type Name Description
Base6Directions.Direction Forward

Forward direction

Base6Directions.Direction Up

Up direction

InitOrientation(MyBlockOrientation)

Sets orientation of block

Declaration
void InitOrientation(MyBlockOrientation orientation)
Parameters
Type Name Description
MyBlockOrientation orientation

Block orientation

InitOrientation(ref Vector3I, ref Vector3I)

Sets orientation of block

Declaration
void InitOrientation(ref Vector3I forward, ref Vector3I up)
Parameters
Type Name Description
Vector3I forward

Forward vector

Vector3I up

Up vector

MoveItemsFromConstructionStockpile(IMyInventory, MyItemFlags)

Transfer construction components from inventory to stockpile

Declaration
void MoveItemsFromConstructionStockpile(IMyInventory toInventory, MyItemFlags flags)
Parameters
Type Name Description
IMyInventory toInventory

Inventory that would get items

MyItemFlags flags

Use only None

MoveItemsToConstructionStockpile(IMyInventory)

Move items missing from an inventory into the construction stockpile

Declaration
void MoveItemsToConstructionStockpile(IMyInventory fromInventory)
Parameters
Type Name Description
IMyInventory fromInventory

The inventory where the components are being taken from

PlayConstructionSound(MyIntegrityChangeEnum, Boolean)

Play the construction sound associated with the integrity change

Declaration
void PlayConstructionSound(MyIntegrityChangeEnum integrityChangeType, bool deconstruction = false)
Parameters
Type Name Description
MyIntegrityChangeEnum integrityChangeType

Type of integrity change

System.Boolean deconstruction

Is this deconstruction?

RemoveNeighbours()

Removes block neighbours

Declaration
void RemoveNeighbours()

SetToConstructionSite()

Resets welded integrity to minimal value

Declaration
void SetToConstructionSite()

SpawnConstructionStockpile()

Spawn contents of construction stockpile

Declaration
void SpawnConstructionStockpile()

SpawnFirstItemInConstructionStockpile()

Adds the first component to the stockpile

Declaration
void SpawnFirstItemInConstructionStockpile()

UpdateVisual()

Drops visual cache. May fix some render problems.

Declaration
void UpdateVisual()
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾