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.
spaceport.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 <map>
20#include <queue>
21
22#include <entt/entt.hpp>
23
25
28 entt::entity good;
29 double amount;
31};
32
37 double amount;
38 double fulfilled;
39 double priority;
40};
41
50struct SpacePort {
51 // The map is target, and queue
52 // The entt entity must have an orbit, and we must be able to rendezvous to that entity
53 // So this is the list of goods that it wants to deliver to different places
54 std::map<entt::entity, std::priority_queue<TransportedGood>> deliveries;
55 std::map<entt::entity, std::vector<ResourceRequest>> requests;
56
57 double launch_cadance = 0;
58 int launchpads = 0;
59 entt::entity reference_body = entt::null;
60
66};
67} // namespace cqsp::common::components::infrastructure
entt::entity good
Definition: spaceport.h:28
Definition: infrastructure.h:21
ResourceLedger demanded_resources_rate
Definition: spaceport.h:62
std::map< entt::entity, std::vector< ResourceRequest > > requests
Definition: spaceport.h:55
ResourceLedger demanded_resources
Definition: spaceport.h:61
ResourceLedger output_resources_rate
Definition: spaceport.h:64
entt::entity reference_body
Definition: spaceport.h:59
std::map< entt::entity, std::priority_queue< TransportedGood > > deliveries
Definition: spaceport.h:54
double launch_cadance
Definition: spaceport.h:57
ResourceLedger resource_stockpile
Definition: spaceport.h:65
ResourceLedger output_resources
Definition: spaceport.h:63