Sandbox.Game.Entities
MyCubeGrid
Assembly: Sandbox.Game.dll
public class MyCubeGrid: MyEntity, IMyEntity, IMyEntity, IMyGridConnectivityTest, IMyEventProxy, IMyEventOwner, IMySyncedEntity, IMyShootOrigin, IMyParallelUpdateable, IMyCubeGrid, IMyCubeGrid
Grid - small ship, large ship, station Cubes (armor, walls...) are merge and rendered by this entity Blocks (turret, thrusts...) are rendered as child entities
Fields
Events
| Member | Description |
|---|---|
| static OnBlockAddedGlobally | Called only for single block changes |
| static OnBlockRemovedGlobally | Not called on grid split, or when closing grid |
| static OnBlocksChangeFinishedGlobally | Called on multi block changes. Both arguments may be null. First from where blocks where removed, second - where added |
| static OnSplitGridCreated | |
| GridPresenceTierChanged | |
| OnBlockAdded | |
| OnBlockClosed | |
| OnBlockIntegrityChanged | |
| OnBlockOwnershipChanged | |
| OnBlockRemoved | |
| OnConnectionChangeCompleted | Event triggered, when one of GridLinkTypeEnum connections changed. Used to determine changes in connections. Use may also need react to OnGridMerge/OnGridSplit Event different from OnConnectivityChanged. 1) It is called when all group changes 2) It is called AFTER all group changes, so GetConnectedGrids returning correct results |
| OnConnectionChanged | Event triggered, when one of GridLinkTypeEnum connections changed. Used to determine changes in connections. Use may also need react to OnGridMerge/OnGridSplit |
| OnDeschedule | |
| OnDynamicNPCGridOrSubgridShooting | |
| OnFatBlockAdded | |
| OnFatBlockClosed | |
| OnFatBlockRemoved | |
| OnGridBlockDamaged | |
| OnGridChanged | |
| OnGridMarkedDirty | |
| OnGridMerge | Called, when 2 grids are merged with merge block. First grid - grid that will stay, second - will be merged into first, and deleted. Called for both grids |
| OnGridSplit | |
| OnHavokSystemIDChanged | |
| OnHierarchyUpdated | |
| OnMassPropertiesChanged | |
| OnMaxThrustChanged | May be called from parallel thread |
| OnMinMaxChanged | |
| OnNameChanged | |
| OnNaturalGravityChanged | |
| OnSolarOccludedChanged | |
| OnStaticChanged | |
| OnTargetLocked | |
| OnTargetLockLost | |
| PlayerPresenceTierChanged | |
| PowerSwitchChanged | |
| SpeedChanged | |
| SyncPropertyChanged | |
| AddedToScene | Inherited from MyEntity |
| GridPresenceTierChanged | Triggered when grid presence tier is changed Inherited from IMyCubeGrid |
| OnBlockAdded | Called when a block is added to the grid Inherited from IMyCubeGrid |
| OnBlockIntegrityChanged | Triggered when block integrity changes (construction) Inherited from IMyCubeGrid |
| OnBlockOwnershipChanged | Called when a block on the grid changes owner Inherited from IMyCubeGrid |
| OnBlockRemoved | Called when a block is removed from the grid Inherited from IMyCubeGrid |
| OnClose | Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose . Inherited from IMyEntity |
| OnClose | Inherited from MyEntity |
| OnClosing | Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose . Inherited from IMyEntity |
| OnClosing | Inherited from MyEntity |
| OnDebugDraw | Inherited from MyEntity |
| OnGridBlockDamaged | Called when one of blocks on grid is taking damage Inherited from IMyCubeGrid |
| OnGridChanged | Called when a grid is taken control of by a player Inherited from IMyCubeGrid |
| OnGridMerge | Called, when 2 grids are merged with merge block. First grid - grid that will stay, second - will be merged into first, and deleted. Called for both grids Inherited from IMyCubeGrid |
| OnGridSplit | Triggered when grid is split Inherited from IMyCubeGrid |
| OnIsStaticChanged | Triggered when grid changes to or from static (station) Inherited from IMyCubeGrid |
| OnMarkForClose | Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose . Inherited from IMyEntity |
| OnMarkForClose | This event may not be invoked at all, when calling MyEntities.CloseAll, marking is bypassed Inherited from MyEntity |
| OnMaxThrustChanged | Triggered when max thrust in one of directions was changed. Maybe called from parralel thread Inherited from IMyCubeGrid |
| OnModelRefresh | Inherited from MyEntity |
| OnNaturalGravityChanged | Triggered when natural gravity changes around the grid Inherited from IMyCubeGrid |
| OnPhysicsChanged | Called when havok rigid body physics are changed: inited, closed, modified. Inherited from IMyEntity |
| OnPhysicsChanged | Inherited from MyEntity |
| OnPhysicsComponentChanged | Inherited from MyEntity |
| OnTargetLocked | Called when grid was target locked Inherited from IMyCubeGrid |
| OnTeleported | Inherited from MyEntity |
| OnUpdateOnceBeforeNextFrame | Inherited from MyEntity |
| PlayerPresenceTierChanged | Triggered when player presence tier is changed Inherited from IMyCubeGrid |
| RemovedFromScene | Inherited from MyEntity |
| SpeedChanged | Triggered when speed of the grid is changed Inherited from IMyCubeGrid |
| OnIsStaticChanged | Obsolete: Use OnStaticChanged |
Properties
| Member | Description |
|---|---|
| static GridCounter | |
| static ShowAiInfo | |
| static ShowAntennaGizmos | |
| static ShowCenterOfMass | |
| static ShowGravityGizmos | |
| static ShowGridPivot | |
| static ShowSenzorGizmos | |
| AllowPrediction | |
| BigOwners | players that have the maximum number of functional blocks in cube grid |
| BlocksCount | |
| BlocksDestructionEnabled | |
| BlocksForDraw | |
| BlocksPCU | |
| ClosestParentId | |
| ConveyorSystem | |
| CubeBlocks | |
| DampenersEnabled | |
| Decoys | |
| DestructibleBlocks | |
| DirtyBlocks | |
| Editable | |
| EntityThrustComponent | |
| ForceDisablePrediction | |
| GameLogic | |
| GetAmmoDefinition | |
| GridPresenceTier | |
| GridScale | |
| GridSize | |
| GridSizeEnum | |
| GridSizeHalf | |
| GridSizeHalfVector | |
| GridSizeQuarter | |
| GridSizeQuarterVector | |
| GridSizeR | Reciprocal of gridsize |
| GridSystems | |
| HasCubeGridRender | |
| HasMechanicalBlocksWaitingOnAttachUpdate | |
| Immune | |
| InitFromClipboard | True if created from MyGridClipboardprohibited . Set earlier than IsProjected, before blocks/ec are handled |
| Inventories | |
| IsBlockAreaChange | |
| IsBlockTrasferInProgress | |
| IsClientPredicted | |
| IsClientPredictedCar | |
| IsClientPredictedWheel | |
| IsGenerated | Gets or sets is generated, used for economy stations |
| IsLargeDestroyInProgress | |
| IsMarkedForEarlyDeactivation | |
| IsNpcSpawnedGrid | |
| IsParked | |
| IsPowerSwitchOn | |
| IsRespawnGrid | Gets or sets indication if a grid coresponds to a respawn ship/cart. |
| IsSmokeParticleActive | |
| IsSolarOccluded | |
| IsSplit | |
| IsStatic | |
| IsTransparentForJumpDrive | |
| IsUnsupportedStation | |
| LastUpdates | |
| LinearVelocity | |
| LocalCoordSystem | Local coord system under which this cube exists. (its id) |
| LockedByCount | |
| MarkedAsTrash | |
| Mass | |
| Max | |
| MaxShootRange | |
| Min | |
| NaturalGravity | |
| NumberOfGridColors | Return how many colors are on grid |
| OccupiedBlocks | |
| Physics | |
| PlayerPresenceTier | |
| RenderData | |
| RvoAgentId | |
| ShapeCount | |
| ShootOrigin | |
| SmallOwners | players that have at least one block in cube grid |
| Speed | |
| SyncType | |
| TrashHighlightCounter | |
| UnsafeBlocks | |
| UpdateFlags | |
| UsesTargetingList | |
| BigOwners | List of players with majority of blocks on grid Inherited from IMyCubeGrid |
| CastShadows | Gets or sets flag CastShadows Inherited from IMyEntity |
| Closed | True if the block has been removed from the world. Inherited from IMyEntity |
| Closed | Inherited from MyEntity |
| Components | Gets blocks component logic container Inherited from IMyEntity |
| Components | Inherited from MyEntity |
| ControlSystem | Gets grid-group control system Inherited from IMyCubeGrid |
| ConveyorSystem | Gets grid-group conveyor system Inherited from IMyCubeGrid |
| CustomName | Getter and setter for display name of the grid (as seen in Info terminal tab) Inherited from IMyCubeGrid |
| CustomName | Display name of the grid (as seen in Info terminal tab) Inherited from IMyCubeGrid |
| DebugAsyncLoading | Used for internal usage. Modders should not use it. Will be eventually removed Inherited from IMyEntity |
| DebugName | Inherited from MyEntity |
| DisplayName | Gets user friendly name of entity. May be null For block terminal name use DisplayNameText Inherited from IMyEntity |
| DisplayName | Gets or sets user friendly name of entity Inherited from IMyEntity |
| DisplayName | Inherited from MyEntity |
| DisplayNameText | Display Name for GUI etc. Override in descendant classes. Usually used to display in terminal or inventory controls. Inherited from MyEntity |
| EntityId | Id of entity Inherited from IMyEntity |
| EntityId | Uniq id of entity. Inherited from IMyEntity |
| EntityId | Entity id, can be set by subclasses (for example when using pool...) Inherited from MyEntity |
| EntityStorage | Inherited from MyEntity |
| FastCastShadowResolve | Gets or sets flag CastShadows Inherited from IMyEntity |
| Flags | Gets or set some behavior of entity. EntityFlags Inherited from IMyEntity |
| Flags | Inherited from MyEntity |
| GameLogic | Gets or sets game logic for object. If there is more than 1 game logic attached it should be wrapped into. Inherited from IMyEntity |
| GameLogic | Inherited from MyEntity |
| GasSystem | Gets grid-group gas system Inherited from IMyCubeGrid |
| GetAmmoDefinition | Gets ammo definition Inherited from IMyShootOrigin |
| GridPresenceTier | Gets grid presence tier Inherited from IMyCubeGrid |
| GridSize | Getter of grid size in meters Inherited from IMyCubeGrid |
| GridSizeEnum | Getter for grid size enum Inherited from IMyCubeGrid |
| HasInventory | Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventory() != null. Inherited from IMyEntity |
| HasInventory | Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventoryBase() != null. Inherited from MyEntity |
| Hierarchy | Gets or sets Hierarchy component Inherited from IMyEntity |
| Hierarchy | Inherited from MyEntity |
| InScene | Gets or set if grid is InScene. Objects that are not in scene are not updated and drawn. Inherited from IMyEntity |
| InScene | Inherited from MyEntity |
| InvalidateOnMove | Gets if entity is invalidated on move When visual look of entity depends on position - then InvalidateOnMove should be true Inherited from IMyEntity |
| InvalidateOnMove | Inherited from MyEntity |
| InventoryCount | Returns the count of the number of inventories this entity has. Inherited from IMyEntity |
| InventoryCount | Iterate through inventories and return their count. Inherited from MyEntity |
| IsBlockTrasferInProgress | Gets whether the move block transfer from one grid to another is in progress. This happens during the split operation. Inherited from IMyCubeGrid |
| IsCCDForProjectiles | Inherited from MyEntity |
| IsNpcSpawnedGrid | Gets if this grid is NPC spawned grid by the system (cargo ship, encounter, etc) Inherited from IMyCubeGrid |
| IsPreview | Inherited from MyEntity |
| IsReadyForReplication | Inherited from MyEntity |
| IsReplicated | Inherited from MyEntity |
| IsRespawnGrid | Gets or sets if this grid is a respawn grid (can be cleaned up automatically when player leaves) Inherited from IMyCubeGrid |
| IsStatic | Determines if the grid is static (unmoveable) Inherited from IMyCubeGrid |
| IsStatic | Gets or sets if the grid is static (station) Inherited from IMyCubeGrid |
| IsTransparentForJumpDrive | Inherited from MyEntity |
| IsVolumetric | Always returns false Inherited from IMyEntity |
| IsVolumetric | Inherited from MyEntity |
| JumpSystem | Gets grid-group jump system Inherited from IMyCubeGrid |
| LastSnapshotFlags | Inherited from MyEntity |
| LinearVelocity | Gets linear velocity of the grid Inherited from IMyCubeGrid |
| LocalAABB | Gets or sets local axis aligned bounding box. Same as LocalAABBHr , LocalAABB Inherited from IMyEntity |
| LocalAABBHr | Gets local axis aligned bounding box. Same as LocalAABB , LocalAABB Inherited from IMyEntity |
| LocalMatrix | Gets or sets local matrix. When entity, has parent, it's world coordinates are calculated from localMatrix and parent world matrix Inherited from IMyEntity |
| LocalVolume | Gets or sets local volume. Same as LocalVolume Inherited from IMyEntity |
| LocalVolumeOffset | Gets or sets local volume offset. Same as LocalVolumeOffset Inherited from IMyEntity |
| LocationForHudMarker | Inherited from MyEntity |
| MarkedForClose | Checked if Close() was called Inherited from IMyEntity |
| MarkedForClose | Inherited from MyEntity |
| Max | Maximum coordinates of blocks in grid Inherited from IMyCubeGrid |
| MaxGlassDistSq | Not used in game anymore Inherited from IMyEntity |
| MaxGlassDistSq | Inherited from MyEntity |
| MaxShootRange | Gets weapon max shoot range Inherited from IMyShootOrigin |
| Min | Minimum coordinates of blocks in grid Inherited from IMyCubeGrid |
| Model | Gets model of block Inherited from IMyEntity |
| Model | Inherited from MyEntity |
| ModelCollision | Gets collision model of block Inherited from IMyEntity |
| ModelCollision | Inherited from MyEntity |
| Name | Some entities can have uniq name, and game can find them by name TryGetEntityByName(string, out IMyEntity) Inherited from IMyEntity |
| Name | Uniq name of entity. Can be used to find entity by name Inherited from IMyEntity |
| Name | Inherited from MyEntity |
| NaturalGravity | Gets natural gravity around the grid Inherited from IMyCubeGrid |
| NearFlag | Gets or sets flag Near Inherited from IMyEntity |
| NeedsDraw | Gets or sets flag NeedsDraw Inherited from IMyEntity |
| NeedsDrawFromParent | Gets or sets flag NeedsDrawFromParent Inherited from IMyEntity |
| NeedsResolveCastShadow | Gets or sets flag NeedsResolveCastShadow Inherited from IMyEntity |
| NeedsUpdate | Gets or sets how often the entity should be updated. Inherited from IMyEntity |
| NeedsUpdate | Inherited from MyEntity |
| NeedsWorldMatrix | Gets or sets if WorldMatrix should be calculated when parent WorldMatrix is changed. Inherited from IMyEntity |
| NeedsWorldMatrix | Inherited from MyEntity |
| Parent | Gets parent of entity or null, if this entity doesn't have parent. Ex: character sitting in cockpit, has parent - cockpit, cockpit has parent - cube grid, connected grids also has main grid, which would be parent for other grids. Inherited from IMyEntity |
| Parent | Gets or sets the parent. Inherited from MyEntity |
| PersistentFlags | Gets or sets persistent flags that are used in rendering. Inherited from IMyEntity |
| Physics | Gets or sets physics for object Inherited from IMyEntity |
| Physics | Inherited from MyEntity |
| Pinned | Inherited from MyEntity |
| PlayerPresenceTier | Gets player presence tier Inherited from IMyCubeGrid |
| PositionComp | Gets or sets position provider logic Inherited from IMyEntity |
| PositionComp | Inherited from MyEntity |
| Render | Gets or sets render logic Inherited from IMyEntity |
| Render | Inherited from MyEntity |
| ResourceDistributor | Gets grid-group resource distributor Inherited from IMyCubeGrid |
| RvoAgentId | Gets RVO Agent ID used for collision avoidance algorithm Inherited from IMyCubeGrid |
| Save | Gets or sets Save . Entity won't be saved if Save is false Inherited from IMyEntity |
| Save | Inherited from MyEntity |
| ShadowBoxLod | Gets or sets flag ShadowBoxLod Inherited from IMyEntity |
| ShootOrigin | Gets shot starting position Inherited from IMyShootOrigin |
| SkipIfTooSmall | Gets or sets flag SkipIfTooSmall Inherited from IMyEntity |
| SmallOwners | List of players with any blocks on grid Inherited from IMyCubeGrid |
| Speed | Gets speed of the grid calculated from Linear Velocity. Rounded to two decimal places. Inherited from IMyCubeGrid |
| StopPhysicsActivation | Inherited from IMyEntity |
| StopPhysicsActivation | Inherited from MyEntity |
| Storage | Custom storage for mods. Shared with all mods. Inherited from IMyEntity |
| Storage | Inherited from MyEntity |
| Subparts | Inherited from MyEntity |
| SyncFlag | Inherited from MyEntity |
| Synchronized | Gets or sets if the entity should be synced. Inherited from IMyEntity |
| SyncObject | Gets SyncObject used for synchronizing data over network with Inherited from IMyEntity |
| SyncObject | Inherited from MyEntity |
| Transparent | Gets or sets Transparency . When setting true entity would be 25% transparent Inherited from IMyEntity |
| UpdateDuration | Inherited from MyEntity |
| UpdateFlags | Inherited from IMyParallelUpdateable |
| Visible | Gets or sets flag Visible Inherited from IMyEntity |
| WeaponSystem | Gets grid-group weapon system Inherited from IMyCubeGrid |
| WorldAABB | Gets world axis-aligned bounding box Inherited from IMyEntity |
| WorldAABBHr | Gets world axis-aligned bounding box Inherited from IMyEntity |
| WorldMatrix | Gets world matrix of this entity Inherited from IMyEntity |
| WorldMatrix | Gets or sets world matrix. Inherited from IMyEntity |
| WorldMatrix | Inherited from MyEntity |
| WorldMatrixInvScaled | Get scaled, inverted world matrix. Same as GetViewMatrix() , GetWorldMatrixNormalizedInv() , WorldMatrixNormalizedInv , but not normalized Inherited from IMyEntity |
| WorldMatrixNormalizedInv | Get normalized, inverted world matrix. Same as GetViewMatrix() , WorldMatrixNormalizedInv Inherited from IMyEntity |
| WorldVolume | Gets bounding sphere of this entity Inherited from IMyEntity |
| WorldVolumeHr | Gets bounding sphere of this entity Inherited from IMyEntity |
| XSymmetryOdd | Gets or sets if the symmetry plane is offset from the block center Inherited from IMyCubeGrid |
| XSymmetryPlane | Gets or sets X-Axis build symmetry plane Inherited from IMyCubeGrid |
| YSymmetryOdd | Gets or sets if the symmetry plane is offset from the block center Inherited from IMyCubeGrid |
| YSymmetryPlane | Gets or sets Y-Axis build symmetry plane Inherited from IMyCubeGrid |
| ZSymmetryOdd | Gets or sets if the symmetry plane is offset from the block center Inherited from IMyCubeGrid |
| ZSymmetryPlane | Gets or sets Z-Axis build symmetry plane Inherited from IMyCubeGrid |
| IsCCDForProjectiles | Obsolete Inherited from IMyEntity |
| LocationForHudMarker | Obsolete Inherited from IMyEntity |
Constructors
| Member | Description |
|---|---|
| MyCubeGrid() | |
| MyEntity() | Inherited from MyEntity |
| MyEntity(bool) | Inherited from MyEntity |
Methods
Inheritance: MyEntity
Implements:
- IMyCubeGrid
- IMyCubeGrid
- IMyEntity
- IMyEntity
- IMyEventOwner prohibited
- IMyEventProxy
- IMyGridConnectivityTest prohibited
- IMyParallelUpdateable
- IMyShootOrigin
- IMySyncedEntity prohibited