Space Engineers
Public Member Functions | Protected Member Functions | Properties | Events | List of all members
Sandbox.Game.Components.MyCraftingComponentBlock Class Reference
Inheritance diagram for Sandbox.Game.Components.MyCraftingComponentBlock:
Sandbox.Game.Components.MyCraftingComponentBase VRage.Network.IMyEventProxy VRage.Game.Components.MyGameLogicComponent VRage.Network.IMyEventProxy VRage.Network.IMyEventOwner VRage.Game.Components.MyEntityComponentBase VRage.Network.IMyEventOwner VRage.Game.Components.MyComponentBase

Public Member Functions

 MyCraftingComponentBlock ()
 
override void Init (MyComponentDefinitionBase definition)
 
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
void OnBlockEnabledChanged (MyCubeBlock obj)
 
override bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
override void Deserialize (MyObjectBuilder_ComponentBase builder)
 
override MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
override VRage.ObjectBuilders.MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 
override bool IsOperatingItem (MyPhysicalInventoryItem item)
 
override void GetInsertedOperatingItems (List< MyPhysicalInventoryItem > itemsList)
 
override void UpdateAfterSimulation100 ()
 
override bool ContainsOperatingItem (MyPhysicalInventoryItem item)
 
override MyFixedPoint GetOperatingItemRemovableAmount (MyPhysicalInventoryItem item)
 
- Public Member Functions inherited from Sandbox.Game.Components.MyCraftingComponentBase
MyBlueprintToProduce GetItemToProduce (int index)
 
void StartProduction (long senderEntityId)
 
void StopProduction (long senderEntityId)
 
void ClearItemsToProduce (long senderEntityId)
 
bool CanUseBlueprint (MyBlueprintDefinitionBase blueprint)
 
void AddItemToProduce (MyFixedPoint amount, MyBlueprintDefinitionBase blueprint, long senderEntityId)
 
void AddItemToRepair (MyFixedPoint amount, MyBlueprintDefinitionBase blueprint, long senderEntityId, uint inventoryItemId, MyObjectBuilderType inventoryItemType, MyStringHash inventoryItemSubtypeId)
 
void RemoveItemToProduce (MyFixedPoint amount, MyBlueprintDefinitionBase blueprint, long senderEntityId, int itemId=-1)
 
void RemoveItemToProduce (MyFixedPoint amount, MyBlueprintToProduce blueprintInProduction, long senderEntityId)
 
MyFixedPoint MaxProducableAmount (MyBlueprintDefinitionBase blueprintDefinition, bool raiseMissingRequiredItemEvent=false)
 
MyBlueprintToProduce TryGetItemToProduce (MyBlueprintDefinitionBase blueprint)
 
MyRepairBlueprintToProduce TryGetItemToRepair (uint inventoryItemId, MyObjectBuilderType inventoryItemType, MyStringHash inventoryItemSubtypeId)
 
void InsertOperatingItem (MyPhysicalInventoryItem item, long senderEntityId)
 
void RemoveOperatingItem (MyPhysicalInventoryItem item, MyFixedPoint amount, long senderEntityId)
 
virtual void UpdateCurrentItemStatus (float statusDelta)
 
MyBlueprintToProduce GetCurrentItemInProduction ()
 
void AcquireLockRequest (long entityId)
 
void ReleaseLockRequest (long entityId)
 
override void Close ()
 
override void Deserialize (VRage.Game.ObjectBuilders.ComponentSystem.MyObjectBuilder_ComponentBase builder)
 
- Public Member Functions inherited from VRage.Game.Components.MyGameLogicComponent
virtual void UpdateOnceBeforeFrame ()
 
virtual void UpdateBeforeSimulation ()
 
virtual void UpdateBeforeSimulation10 ()
 
virtual void UpdateBeforeSimulation100 ()
 
virtual void UpdateAfterSimulation ()
 
virtual void UpdateAfterSimulation10 ()
 
virtual void UpdatingStopped ()
 
virtual void Init (MyObjectBuilder_EntityBase objectBuilder)
 
virtual void MarkForClose ()
 
- Public Member Functions inherited from VRage.Game.Components.MyEntityComponentBase
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
- Public Member Functions inherited from VRage.Game.Components.MyComponentBase
virtual void SetContainer (MyComponentContainer container)
 Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself. More...
 
virtual T GetAs< T > ()
 
virtual void OnAddedToScene ()
 CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already! More...
 
virtual void OnRemovedFromScene ()
 CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene! More...
 

Protected Member Functions

override void StartProduction_Implementation ()
 
override void UpdateProduction_Implementation ()
 
override void UpdateOperatingLevel ()
 
override void RemoveOperatingItem_Implementation (MyPhysicalInventoryItem item, MyFixedPoint amount)
 
override void InsertOperatingItem_Implementation (MyPhysicalInventoryItem item)
 
override void StopOperating_Implementation ()
 
override void StopProduction_Implementation ()
 
