Show / Hide Table of Contents

Namespace Eco.Gameplay.Occupancy

Classes

BlockOccupancy

Represents an occupancy position in a world object. Used to check if a block is available relative to the world object position. They are mainly used in WorldOccupancyAutogen.cs to declare each occupancy from a WorldObject

BlockOccupancyType

Special block occupancy that is used by world object for many purpose. Specify this in world object prefab for autogenerate or at static world object constructor (see WaterwheelObject)

OccupancyContext

A class that contains the definitions of methods needed for placement related stuff, such as trying to place an object, which positions are invalid when placing an object, which chunks does the placement affect, the current placement status of an object already placed. More detailed information can be found here: https://github.com/StrangeLoopGames/Eco/wiki/Occupancy-System.

OccupancyContextUtils

Contains functionality that allows us to operate on OccupancyContexts and make a versions of them readable by the client.

OccupancyInfo

Contains information about the space that a world object occupies, in the form of a list of block occupancies, that in itself contain information about the position relative to the world objects position, blocktype and occupancy type. More detailed information can be found here: https://github.com/StrangeLoopGames/Eco/wiki/Occupancy-System.

OccupancyRequirementComponent

Will enable/disable worldobject status if it passes through the world object placement requirements, by default the worldObject will use a surface side from the defined occupancy position to calculate placement requirements, and some specific ones will use surface requirement for more complex requirements

OccupancyUtils

Contains public functions related to the occupancy system.

PositionsRequirement

Contains list of positions relative to the world object and the requirement they should abide to when placing it, as well as which part of the world object is it referring to and the placement message the requirement refers to

PositionsRequirementContext

Given a list of positions requirements it checks for each one to be valid, this means evaluating all of their positions by their requirement, such as being placed on solid ground, water, empty space.

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

WaterDepthContext

It makes sure that the object is placed on water, it checks for a solid block within the given depth

☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