Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Sandbox.Game.EntityComponents.MyResourceDistributorComponent Class Reference
Inheritance diagram for Sandbox.Game.EntityComponents.MyResourceDistributorComponent:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase

Public Member Functions

 MyResourceDistributorComponent (string debugName)
 
void AddSink (MyResourceSinkComponent sink)
 
void RemoveSink (MyResourceSinkComponent sink, bool resetSinkInput=true, bool markedForClose=false)
 
void AddSource (MyResourceSourceComponent source)
 
void RemoveSource (MyResourceSourceComponent source)
 
int GetSourceCount (MyDefinitionId resourceTypeId, MyStringHash sourceGroupType)
 
void UpdateBeforeSimulation ()
 
void UpdateHud (MyHudSinkGroupInfo info)
 Computes number of groups that have enough energy to work. More...
 
void ChangeSourcesState (MyDefinitionId resourceTypeId, MyMultipleEnabledEnum state, long playerId)
 
MyMultipleEnabledEnum SourcesEnabledByType (MyDefinitionId resourceTypeId)
 
float RemainingFuelTimeByType (MyDefinitionId resourceTypeId)
 
MyResourceStateEnum ResourceStateByType (MyDefinitionId typeId)
 
void ConveyorSystem_OnPoweredChanged ()
 
float MaxAvailableResourceByType (MyDefinitionId resourceTypeId)
 
float TotalRequiredInputByType (MyDefinitionId resourceTypeId)
 
- 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...
 

Static Public Member Functions

static bool IsConveyorConnectionRequiredTotal (MyDefinitionId typeId)
 
static bool IsConveyorConnectionRequiredTotal (ref MyDefinitionId typeId)
 

Public Attributes

string DebugName
 

Static Public Attributes

static readonly MyDefinitionId ElectricityId = new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Electricity")
 
static readonly MyDefinitionId HydrogenId = new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Hydrogen")
 
static readonly MyDefinitionId OxygenId = new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Oxygen")
 
static bool ShowTrace = false
 Remaining fuel time in hours. More...
 

Properties

MyMultipleEnabledEnum SourcesEnabled [get]
 
MyResourceStateEnum ResourceState [get]
 
static int SinkGroupPrioritiesTotal [get]
 
static DictionaryReader< MyStringHash, int > SinkSubtypesToPriority [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...
 

Additional Inherited Members

- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 32 of file MyResourceDistributorComponent.cs.

Constructor & Destructor Documentation

Sandbox.Game.EntityComponents.MyResourceDistributorComponent.MyResourceDistributorComponent ( string  debugName)
inline

Definition at line 408 of file MyResourceDistributorComponent.cs.

Member Function Documentation

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.AddSink ( MyResourceSinkComponent  sink)
inline

Definition at line 426 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.AddSource ( MyResourceSourceComponent  source)
inline

Definition at line 496 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.ChangeSourcesState ( MyDefinitionId  resourceTypeId,
MyMultipleEnabledEnum  state,
long  playerId 
)
inline

Definition at line 855 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.ConveyorSystem_OnPoweredChanged ( )
inline

Definition at line 2205 of file MyResourceDistributorComponent.cs.

int Sandbox.Game.EntityComponents.MyResourceDistributorComponent.GetSourceCount ( MyDefinitionId  resourceTypeId,
MyStringHash  sourceGroupType 
)
inline

Definition at line 790 of file MyResourceDistributorComponent.cs.

static bool Sandbox.Game.EntityComponents.MyResourceDistributorComponent.IsConveyorConnectionRequiredTotal ( MyDefinitionId  typeId)
inlinestatic

Definition at line 1987 of file MyResourceDistributorComponent.cs.

static bool Sandbox.Game.EntityComponents.MyResourceDistributorComponent.IsConveyorConnectionRequiredTotal ( ref MyDefinitionId  typeId)
inlinestatic

Definition at line 1992 of file MyResourceDistributorComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceDistributorComponent.MaxAvailableResourceByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 2242 of file MyResourceDistributorComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceDistributorComponent.RemainingFuelTimeByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 1925 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.RemoveSink ( MyResourceSinkComponent  sink,
bool  resetSinkInput = true,
bool  markedForClose = false 
)
inline

Definition at line 464 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.RemoveSource ( MyResourceSourceComponent  source)
inline

Definition at line 525 of file MyResourceDistributorComponent.cs.

MyResourceStateEnum Sandbox.Game.EntityComponents.MyResourceDistributorComponent.ResourceStateByType ( MyDefinitionId  typeId)
inline

Definition at line 1946 of file MyResourceDistributorComponent.cs.

MyMultipleEnabledEnum Sandbox.Game.EntityComponents.MyResourceDistributorComponent.SourcesEnabledByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 1913 of file MyResourceDistributorComponent.cs.

float Sandbox.Game.EntityComponents.MyResourceDistributorComponent.TotalRequiredInputByType ( MyDefinitionId  resourceTypeId)
inline

Definition at line 2248 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.UpdateBeforeSimulation ( )
inline

Definition at line 806 of file MyResourceDistributorComponent.cs.

void Sandbox.Game.EntityComponents.MyResourceDistributorComponent.UpdateHud ( MyHudSinkGroupInfo  info)
inline

Computes number of groups that have enough energy to work.

Definition at line 831 of file MyResourceDistributorComponent.cs.

Member Data Documentation

string Sandbox.Game.EntityComponents.MyResourceDistributorComponent.DebugName

Definition at line 275 of file MyResourceDistributorComponent.cs.

readonly MyDefinitionId Sandbox.Game.EntityComponents.MyResourceDistributorComponent.ElectricityId = new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Electricity")
static

Definition at line 34 of file MyResourceDistributorComponent.cs.

readonly MyDefinitionId Sandbox.Game.EntityComponents.MyResourceDistributorComponent.HydrogenId = new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Hydrogen")
static

Definition at line 35 of file MyResourceDistributorComponent.cs.

readonly MyDefinitionId Sandbox.Game.EntityComponents.MyResourceDistributorComponent.OxygenId = new MyDefinitionId(typeof(MyObjectBuilder_GasProperties), "Oxygen")
static

Definition at line 36 of file MyResourceDistributorComponent.cs.

bool Sandbox.Game.EntityComponents.MyResourceDistributorComponent.ShowTrace = false
static

Remaining fuel time in hours.

For debugging purposes. Enables trace messages and watches for this instance.

Definition at line 273 of file MyResourceDistributorComponent.cs.

Property Documentation

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

Definition at line 2256 of file MyResourceDistributorComponent.cs.

MyResourceStateEnum Sandbox.Game.EntityComponents.MyResourceDistributorComponent.ResourceState
get

Definition at line 278 of file MyResourceDistributorComponent.cs.

int Sandbox.Game.EntityComponents.MyResourceDistributorComponent.SinkGroupPrioritiesTotal
staticget

Definition at line 286 of file MyResourceDistributorComponent.cs.

DictionaryReader<MyStringHash, int> Sandbox.Game.EntityComponents.MyResourceDistributorComponent.SinkSubtypesToPriority
staticget

Definition at line 294 of file MyResourceDistributorComponent.cs.

MyMultipleEnabledEnum Sandbox.Game.EntityComponents.MyResourceDistributorComponent.SourcesEnabled
get

Definition at line 277 of file MyResourceDistributorComponent.cs.


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