OpenAstra
 
Loading...
Searching...
No Matches
starsystem.h
1#ifndef STARSYSTEM_H
2#define STARSYSTEM_H
3
4#include <string>
5#include <stdint.h>
6
7#include "gameobject.h"
8
9class Command;
10
11class StarSystem
12 : public GameObject
13{
14public:
15 static constexpr char starsystemCategory[] = "starsystem";
16 static std::shared_ptr<GameObject> createFromDump( ObjectId id, const std::string& type );
17 static std::shared_ptr<StarSystem> createFromTemplate(const std::string& name,
18 const std::string& type);
19
20 StarSystem( const std::string& name, double radius_kkm );
21 StarSystem(ObjectId id);
22 virtual ~StarSystem();
23
24 bool queueCommand(std::shared_ptr<Command> command );
25
26 virtual void tick( double delta_time_s, double total_time_s ) final;
27
28private:
29 static nlohmann::json _refMapper( const nlohmann::json &original_config,
30 const std::map<std::string, ObjectId>& id_refs);
31
32};
33
34#endif // STARSYSTEM_H
The Command class.
Definition command.h:23
GameObject(const std::string &category, ObjectId id, const std::string &type)
Create a GameObject object.
Definition gameobject.cpp:38
const std::string & type() const
return the type (ship_xxx, station_xxx, planet_xxx...)
Definition gameobject.h:213
Definition gameid.hpp:9