Space Engineers
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Sandbox.Game.Weapons.MyDrillBase Class Reference

Common code for all drills (both cube blocks on ship and hand drill). More...

Classes

struct  Sounds
 

Public Member Functions

 MyDrillBase (MyEntity drillEntity, MyParticleEffectsIDEnum dustEffectId, MyParticleEffectsIDEnum dustEffectStonesId, MyParticleEffectsIDEnum sparksEffectId, MyDrillSensorBase sensor, MyDrillCutOut cutOut, float animationSlowdownTimeInSeconds, float floatingObjectSpawnOffset, float floatingObjectSpawnRadius, float inventoryCollectionRatio=0f)
 
bool Drill (bool collectOre=true, bool performCutout=true, bool assignDamagedMaterial=false, float speedMultiplier=1f)
 
virtual void Close ()
 
void StopDrill ()
 
void UpdateAfterSimulation ()
 
void OnWorldPositionChanged (MatrixD worldMatrix)
 
void StopLoopSound ()
 
void StopSparkParticles ()
 
void PerformCameraShake ()
 
void DebugDraw ()
 
void UpdateSoundEmitter ()
 

Public Attributes

MyInventory OutputInventory
 
float VoxelHarvestRatio = MyDrillConstants.VOXEL_HARVEST_RATIO
 
MyStringHash m_drillMaterial = MyStringHash.GetOrCompute("HandDrill")
 
MySoundPair m_idleSoundLoop = new MySoundPair("ToolPlayDrillIdle")
 
MyParticleEffect DustParticles
 
MyParticleEffect SparkEffect = null
 

Protected Member Functions

void CreateParticles (Vector3D position, bool createDust, bool createSparks, bool createStones)
 
virtual bool TryDrillBlocks (MyCubeGrid grid, Vector3 worldPoint, bool onlyCheck, out MyStringHash blockMaterial)
 
virtual bool TryDrillVoxels (MyVoxelBase voxels, Vector3D hitPosition, bool collectOre, bool onlyCheck, bool applyDamagedMaterial)
 

Protected Attributes

MyEntity m_drillEntity
 
Dictionary< MyVoxelMaterialDefinition, int > m_drilledMaterialBuffer
 
MyDrillSensorBase m_sensor
 
MyStringHash m_metalMaterial = MyStringHash.GetOrCompute("Metal")
 
MyStringHash m_rockMaterial = MyStringHash.GetOrCompute("Rock")
 
bool m_particleEffectsEnabled = true
 
float m_floatingObjectSpawnOffset
 
float m_floatingObjectSpawnRadius
 
MyDrillCutOut m_cutOut
 

Properties

HashSet< MyEntityIgnoredEntities [get]
 
MySoundPair CurrentLoopCueEnum [get, set]
 
bool IsDrilling [get]
 
float AnimationMaxSpeedRatio [get]
 
MyDrillSensorBase Sensor [get]
 
MyDrillCutOut CutOut [get]
 

Detailed Description

Common code for all drills (both cube blocks on ship and hand drill).

Definition at line 60 of file MyDrillBase.cs.

Constructor & Destructor Documentation

Sandbox.Game.Weapons.MyDrillBase.MyDrillBase ( MyEntity  drillEntity,
MyParticleEffectsIDEnum  dustEffectId,
MyParticleEffectsIDEnum  dustEffectStonesId,
MyParticleEffectsIDEnum  sparksEffectId,
MyDrillSensorBase  sensor,
MyDrillCutOut  cutOut,
float  animationSlowdownTimeInSeconds,
float  floatingObjectSpawnOffset,
float  floatingObjectSpawnRadius,
float  inventoryCollectionRatio = 0f 
)
inline
Parameters
drillEntityEntity to which this drill is attached.
inventoryCollectionRatioRatio (0 to 1) of mined material that will be stored in inventory (if one is assigned), rest will be thrown out in space.

Definition at line 141 of file MyDrillBase.cs.

Member Function Documentation

virtual void Sandbox.Game.Weapons.MyDrillBase.Close ( )
inlinevirtual

Definition at line 352 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.CreateParticles ( Vector3D  position,
bool  createDust,
bool  createSparks,
bool  createStones 
)
inlineprotected

Definition at line 450 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.DebugDraw ( )
inline

Definition at line 665 of file MyDrillBase.cs.

bool Sandbox.Game.Weapons.MyDrillBase.Drill ( bool  collectOre = true,
bool  performCutout = true,
bool  assignDamagedMaterial = false,
float  speedMultiplier = 1f 
)
inline

Definition at line 172 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.OnWorldPositionChanged ( MatrixD  worldMatrix)
inline

Definition at line 394 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.PerformCameraShake ( )
inline

