Show / Hide Table of Contents

Class FuelSupplyComponent

Inheritance
System.Object
WorldObjectComponent
StorageComponent
FuelSupplyComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
IInventoryWorldObjectComponent
IPermanentDestroyHandler
ICanOverrideAuth
System.ComponentModel.INotifyPropertyChanged
IHasEnvVars
Inherited Members
StorageComponent.PostInitialize()
StorageComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
StorageComponent.FindItemCantContain(IEnumerable<ItemStack>)
StorageComponent.ShouldOverrideAuth(IAlias, IOwned, GameAction)
StorageComponent.ConsolidateInventory(User)
StorageComponent.HiddenFromUI
StorageComponent.Inventories
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.OnCreate()
WorldObjectComponent.Tick()
WorldObjectComponent.OnPickup(Player)
WorldObjectComponent.OnBeforeObjectMoved()
WorldObjectComponent.OnAfterObjectMoved()
WorldObjectComponent.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
WorldObjectComponent.UILinkContent()
WorldObjectComponent.Parent
WorldObjectComponent.Name
WorldObjectComponent.ForceActiveTab
WorldObjectComponent.ComponentPrefabName
WorldObjectComponent.ComponentTabName
WorldObjectComponent.IsDestroyed
WorldObjectComponent.ShouldRequestEverything
WorldObjectComponent.Owners
WorldObjectComponent.ControllerID
WorldObjectComponent.IOwned.Deed
WorldObjectComponent.Subscriptions
WorldObjectComponent.PropertyChanged
Namespace: Eco.Gameplay.Components.Storage
Assembly: Eco.Gameplay.dll
Syntax
[RequireComponent]
[DefaultToUnlinked]
public class FuelSupplyComponent : StorageComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IInventoryWorldObjectComponent, IPermanentDestroyHandler, ICanOverrideAuth, INotifyPropertyChanged, IHasEnvVars

Constructors

FuelSupplyComponent()

Declaration
public FuelSupplyComponent()

FuelSupplyComponent(Int32, String[])

Declaration
public FuelSupplyComponent(int numFuelSlots, params string[] fuelTags)
Parameters
Type Name Description
System.Int32 numFuelSlots
System.String[] fuelTags

Properties

Availability

Declaration
public override WorldObjectComponentClientAvailability Availability { get; }
Property Value
Type Description
WorldObjectComponentClientAvailability
Overrides
WorldObjectComponent.Availability

ConsumptionRate

Declaration
public float ConsumptionRate { get; }
Property Value
Type Description
System.Single

CurrentFuel

Declaration
public Item CurrentFuel { get; }
Property Value
Type Description
Item

Enabled

Declaration
public override bool Enabled { get; }
Property Value
Type Description
System.Boolean
Overrides
WorldObjectComponent.Enabled

Energy

Declaration
public float Energy { get; }
Property Value
Type Description
System.Single

EnergyInSupply

Declaration
public float EnergyInSupply { get; }
Property Value
Type Description
System.Single

FuelTags

Declaration
public IEnumerable<string> FuelTags { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

FuelTypesString

Declaration
public string FuelTypesString { get; }
Property Value
Type Description
System.String

HighestValueFuel

Declaration
public Item HighestValueFuel { get; }
Property Value
Type Description
Item

IconName

Declaration
public override string IconName { get; }
Property Value
Type Description
System.String
Overrides
StorageComponent.IconName

Inventory

Declaration
public override Inventory Inventory { get; }
Property Value
Type Description
Inventory
Overrides
StorageComponent.Inventory

PeakEnergy

Declaration
public float PeakEnergy { get; }
Property Value
Type Description
System.Single

Methods

CanConsumeFuel(Single)

Checks whether it's possible for the component to burn provided amount of energy.

Declaration
public bool CanConsumeFuel(float joules)
Parameters
Type Name Description
System.Single joules
Returns
Type Description
System.Boolean

CanPutIntoFuelTank(User)

Declaration
[EnvVar]
public bool CanPutIntoFuelTank(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Boolean

ConsumeAsMuchAsPossible(Single)

Consumes as much joules as possible and returns actually consumed joules. It tries to load fuel from inventory when Energy fully consumed.

Declaration
public float ConsumeAsMuchAsPossible(float joules)
Parameters
Type Name Description
System.Single joules
Returns
Type Description
System.Single

Destroy()

Declaration
public override void Destroy()
Overrides
StorageComponent.Destroy()

Initialize()

Declaration
public override void Initialize()
Overrides
StorageComponent.Initialize()

Initialize(Int32, String[])

Declaration
public void Initialize(int numFuelSlots, string[] fuelTags)
Parameters
Type Name Description
System.Int32 numFuelSlots
System.String[] fuelTags

LateTick()

Declaration
public override void LateTick()
Overrides
WorldObjectComponent.LateTick()

PutItem(Player, InteractionTriggerInfo, InteractionTarget)

Declaration
[Interaction]
public void PutItem(Player player, InteractionTriggerInfo trigger, InteractionTarget target)
Parameters
Type Name Description
Player player
InteractionTriggerInfo trigger
InteractionTarget target

Implements

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
IInventoryWorldObjectComponent
IPermanentDestroyHandler
ICanOverrideAuth
System.ComponentModel.INotifyPropertyChanged
IHasEnvVars

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