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
26
29 entt::entity good;
30 double amount;
31 double fulfilled;
32 double priority;
33
34 TransportedGood() : good(entt::null), amount(0.0), fulfilled(0.0), priority(0) {}
35 explicit TransportedGood(const MarketOrder& order, entt::entity _good)
36 : good(_good), amount(order.amount), fulfilled(0.0), priority(0) {}
37};
38
47struct SpacePort {
48 // The key is target, and queue
49 // The entt entity must have an orbit, and we must be able to rendezvous to that entity
50 // So this is the list of goods that it wants to deliver to different places
51 std::map<entt::entity, std::vector<TransportedGood>> deliveries;
52
53 double launch_cadence = 0;
54 int launchpads = 0;
55 entt::entity reference_body = entt::null;
56
62};
63} // namespace cqsp::common::components::infrastructure
Definition: infrastructure.h:21
ResourceLedger demanded_resources_rate
Definition: spaceport.h:58
double launch_cadence
Definition: spaceport.h:53
ResourceLedger demanded_resources
Definition: spaceport.h:57
ResourceLedger output_resources_rate
Definition: spaceport.h:60
entt::entity reference_body
Definition: spaceport.h:55
ResourceLedger resource_stockpile
Definition: spaceport.h:61
ResourceLedger output_resources
Definition: spaceport.h:59
std::map< entt::entity, std::vector< TransportedGood > > deliveries
Definition: spaceport.h:51
entt::entity good
Definition: spaceport.h:29
TransportedGood(const MarketOrder &order, entt::entity _good)
Definition: spaceport.h:35