Difference between revisions of "Sandbox.ModAPI.Ingame.IMyCubeBlock"
From Space Engineers Wiki
Line 116: | Line 116: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | [[Category: API]] | + | [[Category: API]] | [[Cateogry:Sandbox.ModAPI.Ingame]] |
− | [[Cateogry:Sandbox.ModAPI.Ingame]] |
Revision as of 06:15, 12 January 2015
Contents
Sandbox.ModAPI.Ingame.IMyCubeBlock
This is a base class for all blocks.
Namespace
Assembly
Sandbox.Common (Sandbox.Common.dll)
Syntax
public interface IMyCubeBlock : IMyEntity
Methods
GetOwnerFactionTag
string GetOwnerFactionTag()
This returns a string with the faction tag of the associated owner.
GetPlayerRelationToOwner
MyRelationsBetweenPlayerAndBlock GetUserRelationToOwner(long playerId)
GetUserRelationToOwner
MyRelationsBetweenPlayerAndBlock GetUserRelationToOWner(long playerId)
UpdateIsWorking
void UpdateIsWorking()
Updates the current value of the IsWorking property.
UpdateVisual
void UpdateVisual()
Properties
BlockDefinition
SerializableDefinitionId BlockDefinition {get;}
CheckConnectionAllowed
bool CheckConnectionAllowed {get;}
CubeGrid
IMyCubeGrid CubeGrid {get;}
DefinitionDisplayNameText
string DefinitionDisplayNameText {get;}
DisassembleRatio
float DisassembleRatio {get;}
DisplayNameText
string DisplayNameText {get;}
IsBeingHacked
bool IsBeingHacked {get;}
If the block is being ground down, returns true.
IsFunctional
bool IsFunctional {get;}
Determines whether or not the block is built enough to perform its function.
IsWorking
bool IsWorking {get;}
Max
Vector3I Max {get;}
Min
Vector3I Min {get;}
NumberInGrid
int NumberInGrid {get;}
Returns the number of this block's type in the grid (not quantity of blocks of that type on the grid). For instance, if you have a thruster, and add a second thruster, this will return 2. If you remove the second thruster and build another one to replace it, it will return 3.
Orientation
MyBlockOrientation Orientation {get;}
OwnerId
long OwnerId {get;}
Position
Vector3I Position {get;}