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::common::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 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)
 
std::vector< entt::entity > GetSOIHierarchy (Universe &universe, entt::entity source)
 
entt::entity GetCommonSOI (Universe &universe, entt::entity source, entt::entity target)
 
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::common::systems::commands::ExecuteCommand ( Universe universe,
entt::entity  entity,
entt::entity  command_entity,
Command  command 
)

◆ ExecuteCommand() [2/2]

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

◆ GetCommonSOI()

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

Finds the common 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::common::systems::commands::GetSOIHierarchy ( Universe universe,
entt::entity  source 
)

◆ LandOnMoon()

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

◆ ProcessCommandQueue() [1/2]

bool cqsp::common::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::common::systems::commands::ProcessCommandQueue ( Universe universe,
entt::entity  body,
Trigger  trigger 
)

◆ PushManeuvers() [1/2]

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

◆ PushManeuvers() [2/2]

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

◆ TransferToMoon()

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

◆ VerifyCommand()

bool cqsp::common::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