Space Engineers
Classes | Public Member Functions | Protected Member Functions | Properties | Events | List of all members
Sandbox.Game.EntityComponents.MyResourceSourceComponent Class Reference
Inheritance diagram for Sandbox.Game.EntityComponents.MyResourceSourceComponent:
VRage.Game.Components.MyResourceSourceComponentBase VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase

Public Member Functions

 MyResourceSourceComponent (int initialAllocationSize=1)
 
void Init (MyStringHash sourceGroup, MyResourceSourceInfo sourceResourceData)
 
void Init (MyStringHash sourceGroup, List< MyResourceSourceInfo > sourceResourceData)
 
override float CurrentOutputByType (MyDefinitionId resourceTypeId)
 Currently used power output of the producer in MW or litres/h. More...
 
void SetOutput (float newOutput)
 
void SetOutputByType (MyDefinitionId resourceTypeId, float newOutput)
 
float RemainingCapacityByType (MyDefinitionId resourceTypeId)
 
void SetRemainingCapacityByType (MyDefinitionId resourceTypeId, float newRemainingCapacity)
 
override float MaxOutputByType (MyDefinitionId resourceTypeId)
 Maximum power output of the producer in MW or litres/h. More...
 
void SetMaxOutput (float newMaxOutput)
 
void SetMaxOutputByType (MyDefinitionId resourceTypeId, float newMaxOutput)
 
override float DefinedOutputByType (MyDefinitionId resourceTypeId)
 Max resource output defined in definition in MW or litres/h. More...
 
float ProductionToCapacityMultiplierByType (MyDefinitionId resourceTypeId)
 
bool HasCapacityRemainingByType (MyDefinitionId resourceTypeId)
 
override bool ProductionEnabledByType (MyDefinitionId resourceTypeId)
 Resource production is enabled More...
 
void SetProductionEnabledByType (MyDefinitionId resourceTypeId, bool newProducerEnabled)
 
override string ToString ()
 
- 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...
 
virtual MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
virtual void Deserialize (MyObjectBuilder_ComponentBase builder)
 
virtual void Init (MyComponentDefinitionBase definition)
 
virtual bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 

Protected Member Functions

int GetTypeIndex (MyDefinitionId resourceTypeId)
 

Properties

MyEntity TemporaryConnectedEntity [get, set]
 
MyStringHash Group [get]
 
float CurrentOutput [get]
 
float MaxOutput [get]
 
float DefinedOutput [get]
 
bool ProductionEnabled [get]
 
float RemainingCapacity [get]
 
bool IsInfiniteCapacity [get]
 
float ProductionToCapacityMultiplier [get]
 
bool Enabled [get, set]
 
bool HasCapacityRemaining [get]
 
ListReader< MyDefinitionIdResourceTypes [get]
 
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

MyResourceCapacityRemainingChangedDelegate HasCapacityRemainingChanged
 
MyResourceCapacityRemainingChangedDelegate ProductionEnabledChanged
 
MyResourceOutputChangedDelegate OutputChanged
 
MyResourceOutputChangedDelegate MaxOutputChanged
 
- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 29 of file MyResourceSourceComponent.cs.

Constructor & Destructor Documentation

Sandbox.Game.EntityComponents.MyResourceSourceComponent.MyResourceSourceComponent ( int  initialAllocationSize = 1)
inline

Definition at line 82 of file MyResourceSourceComponent.cs.

Member Function Documentation

override float Sandbox.Game.EntityComponents.MyResourceSourceComponent.CurrentOutputByType ( MyDefinitionId  resourceTypeId)
inlinevirtual

Currently used power output of the producer in MW or litres/h.

Implements VRage.Game.Components.MyResourceSourceComponentBase.

Definition at line 138 of file MyResourceSourceComponent.cs.

override float Sandbox.Game.EntityComponents.MyResourceSourceComponent.DefinedOutputByType ( MyDefinitionId  resourceTypeId)
inlinevirtual

Max resource output defined in definition in MW or litres/h.

Implements VRage.Game.Components.MyResourceSourceComponentBase.

Definition at line 204 of file MyResourceSourceComponent.cs.

int Sandbox.Game.EntityComponents.MyResourceSourceComponent.GetTypeIndex ( MyDefinitionId  resourceTypeId)
inlineprotected

Definition at line 274 of file MyResourceSourceComponent.cs.

bool Sandbox.Game.EntityComponents.MyResourceSourceComponent.HasCapacityRemainingByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 214 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.Init ( MyStringHash  sourceGroup,
MyResourceSourceInfo  sourceResourceData 
)
inline

