11 ModuleManager( std::shared_ptr<StarsystemObject> owner );
13 bool modulesFromTemplate(
const nlohmann::json& config );
15 virtual ~ModuleManager();
17 void replaceModule(std::shared_ptr<Module> new_module, int64_t slot );
18 void replaceModule(
const std::string& module_type, int64_t slot );
20 std::vector<std::shared_ptr<Module>> getModules();
22 std::shared_ptr<Module> getModule(
ObjectId module_id )
const;
24 virtual void tick(
double delta_time_s,
double current_time_s );
27 std::shared_ptr<StarsystemObject> _owner;
29 bool checkAddToMap( std::map<std::string, int64_t>& map,
const std::string& value );
30 bool checkRemoveFromMap( std::map<std::string, int64_t>& map,
const std::string& value );
32 std::map<std::string, int64_t> _aggregate_values_map;
33 std::map<std::string, int64_t> _aggregate_capacities_map;
34 std::map<std::string, int64_t> _transform_sources_targets_map;
36 void finalizeUndumpModules();