allow to unlock modules when destroying defence stations

This commit is contained in:
2026-06-10 21:43:48 +02:00
parent aad094f842
commit af96b95f61
19 changed files with 203 additions and 51 deletions

View File

@@ -570,8 +570,10 @@ ModulesConfig ConfigLoader::loadModules(const std::string& path)
toml::table& mt = const_cast<toml::table&>(*st);
ModuleDef def;
def.id = requireString(mt["id"], file, elemPath + ".id");
def.surfaceMask = requireStringArray(mt["surface_mask"], file, elemPath + ".surface_mask");
def.id = requireString(mt["id"], file, elemPath + ".id");
def.unlockAtStationLevel = static_cast<int>(
mt["unlock_at_station_level"].value_or<int64_t>(-1));
def.surfaceMask = requireStringArray(mt["surface_mask"], file, elemPath + ".surface_mask");
def.playerProductionLevel = static_cast<int>(requireInt(
mt["player_production_level"], file, elemPath + ".player_production_level"));
def.productionTimeSeconds = requireDouble(

View File

@@ -40,6 +40,7 @@ struct ModuleRepairCapability
struct ModuleDef
{
std::string id;
int unlockAtStationLevel;
std::vector<std::string> surfaceMask;
std::vector<RecipeIngredient> materials;
int playerProductionLevel;