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>, 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
Overrides
Priority
Declaration
public override int Priority { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Overrides
Methods
MaxAccepted(Item)
Declaration
public override int MaxAccepted(Item item)
Parameters
| Type |
Name |
Description |
| Item |
item |
|
Returns
| Type |
Description |
| System.Int32 |
|
Overrides
MaxPickup(RestrictionCheckData, Item, Int32)
Declaration
public override int MaxPickup(RestrictionCheckData checkData, Item item, int totalMoved)
Parameters
Returns
| Type |
Description |
| System.Int32 |
|
Overrides
Extension Methods