Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Sandbox.Game.Entities.Cube.MyMultiBlockClipboard Class Reference

Multiblock clipboard for building multiblocks. Can be used for building only (not copy/paste) because it uses definitions not real tile grid/block data. More...

Inheritance diagram for Sandbox.Game.Entities.Cube.MyMultiBlockClipboard:
Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced Sandbox.Game.Entities.Cube.MyGridClipboard

Public Member Functions

 MyMultiBlockClipboard (MyPlacementSettings settings, bool calculateVelocity=true)
 
override void Deactivate (bool afterPaste=false)
 
override void Update ()
 
override bool PasteGrid (MyInventoryBase buildInventory=null, bool deactivate=true)
 
override bool EntityCanPaste (MyEntity pastingEntity)
 
override void MoveEntityFurther ()
 
override void MoveEntityCloser ()
 
Matrix GetRotationDeltaMatrixToHitGrid (MyCubeGrid hitGrid)
 
void SetGridFromBuilder (MyMultiBlockDefinition multiBlockDefinition, MyObjectBuilder_CubeGrid grid, Vector3 dragPointDelta, float dragVectorLength)
 
- Public Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced
 MyGridClipboardAdvanced (MyPlacementSettings settings, bool calculateVelocity=true)
 
override void Activate (Action callback=null)
 
void SetDragDistance (float dragDistance)
 
- Public Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
 MyGridClipboard (MyPlacementSettings settings, bool calculateVelocity=true)
 
MyCubeBlockDefinition GetFirstBlockDefinition (MyObjectBuilder_CubeGrid grid=null)
 
virtual void ActivateNoAlign (Action callback=null)
 
void Hide ()
 
void Show ()
 
void ClearClipboard ()
 
void CopyGroup (MyCubeGrid gridInGroup, GridLinkTypeEnum groupType)
 
void CutGrid (MyCubeGrid grid)
 
void CopyGrid (MyCubeGrid grid)
 
void CutGroup (MyCubeGrid grid, GridLinkTypeEnum groupType)
 
void SetGridFromBuilder (MyObjectBuilder_CubeGrid grid, Vector3 dragPointDelta, float dragVectorLength)
 
void SetGridFromBuilders (MyObjectBuilder_CubeGrid[] grids, Vector3 dragPointDelta, float dragVectorLength)
 
virtual void UpdateColor (Vector3 newHSV)
 Used to update the color of a new ship/station block when the player switches it More...
 
virtual Matrix GetFirstGridOrientationMatrix ()
 
void AlignClipboardToGravity ()
 
void AlignClipboardToGravity (Vector3 gravity)
 
void DrawHud ()
 
void CalculateRotationHints (MyBlockBuilderRotationHints hints, bool isRotating)
 
bool HasCopiedGrids ()
 
void SaveClipboardAsPrefab (string name=null, string path=null)
 
void HideGridWhenColliding (List< Vector3D > collisionTestPoints)
 
void RotateAroundAxis (int axisIndex, int sign, bool newlyPressed, float angleDelta)
 

Static Public Member Functions

static void TakeMaterialsFromBuilder (List< MyObjectBuilder_CubeGrid > blocksToBuild, MyEntity builder)
 
- Static Public Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
static void CalculateItemRequirements (List< MyObjectBuilder_CubeGrid > blocksToBuild, MyComponentList buildComponents)
 
static void CalculateItemRequirements (MyObjectBuilder_CubeGrid[] blocksToBuild, MyComponentList buildComponents)
 

Public Attributes

MySlimBlock RemoveBlock
 
ushort BlockIdInCompound
 
HashSet< Tuple< MySlimBlock, ushort?> > RemoveBlocksInMultiBlock = new HashSet<Tuple<MySlimBlock, ushort?>>()
 
- Public Attributes inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
bool ShowModdedBlocksWarning = true
 

Protected Member Functions

override void UpdatePastePosition ()
 
override void ChangeClipboardPreview (bool visible)
 
override void SetupDragDistance ()
 
- Protected Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced
Vector3D GetFreeSpacePlacementPosition (bool copyPaste, out bool buildAllowed)
 
Vector3D GetFreeSpacePlacementPositionGridAabbs (bool copyPaste, out bool buildAllowed)
 Casts preview grids aabbs and get shortest distance. Returns shortest intersection or null. More...
 
