Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpObstruction.h
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Returns a list of entities that have an obstruction matching the given flag and intersect the current obstruction. | * Returns a list of entities that have an obstruction matching the given flag and intersect the current obstruction. | ||||
* @return vector of blocking entities | * @return vector of blocking entities | ||||
*/ | */ | ||||
virtual std::vector<entity_id_t> GetEntitiesByFlags(ICmpObstructionManager::flags_t flags) const = 0; | virtual std::vector<entity_id_t> GetEntitiesByFlags(ICmpObstructionManager::flags_t flags) const = 0; | ||||
/** | /** | ||||
* Returns a list of entities that are blocking movement. | * Returns a list of unit shapes that are blocking movement. | ||||
* @return vector of blocking entities | * @return vector of blocking entities | ||||
*/ | */ | ||||
virtual std::vector<entity_id_t> GetEntitiesBlockingMovement() const = 0; | virtual std::vector<entity_id_t> GetUnitsBlockingMovement() const = 0; | ||||
/** | |||||
* Returns a list of entities that are blocking construction of a foundation. | |||||
* @return vector of blocking entities | |||||
*/ | |||||
virtual std::vector<entity_id_t> GetEntitiesBlockingConstruction() const = 0; | |||||
/** | /** | ||||
* Returns a list of entities that shall be deleted when a construction on this obstruction starts, | * Returns a list of entities that shall be deleted when a construction on this obstruction starts, | ||||
* for example sheep carcasses. | * for example sheep carcasses. | ||||
*/ | */ | ||||
virtual std::vector<entity_id_t> GetEntitiesDeletedUponConstruction() const = 0; | virtual std::vector<entity_id_t> GetEntitiesDeletedUponConstruction() const = 0; | ||||
/** | /** | ||||
* Detects collisions between foundation-blocking entities and | * Detects collisions between foundation-blocking entities and | ||||
* tries to fix them by setting control groups, if appropriate. | * tries to fix them by setting control groups, if appropriate. | ||||
*/ | */ | ||||
virtual void ResolveFoundationCollisions() const = 0; | virtual void ResolveFoundationCollisions() const = 0; | ||||
virtual void SetActive(bool active) = 0; | |||||
virtual void SetMovingFlag(bool enabled) = 0; | virtual void SetMovingFlag(bool enabled) = 0; | ||||
virtual void SetDisableBlockMovementPathfinding(bool movementDisabled, bool pathfindingDisabled, int32_t shape) = 0; | virtual void SetDisableBlockMovementPathfinding(bool movementDisabled, bool pathfindingDisabled, int32_t shape) = 0; | ||||
virtual bool GetBlockMovementFlag() const = 0; | virtual bool GetBlockMovementFlag() const = 0; | ||||
/** | /** | ||||
* Change the control group that the entity belongs to. | * Change the control group that the entity belongs to. | ||||
Show All 15 Lines |
Wildfire Games · Phabricator