- Protected Member Functions inherited from Sandbox.Game.Components.MyCraftingComponentBase
void RaiseEvent_MissingRequiredItem (MyBlueprintDefinitionBase blueprint, MyBlueprintDefinitionBase.Item missingItem)
 
void RaiseEvent_InventoryIsFull ()
 
void OnBlueprintProduced (MyBlueprintDefinitionBase blueprint, MyFixedPoint amount)
 
void StartProduction ()
 
void StopProduction ()
 
void ClearItemsToProduce ()
 
void RemovePrereqItemsFromInventory (MyBlueprintDefinitionBase definition, MyFixedPoint amountMult)
 
virtual void AddProducedItemToInventory (MyBlueprintDefinitionBase definition, MyFixedPoint amountMult)
 
IMyInventoryItem CreateInventoryItem (MyDefinitionId itemDefinition, MyFixedPoint amount)
 
IMyInventoryItem CreateInventoryBlockItem (MyDefinitionId blockDefinition, MyFixedPoint amount)
 
MyFixedPoint MaxAmountToFitInventory (MyBlueprintDefinitionBase definition)
 
void RemoveOperatingItem (MyPhysicalInventoryItem item, MyFixedPoint amount)
 
void RaiseEvent_OperatingChanged ()
 
void StopOperating ()
 
void RaiseEvent_ProductionChanged ()
 
void SelectItemToProduction ()
 
void UpdateCurrentItem ()
 

Properties

override string ComponentTypeDebugString [get]
 
override string DisplayNameText [get]
 
override bool RequiresItemsToOperate [get]
 
override bool CanOperate [get]
 
override string OperatingItemsDisplayNameText [get]
 
override float OperatingItemsLevel [get]
 
MyCubeBlock Block [get]
 
bool IsBlockEnabled [get, set]
 
override bool AcceptsOperatingItems [get]
 
override float AvailableOperatingSpace [get]
 
- Properties inherited from Sandbox.Game.Components.MyCraftingComponentBase
bool IsProductionDone [get]
 
List< MyBlueprintClassDefinitionAvailableBlueprintClasses [get]
 
int BlueprintsToProduceCount [get]
 
abstract String DisplayNameText [get]
 
abstract bool RequiresItemsToOperate [get]
 
virtual String OperatingItemsDisplayNameText [get]
 
abstract bool CanOperate [get]
 
virtual float OperatingItemsLevel [get]
 
virtual bool AcceptsOperatingItems [get]
 
virtual float AvailableOperatingSpace [get]
 
bool IsProducing [get]
 
float CurrentItemStatus [get]
 
bool IsLocked [get]
 
long LockedByEntityId [get]
 
List< MyBlueprintToProduceItemsInProduction [get]
 
- Properties inherited from VRage.Game.Components.MyGameLogicComponent
MyEntityUpdateEnum NeedsUpdate [get, set]
 
bool Closed [get, protected set]
 
bool MarkedForClose [get, protected set]
 
override string ComponentTypeDebugString [get]
 
- Properties inherited from VRage.Game.Components.MyEntityComponentBase
MyEntityComponentContainer Container [get]
 
IMyEntity Entity [get]
 
abstract string ComponentTypeDebugString [get]
 Name of the base component type for debug purposes (e.g.: "Position") More...
 
- Properties inherited from VRage.Game.Components.MyComponentBase
MyComponentContainer ContainerBase [get]
 This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase. More...
 

Events

Action< MyCraftingComponentBlock, MyCubeBlockOnBlockTurnedOn
 
Action< MyCraftingComponentBlock, MyCubeBlockOnBlockTurnedOff
 
- Events inherited from Sandbox.Game.Components.MyCraftingComponentBase
Action< MyCraftingComponentBase, MyBlueprintDefinitionBase, MyFixedPointBlueprintProduced
 
Action< MyCraftingComponentBase, MyBlueprintDefinitionBase, MyBlueprintDefinitionBase.ItemMissingRequiredItem
 
Action< MyCraftingComponentBaseInventoryIsFull
 
Action< MyCraftingComponentBase, MyBlueprintToProduceProductionChanged
 
Action< MyCraftingComponentBaseOperatingChanged
 
Action LockAcquired
 
Action LockReleased
 
- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Additional Inherited Members

- Protected Attributes inherited from Sandbox.Game.Components.MyCraftingComponentBase
List< MyBlueprintClassDefinitionm_blueprintClasses = new List<MyBlueprintClassDefinition>()
 
int m_currentItem = -1
 
float m_currentItemStatus
 
float m_lastItemStatus
 
MyFixedPoint m_currentProductionAmount = 1
 
int m_elapsedTimeMs = 0
 
float m_craftingSpeedMultiplier = 1.0f
 

Detailed Description

Definition at line 26 of file MyCraftingComponentBlock.cs.

Constructor & Destructor Documentation

Sandbox.Game.Components.MyCraftingComponentBlock.MyCraftingComponentBlock ( )
inline