bool TestGridPlacementOnGrid (MyCubeGrid previewGrid, ref MyGridPlacementSettings settings, MyCubeGrid hitGrid)
 
- Protected Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
delegate void UpdateAfterPasteCallback (List< MyObjectBuilder_CubeGrid > pastedBuilders)
 
void ShowPreview (bool show)
 
bool PasteGridInternal (MyInventoryBase buildInventory, bool deactivate, List< MyObjectBuilder_CubeGrid > pastedBuilders=null, List< MyCubeGrid > touchingGrids=null, UpdateAfterPasteCallback updateAfterPasteCallback=null, bool multiBlock=false)
 
bool CheckPastedBlocks ()
 Checks the pasted object builder for non-existent blocks (e.g. copying from world with a cube block mod to a world without it) More...
 
bool CheckPastedScripts ()
 Checks the pasted object builder for scripts inside programmable blocks More...
 
void BeforeCreateGrid (MyObjectBuilder_CubeGrid grid)
 
bool UpdateHitEntity (bool canPasteLargeOnSmall=true)
 
virtual void TestBuildingMaterials ()
 
virtual MyEntity GetClipboardBuilder ()
 
virtual void UpdateGridTransformations ()
 
void AlignRotationToCoordSys ()
 
bool TrySnapToSurface (SnapMode snapMode)
 
void FixSnapTransformationBase6 ()
 

Properties

override bool AnyCopiedGridIsStatic [get]
 
- Properties inherited from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced
override bool AnyCopiedGridIsStatic [get]
 
- Properties inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
virtual bool CanBePlaced [get]
 
bool CharacterHasEnoughMaterials [get]
 
virtual bool HasPreviewBBox [get, set]
 
bool IsActive [get, protected set]
 
bool AllowSwitchCameraMode [get]
 
bool IsSnapped [get, protected set]
 
List< MyObjectBuilder_CubeGridCopiedGrids [get]
 
SnapMode SnapMode [get]
 
bool EnablePreciseRotationWhenSnapped [get]
 
bool OneAxisRotationMode [get]
 
List< MyCubeGridPreviewGrids [get]
 
virtual bool AnyCopiedGridIsStatic [get]
 
bool EnableStationRotation [get, set]
 
bool CreationMode [get, set]
 
MyCubeSize CubeSize [get, set]
 
bool IsStatic [get, set]
 
virtual float Transparency [get]
 
string CopiedGridsName [get]
 

Additional Inherited Members

- Static Protected Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced
static bool CheckConnectivityOnGrid (MySlimBlock block, ref MatrixI transform, ref MyGridPlacementSettings settings, MyCubeGrid hitGrid)
 
static bool TestBlockPlacementOnGrid (MySlimBlock block, ref MatrixI transform, ref MyGridPlacementSettings settings, MyCubeGrid hitGrid)
 
static bool TestBlockPlacement (MySlimBlock block, ref MyGridPlacementSettings settings)
 
static bool TestBlockPlacement (MySlimBlock block, ref MyGridPlacementSettings settings, out MyCubeGrid touchingGrid)
 
static bool TestBlockPlacementNoAABBInflate (MySlimBlock block, ref MyGridPlacementSettings settings, out MyCubeGrid touchingGrid)
 
static bool TestVoxelPlacement (MySlimBlock block, ref MyGridPlacementSettings settings, bool dynamicMode)
 
static bool TestBlockPlacementArea (MySlimBlock block, ref MyGridPlacementSettings settings, bool dynamicMode, bool testVoxel=true)
 
- Static Protected Member Functions inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
static MatrixD GetPasteMatrix ()
 
- Protected Attributes inherited from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced
bool m_dynamicBuildAllowed
 
- Protected Attributes inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
List< Vector3m_copiedGridOffsets = new List<Vector3>()
 
Vector3D m_pastePosition
 
Vector3D m_pastePositionPrevious
 
bool m_calculateVelocity = true
 
Vector3 m_objectVelocity = Vector3.Zero
 
float m_pasteOrientationAngle = 0.0f
 
Vector3 m_pasteDirUp = new Vector3(1.0f, 0.0f, 0.0f)
 
