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
25#include "common/universe.h"
26
28
29
33bool VerifyCommand(Universe& universe, entt::entity command);
35bool ProcessCommandQueue(Universe& universe, entt::entity body, components::Trigger trigger);
36void ExecuteCommand(Universe& universe, entt::entity entity, entt::entity command_entity, components::Command command);
37void TransferToMoon(Universe& universe, entt::entity agent, entt::entity target);
38void LandOnMoon(Universe& universe, entt::entity agent, entt::entity target, entt::entity city);
39
40void PushManeuvers(Universe& universe, entt::entity entity, std::initializer_list<components::Maneuver_t> maneuver,
41 double offset = 0);
42void PushManeuvers(Universe& universe, entt::entity entity, components::HohmannPair_t hohmann_pair, double offset = 0);
43std::vector<entt::entity> GetSOIHierarchy(Universe& universe, entt::entity source);
52entt::entity GetCommonSOI(Universe& universe, entt::entity source, entt::entity target);
53} // namespace cqsp::common::systems::commands
Definition: universe.h:37
Trigger
Definition: orders.h:20
Command
Definition: orders.h:7
std::pair< Maneuver_t, Maneuver_t > HohmannPair_t
Definition: movement.h:27
Definition: commands.cpp:27
void ExecuteCommand(Universe &universe, entt::entity entity, entt::entity command_entity, Command command)
Definition: commands.cpp:42
bool ProcessCommandQueue(Universe &universe, entt::entity body, Trigger trigger)
Definition: commands.cpp:134
void LandOnMoon(Universe &universe, entt::entity agent, entt::entity target, entt::entity city)
Definition: commands.cpp:205
void TransferToMoon(Universe &universe, entt::entity agent, entt::entity target)
Definition: commands.cpp:164
std::vector< entt::entity > GetSOIHierarchy(Universe &universe, entt::entity source)
Definition: commands.cpp:231
bool VerifyCommand(Universe &universe, entt::entity command)
Definition: commands.cpp:38
entt::entity GetCommonSOI(Universe &universe, entt::entity source, entt::entity target)
Definition: commands.cpp:241
void PushManeuvers(Universe &universe, entt::entity entity, std::initializer_list< components::Maneuver_t > maneuver, double offset)
Definition: commands.cpp:190
glm::vec3 offset
Definition: starsystemview.cpp:91
common::Universe * universe
Definition: turnsavewindow.h:3