Show / Hide Table of Contents

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
BlueprintComponent
AreaBuffComponent
AirPollutionComponent
AnimalTrapComponent
AttachmentComponent
AuthComponent
AuthDataTrackerComponent
BankComponent
BedComponent
BoatComponent
BoatMooragePostComponent
ChargingComponent
ChunkSubscriberComponent
CivicObjectComponent
ClockComponent
CraftingComponent
CraneToolComponent
CreditComponent
CustomTextComponent
DeedManagementComponent
DeedSalesComponent
DoorComponent
EducationComponent
ElevatorCallPostComponent
ElevatorComponent
ExchangeComponent
ExplosionComponent
ExplosionLinkComponent
FakePlantComponent
ForSaleComponent
FuelConsumptionComponent
ItemDistributionComponent
JurisdictionComponent
LadderComponent
LinkComponent
MinimapComponent
MintComponent
MixingComponent
ModularVehicleComponent
MountComponent
MustBeOwnedComponent
NameDataTrackerComponent
OnOffComponent
PaintableComponent
PartsComponent
PerformCivicActionComponent
PhysicsValueSyncComponent
PicturePrinterComponent
PluginModulesComponent
PowerConsumptionComponent
PowerGeneratorComponent
PowerGridComponent
PowerGridNetworkComponent
RegistrarComponent
RepairBountyComponent
RepairComponent
RoomRequirementsComponent
SmokeComponent
SolarGeneratorComponent
SpawnedClaimsComponent
StatusComponent
InOutLinkedInventoriesComponent
ModularStockpileComponent
StockpileComponent
StorageComponent
WorldStockpileComponent
StoreComponent
SurfaceComponent
TailingsReportComponent
TreasuryComponent
VehicleComponent
VehicleHoeComponent
WardrobeComponent
WaterRiverGeneratorComponent
WindGeneratorComponent
RateCultureComponent
PictureFrameComponent
HousingComponent
TrackPlacementComponent
OccupancyRequirementComponent
ChimneyComponent
LiquidConsumerComponent
LiquidConverterComponent
LiquidProducerComponent
PipeComponent
AnnexationComponent
BorderControlComponent
CultureControlComponent
HomesteadFoundationComponent
InfluenceLimiterComponent
SettlementClaimStakeComponent
SettlementFoundationComponent
OutpostComponent
SettlementComponent
ButtonComponent
SelectionComponent
SwitchComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
Namespace: Eco.Gameplay.Objects
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
Type Description
WorldObjectComponentClientAvailability

ComponentPrefabName

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

ComponentTabName

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

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
Type Description
IAlias

Parent

Declaration
public WorldObject Parent { get; }
Property Value
Type Description
WorldObject

ShouldRequestEverything

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

Subscriptions

Declaration
public ref ThreadSafeSubscriptions Subscriptions { get; }
Property Value
Type Description
ThreadSafeSubscriptions

Methods

Destroy()

Called to destroy the WorldObjectComponent instance.

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
Type Name Description
IWorldObserver observer
AccessType requiredAccess
System.Object[] args
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()
Remarks

Use this to re-initialize anything that needs it (e.g.: leftover blocks of stockpile).

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()
Remarks

Use this to clean up anything that needs to be cleaned up (e.g.: leftover blocks of stockpile).

OnCreate()

Declaration
public virtual void OnCreate()

OnLinkClicked(TooltipOrigin, TooltipClickContext, User)

Declaration
public void OnLinkClicked(TooltipOrigin origin, TooltipClickContext clickContext, User user)
Parameters
Type Name Description
TooltipOrigin origin
TooltipClickContext clickContext
User user

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
Type Name Description
Player player
InventoryChangeSet invChanges
Inventory targetInventory
System.Boolean force
Returns
Type Description
InventoryMoveResult

UILinkContent()

Declaration
public LocString UILinkContent()
Returns
Type Description
LocString

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
Type Description
Deed

Implements

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

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