#include "server/init.hh" namespace server { const shared::args_t& get_options() { static shared::args_t ret{ {.name = "seed", .desc = "manually set the worldseed", .val = "S:"}, {.name = "directory", .desc = "manually set the directory", .val = "d:"}, {.name = "tickrate", .desc = "override the default tickrate", .val = "t:"}, {.name = "distance", .desc = "limit the max chunk distance the server provides", .val = "D:"}, }; return ret; } bool parse_arg(const int& c, const char* const arg) { switch (c) { case 'S': server::state.seed = boost::lexical_cast(arg); break; case 'd': server::state.directory = boost::lexical_cast(arg); break; case 't': server::state.tickrate = boost::lexical_cast(arg); break; case 'D': server::state.draw_distance = boost::lexical_cast(arg); break; default: return false; } return true; } } // namespace server