Show / Hide Table of Contents

Class GeneralRestriction

Restricts the inventory to only things that pass a given function.

Inheritance
System.Object
InventoryRestriction
GeneralRestriction
Inherited Members
InventoryRestriction.MaxAccepted(Item, Int32)
InventoryRestriction.MaxAccepted(RestrictionCheckData, Item)
InventoryRestriction.MaxAccepted(RestrictionCheckData, Item, Int32)
InventoryRestriction.Type
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
public class GeneralRestriction : InventoryRestriction

Constructors

GeneralRestriction(Func<Item, Int32>, LocString)

Passes in item and quantity, returns how many are accepted.

Declaration
public GeneralRestriction(Func<Item, int> testFunc, LocString message)
Parameters
Type Name Description
System.Func<Item, System.Int32> testFunc
LocString message

Properties

Message

Declaration
public override LocString Message { get; }
Property Value
Type Description
LocString
Overrides
InventoryRestriction.Message

Priority

Declaration
public override int Priority { get; }
Property Value
Type Description
System.Int32
Overrides
InventoryRestriction.Priority

Methods

MaxAccepted(Item)

Declaration
public override int MaxAccepted(Item item)
Parameters
Type Name Description
Item item
Returns
Type Description
System.Int32
Overrides
InventoryRestriction.MaxAccepted(Item)

MaxPickup(RestrictionCheckData, Item, Int32)

Declaration
public override int MaxPickup(RestrictionCheckData checkData, Item item, int totalMoved)
Parameters
Type Name Description
RestrictionCheckData checkData
Item item
System.Int32 totalMoved
Returns
Type Description
System.Int32
Overrides
InventoryRestriction.MaxPickup(RestrictionCheckData, Item, Int32)

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