Class MyResourceSourceComponent
Inheritance
System.Object
MyResourceSourceComponent
Assembly: Sandbox.Game.dll
Syntax
public class MyResourceSourceComponent : MyResourceSourceComponentBase, IMyEntityComponentBase, IMyComponentBase
Constructors
MyResourceSourceComponent(Int32)
Declaration
public MyResourceSourceComponent(int initialAllocationSize = 1)
Parameters
Type |
Name |
Description |
System.Int32 |
initialAllocationSize |
|
Fields
CountTowardsRemainingEnergyTime
Declaration
public bool CountTowardsRemainingEnergyTime
Field Value
Type |
Description |
System.Boolean |
|
Properties
ComponentTypeDebugString
Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
CurrentOutput
Declaration
public float CurrentOutput { get; }
Property Value
Type |
Description |
System.Single |
|
DefinedOutput
Declaration
public float DefinedOutput { get; }
Property Value
Type |
Description |
System.Single |
|
Enabled
Declaration
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Grid
Declaration
public MyCubeGrid Grid { get; set; }
Property Value
Group
Declaration
public MyStringHash Group { get; }
Property Value
HasCapacityRemaining
Declaration
public bool HasCapacityRemaining { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsInfiniteCapacity
Declaration
public bool IsInfiniteCapacity { get; }
Property Value
Type |
Description |
System.Boolean |
|
MaxOutput
Declaration
public float MaxOutput { get; }
Property Value
Type |
Description |
System.Single |
|
ProductionEnabled
Declaration
public bool ProductionEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
ProductionToCapacityMultiplier
Declaration
public float ProductionToCapacityMultiplier { get; }
Property Value
Type |
Description |
System.Single |
|
RemainingCapacity
Declaration
public float RemainingCapacity { get; }
Property Value
Type |
Description |
System.Single |
|
ResourceTypes
Declaration
public ListReader<MyDefinitionId> ResourceTypes { get; }
Property Value
TemporaryConnectedEntity
Declaration
public MyEntity TemporaryConnectedEntity { get; set; }
Property Value
Methods
add_HasCapacityRemainingChanged(MyResourceCapacityRemainingChangedDelegate)
Declaration
public void add_HasCapacityRemainingChanged(MyResourceCapacityRemainingChangedDelegate value)
Parameters
add_MaxOutputChanged(MyResourceOutputChangedDelegate)
Declaration
public void add_MaxOutputChanged(MyResourceOutputChangedDelegate value)
Parameters
add_OutputChanged(MyResourceOutputChangedDelegate)
Declaration
public void add_OutputChanged(MyResourceOutputChangedDelegate value)
Parameters
add_ProductionEnabledChanged(MyResourceCapacityRemainingChangedDelegate)
Declaration
public void add_ProductionEnabledChanged(MyResourceCapacityRemainingChangedDelegate value)
Parameters
CurrentOutputByType(MyDefinitionId)
Declaration
public override float CurrentOutputByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Single |
|
Overrides
DebugDraw(Matrix)
Declaration
public void DebugDraw(Matrix worldMatrix)
Parameters
Type |
Name |
Description |
Matrix |
worldMatrix |
|
DefinedOutputByType(MyDefinitionId)
Declaration
public override float DefinedOutputByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Single |
|
Overrides
GetTypeIndex(MyDefinitionId)
Declaration
protected int GetTypeIndex(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Int32 |
|
HasCapacityRemainingByType(MyDefinitionId)
Declaration
public bool HasCapacityRemainingByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Init(MyStringHash, MyResourceSourceInfo)
Declaration
public void Init(MyStringHash sourceGroup, MyResourceSourceInfo sourceResourceData)
Parameters
Init(MyStringHash, List<MyResourceSourceInfo>)
Declaration
public void Init(MyStringHash sourceGroup, List<MyResourceSourceInfo> sourceResourceData)
Parameters
MaxOutputByType(MyDefinitionId)
Declaration
public override float MaxOutputByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Single |
|
Overrides
OnProductionEnabledChanged(Nullable<MyDefinitionId>)
Do not use this unless absolutely necessary.
Declaration
public void OnProductionEnabledChanged(Nullable<MyDefinitionId> resId = null)
Parameters
ProductionEnabledByType(MyDefinitionId)
Declaration
public override bool ProductionEnabledByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
ProductionToCapacityMultiplierByType(MyDefinitionId)
Declaration
public float ProductionToCapacityMultiplierByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Single |
|
RemainingCapacityByType(MyDefinitionId)
Declaration
public float RemainingCapacityByType(MyDefinitionId resourceTypeId)
Parameters
Returns
Type |
Description |
System.Single |
|
remove_HasCapacityRemainingChanged(MyResourceCapacityRemainingChangedDelegate)
Declaration
public void remove_HasCapacityRemainingChanged(MyResourceCapacityRemainingChangedDelegate value)
Parameters
remove_MaxOutputChanged(MyResourceOutputChangedDelegate)
Declaration
public void remove_MaxOutputChanged(MyResourceOutputChangedDelegate value)
Parameters
remove_OutputChanged(MyResourceOutputChangedDelegate)
Declaration
public void remove_OutputChanged(MyResourceOutputChangedDelegate value)
Parameters
remove_ProductionEnabledChanged(MyResourceCapacityRemainingChangedDelegate)
Declaration
public void remove_ProductionEnabledChanged(MyResourceCapacityRemainingChangedDelegate value)
Parameters
SetMaxOutput(Single)
Declaration
public void SetMaxOutput(float newMaxOutput)
Parameters
Type |
Name |
Description |
System.Single |
newMaxOutput |
|
SetMaxOutputByType(MyDefinitionId, Single)
Declaration
public void SetMaxOutputByType(MyDefinitionId resourceTypeId, float newMaxOutput)
Parameters
Type |
Name |
Description |
MyDefinitionId |
resourceTypeId |
|
System.Single |
newMaxOutput |
|
SetOutput(Single)
Declaration
public void SetOutput(float newOutput)
Parameters
Type |
Name |
Description |
System.Single |
newOutput |
|
SetOutputByType(MyDefinitionId, Single)
Declaration
public void SetOutputByType(MyDefinitionId resourceTypeId, float newOutput)
Parameters
Type |
Name |
Description |
MyDefinitionId |
resourceTypeId |
|
System.Single |
newOutput |
|
SetProductionEnabledByType(MyDefinitionId, Boolean)
Declaration
public void SetProductionEnabledByType(MyDefinitionId resourceTypeId, bool newProducerEnabled)
Parameters
Type |
Name |
Description |
MyDefinitionId |
resourceTypeId |
|
System.Boolean |
newProducerEnabled |
|
SetRemainingCapacityByType(MyDefinitionId, Single)
Declaration
public void SetRemainingCapacityByType(MyDefinitionId resourceTypeId, float newRemainingCapacity)
Parameters
Type |
Name |
Description |
MyDefinitionId |
resourceTypeId |
|
System.Single |
newRemainingCapacity |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Events
HasCapacityRemainingChanged
Declaration
public event MyResourceCapacityRemainingChangedDelegate HasCapacityRemainingChanged
Event Type
MaxOutputChanged
Declaration
public event MyResourceOutputChangedDelegate MaxOutputChanged
Event Type
OutputChanged
Declaration
public event MyResourceOutputChangedDelegate OutputChanged
Event Type
ProductionEnabledChanged
Declaration
public event MyResourceCapacityRemainingChangedDelegate ProductionEnabledChanged
Event Type
Extension Methods