Interface IPlaceableItem
For items that can be placed in the world.
Assembly: Eco.Gameplay.dll
Syntax
public interface IPlaceableItem : IController, IViewController, IHasUniversalID
Fields
singleBlockOccupancy
Declaration
public static OccupancyContext singleBlockOccupancy
Field Value
WaterBlocksPlacement
Declaration
public static readonly Type[] WaterBlocksPlacement
Field Value
| Type |
Description |
| System.Type[] |
|
Properties
Blockers
Declaration
virtual Type[] Blockers { get; }
Property Value
| Type |
Description |
| System.Type[] |
|
HomeValue
Declaration
virtual HomeFurnishingValue HomeValue { get; }
Property Value
MarkedUpName
Declaration
virtual LocString MarkedUpName { get; }
Property Value
Name
Declaration
virtual string Name { get; }
Property Value
| Type |
Description |
| System.String |
|
OccupancyContext
Declaration
virtual OccupancyContext OccupancyContext { get; }
Property Value
ShouldCreate
Declaration
virtual bool ShouldCreate { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
WorldObjectType
Declaration
virtual Type WorldObjectType { get; }
Property Value
| Type |
Description |
| System.Type |
|
Methods
CanMove(Player, Vector3, Quaternion, INetObject)
This will check whether this item can be moved by the specified player to the specified position or not.
Declaration
virtual Task<bool> CanMove(Player player, Vector3 pos, Quaternion rotation, INetObject woNetObject)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
CanPlaceObject(Player, Vector3, Quaternion)
Declaration
virtual Task<bool> CanPlaceObject(Player player, Vector3 pos, Quaternion rotation)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.Numerics.Vector3 |
pos |
|
| Quaternion |
rotation |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
GetMoveInfo(Player, INetObject)
Retrieves the initial info required for a WorldObject's movement, like deed/settlement restrictions and messages, calories required, etc.
Declaration
virtual MoveWorldObjectActionInfo GetMoveInfo(Player player, INetObject woNetObject)
Parameters
Returns
Move(Player, Vector3, Quaternion, INetObject, Boolean)
Attempts to move the WorldObject that this item represents, from its existing point to specified position and rotation.
Declaration
virtual Task<bool> Move(Player player, Vector3 pos, Quaternion rotation, INetObject woNetObject, bool unstuck = false)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
|
OnPickup(WorldObject)
Declaration
virtual void OnPickup(WorldObject placedObject)
Parameters
OnPostWorldObjectPlaced(WorldObject)
This called after the world object is placed, added to the world object manager and all its components initialized.
Declaration
virtual void OnPostWorldObjectPlaced(WorldObject addedObject)
Parameters
OnPreWorldObjectPlaced(WorldObject)
This is called immediately before placement, before initialization and net object activation.
Declaration
virtual void OnPreWorldObjectPlaced(WorldObject placedObject)
Parameters
Place(Player, Vector3, Quaternion, Int32)
Declaration
virtual void Place(Player player, Vector3 pos, Quaternion rotation, int placeOnSurfaceOfObjectID)
Parameters
| Type |
Name |
Description |
| Player |
player |
|
| System.Numerics.Vector3 |
pos |
|
| Quaternion |
rotation |
|
| System.Int32 |
placeOnSurfaceOfObjectID |
|
PlacingObject(GameActionPack, Player, ItemStack, Vector3, Quaternion)
Declaration
virtual Task PlacingObject(GameActionPack pack, Player player, ItemStack containingStack, Vector3 pos, Quaternion rotation)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Extension Methods