Definition at line 583 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.StopDrill ( )
inline

Definition at line 361 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.StopLoopSound ( )
inline

Definition at line 443 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.StopSparkParticles ( )
inline

Definition at line 491 of file MyDrillBase.cs.

virtual bool Sandbox.Game.Weapons.MyDrillBase.TryDrillBlocks ( MyCubeGrid  grid,
Vector3  worldPoint,
bool  onlyCheck,
out MyStringHash  blockMaterial 
)
inlineprotectedvirtual

Definition at line 500 of file MyDrillBase.cs.

virtual bool Sandbox.Game.Weapons.MyDrillBase.TryDrillVoxels ( MyVoxelBase  voxels,
Vector3D  hitPosition,
bool  collectOre,
bool  onlyCheck,
bool  applyDamagedMaterial 
)
inlineprotectedvirtual

Definition at line 549 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.UpdateAfterSimulation ( )
inline

Definition at line 370 of file MyDrillBase.cs.

void Sandbox.Game.Weapons.MyDrillBase.UpdateSoundEmitter ( )
inline

Definition at line 678 of file MyDrillBase.cs.

Member Data Documentation

MyParticleEffect Sandbox.Game.Weapons.MyDrillBase.DustParticles

Definition at line 92 of file MyDrillBase.cs.

MyDrillCutOut Sandbox.Game.Weapons.MyDrillBase.m_cutOut
protected

Definition at line 111 of file MyDrillBase.cs.

Dictionary<MyVoxelMaterialDefinition, int> Sandbox.Game.Weapons.MyDrillBase.m_drilledMaterialBuffer
protected

Definition at line 78 of file MyDrillBase.cs.

MyEntity Sandbox.Game.Weapons.MyDrillBase.m_drillEntity
protected

Definition at line 77 of file MyDrillBase.cs.

MyStringHash Sandbox.Game.Weapons.MyDrillBase.m_drillMaterial = MyStringHash.GetOrCompute("HandDrill")

Definition at line 82 of file MyDrillBase.cs.

float Sandbox.Game.Weapons.MyDrillBase.m_floatingObjectSpawnOffset
protected

Definition at line 104 of file MyDrillBase.cs.

float Sandbox.Game.Weapons.MyDrillBase.m_floatingObjectSpawnRadius
protected

Definition at line 105 of file MyDrillBase.cs.

MySoundPair Sandbox.Game.Weapons.MyDrillBase.m_idleSoundLoop = new MySoundPair("ToolPlayDrillIdle")

Definition at line 83 of file MyDrillBase.cs.

MyStringHash Sandbox.Game.Weapons.MyDrillBase.m_metalMaterial = MyStringHash.GetOrCompute("Metal")
protected

Definition at line 84 of file MyDrillBase.cs.

bool Sandbox.Game.Weapons.MyDrillBase.m_particleEffectsEnabled = true
protected

Definition at line 98 of file MyDrillBase.cs.

MyStringHash Sandbox.Game.Weapons.MyDrillBase.m_rockMaterial = MyStringHash.GetOrCompute("Rock")
protected

Definition at line 85 of file MyDrillBase.cs.

MyDrillSensorBase Sandbox.Game.Weapons.MyDrillBase.m_sensor
protected

Definition at line 81 of file MyDrillBase.cs.

MyInventory Sandbox.Game.Weapons.MyDrillBase.OutputInventory

Definition at line 73 of file MyDrillBase.cs.

MyParticleEffect Sandbox.Game.Weapons.MyDrillBase.SparkEffect = null

Definition at line 449 of file MyDrillBase.cs.

float Sandbox.Game.Weapons.MyDrillBase.VoxelHarvestRatio = MyDrillConstants.VOXEL_HARVEST_RATIO

Definition at line 74 of file MyDrillBase.cs.

Property Documentation

float Sandbox.Game.Weapons.MyDrillBase.AnimationMaxSpeedRatio
get

Definition at line 124 of file MyDrillBase.cs.

MySoundPair Sandbox.Game.Weapons.MyDrillBase.CurrentLoopCueEnum
getset

Definition at line 115 of file MyDrillBase.cs.

MyDrillCutOut Sandbox.Game.Weapons.MyDrillBase.CutOut
get

Definition at line 134 of file MyDrillBase.cs.

HashSet<MyEntity> Sandbox.Game.Weapons.MyDrillBase.IgnoredEntities
get

Definition at line 70 of file MyDrillBase.cs.

bool Sandbox.Game.Weapons.MyDrillBase.IsDrilling
get

Definition at line 118 of file MyDrillBase.cs.

MyDrillSensorBase Sandbox.Game.Weapons.MyDrillBase.Sensor
get

Definition at line 129 of file MyDrillBase.cs.


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