VR-Engage  2.3
Loading...
Searching...
No Matches
embeddedEntityLogic.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2024 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6#pragma once
7
12
13#include <string>
14
15namespace makVre
16{
17
19{
20//! \ingroup RoleConfigParams
21//! \defgroup EmbeddedEntityLogicRoleParams Embedded Entity Logic Role Parameters
22//! \roleInherits{PlayerComponentRoleParams}
23//! @{
24
25//! \vreRoleParam{roleHasDeployables,bool,true,embeddedEntityLogic,Whether this role has deployable objects.}
26constexpr const char* roleHasDeployables = "roleHasDeployables";
27
28//! @}
29} // namespace EmbeddedEntityLogicConfig
30
31//! \brief Type identifier for DtEmbeddedEntityLogic component
32constexpr const char* DtEmbeddedEntityLogicType = "DtEmbeddedEntityLogic";
33
35
36//! \brief Component that manages embedded-entity (deployable) state and deploy/recover operations.
37//!
38//! Listens to SimulationStateMessage to keep "deployable-objects" in the player attribute store
39//! up to date. Deploy/recover operations are forwarded to VRF via scripted-entity tasks.
40//! Inter-component cleanup (stop using drone, exit launcher) is driven through MenuActionMessage.
42{
43public:
45 virtual ~DtEmbeddedEntityLogic() override;
46
47 virtual bool initialize(DtPlayerStation* player, DtInitTable& config) override;
48 virtual void tick(double dt) override;
49 virtual void shutdown() override;
50
51 virtual const char* type() const override;
52
53 virtual void deployEmbeddedEntity(const std::string& embeddedEntityName);
54 virtual void recoverEmbeddedEntity(const std::string& embeddedEntityName);
55
56protected:
58
61
63
78};
79
80} // namespace makVre
Type-specific handle class for attributes.
Definition attributeHandle.h:229
DtAttributeHandleType< bool > myMenuDeployableDestroyedAttr
Definition embeddedEntityLogic.h:73
DtAttributeHandleType< bool > myMenuDeployableDeployedAttr
Definition embeddedEntityLogic.h:72
virtual void tick(double dt) override
Updates the component.
DtAttributeHandleType< bool > myRoleHasDeployablesAttr
Definition embeddedEntityLogic.h:77
virtual bool initialize(DtPlayerStation *player, DtInitTable &config) override
Initializes the component.
void updateOwnshipFromSimState(SimulationStateMessage *smsg)
DtAttributeHandleType< DeployableObjectStateMap > myDeployableObjectsAttr
Definition embeddedEntityLogic.h:64
DtAttributeHandleType< bool > myDroneSignalLostAttr
Definition embeddedEntityLogic.h:69
virtual void recoverEmbeddedEntity(const std::string &embeddedEntityName)
void updateEmbeddedEntityFromSimState(SimulationStateMessage *smsg)
DtAttributeHandleType< std::string > myMenuDeployableNameAttr
Definition embeddedEntityLogic.h:71
DtAttributeHandleType< bool > myDroneSignalLostDismissedAttr
Definition embeddedEntityLogic.h:70
DtAttributeHandleType< bool > myHasEmbeddedEntitiesAttr
Definition embeddedEntityLogic.h:65
DtAttributeHandleType< bool > myMenuDeployableIsDroneAttr
Definition embeddedEntityLogic.h:75
virtual ~DtEmbeddedEntityLogic() override
DtAttributeHandleType< bool > myUsingLauncherAttr
Definition embeddedEntityLogic.h:67
DtAttributeHandleType< DtEntityIdentifier > myDroneEntityIdAttr
Definition embeddedEntityLogic.h:68
DtAttributeHandleType< bool > myMenuDeployableIsLauncherAttr
Definition embeddedEntityLogic.h:76
DtAttributeHandleType< bool > myUsingDroneAttr
Definition embeddedEntityLogic.h:66
DtAttributeHandleType< bool > myMenuDeployableUsingAttr
Definition embeddedEntityLogic.h:74
virtual const char * type() const override
Gets the component type identifier.
virtual makVre::DtVreMessageResult handleSimState(makVre::DtVreMessage *msg)
virtual void shutdown() override
Shuts down the component.
double myStatusUpdateDisplayTime
Definition embeddedEntityLogic.h:62
virtual void deployEmbeddedEntity(const std::string &embeddedEntityName)
Table-based access to Lua state for configuration data.
Definition initializer.h:38
virtual DtPlayerStation & player()
Gets the player station.
DtPlayerComponent()
Constructor.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
State update for an entity.
Definition simulationState.h:38
constexpr const char * roleHasDeployables
Definition embeddedEntityLogic.h:26
Defines export/import macros for the vreCommonComponents library.
#define VRECOMMONCOMPONENTS_DLL
DLL export/import macro for the vreCommonComponents library.
Definition export.h:28
Definition embeddedEntityLogic.h:19
!
Definition glsVreMessageUtil.h:50
constexpr const char * DtEmbeddedEntityLogicType
Type identifier for DtEmbeddedEntityLogic component.
Definition embeddedEntityLogic.h:32
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines the DtPlayerComponent base class for VR-Engage role components.
Defines the base class for all VREngage messages.