Definition at line 87 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.Init ( MyStringHash  sourceGroup,
List< MyResourceSourceInfo sourceResourceData 
)
inline

Definition at line 95 of file MyResourceSourceComponent.cs.

override float Sandbox.Game.EntityComponents.MyResourceSourceComponent.MaxOutputByType ( MyDefinitionId  resourceTypeId)
inlinevirtual

Maximum power output of the producer in MW or litres/h.

Implements VRage.Game.Components.MyResourceSourceComponentBase.

Definition at line 180 of file MyResourceSourceComponent.cs.

override bool Sandbox.Game.EntityComponents.MyResourceSourceComponent.ProductionEnabledByType ( MyDefinitionId  resourceTypeId)
inlinevirtual

Resource production is enabled

Implements VRage.Game.Components.MyResourceSourceComponentBase.

Definition at line 236 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.ProductionToCapacityMultiplierByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 209 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.RemainingCapacityByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 158 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.SetMaxOutput ( float  newMaxOutput)
inline

Definition at line 191 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.SetMaxOutputByType ( MyDefinitionId  resourceTypeId,
float  newMaxOutput 
)
inline

Definition at line 192 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.SetOutput ( float  newOutput)
inline

Definition at line 143 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.SetOutputByType ( MyDefinitionId  resourceTypeId,
float  newOutput 
)
inline

Definition at line 148 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.SetProductionEnabledByType ( MyDefinitionId  resourceTypeId,
bool  newProducerEnabled 
)
inline

Definition at line 241 of file MyResourceSourceComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceSourceComponent.SetRemainingCapacityByType ( MyDefinitionId  resourceTypeId,
float  newRemainingCapacity 
)
inline

Definition at line 163 of file MyResourceSourceComponent.cs.

override string Sandbox.Game.EntityComponents.MyResourceSourceComponent.ToString ( )
inline

Definition at line 282 of file MyResourceSourceComponent.cs.

Property Documentation

override string Sandbox.Game.EntityComponents.MyResourceSourceComponent.ComponentTypeDebugString
get

Definition at line 293 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.CurrentOutput
get

Definition at line 61 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.DefinedOutput
get

Definition at line 63 of file MyResourceSourceComponent.cs.

bool Sandbox.Game.EntityComponents.MyResourceSourceComponent.Enabled
getset

Definition at line 71 of file MyResourceSourceComponent.cs.

MyStringHash Sandbox.Game.EntityComponents.MyResourceSourceComponent.Group
get

Definition at line 59 of file MyResourceSourceComponent.cs.

bool Sandbox.Game.EntityComponents.MyResourceSourceComponent.HasCapacityRemaining
get

Definition at line 74 of file MyResourceSourceComponent.cs.

bool Sandbox.Game.EntityComponents.MyResourceSourceComponent.IsInfiniteCapacity
get

Definition at line 69 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.MaxOutput
get

Definition at line 62 of file MyResourceSourceComponent.cs.

bool Sandbox.Game.EntityComponents.MyResourceSourceComponent.ProductionEnabled
get

Definition at line 64 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.ProductionToCapacityMultiplier
get

Definition at line 70 of file MyResourceSourceComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceSourceComponent.RemainingCapacity
get

Definition at line 67 of file MyResourceSourceComponent.cs.

ListReader<MyDefinitionId> Sandbox.Game.EntityComponents.MyResourceSourceComponent.ResourceTypes
get

Definition at line 80 of file MyResourceSourceComponent.cs.

MyEntity Sandbox.Game.EntityComponents.MyResourceSourceComponent.TemporaryConnectedEntity
getset

Definition at line 36 of file MyResourceSourceComponent.cs.

Event Documentation

MyResourceCapacityRemainingChangedDelegate Sandbox.Game.EntityComponents.MyResourceSourceComponent.HasCapacityRemainingChanged

Definition at line 31 of file MyResourceSourceComponent.cs.

MyResourceOutputChangedDelegate Sandbox.Game.EntityComponents.MyResourceSourceComponent.MaxOutputChanged

Definition at line 34 of file MyResourceSourceComponent.cs.

MyResourceOutputChangedDelegate Sandbox.Game.EntityComponents.MyResourceSourceComponent.OutputChanged

Definition at line 33 of file MyResourceSourceComponent.cs.

MyResourceCapacityRemainingChangedDelegate Sandbox.Game.EntityComponents.MyResourceSourceComponent.ProductionEnabledChanged

Definition at line 32 of file MyResourceSourceComponent.cs.


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