18 #include "precompiled.h"
47 "<element name='Range'>"
48 "<data type='nonNegativeInteger'/>"
50 "<element name='RetainInFog'>"
51 "<data type='boolean'/>"
53 "<element name='AlwaysVisible'>"
54 "<data type='boolean'/>"
An entity initialisation parameter node.
A simple fixed-point number class.
#define REGISTER_COMPONENT_TYPE(cname)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
bool ToBool() const
Parses the content of this node as a boolean ("true" == true, anything else == false) ...
Sent by CCmpVision when an entity's vision range changes.
Serialization interface; see serialization overview.
static void ClassInit(CComponentManager &componentManager)
virtual void Serialize(ISerializer &serialize)
virtual bool GetAlwaysVisible()
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
CEntityHandle GetEntityHandle() const
fixed ToFixed() const
Parses the content of this node as a fixed-point number.
entity_id_t GetEntityId() const
virtual int GetType() const =0
const CParamNode & GetChild(const char *name) const
Returns the (unique) child node with the given name, or a node with IsOk() == false if there is none...
virtual fixed ApplyModifications(std::wstring valueName, fixed currentValue, entity_id_t entity)=0
virtual void Init(const CParamNode ¶mNode)
virtual entity_id_t GetPlayerByID(int32_t id)=0
virtual player_id_t GetOwner()=0
Vision (LOS etc) interface (typically implemented by a scripted component).
#define DEFAULT_COMPONENT_ALLOCATOR(cname)
const CSimContext & GetSimContext() const
void SubscribeGloballyToMessageType(MessageTypeId mtid)
Subscribe the current component type to all messages of the given message type.
static std::string GetSchema()
A simplified syntax for accessing entity components.
CEntityHandle GetSystemEntity() const
virtual bool GetRetainInFog()
virtual entity_pos_t GetRange()
Sent by technology manager when a technology is researched that modifies a component.
void BroadcastMessage(const CMessage &msg) const
Send a message, not targeted at any particular entity.
virtual void HandleMessage(const CMessage &msg, bool global)
const entity_id_t INVALID_ENTITY
Invalid entity ID.
u32 entity_id_t
Entity ID type.
static const player_id_t INVALID_PLAYER
virtual void Deserialize(const CParamNode ¶mNode, IDeserializer &deserialize)
CComponentManager & GetComponentManager() const
Deserialization interface; see serialization overview.