Vector3 m_pasteDirForward = new Vector3(0.0f, 1.0f, 0.0f)
 
float m_dragDistance
 
const float m_maxDragDistance = 2E4f
 
Vector3 m_dragPointToPositionLocal
 
bool m_canBePlaced
 
bool m_characterHasEnoughMaterials = false
 
MyPlacementSettings m_settings
 
float m_closestHitDistSq = float.MaxValue
 
Vector3D m_hitPos = new Vector3(0.0f, 0.0f, 0.0f)
 
Vector3 m_hitNormal = new Vector3(1.0f, 0.0f, 0.0f)
 
IMyEntity m_hitEntity = null
 
bool m_visible = true
 
bool m_useDynamicPreviews = false
 
Dictionary< string, int > m_blocksPerType = new Dictionary<string,int>()
 
List< MyCubeGridm_touchingGrids = new List<MyCubeGrid>()
 Grids that are around pasted grid. (In proximity, possible for merge) More...
 
- Events inherited from Sandbox.Game.Entities.Cube.MyGridClipboard
Action< MyGridClipboard, bool > Deactivated
 

Detailed Description

Multiblock clipboard for building multiblocks. Can be used for building only (not copy/paste) because it uses definitions not real tile grid/block data.

Definition at line 35 of file MyMultiBlockClipboard.cs.

Constructor & Destructor Documentation

Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.MyMultiBlockClipboard ( MyPlacementSettings  settings,
bool  calculateVelocity = true 
)
inline

Definition at line 60 of file MyMultiBlockClipboard.cs.

Member Function Documentation

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.ChangeClipboardPreview ( bool  visible)
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboard.

Definition at line 315 of file MyMultiBlockClipboard.cs.

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.Deactivate ( bool  afterPaste = false)
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboard.

Definition at line 65 of file MyMultiBlockClipboard.cs.

override bool Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.EntityCanPaste ( MyEntity  pastingEntity)
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboard.

Definition at line 155 of file MyMultiBlockClipboard.cs.

Matrix Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.GetRotationDeltaMatrixToHitGrid ( MyCubeGrid  hitGrid)
inline

Definition at line 507 of file MyMultiBlockClipboard.cs.

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.MoveEntityCloser ( )
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.

Definition at line 305 of file MyMultiBlockClipboard.cs.

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.MoveEntityFurther ( )
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboard.

Definition at line 295 of file MyMultiBlockClipboard.cs.

override bool Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.PasteGrid ( MyInventoryBase  buildInventory = null,
bool  deactivate = true 
)
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.

Definition at line 122 of file MyMultiBlockClipboard.cs.

void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.SetGridFromBuilder ( MyMultiBlockDefinition  multiBlockDefinition,
MyObjectBuilder_CubeGrid  grid,
Vector3  dragPointDelta,
float  dragVectorLength 
)
inline

Definition at line 827 of file MyMultiBlockClipboard.cs.

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.SetupDragDistance ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.

Definition at line 816 of file MyMultiBlockClipboard.cs.

static void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.TakeMaterialsFromBuilder ( List< MyObjectBuilder_CubeGrid blocksToBuild,
MyEntity  builder 
)
inlinestatic

Definition at line 837 of file MyMultiBlockClipboard.cs.

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.Update ( )
inlinevirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.

Definition at line 71 of file MyMultiBlockClipboard.cs.

override void Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.UpdatePastePosition ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Entities.Cube.MyGridClipboardAdvanced.

Definition at line 243 of file MyMultiBlockClipboard.cs.

Member Data Documentation

ushort Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.BlockIdInCompound

Definition at line 51 of file MyMultiBlockClipboard.cs.

MySlimBlock Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.RemoveBlock

Definition at line 50 of file MyMultiBlockClipboard.cs.

HashSet<Tuple<MySlimBlock, ushort?> > Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.RemoveBlocksInMultiBlock = new HashSet<Tuple<MySlimBlock, ushort?>>()

Definition at line 55 of file MyMultiBlockClipboard.cs.

Property Documentation

override bool Sandbox.Game.Entities.Cube.MyMultiBlockClipboard.AnyCopiedGridIsStatic
getprotected

Definition at line 41 of file MyMultiBlockClipboard.cs.


The documentation for this class was generated from the following file: