Show / Hide Table of Contents

Class WeightComponent

Used to track the total weight of an inventory.

Inheritance
System.Object
InventoryComponent
WeightComponent
Implements
IController
IViewController
IHasUniversalID
Inherited Members
InventoryComponent.ControllerID
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public class WeightComponent : InventoryComponent, IController, IViewController, IHasUniversalID

Constructors

WeightComponent(Int32)

Declaration
public WeightComponent(int maxWeight)
Parameters
Type Name Description
System.Int32 maxWeight

Properties

MaxWeight

Represents the max weight this inventory can support.

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

Weight

Represents the true modified weight of this inventory.

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

Methods

ApplyChange(Item, Int32)

Declaration
public override void ApplyChange(Item item, int quantityDelta)
Parameters
Type Name Description
Item item
System.Int32 quantityDelta
Overrides
InventoryComponent.ApplyChange(Item, Int32)

EndChangeSetModification(Boolean)

Declaration
public override void EndChangeSetModification(bool successful)
Parameters
Type Name Description
System.Boolean successful
Overrides
InventoryComponent.EndChangeSetModification(Boolean)

Initialize(Inventory)

Declaration
public override void Initialize(Inventory inventory)
Parameters
Type Name Description
Inventory inventory
Overrides
InventoryComponent.Initialize(Inventory)

SetMaxWeight(Int32)

Declaration
public void SetMaxWeight(int maxWeight)
Parameters
Type Name Description
System.Int32 maxWeight

Implements

IController
IViewController
IHasUniversalID

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