fix issue where upgrade modules are not working properly
This commit is contained in:
@@ -530,17 +530,19 @@ struct StatEntry
|
||||
};
|
||||
|
||||
static const StatEntry kKnownStats[] = {
|
||||
{"health", "hp", ""},
|
||||
{"movement", "speed", "_mps"},
|
||||
{"sensor", "sensor_range", "_m"},
|
||||
{"weapon", "damage", ""},
|
||||
{"weapon", "attack_range", "_m"},
|
||||
{"weapon", "attack_rate", "_hz"},
|
||||
{"salvage", "collection_range", "_m"},
|
||||
{"salvage", "cargo_capacity", ""},
|
||||
{"salvage", "collection_rate", "_hz"},
|
||||
{"repair", "repair_rate", "_hz"},
|
||||
{"repair", "repair_range", "_m"},
|
||||
{"health", "hp", ""},
|
||||
{"movement", "speed", "_mps"},
|
||||
{"movement", "main_acceleration", "_mpss"},
|
||||
{"movement", "maneuvering_acceleration", "_mpss"},
|
||||
{"sensor", "sensor_range", "_m"},
|
||||
{"weapon", "damage", ""},
|
||||
{"weapon", "attack_range", "_m"},
|
||||
{"weapon", "attack_rate", "_hz"},
|
||||
{"salvage", "collection_range", "_m"},
|
||||
{"salvage", "cargo_capacity", ""},
|
||||
{"salvage", "collection_rate", "_hz"},
|
||||
{"repair", "repair_rate", "_hz"},
|
||||
{"repair", "repair_range", "_m"},
|
||||
};
|
||||
|
||||
ModulesConfig ConfigLoader::loadModules(const std::string& path)
|
||||
@@ -596,7 +598,7 @@ ModulesConfig ConfigLoader::loadModules(const std::string& path)
|
||||
toml::table& catMt = const_cast<toml::table&>(catTable);
|
||||
|
||||
const std::string addedKey = std::string("added_") + se.stat + se.addedKeySuffix + "_formula";
|
||||
const std::string multipliedKey = std::string("multiplied_") + se.stat + "_formula";
|
||||
const std::string multipliedKey = std::string("multiplied_") + se.stat + se.addedKeySuffix + "_formula";
|
||||
|
||||
if (catMt.contains(addedKey))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user