18#ifndef INCLUDED_ICMPOBSTRUCTION
19#define INCLUDED_ICMPOBSTRUCTION
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
Definition: FixedVector2D.h:25
A simple fixed-point number class.
Definition: Fixed.h:120
u8 flags_t
Bitmask of EFlag values.
Definition: ICmpObstructionManager.h:102
Flags an entity as obstructing movement for other units, and handles the processing of collision quer...
Definition: ICmpObstruction.h:30
virtual EFoundationCheck CheckFoundation(const std::string &className) const =0
Test whether this entity is colliding with any obstruction that are set to block the creation of foun...
virtual std::string CheckFoundation_wrapper(const std::string &className, bool onlyCenterPoint) const
CheckFoundation wrapper for script calls, to return friendly strings instead of an EFoundationCheck.
Definition: ICmpObstruction.cpp:26
virtual void ResolveFoundationCollisions() const =0
Detects collisions between foundation-blocking entities and tries to fix them by setting control grou...
virtual std::vector< entity_id_t > GetEntitiesByFlags(ICmpObstructionManager::flags_t flags) const =0
Returns a list of entities that have an obstruction matching the given flag and intersect the current...
virtual std::vector< entity_id_t > GetEntitiesBlockingMovement() const =0
Returns a list of entities that are blocking movement.
virtual bool IsControlPersistent() const =0
virtual EFoundationCheck CheckFoundation(const std::string &className, bool onlyCenterPoint) const =0
virtual void SetDisableBlockMovementPathfinding(bool movementDisabled, bool pathfindingDisabled, int32_t shape)=0
EObstructionType
Definition: ICmpObstruction.h:41
@ CLUSTER
Definition: ICmpObstruction.h:44
@ STATIC
Definition: ICmpObstruction.h:42
@ UNIT
Definition: ICmpObstruction.h:43
virtual void SetUnitClearance(const entity_pos_t &clearance)=0
virtual bool GetBlockMovementFlag(bool templateOnly) const =0
virtual void SetMovingFlag(bool enabled)=0
virtual entity_pos_t GetSize() const =0
virtual void SetControlGroup(entity_id_t group)=0
Change the control group that the entity belongs to.
virtual bool GetPreviousObstructionSquare(ICmpObstructionManager::ObstructionSquare &out) const =0
Same as the method above, but returns an obstruction shape for the previous turn.
EFoundationCheck
Definition: ICmpObstruction.h:33
@ FOUNDATION_CHECK_FAIL_NO_OBSTRUCTION
Definition: ICmpObstruction.h:36
@ FOUNDATION_CHECK_FAIL_TERRAIN_CLASS
Definition: ICmpObstruction.h:38
@ FOUNDATION_CHECK_SUCCESS
Definition: ICmpObstruction.h:34
@ FOUNDATION_CHECK_FAIL_OBSTRUCTS_FOUNDATION
Definition: ICmpObstruction.h:37
@ FOUNDATION_CHECK_FAIL_ERROR
Definition: ICmpObstruction.h:35
virtual void SetControlGroup2(entity_id_t group2)=0
virtual std::vector< entity_id_t > GetEntitiesBlockingConstruction() const =0
Returns a list of entities that are blocking construction of a foundation.
virtual entity_id_t GetControlGroup() const =0
See SetControlGroup.
virtual void SetActive(bool active)=0
virtual bool CheckShorePlacement() const =0
Test whether the front of the obstruction square is in the water and the back is on the shore.
virtual ICmpObstructionManager::tag_t GetObstruction() const =0
virtual CFixedVector2D GetStaticSize() const =0
virtual EObstructionType GetObstructionType() const =0
virtual bool GetObstructionSquare(ICmpObstructionManager::ObstructionSquare &out) const =0
Gets the square corresponding to this obstruction shape.
virtual entity_id_t GetControlGroup2() const =0
virtual std::vector< entity_id_t > GetEntitiesDeletedUponConstruction() const =0
Returns a list of entities that shall be deleted when a construction on this obstruction starts,...
virtual bool CheckDuplicateFoundation() const =0
Test whether this entity is colliding with any obstructions that share its control groups and block t...
Definition: IComponent.h:33
u32 entity_id_t
Entity ID type.
Definition: Entity.h:29
Standard representation for all types of shapes, for use with geometry processing code.
Definition: ICmpObstructionManager.h:67
External identifiers for shapes.
Definition: ICmpObstructionManager.h:78
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:407