Class BuildingToolItem
Base class for items that has block building functionality. Extracted from HammerItem class. Needed to refer by type easily as tech tree item not available in core. (Same as like "is ToolItem" " is DurabilityItem", etc)
Inheritance
System.Object
BuildingToolItem
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Eco.Gameplay.Items
Assembly: Eco.Gameplay.dll
Syntax
[CanMakeBlockForm]
public abstract class BuildingToolItem : ToolItem, IItem, ILinkableParameterized<LinkConfig>, ILinkable, IHasIcon, INotifyPropertyChanged, IInteractor, IHasInteractions, IPlaceableItem, IController, IViewController, IHasUniversalID
Constructors
BuildingToolItem()
Declaration
protected BuildingToolItem()
Methods
GetNoSuitablePickupTargetFailureMessage(Inventory)
Declaration
public override LocString GetNoSuitablePickupTargetFailureMessage(Inventory inventory)
Parameters
Type | Name | Description |
---|---|---|
Inventory | inventory |
Returns
Type | Description |
---|---|
LocString |
Overrides
PickupBlock(Player, Vector3i)
Attempts to pick up the block at given position.
Declaration
public bool PickupBlock(Player player, Vector3i blockPos)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
Vector3i | blockPos |
Returns
Type | Description |
---|---|
System.Boolean |
PickupWorldObject(Player, WorldObject)
Attempts to pick up a World Object.
Declaration
public Task<bool> PickupWorldObject(Player player, WorldObject worldObj)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
WorldObject | worldObj |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
Place(Player, BlockLayout, Int32)
Attempts to place a layout of blocks at given position, with given rotation.
Declaration
public bool Place(Player player, BlockLayout layout, int rotation)
Parameters
Type | Name | Description |
---|---|---|
Player | player | |
BlockLayout | layout | |
System.Int32 | rotation |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.ComponentModel.INotifyPropertyChanged