Difference between revisions of "Sandbox.ModAPI.Ingame.IMyCubeBlock"

From Space Engineers Wiki
Jump to: navigation, search
(Redirecting to new namespace.)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Sandbox.ModAPI.Ingame.IMyCubeBlock=
+
#REDIRECT [[API:Sandbox.ModAPI.Ingame.IMyCubeBlock]]
This is a base class for all blocks.
 
==Namespace==
 
[[Sandbox.ModAPI.Ingame]]
 
==Assembly==
 
[[Sandbox.Common]] (Sandbox.Common.dll)
 
==Syntax==
 
<syntaxhighlight lang="csharp">
 
public interface IMyCubeBlock : IMyEntity
 
</syntaxhighlight>
 
==Methods==
 
===GetOwnerFactionTag===
 
<syntaxhighlight lang="csharp">
 
string GetOwnerFactionTag()
 
</syntaxhighlight>
 
This returns a string with the faction tag of the associated owner.
 
 
 
===GetPlayerRelationToOwner===
 
<syntaxhighlight lang="csharp">
 
MyRelationsBetweenPlayerAndBlock GetUserRelationToOwner(long playerId)
 
</syntaxhighlight>
 
 
 
===GetUserRelationToOwner===
 
<syntaxhighlight lang="csharp">
 
MyRelationsBetweenPlayerAndBlock GetUserRelationToOWner(long playerId)
 
</syntaxhighlight>
 
 
 
===UpdateIsWorking===
 
<syntaxhighlight lang="csharp">
 
void UpdateIsWorking()
 
</syntaxhighlight>
 
Updates the current value of the IsWorking property.
 
 
 
===UpdateVisual===
 
<syntaxhighlight lang="csharp">
 
void UpdateVisual()
 
</syntaxhighlight>
 
 
 
==Properties==
 
===BlockDefinition===
 
<syntaxhighlight lang="csharp">
 
SerializableDefinitionId BlockDefinition {get;}
 
</syntaxhighlight>
 
 
 
===CheckConnectionAllowed===
 
<syntaxhighlight lang="csharp">
 
bool CheckConnectionAllowed {get;}
 
</syntaxhighlight>
 
 
 
===CubeGrid===
 
<syntaxhighlight lang="csharp">
 
IMyCubeGrid CubeGrid {get;}
 
</syntaxhighlight>
 
 
 
===DefinitionDisplayNameText===
 
<syntaxhighlight lang="csharp">
 
string DefinitionDisplayNameText {get;}
 
</syntaxhighlight>
 
 
 
===DisassembleRatio===
 
<syntaxhighlight lang="csharp">
 
float DisassembleRatio {get;}
 
</syntaxhighlight>
 
 
 
===DisplayNameText===
 
<syntaxhighlight lang="csharp">
 
string DisplayNameText {get;}
 
</syntaxhighlight>
 
 
 
===IsBeingHacked===
 
<syntaxhighlight lang="csharp">
 
bool IsBeingHacked {get;}
 
</syntaxhighlight>
 
If the block is being ground down, returns true.
 
 
 
===IsFunctional===
 
<syntaxhighlight lang="csharp">
 
bool IsFunctional {get;}
 
</syntaxhighlight>
 
Determines whether or not the block is built enough to perform its function.
 
 
 
===IsWorking===
 
<syntaxhighlight lang="csharp">
 
bool IsWorking {get;}
 
</syntaxhighlight>
 
 
 
===Max===
 
<syntaxhighlight lang="csharp">
 
Vector3I Max {get;}
 
</syntaxhighlight>
 
 
 
===Min===
 
<syntaxhighlight lang="csharp">
 
Vector3I Min {get;}
 
</syntaxhighlight>
 
 
 
===NumberInGrid===
 
<syntaxhighlight lang="csharp">
 
int NumberInGrid {get;}
 
</syntaxhighlight>
 
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===
 
<syntaxhighlight lang="csharp">
 
MyBlockOrientation Orientation {get;}
 
</syntaxhighlight>
 
 
 
===OwnerId===
 
<syntaxhighlight lang="csharp">
 
long OwnerId {get;}
 
</syntaxhighlight>
 
 
 
===Position===
 
<syntaxhighlight lang="csharp">
 
Vector3I Position {get;}
 
</syntaxhighlight>
 
 
 
[[Category: API]][[Cateogry:Sandbox.ModAPI.Ingame]]
 

Latest revision as of 06:48, 13 January 2015