implement sensor range requirements

This commit is contained in:
2026-04-29 21:01:41 +02:00
parent 58b7cda21c
commit b0320ac117
9 changed files with 178 additions and 30 deletions

View File

@@ -397,6 +397,14 @@ ShipsConfig ConfigLoader::loadShips(const std::string& path)
def.movement.speedFormula = requireFormula(mMt["speed_formula"], file, mPath + ".speed_formula");
}
// Sensor
{
const std::string snsPath = elemPath + ".sensor";
const toml::table& snsTable = requireTable(mt["sensor"], file, snsPath);
toml::table& snsMt = const_cast<toml::table&>(snsTable);
def.sensor.sensorRangeFormula = requireFormula(snsMt["sensor_range_formula"], file, snsPath + ".sensor_range_formula");
}
// Loot
{
const std::string lPath = elemPath + ".loot";