()
| 199 | |
| 200 | |
| 201 | def export_settings_commands_table(): |
| 202 | print("<!-- DO NOT EDIT MANUALLY! THIS FILE IS AUTOMATICALLY GENERATED BY https://github.com/ddnet/ddnet/blob/master/scripts/export_settings_commands_table.py -->") |
| 203 | |
| 204 | settings = parse_settings(read_files("src/engine/shared/config_variables.h")) |
| 205 | commands = parse_commands(read_files("src/**/*.cpp")) |
| 206 | |
| 207 | export_block( |
| 208 | "Map Settings", |
| 209 | export_settings([setting for setting in settings if "CFGFLAG_SERVER" in setting["flags"] and "CFGFLAG_GAME" in setting["flags"]]) + "\n" + export_commands([command for command in commands if "CFGFLAG_SERVER" in command["flags"] and "CFGFLAG_GAME" in command["flags"]]), |
| 210 | ) |
| 211 | |
| 212 | export_block( |
| 213 | "Server Settings", |
| 214 | export_settings([setting for setting in settings if "CFGFLAG_SERVER" in setting["flags"]]), |
| 215 | ) |
| 216 | |
| 217 | export_block( |
| 218 | "Econ Settings", |
| 219 | export_settings([setting for setting in settings if "CFGFLAG_ECON" in setting["flags"]]), |
| 220 | ) |
| 221 | |
| 222 | export_block( |
| 223 | "Server Commands", |
| 224 | export_commands([command for command in commands if "CFGFLAG_SERVER" in command["flags"] and "CFGFLAG_CHAT" not in command["flags"]]), |
| 225 | ) |
| 226 | |
| 227 | export_block( |
| 228 | "Chat Commands", |
| 229 | export_commands([command for command in commands if "CFGFLAG_SERVER" in command["flags"] and "CFGFLAG_CHAT" in command["flags"]]), |
| 230 | ) |
| 231 | |
| 232 | export_block( |
| 233 | "Client Settings", |
| 234 | export_settings([setting for setting in settings if "CFGFLAG_CLIENT" in setting["flags"]]), |
| 235 | ) |
| 236 | |
| 237 | export_block( |
| 238 | "Client Commands", |
| 239 | export_commands([command for command in commands if "CFGFLAG_CLIENT" in command["flags"]]), |
| 240 | ) |
| 241 | |
| 242 | export_block( |
| 243 | "Tunings", |
| 244 | export_tunings(parse_tunings(read_files("src/game/tuning.h"))), |
| 245 | ) |
| 246 | |
| 247 | |
| 248 | if __name__ == "__main__": |
no test coverage detected