Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Functions
cqsp::core::systems::commands Namespace Reference

Functions

bool VerifyCommand (Universe &universe, entt::entity command)
 
void ExecuteCommand (Universe &universe, entt::entity entity, entt::entity command_entity, Command command)
 
bool ProcessCommandQueue (Universe &universe, entt::entity body, Trigger trigger)
 
void TransferToMoon (Universe &universe, entt::entity agent, entt::entity target)
 
void PushManeuver (Universe &universe, entt::entity entity, components::Maneuver_t maneuver, double offset)
 
void PushManeuvers (Universe &universe, entt::entity entity, std::initializer_list< components::Maneuver_t > maneuver, double offset)
 
void PushManeuvers (Universe &universe, entt::entity entity, components::HohmannPair_t hohmann_pair, double offset)
 
void LandOnMoon (Universe &universe, entt::entity agent, entt::entity target, entt::entity city)
 
components::Maneuver_t MakeManeuver (const glm::dvec3 &vector, double time)
 
std::vector< entt::entity > GetSOIHierarchy (Universe &universe, entt::entity source)
 
entt::entity GetCommonSOI (Universe &universe, entt::entity source, entt::entity target)
 
void LeaveSOI (Universe &universe, entt::entity agent, double altitude)
 
bool ProcessCommandQueue (Universe &universe, entt::entity body, components::Trigger trigger)
 Returns true if a command is processed and popped, returns false if not. More...
 
void ExecuteCommand (Universe &universe, entt::entity entity, entt::entity command_entity, components::Command command)
 

Function Documentation

◆ ExecuteCommand() [1/2]

void cqsp::core::systems::commands::ExecuteCommand ( Universe universe,
entt::entity  entity,
entt::entity  command_entity,
Command  command 
)

◆ ExecuteCommand() [2/2]

void cqsp::core::systems::commands::ExecuteCommand ( Universe universe,
entt::entity  entity,
entt::entity  command_entity,
components::Command  command 
)

◆ GetCommonSOI()

entt::entity cqsp::core::systems::commands::GetCommonSOI ( Universe universe,
entt::entity  source,
entt::entity  target 
)

Finds common core sphere of influence between the two bodies.

Parameters
universeuniverse registry
sourcesource entity
targettarget entity
Returns
least common sphere of influence between source and target. If null, then we are comparing two completely separate SOI trees.

◆ GetSOIHierarchy()

std::vector< entt::entity > cqsp::core::systems::commands::GetSOIHierarchy ( Universe universe,
entt::entity  source 
)

◆ LandOnMoon()

void cqsp::core::systems::commands::LandOnMoon ( Universe universe,
entt::entity  agent,
entt::entity  target,
entt::entity  city 
)

◆ LeaveSOI()

void cqsp::core::systems::commands::LeaveSOI ( Universe universe,
entt::entity  agent,
double  altitude 
)

◆ MakeManeuver()

components::Maneuver_t cqsp::core::systems::commands::MakeManeuver ( const glm::dvec3 &  vector,
double  time 
)

◆ ProcessCommandQueue() [1/2]

bool cqsp::core::systems::commands::ProcessCommandQueue ( Universe universe,
entt::entity  body,
components::Trigger  trigger 
)

Returns true if a command is processed and popped, returns false if not.

◆ ProcessCommandQueue() [2/2]

bool cqsp::core::systems::commands::ProcessCommandQueue ( Universe universe,
entt::entity  body,
Trigger  trigger 
)

◆ PushManeuver()

void cqsp::core::systems::commands::PushManeuver ( Universe universe,
entt::entity  entity,
components::Maneuver_t  maneuver,
double  offset 
)
Parameters
offsetthe time offset in ticks to push back the command

◆ PushManeuvers() [1/2]

void cqsp::core::systems::commands::PushManeuvers ( Universe universe,
entt::entity  entity,
components::HohmannPair_t  hohmann_pair,
double  offset 
)

◆ PushManeuvers() [2/2]

void cqsp::core::systems::commands::PushManeuvers ( Universe universe,
entt::entity  entity,
std::initializer_list< components::Maneuver_t maneuver,
double  offset 
)

◆ TransferToMoon()

void cqsp::core::systems::commands::TransferToMoon ( Universe universe,
entt::entity  agent,
entt::entity  target 
)

◆ VerifyCommand()

bool cqsp::core::systems::commands::VerifyCommand ( Universe universe,
entt::entity  command 
)

Verifies if the command is a valid ship command option. This verifies if it's not null, and contains the necessary components to make it a command