Class WorldObjectComponent
Base class for all world object components. Icon attribute should be applied on a particular descendant, do not put it here.
Inheritance
System.Object
WorldObjectComponent
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
[IconGroup("WorldObjectComponent")]
public abstract class WorldObjectComponent : Object, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions
Constructors
WorldObjectComponent()
Declaration
protected WorldObjectComponent()
Properties
Availability
Declaration
public virtual WorldObjectComponentClientAvailability Availability { get; }
Property Value
ComponentPrefabName
Declaration
public virtual string ComponentPrefabName { get; }
Property Value
| Type |
Description |
| System.String |
|
ComponentTabName
Declaration
public virtual LocString ComponentTabName { get; }
Property Value
ControllerID
Declaration
public ref int ControllerID { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Enabled
Flag representing whether or not this component is functioning. World object enabled state is true if all components are enabled.
Declaration
public virtual bool Enabled { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
ForceActiveTab
Declaration
public bool ForceActiveTab { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IconName
Declaration
public virtual string IconName { get; }
Property Value
| Type |
Description |
| System.String |
|
IsDestroyed
Declaration
public bool IsDestroyed { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Name
Declaration
public string Name { get; }
Property Value
| Type |
Description |
| System.String |
|
Owners
Declaration
public virtual IAlias Owners { get; }
Property Value
Parent
Declaration
public WorldObject Parent { get; }
Property Value
ShouldRequestEverything
Declaration
public virtual bool ShouldRequestEverything { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Subscriptions
Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Methods
Destroy()
Declaration
public virtual void Destroy()
Initialize()
Called to initialize the WorldObjectComponent instance. Components that need a tab also should define HasIcon for themselves, so record a warning if check is failed.
Declaration
public virtual void Initialize()
IsRPCAuthorized(IWorldObserver, AccessType, Object[])
Declaration
public virtual bool IsRPCAuthorized(IWorldObserver observer, AccessType requiredAccess, object[] args)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
LateTick()
Declaration
public virtual void LateTick()
OnAfterObjectMoved()
Called once the object's move action has been confirmed and the position has been updated.
Declaration
public virtual void OnAfterObjectMoved()
OnBeforeObjectMoved()
Called once the object's move action has been confirmed, but before the actual movement takes place (so the position will be the one before the movement).
Declaration
public virtual void OnBeforeObjectMoved()
OnComponentAddedPostInit(WorldObjectComponent)
Called when a component gets added later after initialization.
Declaration
public virtual void OnComponentAddedPostInit(WorldObjectComponent c)
Parameters
OnCreate()
Declaration
public virtual void OnCreate()
OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
Declaration
public void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
OnPickup(Player)
Declaration
public virtual void OnPickup(Player player)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
PostInitialize()
Declaration
public virtual void PostInitialize()
Tick()
Declaration
public virtual void Tick()
TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
Declaration
public virtual InventoryMoveResult TryPickup(Player player, InventoryChangeSet invChanges, Inventory targetInventory, bool force)
Parameters
Returns
UILinkContent()
Declaration
public LocString UILinkContent()
Returns
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
Description |
| System.ComponentModel.PropertyChangedEventHandler |
|
Explicit Interface Implementations
IOwned.Deed
Declaration
Deed IOwned.Deed { get; }
Returns
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods