Show / Hide Table of Contents

Class VehicleComponent

Inheritance
System.Object
WorldObjectComponent
VehicleComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
INetObject
IOperatingWorldObjectComponent
IInventoryContext
Inherited Members
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.PostInitialize()
WorldObjectComponent.OnCreate()
WorldObjectComponent.Destroy()
WorldObjectComponent.LateTick()
WorldObjectComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
WorldObjectComponent.OnPickup(Player)
WorldObjectComponent.OnBeforeObjectMoved()
WorldObjectComponent.OnAfterObjectMoved()
WorldObjectComponent.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
WorldObjectComponent.UILinkContent()
WorldObjectComponent.Parent
WorldObjectComponent.Name
WorldObjectComponent.IconName
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
Assembly: Eco.Gameplay.dll
Syntax
[RequireComponent]
[RequireComponent]
[RequireComponent]
public class VehicleComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, INetObject, IOperatingWorldObjectComponent, IInventoryContext

Constructors

VehicleComponent()

Declaration
public VehicleComponent()

Fields

ReducePartDurabilityPerHourOfUse

Declaration
public double ReducePartDurabilityPerHourOfUse
Field Value
Type Description
System.Double

VehicleMovedEvent

Declaration
public ThreadSafeAction VehicleMovedEvent
Field Value
Type Description
ThreadSafeAction

Properties

Active

Declaration
public bool Active { get; }
Property Value
Type Description
System.Boolean

Availability

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

BuilderInventoryContext

Declaration
public BuilderInventory BuilderInventoryContext { get; set; }
Property Value
Type Description
BuilderInventory

Carrier

Declaration
public INetObject Carrier { get; set; }
Property Value
Type Description
INetObject

ControlHints

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

DecayDescription

Declaration
public virtual LocString DecayDescription { get; }
Property Value
Type Description
LocString

Drivable

Declaration
public bool Drivable { get; }
Property Value
Type Description
System.Boolean

Driver

Declaration
public Player Driver { get; set; }
Property Value
Type Description
Player

Enabled

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

FailDriveMsg

Declaration
public LocString FailDriveMsg { get; set; }
Property Value
Type Description
LocString

Honk

Declaration
public bool Honk { get; set; }
Property Value
Type Description
System.Boolean

ID

Declaration
public int ID { get; }
Property Value
Type Description
System.Int32

InventoryContext

Declaration
public ToolbarInventory InventoryContext { get; set; }
Property Value
Type Description
ToolbarInventory

IsDrivenUnderwater

Declaration
public bool IsDrivenUnderwater { get; }
Property Value
Type Description
System.Boolean

IsMoving

Declaration
public bool IsMoving { get; }
Property Value
Type Description
System.Boolean

IsSinking

Declaration
public bool IsSinking { get; }
Property Value
Type Description
System.Boolean

Lights

Declaration
public bool Lights { get; set; }
Property Value
Type Description
System.Boolean

MaxSpeed

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

Mounts

Declaration
public MountComponent Mounts { get; }
Property Value
Type Description
MountComponent

NetObjectCreationRealtime

Declaration
public double NetObjectCreationRealtime { get; set; }
Property Value
Type Description
System.Double

Operating

Declaration
public bool Operating { get; }
Property Value
Type Description
System.Boolean

OutOfFuel

This property set if Vehicle has fuel supply and it is out of energy.

Declaration
public bool OutOfFuel { get; set; }
Property Value
Type Description
System.Boolean

RequiresCalories

Declaration
public bool RequiresCalories { get; }
Property Value
Type Description
System.Boolean

Methods

Dismount(Int32)

Declaration
public void Dismount(int playerID)
Parameters
Type Name Description
System.Int32 playerID

HumanPowered(Single)

Declaration
public void HumanPowered(float caloriesPerSec)
Parameters
Type Name Description
System.Single caloriesPerSec

Initialize()

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

Initialize(Single, Single, Int32, String, Boolean)

Declaration
public void Initialize(float maxSpeed, float efficiencyMultiplier, int seats = 1, string controlHints = null, bool isDrivenUnderwater = false)
Parameters
Type Name Description
System.Single maxSpeed
System.Single efficiencyMultiplier
System.Int32 seats
System.String controlHints
System.Boolean isDrivenUnderwater

IsNotRelevant(INetObjectViewer)

Declaration
public bool IsNotRelevant(INetObjectViewer viewer)
Parameters
Type Name Description
INetObjectViewer viewer
Returns
Type Description
System.Boolean

IsRelevant(INetObjectViewer)

Declaration
public bool IsRelevant(INetObjectViewer viewer)
Parameters
Type Name Description
INetObjectViewer viewer
Returns
Type Description
System.Boolean

IsUpdated(INetObjectViewer)

Declaration
public bool IsUpdated(INetObjectViewer viewer)
Parameters
Type Name Description
INetObjectViewer viewer
Returns
Type Description
System.Boolean

LockCarried(INetObject)

Declaration
public void LockCarried(INetObject net)
Parameters
Type Name Description
INetObject net

MountAtInteraction(Player, InteractionTriggerInfo, InteractionTarget)

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

MountInteraction(Player, InteractionTriggerInfo, InteractionTarget)

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

ReceiveInitialState(BSONObject)

Declaration
public void ReceiveInitialState(BSONObject bsonObj)
Parameters
Type Name Description
BSONObject bsonObj

ReceiveUpdate(BSONObject)

Declaration
public void ReceiveUpdate(BSONObject bsonObj)
Parameters
Type Name Description
BSONObject bsonObj

SendInitialState(BSONObject, INetObjectViewer)

Declaration
public void SendInitialState(BSONObject bsonObj, INetObjectViewer viewer)
Parameters
Type Name Description
BSONObject bsonObj
INetObjectViewer viewer

SendUpdate(BSONObject, INetObjectViewer)

Declaration
public void SendUpdate(BSONObject bsonObj, INetObjectViewer viewer)
Parameters
Type Name Description
BSONObject bsonObj
INetObjectViewer viewer

SetAdditionalDrivableCheck(Func<Boolean>)

Declaration
public void SetAdditionalDrivableCheck(Func<bool> func)
Parameters
Type Name Description
System.Func<System.Boolean> func

TestDrivable()

Declaration
public bool TestDrivable()
Returns
Type Description
System.Boolean

Tick()

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

TrySetSinking(WrappedPosition3i)

This RPC is for setting vehicle is underwater or not using given position. Do nothing if vehicle is able to move underwater.

Declaration
public void TrySetSinking(WrappedPosition3i checkedPos)
Parameters
Type Name Description
WrappedPosition3i checkedPos

UnlockCarried()

Declaration
public void UnlockCarried()

Implements

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
INetObject
IOperatingWorldObjectComponent
IInventoryContext

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
☀
☾