Show / Hide Table of Contents

Class InteractableStorage

Defines interactions that storages which should have put/take available can use.

Inheritance
System.Object
WorldObjectComponent
StorageComponent
InteractableStorage
PlotsComponent
PublicStorageComponent
SelectionStorageComponent
VehicleToolComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
IInventoryWorldObjectComponent
IPermanentDestroyHandler
ICanOverrideAuth
IHasEnvVars
Inherited Members
StorageComponent.PostInitialize()
StorageComponent.Destroy()
StorageComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
StorageComponent.FindItemCantContain(IEnumerable<ItemStack>)
StorageComponent.ShouldOverrideAuth(IAlias, IOwned, GameAction)
StorageComponent.ConsolidateInventory(User)
StorageComponent.Inventory
StorageComponent.IconName
StorageComponent.HiddenFromUI
StorageComponent.Inventories
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.OnCreate()
WorldObjectComponent.Tick()
WorldObjectComponent.LateTick()
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.Enabled
WorldObjectComponent.IsDestroyed
WorldObjectComponent.Availability
WorldObjectComponent.ShouldRequestEverything
WorldObjectComponent.Owners
WorldObjectComponent.ControllerID
WorldObjectComponent.IOwned.Deed
WorldObjectComponent.Subscriptions
WorldObjectComponent.PropertyChanged
Namespace: Eco.Gameplay.Components.Storage
Assembly: Eco.Gameplay.dll
Syntax
public abstract class InteractableStorage : StorageComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IInventoryWorldObjectComponent, IPermanentDestroyHandler, ICanOverrideAuth, IHasEnvVars

Constructors

InteractableStorage()

Declaration
protected InteractableStorage()

Properties

CanTakeAll

Declaration
[EnvVar]
public bool CanTakeAll { get; }
Property Value
Type Description
System.Boolean

Methods

CanPut(User)

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

CanTake(User)

Declaration
[EnvVar]
public Item CanTake(User user)
Parameters
Type Name Description
User user
Returns
Type Description
Item

GetItemsUserCanTake(WorldObject, User, Item, Item, Boolean, Func<ItemStack, Item, Boolean>)

Get items available to user in this inventory

Declaration
public List<Item> GetItemsUserCanTake(WorldObject worldObject, User user, Item carriedItem, Item selectedItem, bool tryTakeAll = false, Func<ItemStack, Item, bool> restrictionsPassed = null)
Parameters
Type Name Description
WorldObject worldObject
User user
Item carriedItem
Item selectedItem
System.Boolean tryTakeAll
System.Func<ItemStack, Item, System.Boolean> restrictionsPassed

possible restrictions of other inventories

Returns
Type Description
System.Collections.Generic.List<Item>

HoldingTool(User)

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

Initialize()

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

PutItem(Player, InteractionTriggerInfo, InteractionTarget)

2 interactions to separate put with a tool in hand and without, so tool has an animation and hand doesnt. the one with more restrictions (in this case extra requiredEnvVar:HoldingTool, should always be first.

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

Take(User, InteractionTarget, Boolean)

Declaration
public void Take(User user, InteractionTarget target, bool takeAll = false)
Parameters
Type Name Description
User user
InteractionTarget target
System.Boolean takeAll

TakeItem(Player, InteractionTriggerInfo, InteractionTarget)

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

Implements

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
IInventoryWorldObjectComponent
IPermanentDestroyHandler
ICanOverrideAuth
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
☀
☾