Definition at line 155 of file MyCraftingComponentBlock.cs.

Member Function Documentation

override bool Sandbox.Game.Components.MyCraftingComponentBlock.ContainsOperatingItem ( MyPhysicalInventoryItem  item)
inlinevirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 582 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.Deserialize ( MyObjectBuilder_ComponentBase  builder)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 307 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.GetInsertedOperatingItems ( List< MyPhysicalInventoryItem itemsList)
inlinevirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 465 of file MyCraftingComponentBlock.cs.

override VRage.ObjectBuilders.MyObjectBuilder_EntityBase Sandbox.Game.Components.MyCraftingComponentBlock.GetObjectBuilder ( bool  copy = false)
inlinevirtual
override MyFixedPoint Sandbox.Game.Components.MyCraftingComponentBlock.GetOperatingItemRemovableAmount ( MyPhysicalInventoryItem  item)
inlinevirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 588 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.Init ( MyComponentDefinitionBase  definition)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 221 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.InsertOperatingItem_Implementation ( MyPhysicalInventoryItem  item)
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 554 of file MyCraftingComponentBlock.cs.

override bool Sandbox.Game.Components.MyCraftingComponentBlock.IsOperatingItem ( MyPhysicalInventoryItem  item)
inlinevirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 389 of file MyCraftingComponentBlock.cs.

override bool Sandbox.Game.Components.MyCraftingComponentBlock.IsSerialized ( )
inlinevirtual

Tells the component container serializer whether this component should be saved

Returns

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 295 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.OnAddedToContainer ( )
inlinevirtual

Gets called after the container of this component changes

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 264 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.OnBeforeRemovedFromContainer ( )
inlinevirtual

Gets called before the removal of this component from a container

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 300 of file MyCraftingComponentBlock.cs.

void Sandbox.Game.Components.MyCraftingComponentBlock.OnBlockEnabledChanged ( MyCubeBlock  obj)
inline

Definition at line 273 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.RemoveOperatingItem_Implementation ( MyPhysicalInventoryItem  item,
MyFixedPoint  amount 
)
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 516 of file MyCraftingComponentBlock.cs.

override MyObjectBuilder_ComponentBase Sandbox.Game.Components.MyCraftingComponentBlock.Serialize ( bool  copy = false)
inlinevirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 342 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.StartProduction_Implementation ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 257 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.StopOperating_Implementation ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 604 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.StopProduction_Implementation ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 614 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.UpdateAfterSimulation100 ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MyGameLogicComponent.

Definition at line 470 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.UpdateOperatingLevel ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Game.Components.MyCraftingComponentBase.

Definition at line 396 of file MyCraftingComponentBlock.cs.

override void Sandbox.Game.Components.MyCraftingComponentBlock.UpdateProduction_Implementation ( )
inlineprotectedvirtual

Property Documentation

override bool Sandbox.Game.Components.MyCraftingComponentBlock.AcceptsOperatingItems
get

Definition at line 137 of file MyCraftingComponentBlock.cs.

override float Sandbox.Game.Components.MyCraftingComponentBlock.AvailableOperatingSpace
get

Definition at line 145 of file MyCraftingComponentBlock.cs.

MyCubeBlock Sandbox.Game.Components.MyCraftingComponentBlock.Block
get

Definition at line 115 of file MyCraftingComponentBlock.cs.

override bool Sandbox.Game.Components.MyCraftingComponentBlock.CanOperate
get

Definition at line 89 of file MyCraftingComponentBlock.cs.

override string Sandbox.Game.Components.MyCraftingComponentBlock.ComponentTypeDebugString
get

Definition at line 64 of file MyCraftingComponentBlock.cs.

override string Sandbox.Game.Components.MyCraftingComponentBlock.DisplayNameText
get

Definition at line 69 of file MyCraftingComponentBlock.cs.

bool Sandbox.Game.Components.MyCraftingComponentBlock.IsBlockEnabled
getset

Definition at line 125 of file MyCraftingComponentBlock.cs.

override string Sandbox.Game.Components.MyCraftingComponentBlock.OperatingItemsDisplayNameText
get

Definition at line 99 of file MyCraftingComponentBlock.cs.

override float Sandbox.Game.Components.MyCraftingComponentBlock.OperatingItemsLevel
get

Definition at line 107 of file MyCraftingComponentBlock.cs.

override bool Sandbox.Game.Components.MyCraftingComponentBlock.RequiresItemsToOperate
get

Definition at line 84 of file MyCraftingComponentBlock.cs.

Event Documentation

Action<MyCraftingComponentBlock, MyCubeBlock> Sandbox.Game.Components.MyCraftingComponentBlock.OnBlockTurnedOff

Definition at line 53 of file MyCraftingComponentBlock.cs.

Action<MyCraftingComponentBlock, MyCubeBlock> Sandbox.Game.Components.MyCraftingComponentBlock.OnBlockTurnedOn

Definition at line 51 of file MyCraftingComponentBlock.cs.


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