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.
commands.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2025 Conquer Space
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <initializer_list>
20
24#include "common/universe.h"
25
30bool VerifyCommand(Universe& universe, entt::entity command);
32bool ProcessCommandQueue(Universe& universe, entt::entity body, components::Trigger trigger);
33void ExecuteCommand(Universe& universe, entt::entity entity, entt::entity command_entity, components::Command command);
34void TransferToMoon(Universe& universe, entt::entity agent, entt::entity target);
35void LandOnMoon(Universe& universe, entt::entity agent, entt::entity target, entt::entity city);
36components::Maneuver_t MakeManeuver(const glm::dvec3& vector, double time);
37void PushManeuver(Universe& universe, entt::entity entity, components::Maneuver_t maneuver, double offset = 0);
38void PushManeuvers(Universe& universe, entt::entity entity, std::initializer_list<components::Maneuver_t> maneuver,
39 double offset = 0);
40void PushManeuvers(Universe& universe, entt::entity entity, components::HohmannPair_t hohmann_pair, double offset = 0);
41std::vector<entt::entity> GetSOIHierarchy(Universe& universe, entt::entity source);
50entt::entity GetCommonSOI(Universe& universe, entt::entity source, entt::entity target);
51} // namespace cqsp::common::systems::commands
Definition: universe.h:39
std::pair< glm::dvec3, double > Maneuver_t
Definition: movement.h:27
Trigger
Definition: orders.h:22
Command
Definition: orders.h:7
std::pair< Maneuver_t, Maneuver_t > HohmannPair_t
Definition: movement.h:28
Definition: commands.cpp:30
void ExecuteCommand(Universe &universe, entt::entity entity, entt::entity command_entity, Command command)
Definition: commands.cpp:45
bool ProcessCommandQueue(Universe &universe, entt::entity body, Trigger trigger)
Definition: commands.cpp:164
void LandOnMoon(Universe &universe, entt::entity agent, entt::entity target, entt::entity city)
Definition: commands.cpp:266
components::Maneuver_t MakeManeuver(const glm::dvec3 &vector, double time)
Definition: commands.cpp:292
void TransferToMoon(Universe &universe, entt::entity agent, entt::entity target)
Definition: commands.cpp:194
std::vector< entt::entity > GetSOIHierarchy(Universe &universe, entt::entity source)
Definition: commands.cpp:294
bool VerifyCommand(Universe &universe, entt::entity command)
Definition: commands.cpp:41
entt::entity GetCommonSOI(Universe &universe, entt::entity source, entt::entity target)
Definition: commands.cpp:304
void PushManeuver(Universe &universe, entt::entity entity, components::Maneuver_t maneuver, double offset)
Definition: commands.cpp:246
void PushManeuvers(Universe &universe, entt::entity entity, std::initializer_list< components::Maneuver_t > maneuver, double offset)
Definition: commands.cpp:251
common::Universe * universe
Definition: turnsavewindow.h:3