| 281 | struct_identity infinitesky_options::_identity{sizeof(infinitesky_options), &df::allocator_fn<infinitesky_options>, NULL, "infinitesky_options", NULL, infinitesky_options_fields}; |
| 282 | |
| 283 | command_result infiniteSky(color_ostream &out, |
| 284 | std::vector<std::string> ¶meters) { |
| 285 | if (!Core::getInstance().isMapLoaded() || !World::isFortressMode()) { |
| 286 | out.printerr("Cannot run {} without a loaded fort.\n", plugin_name); |
| 287 | return CR_FAILURE; |
| 288 | } |
| 289 | |
| 290 | infinitesky_options opts; |
| 291 | if (!Lua::CallLuaModuleFunction(out, "plugins.infinite-sky", |
| 292 | "parse_commandline", |
| 293 | std::make_tuple(&opts, parameters)) || |
| 294 | opts.help) |
| 295 | return CR_WRONG_USAGE; |
| 296 | |
| 297 | if (opts.n > 0) { |
| 298 | out.print("Infinite-sky: creating {} new z-level{} of sky.\n", opts.n, |
| 299 | opts.n == 1 ? "" : "s"); |
| 300 | doInfiniteSky(out, opts.n); |
| 301 | } else { |
| 302 | out.print("Construction monitoring is {}.\n", |
| 303 | is_enabled ? "enabled" : "disabled"); |
| 304 | } |
| 305 | return CR_OK; |
| 306 | } |
nothing calls this directly
no test coverage detected