Browse Source

remove spacecraft and maneuver config_loader messages

main
cinnaboot 6 months ago
parent
commit
3717e3ba4d
  1. 4
      src/config_loader.cpp

4
src/config_loader.cpp

@ -189,13 +189,11 @@ bool load_system_config(SimulationState* sim, const char* filepath) {
static bool load_spacecraft_from_toml(SimulationState* sim, toml_result_t result) { static bool load_spacecraft_from_toml(SimulationState* sim, toml_result_t result) {
toml_datum_t spacecraft = toml_get(result.toptab, "spacecraft"); toml_datum_t spacecraft = toml_get(result.toptab, "spacecraft");
if (spacecraft.type != TOML_ARRAY) { if (spacecraft.type != TOML_ARRAY) {
printf("No spacecraft array found in config file: %s (optional)\n", sim->config_name);
return true; return true;
} }
int craft_count = spacecraft.u.arr.size; int craft_count = spacecraft.u.arr.size;
if (craft_count == 0) { if (craft_count == 0) {
printf("No spacecraft found in config file: %s\n", sim->config_name);
return true; return true;
} }
@ -359,13 +357,11 @@ static bool parse_toml_maneuver(toml_datum_t maneuver_table, Maneuver* maneuver,
static bool load_maneuvers_from_toml(SimulationState* sim, toml_result_t result) { static bool load_maneuvers_from_toml(SimulationState* sim, toml_result_t result) {
toml_datum_t maneuvers = toml_get(result.toptab, "maneuvers"); toml_datum_t maneuvers = toml_get(result.toptab, "maneuvers");
if (maneuvers.type != TOML_ARRAY) { if (maneuvers.type != TOML_ARRAY) {
printf("No maneuvers array found in config file: %s (optional)\n", sim->config_name);
return true; return true;
} }
int maneuver_count = maneuvers.u.arr.size; int maneuver_count = maneuvers.u.arr.size;
if (maneuver_count == 0) { if (maneuver_count == 0) {
printf("No maneuvers found in config file: %s\n", sim->config_name);
return true; return true;
} }

Loading…
Cancel
Save