Class GeneralRestriction
Restricts the inventory to only things that pass a given function.
Inheritance
System.Object
GeneralRestriction
Assembly: Eco.Gameplay.dll
Syntax
public class GeneralRestriction : InventoryRestriction
Constructors
GeneralRestriction(Func<Item, Int32, Int32>, LocString)
Passes in item and quantity, returns how many are accepted.
Declaration
public GeneralRestriction(Func<Item, int, int> testFunc, LocString message)
Parameters
Type |
Name |
Description |
System.Func<Item, System.Int32, System.Int32> |
testFunc |
|
LocString |
message |
|
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
Methods
MaxAccepted(Item, Int32)
Declaration
public override int MaxAccepted(Item item, int quantity)
Parameters
Type |
Name |
Description |
Item |
item |
|
System.Int32 |
quantity |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
Extension Methods