Class WeightRestriction
Prohibits the inventory Prohibits from accepting items beyond the weight limit
Inheritance
System.Object
WeightRestriction
Assembly: Eco.Gameplay.dll
Syntax
public class WeightRestriction : InventoryRestriction
Properties
Message
Declaration
public override LocString Message { get; }
Property Value
Overrides
Priority
Declaration
public override int Priority { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
SurpassStackSize
Declaration
public override bool SurpassStackSize { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Methods
Add(Inventory, Int32, Boolean)
Declaration
public static WeightRestriction Add(Inventory inventory, int maxWeight, bool overrideStackSize = false)
Parameters
Type |
Name |
Description |
Inventory |
inventory |
|
System.Int32 |
maxWeight |
|
System.Boolean |
overrideStackSize |
|
Returns
MaxAccepted(Item, Int32)
Declaration
public override int MaxAccepted(Item item, int currentQuantity)
Parameters
Type |
Name |
Description |
Item |
item |
|
System.Int32 |
currentQuantity |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
MaxAccepted(RestrictionCheckData, Item, Int32)
Declaration
public override int MaxAccepted(RestrictionCheckData checkData, Item item, int currentQuantity)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Overrides
SetMaxWeight(Int32)
Declaration
public void SetMaxWeight(int maxWeight)
Parameters
Type |
Name |
Description |
System.Int32 |
maxWeight |
|
Extension Methods