Class SideAttachedContext
Given a side(s), it checks for solid ground placement at the attached positions of the occupancies position, e.g think of the side of a box, where the box is composed of the occupancies position
Inheritance
System.Object
SideAttachedContext
Assembly: Eco.Gameplay.dll
Syntax
public class SideAttachedContext : OccupancyContext
Constructors
SideAttachedContext(DirectionAxisFlags, OccupancyInfo)
Declaration
public SideAttachedContext(DirectionAxisFlags directionAxis, OccupancyInfo occupancyInfo)
Parameters
Fields
OccupancyInfo
Declaration
public readonly OccupancyInfo OccupancyInfo
Field Value
RequiresSurfaceOnSides
Declaration
public readonly DirectionAxisFlags RequiresSurfaceOnSides
Field Value
Methods
CanPlaceObject(Player, IPlaceableItem, Vector3, Quaternion)
Tries to place object on solid ground at one of the sides defined
Declaration
public override bool CanPlaceObject(Player player, IPlaceableItem item, Vector3 worldPos, Quaternion rotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
CurrentPlacementStatus(Vector3i, Quaternion)
Evaluates the current placement status of the world object, by using OccupancyHelper.CanPlace() which checks the blocks attached to the defined side
Declaration
public override IEnumerable<ValResult<bool>> CurrentPlacementStatus(Vector3i worldPos, Quaternion rotation)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ValResult<System.Boolean>> |
|
Overrides
GetRelevantChunkPositions(Vector3i, Quaternion)
Returns the chunks where all of the object's occupancy positions are found
Declaration
public override IEnumerable<Vector3i> GetRelevantChunkPositions(Vector3i worldPos, Quaternion rotation)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Vector3i> |
|
Overrides
GetSurfaceUnavailablePositions(Vector3i, Quaternion)
Checks through all blocks attached to the sides and returns invalid positions where the blocks aren't solid ground
Declaration
public override List<Vector3i> GetSurfaceUnavailablePositions(Vector3i worldPos, Quaternion rotation)
Parameters
Returns
Type |
Description |
System.Collections.Generic.List<Vector3i> |
|
Overrides
Extension Methods