Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Flags an entity as obstructing movement for other units, and handles the processing of collision queries. More...
#include <ICmpObstruction.h>
Public Types | |
enum | EFoundationCheck { FOUNDATION_CHECK_SUCCESS , FOUNDATION_CHECK_FAIL_ERROR , FOUNDATION_CHECK_FAIL_NO_OBSTRUCTION , FOUNDATION_CHECK_FAIL_OBSTRUCTS_FOUNDATION , FOUNDATION_CHECK_FAIL_TERRAIN_CLASS } |
enum | EObstructionType { STATIC , UNIT , CLUSTER } |
Public Types inherited from IComponent | |
using | AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor) |
using | DeallocFunc = void(*)(IComponent *) |
Public Member Functions | |
virtual ICmpObstructionManager::tag_t | GetObstruction () const =0 |
virtual bool | GetObstructionSquare (ICmpObstructionManager::ObstructionSquare &out) const =0 |
Gets the square corresponding to this obstruction shape. More... | |
virtual bool | GetPreviousObstructionSquare (ICmpObstructionManager::ObstructionSquare &out) const =0 |
Same as the method above, but returns an obstruction shape for the previous turn. More... | |
virtual entity_pos_t | GetSize () const =0 |
virtual CFixedVector2D | GetStaticSize () const =0 |
virtual EObstructionType | GetObstructionType () const =0 |
virtual void | SetUnitClearance (const entity_pos_t &clearance)=0 |
virtual bool | IsControlPersistent () const =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. More... | |
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 foundations. More... | |
virtual EFoundationCheck | CheckFoundation (const std::string &className, bool onlyCenterPoint) const =0 |
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. More... | |
virtual bool | CheckDuplicateFoundation () const =0 |
Test whether this entity is colliding with any obstructions that share its control groups and block the creation of foundations. More... | |
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 obstruction. More... | |
virtual std::vector< entity_id_t > | GetEntitiesBlockingMovement () const =0 |
Returns a list of entities that are blocking movement. More... | |
virtual std::vector< entity_id_t > | GetEntitiesBlockingConstruction () const =0 |
Returns a list of entities that are blocking construction of a foundation. More... | |
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, for example sheep carcasses. More... | |
virtual void | ResolveFoundationCollisions () const =0 |
Detects collisions between foundation-blocking entities and tries to fix them by setting control groups, if appropriate. More... | |
virtual void | SetActive (bool active)=0 |
virtual void | SetMovingFlag (bool enabled)=0 |
virtual void | SetDisableBlockMovementPathfinding (bool movementDisabled, bool pathfindingDisabled, int32_t shape)=0 |
virtual bool | GetBlockMovementFlag (bool templateOnly) const =0 |
virtual void | SetControlGroup (entity_id_t group)=0 |
Change the control group that the entity belongs to. More... | |
virtual entity_id_t | GetControlGroup () const =0 |
See SetControlGroup. More... | |
virtual void | SetControlGroup2 (entity_id_t group2)=0 |
virtual entity_id_t | GetControlGroup2 () const =0 |
Public Member Functions inherited from IComponent | |
virtual | ~IComponent () |
virtual void | Init (const CParamNode ¶mNode)=0 |
virtual void | Deinit ()=0 |
virtual void | HandleMessage (const CMessage &msg, bool global) |
CEntityHandle | GetEntityHandle () const |
void | SetEntityHandle (CEntityHandle ent) |
entity_id_t | GetEntityId () const |
CEntityHandle | GetSystemEntity () const |
const CSimContext & | GetSimContext () const |
void | SetSimContext (const CSimContext &context) |
virtual void | Serialize (ISerializer &serialize)=0 |
virtual void | Deserialize (const CParamNode ¶mNode, IDeserializer &deserialize)=0 |
virtual bool | NewJSObject (const ScriptInterface &scriptInterface, JS::MutableHandleObject out) const |
Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More... | |
virtual JS::Value | GetJSInstance () const |
virtual int | GetComponentTypeId () const =0 |
Additional Inherited Members | |
Static Public Member Functions inherited from IComponent | |
static std::string | GetSchema () |
static void | RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema) |
static void | RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema) |
static u8 | GetSerializationVersion () |
Flags an entity as obstructing movement for other units, and handles the processing of collision queries.
|
pure virtual |
Test whether this entity is colliding with any obstructions that share its control groups and block the creation of foundations.
Implemented in CCmpObstruction.
|
pure virtual |
Test whether this entity is colliding with any obstruction that are set to block the creation of foundations.
ignoredEntities | List of entities to ignore during the test. |
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
virtual |
CheckFoundation wrapper for script calls, to return friendly strings instead of an EFoundationCheck.
|
pure virtual |
Test whether the front of the obstruction square is in the water and the back is on the shore.
Implemented in CCmpObstruction.
|
pure virtual |
templateOnly | - whether to return the raw template value or the current value. |
Implemented in CCmpObstruction.
|
pure virtual |
See SetControlGroup.
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Returns a list of entities that are blocking construction of a foundation.
Implemented in CCmpObstruction.
|
pure virtual |
Returns a list of entities that are blocking movement.
Implemented in CCmpObstruction.
|
pure virtual |
Returns a list of entities that have an obstruction matching the given flag and intersect the current obstruction.
Implemented in CCmpObstruction.
|
pure virtual |
Returns a list of entities that shall be deleted when a construction on this obstruction starts, for example sheep carcasses.
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Gets the square corresponding to this obstruction shape.
out
on success; false on failure (e.g. object not in the world). Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Same as the method above, but returns an obstruction shape for the previous turn.
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Detects collisions between foundation-blocking entities and tries to fix them by setting control groups, if appropriate.
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Change the control group that the entity belongs to.
Control groups are used to let units ignore collisions with other units from the same group. Default is the entity's own ID.
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.
|
pure virtual |
Implemented in CCmpObstruction.