Project

General

Profile

Feature #1589 ยป 0080-settings.-ch-Improve-coding-style.patch

Marko Lindqvist, 07/08/2025 04:59 PM

View differences:

server/settings.c
enum sset_level slevel;
/*
* About the *_validate functions: If the function is non-NULL, it
* About the *_validate functions: If the function is non-nullptr, it
* is called with the new value, and returns whether the change is
* legal. The char * is an error message in the case of reject.
*/
......
const struct setting *const *pset2);
#define settings_snprintf(_buf, _buf_len, format, ...) \
if (_buf != NULL) { \
if (_buf != nullptr) { \
fc_snprintf(_buf, _buf_len, format, ## __VA_ARGS__); \
}
......
NAME_CASE(CBS_LOGARITHMIC, "LOGARITHMIC", N_("Log^2 N style"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(MAPSIZE_PLAYER, "PLAYER", N_("Tiles per player"));
NAME_CASE(MAPSIZE_XYSIZE, "XYSIZE", N_("Width and height"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(TF_HEX, "HEX", N_("Hexagonal"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(WRAP_Y, "WRAPY", N_("Wrap North-South"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(TRS_SIMPLE, "SIMPLE", N_("Proportional to tile trade"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(MAPGEN_FAIR, "FAIR", N_("Fair islands"));
NAME_CASE(MAPGEN_FRACTURE, "FRACTURE", N_("Fracture map"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(MAPSTARTPOS_VARIABLE, "VARIABLE",
N_("Depending on size of continents"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(TEAM_PLACEMENT_VERTICAL, "VERTICAL",
N_("Vertical placement"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
N_("As long as connected"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(AS_TIMER, "TIMER", N_("Timer"));
};
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(BORDERS_EXPAND, "EXPAND",
N_("Borders expand to unknown, revealing tiles"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(TDM_FIXED, "FIXED", N_("Fixed"));
NAME_CASE(TDM_EVEN, "EVEN", N_("Even"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(PLRCOL_TEAM_ORDER, "TEAM_ORDER", N_("Per-team, in order"));
NAME_CASE(PLRCOL_NATION_ORDER, "NATION_ORDER", N_("Per-nation, in order"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(HB_NATIONAL, "NATIONAL", N_("Happy within own borders"));
NAME_CASE(HB_ALLIANCE, "ALLIED", N_("Happy within allied borders"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(DIPLO_FOR_TEAMS, "TEAM", N_("Restricted to teams"));
NAME_CASE(DIPLO_DISABLED, "DISABLED", N_("Disabled for everyone"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(CNM_GLOBAL_UNIQUE, "GLOBAL_UNIQUE", N_("Globally unique"));
NAME_CASE(CNM_NO_STEALING, "NO_STEALING", N_("No city name stealing"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(BARBS_FREQUENT, "FREQUENT", N_("Frequent barbarian uprising"));
NAME_CASE(BARBS_HORDES, "HORDES", N_("Raging hordes"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(REVOLEN_QUICKENING, "QUICKENING", N_("First time 'revolen', then always quicker"));
NAME_CASE(REVOLEN_RANDQUICK, "RANDQUICK", N_("Random, max always quicker"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(REVEAL_MAP_START, "START", N_("Reveal map at game start"));
NAME_CASE(REVEAL_MAP_DEAD, "DEAD", N_("Unfog map for dead players"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(AIRLIFTING_UNLIMITED_DEST, "DEST_UNLIMITED",
N_("Unlimited units to destination city"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
"PLAYER", N_("All players alternate movement"));
NAME_CASE(PMT_TEAMS_ALTERNATE, "TEAM", N_("Team alternate movement"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
Scorelog level names accessor.
****************************************************************************/
static const struct sset_val_name *
scoreloglevel_name(enum scorelog_level sl_level)
scoreloglevel_name(enum scorelog_level sl_level)
{
switch (sl_level) {
NAME_CASE(SL_ALL, "ALL", N_("All players"));
NAME_CASE(SL_HUMANS, "HUMANS", N_("Human players only"));
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
#endif
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
const char *lvlname;
if (lvl >= AI_LEVEL_AWAY) {
return NULL;
return nullptr;
}
lvlname = ai_level_name(lvl);
if (lvlname != NULL) {
if (lvlname != nullptr) {
static struct sset_val_name name[AI_LEVEL_COUNT];
name[lvl].support = lvlname;
......
return &name[lvl];
}
return NULL;
return nullptr;
}
/************************************************************************//**
......
NAME_CASE(FALSE, "DISABLED", N_("disabled"));
NAME_CASE(TRUE, "ENABLED", N_("enabled"));
}
return NULL;
return nullptr;
}
#undef NAME_CASE
......
const char *msg = aifill(*pset->integer.pvalue);
if (msg) {
log_normal(_("Warning: aifill not met: %s."), msg);
notify_conn(NULL, NULL, E_SETTING, ftc_server,
notify_conn(nullptr, nullptr, E_SETTING, ftc_server,
_("Warning: aifill not met: %s."), msg);
}
}
......
{
/* If any player's existing selection is invalid, abort it */
players_iterate(pplayer) {
if (pplayer->nation != NULL) {
if (pplayer->nation != nullptr) {
if (!nation_is_in_current_set(pplayer->nation)) {
(void) player_set_nation(pplayer, NO_NATION_SELECTED);
send_player_info_c(pplayer, game.est_connections);
......
* accidentally and transiently set to an unintended value.
* (However, new connections will start out detached.) */
if (normal_player_count() > server.playable_nations) {
notify_conn(NULL, NULL, E_SETTING, ftc_server, "%s",
notify_conn(nullptr, nullptr, E_SETTING, ftc_server, "%s",
_("Warning: not enough nations in this nation set "
"for all current players."));
}
......
if (!game_was_started()) {
if (read_enum_value(pset) != PLRCOL_PLR_SET) {
players_iterate(pplayer) {
server_player_set_color(pplayer, NULL);
server_player_set_color(pplayer, nullptr);
} players_iterate_end;
}
/* Update clients with new color scheme. */
send_player_info_c(NULL, NULL);
send_player_info_c(nullptr, nullptr);
}
}
......
if (*pset->boolean.pvalue) {
players_iterate(pplayer) {
if (is_human(pplayer) && !pplayer->is_connected) {
toggle_ai_player_direct(NULL, pplayer);
toggle_ai_player_direct(nullptr, pplayer);
send_player_info_c(pplayer, game.est_connections);
}
} players_iterate_end;
......
/* This may cause the current turn to end immediately. */
game.tinfo.seconds_to_phasedone = timeout;
}
send_game_info(NULL);
send_game_info(nullptr);
}
}
......
game.tinfo.seconds_to_phasedone = game.info.timeout;
}
}
send_game_info(NULL);
send_game_info(nullptr);
}
}
......
{
char buf[MAX_LEN_PATH];
generate_save_name(value, buf, sizeof(buf), NULL);
generate_save_name(value, buf, sizeof(buf), nullptr);
if (!is_safe_filename(buf)) {
settings_snprintf(reject_msg, reject_msg_len,
......
{
if (map_is_empty()) {
if (MAPGEN_SCENARIO == value
&& (NULL != caller || !game.scenario.is_scenario)) {
&& (caller != nullptr || !game.scenario.is_scenario)) {
settings_snprintf(reject_msg, reject_msg_len,
_("You cannot disable the map generator."));
return FALSE;
......
&& !(game.server.autosaves & (1 << AS_TIMER))) {
game.server.save_timer = timer_renew(game.server.save_timer,
TIMER_USER, TIMER_ACTIVE,
game.server.save_timer != NULL
? NULL : "save interval");
game.server.save_timer != nullptr
? nullptr : "save interval");
timer_start(game.server.save_timer);
} else if (!(value & (1 << AS_TIMER))
&& (game.server.autosaves & (1 << AS_TIMER))) {
timer_stop(game.server.save_timer);
timer_destroy(game.server.save_timer);
game.server.save_timer = NULL;
game.server.save_timer = nullptr;
}
}
......
static bool aitype_callback(const char *value, struct connection *caller,
char *reject_msg, size_t reject_msg_len)
{
if (ai_type_by_name(value) == NULL) {
if (ai_type_by_name(value) == nullptr) {
settings_snprintf(reject_msg, reject_msg_len,
_("No such AI type loaded."));
......
#define GEN_BOOL(name, value, sclass, scateg, slevel, al_read, al_write, \
short_help, extra_help, func_validate, func_action, \
_default) \
{name, sclass, al_read, al_write, short_help, extra_help, NULL, SST_BOOL, \
{name, sclass, al_read, al_write, short_help, extra_help, nullptr, SST_BOOL, \
scateg, slevel, \
INIT_BRACE_BEGIN \
.boolean = {&value, _default, func_validate, bool_name, \
......
#define GEN_STRING(name, value, sclass, scateg, slevel, al_read, al_write, \
short_help, extra_help, func_validate, func_action, \
_default) \
{name, sclass, al_read, al_write, short_help, extra_help, NULL, \
{name, sclass, al_read, al_write, short_help, extra_help, nullptr, \
SST_STRING, scateg, slevel, \
INIT_BRACE_BEGIN \
.string = {value, _default, sizeof(value), func_validate, ""} \
......
#define GEN_STRING_NRS(name, value, sclass, scateg, slevel, al_read, al_write, \
short_help, extra_help, func_validate, func_action, \
_default) \
{name, sclass, al_read, al_write, short_help, extra_help, NULL, \
{name, sclass, al_read, al_write, short_help, extra_help, nullptr, \
SST_STRING, scateg, slevel, \
INIT_BRACE_BEGIN \
.string = {value, _default, sizeof(value), func_validate, ""} \
......
#define GEN_BITWISE(name, value, sclass, scateg, slevel, al_read, al_write, \
short_help, extra_help, func_validate, func_action, \
func_name, _default) \
{ name, sclass, al_read, al_write, short_help, extra_help, NULL, \
{ name, sclass, al_read, al_write, short_help, extra_help, nullptr, \
SST_BITWISE, scateg, slevel, \
INIT_BRACE_BEGIN \
.bitwise = { (unsigned *) (void *) &value, _default, func_validate, \
......
"- \"Tiles per player\" (PLAYER): Number of (land) tiles per "
"player (option 'tilesperplayer').\n"
"- \"Width and height\" (XYSIZE): Map width and height in "
"tiles (options 'xsize' and 'ysize')."), NULL,
mapsize_callback, NULL, mapsize_name, MAP_DEFAULT_MAPSIZE)
"tiles (options 'xsize' and 'ysize')."), nullptr,
mapsize_callback, nullptr, mapsize_name, MAP_DEFAULT_MAPSIZE)
GEN_INT("size", wld.map.server.size, SSET_MAP_SIZE,
SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
......
" size = 20 is a huge map of 20,000 tiles\n"
"For this option to take effect, the \"Map size definition\" "
"option ('mapsize') must be set to \"Number of tiles\" "
"(FULLSIZE)."), NULL, NULL, NULL,
"(FULLSIZE)."), nullptr, nullptr, nullptr,
MAP_MIN_SIZE, MAP_MAX_SIZE, MAP_DEFAULT_SIZE)
GEN_INT("tilesperplayer", wld.map.server.tilesperplayer, SSET_MAP_SIZE,
......
"For this option to take effect, the \"Map size definition\" "
"option ('mapsize') must be set to \"Tiles per player\" "
"(PLAYER)."),
NULL, NULL, NULL, MAP_MIN_TILESPERPLAYER,
nullptr, nullptr, nullptr, MAP_MIN_TILESPERPLAYER,
MAP_MAX_TILESPERPLAYER, MAP_DEFAULT_TILESPERPLAYER)
GEN_INT("xsize", wld.map.xsize, SSET_MAP_SIZE,
......
"For this option to take effect, the \"Map size definition\" "
"option ('mapsize') must be set to \"Width and height\" "
"(XYSIZE)."),
NULL, xsize_callback, NULL,
nullptr, xsize_callback, nullptr,
MAP_MIN_LINEAR_SIZE, MAP_MAX_LINEAR_SIZE, MAP_DEFAULT_LINEAR_SIZE)
GEN_INT("ysize", wld.map.ysize, SSET_MAP_SIZE,
SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
......
"For this option to take effect, the \"Map size definition\" "
"option ('mapsize') must be set to \"Width and height\" "
"(XYSIZE)."),
NULL, ysize_callback, NULL,
nullptr, ysize_callback, nullptr,
MAP_MIN_LINEAR_SIZE, MAP_MAX_LINEAR_SIZE, MAP_DEFAULT_LINEAR_SIZE)
GEN_BITWISE("topology", wld.map.topology_id, SSET_MAP_SIZE,
......
"of the continents.\n"
"If the requested generator is incompatible with other server "
"settings, the server may fall back to another generator."),
NULL, generator_validate, NULL, generator_name, MAP_DEFAULT_GENERATOR)
nullptr, generator_validate, nullptr, generator_name,
MAP_DEFAULT_GENERATOR)
GEN_ENUM("startpos", wld.map.server.startpos,
SSET_MAP_GEN, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
......
"create the right number of continents for the choice of this "
"'startpos' setting and the number of players, so this is "
"unlikely to occur.)"),
NULL, NULL, NULL, startpos_name, MAP_DEFAULT_STARTPOS)
nullptr, nullptr, nullptr, startpos_name, MAP_DEFAULT_STARTPOS)
GEN_ENUM("teamplacement", wld.map.server.team_placement,
SSET_MAP_GEN, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
......
"team will be placed horizontally.\n"
"- \"Vertical placement\" (VERTICAL): players of the same "
"team will be placed vertically."),
NULL, NULL, NULL, teamplacement_name, MAP_DEFAULT_TEAM_PLACEMENT)
nullptr, nullptr, nullptr, teamplacement_name,
MAP_DEFAULT_TEAM_PLACEMENT)
GEN_BOOL("tinyisles", wld.map.server.tinyisles,
SSET_MAP_GEN, SSET_GEOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("Presence of 1x1 islands"),
N_("This setting controls whether the map generator is allowed "
"to make islands of one only tile size."), NULL, NULL,
"to make islands of one only tile size."), nullptr, nullptr,
MAP_DEFAULT_TINYISLES)
GEN_BOOL("separatepoles", wld.map.server.separatepoles,
......
ALLOW_NONE, ALLOW_BASIC,
N_("Whether the poles are separate continents"),
N_("If this setting is disabled, the continents may attach to "
"poles."), NULL, NULL, MAP_DEFAULT_SEPARATE_POLES)
"poles."), nullptr, nullptr, MAP_DEFAULT_SEPARATE_POLES)
GEN_INT("flatpoles", wld.map.server.flatpoles,
SSET_MAP_GEN, SSET_GEOLOGY, SSET_SITUATIONAL, ALLOW_NONE, ALLOW_BASIC,
......
"during map generation, preventing a diversity of land "
"terrain there. 0 is no flattening, 100 is maximum "
"flattening. Only affects the 'RANDOM' and 'FRACTAL' "
"map generators."), NULL,
NULL, NULL,
"map generators."), nullptr,
nullptr, nullptr,
MAP_MIN_FLATPOLES, MAP_MAX_FLATPOLES, MAP_DEFAULT_FLATPOLES)
GEN_INT("northlatitude", wld.map.north_latitude,
......
" 300 and -300 gives an equatorial map.\n"
"\n"
"In rulesets that support it, latitude may also have certain "
"effects during gameplay."), NULL,
NULL, NULL,
"effects during gameplay."), nullptr,
nullptr, nullptr,
MAP_MIN_LATITUDE_BOUND, MAP_MAX_LATITUDE_BOUND,
MAP_DEFAULT_NORTH_LATITUDE)
GEN_INT("southlatitude", wld.map.south_latitude,
......
" 300 and -300 gives an equatorial map.\n"
"\n"
"In rulesets that support it, latitude may also have certain "
"effects during gameplay."), NULL,
NULL, NULL,
"effects during gameplay."), nullptr,
nullptr, nullptr,
MAP_MIN_LATITUDE_BOUND, MAP_MAX_LATITUDE_BOUND,
MAP_DEFAULT_SOUTH_LATITUDE)
......
" 30 means a cold planet with small tropical zones.\n"
" 0 means a very cold planet with large polar zones and no "
"tropics."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
MAP_MIN_TEMPERATURE, MAP_MAX_TEMPERATURE, MAP_DEFAULT_TEMPERATURE)
GEN_INT("landmass", wld.map.server.landpercent,
SSET_MAP_GEN, SSET_GEOLOGY, SSET_SITUATIONAL,
ALLOW_NONE, ALLOW_BASIC,
N_("Percentage of the map that is land"),
N_("This setting gives the approximate percentage of the map "
"that will be made into land."), NULL, NULL, NULL,
"that will be made into land."), nullptr, nullptr, nullptr,
MAP_MIN_LANDMASS, MAP_MAX_LANDMASS, MAP_DEFAULT_LANDMASS)
GEN_INT("steepness", wld.map.server.steepness,
......
N_("Amount of hills/mountains"),
N_("Small values give flat maps, while higher values give a "
"steeper map with more hills and mountains."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
MAP_MIN_STEEPNESS, MAP_MAX_STEEPNESS, MAP_DEFAULT_STEEPNESS)
GEN_INT("wetness", wld.map.server.wetness,
SSET_MAP_GEN, SSET_GEOLOGY, SSET_SITUATIONAL,
ALLOW_NONE, ALLOW_BASIC,
N_("Amount of water on landmasses"),
N_("Amount of water on landmasses"),
N_("Small values mean lots of dry, desert-like land; "
"higher values give a wetter map with more swamps, "
"jungles, and rivers."), NULL, NULL, NULL,
"jungles, and rivers."), nullptr, nullptr, nullptr,
MAP_MIN_WETNESS, MAP_MAX_WETNESS, MAP_DEFAULT_WETNESS)
GEN_BOOL("globalwarming", game.info.global_warming,
......
N_("Global warming"),
N_("If turned off, global warming will not occur "
"as a result of pollution. This setting does not "
"affect pollution."), NULL, NULL,
"affect pollution."), nullptr, nullptr,
GAME_DEFAULT_GLOBAL_WARMING)
GEN_INT("globalwarming_percent", game.server.global_warming_percent,
SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
N_("Global warming percent"),
N_("This is a multiplier for the rate of accumulation of global "
"warming."), NULL, NULL, NULL,
"warming."), nullptr, nullptr, nullptr,
GAME_MIN_GLOBAL_WARMING_PERCENT,
GAME_MAX_GLOBAL_WARMING_PERCENT,
GAME_DEFAULT_GLOBAL_WARMING_PERCENT)
......
SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
N_("Nuclear winter"),
N_("If turned off, nuclear winter will not occur "
"as a result of nuclear war."), NULL, NULL,
"as a result of nuclear war."), nullptr, nullptr,
GAME_DEFAULT_NUCLEAR_WINTER)
GEN_INT("nuclearwinter_percent", game.server.nuclear_winter_percent,
SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
N_("Nuclear winter percent"),
N_("This is a multiplier for the rate of accumulation of nuclear "
"winter."), NULL, NULL, NULL,
"winter."), nullptr, nullptr, nullptr,
GAME_MIN_NUCLEAR_WINTER_PERCENT,
GAME_MAX_NUCLEAR_WINTER_PERCENT,
GAME_DEFAULT_NUCLEAR_WINTER_PERCENT)
......
"for zero (the default) a seed will be generated randomly, "
"based on gameseed. If also gameseed is zero, "
"the map will be completely random."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
MAP_MIN_SEED, MAP_MAX_SEED, MAP_DEFAULT_SEED)
/* Map additional stuff: huts and specials. gameseed also goes here
/* Map additional stuff: huts and specials. gameseed also goes here
* because huts and specials are the first time the gameseed gets used (?)
* These are done when the game starts, so these are historical and
* fixed after the game has started.
......
N_("Game random seed"),
N_("For zero (the default) a seed will be chosen based "
"on system entropy or, failing that, the current time."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_SEED, GAME_MAX_SEED, GAME_DEFAULT_SEED)
GEN_INT("specials", wld.map.server.riches,
......
N_("Amount of \"special\" resource tiles"),
N_("Special resources improve the basic terrain type they "
"are on. The server variable's scale is parts per "
"thousand."), NULL, NULL, NULL,
"thousand."), nullptr, nullptr, nullptr,
MAP_MIN_RICHES, MAP_MAX_RICHES, MAP_DEFAULT_RICHES)
GEN_INT("huts", wld.map.server.huts,
......
N_("Huts are tile extras that usually may be investigated by "
"units. "
"The server variable's scale is huts per thousand tiles."),
huts_help, NULL, huts_action,
huts_help, nullptr, huts_action,
MAP_MIN_HUTS, MAP_MAX_HUTS, MAP_DEFAULT_HUTS)
GEN_INT("animals", wld.map.server.animals,
......
N_("Number of animals initially created on terrains "
"defined for them in the ruleset (if the ruleset supports it). "
"The server variable's scale is animals per "
"thousand tiles."), NULL, NULL, NULL,
"thousand tiles."), nullptr, nullptr, nullptr,
MAP_MIN_ANIMALS, MAP_MAX_ANIMALS, MAP_DEFAULT_ANIMALS)
/* Options affecting numbers of players and AI players. These only
/* Options affecting numbers of players and AI players. These only
* affect the start of the game and can not be adjusted after that.
*/
GEN_INT("minplayers", game.server.min_players,
......
N_("Minimum number of players"),
N_("There must be at least this many players (connected "
"human players) before the game can start."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_MIN_PLAYERS, GAME_MAX_MIN_PLAYERS, GAME_DEFAULT_MIN_PLAYERS)
GEN_INT("maxplayers", game.server.max_players,
......
"When playing a scenario which defines player start positions, "
"this setting cannot be set to greater than the number of "
"defined start positions."),
NULL, maxplayers_callback, NULL,
nullptr, maxplayers_callback, nullptr,
GAME_MIN_MAX_PLAYERS, GAME_MAX_MAX_PLAYERS, GAME_DEFAULT_MAX_PLAYERS)
GEN_INT("aifill", game.info.aifill,
......
"number of players at this amount. As more players join, "
"these AI players will be replaced. When set to zero, "
"all AI players will be removed."),
NULL, NULL, aifill_action,
nullptr, nullptr, aifill_action,
GAME_MIN_AIFILL, GAME_MAX_AIFILL, GAME_DEFAULT_AIFILL)
GEN_ENUM("persistentready", game.info.persistent_ready,
SSET_META, SSET_NETWORK, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("When the Readiness of a player gets autotoggled off"),
N_("In pre-game, usually when new players join or old ones leave, "
N_("When the Readiness of a player gets autotoggled off"),
N_("In pre-game, usually when new players join or old ones leave, "
"those who have already accepted game to start by toggling \"Ready\" "
"get that autotoggled off in the changed situation. This setting "
"can be used to make readiness more persistent."),
NULL, NULL, NULL, persistentready_name, GAME_DEFAULT_PERSISTENTREADY)
nullptr, nullptr, nullptr, persistentready_name,
GAME_DEFAULT_PERSISTENTREADY)
GEN_STRING("nationset", game.server.nationset,
SSET_PLAYERS, SSET_INTERNAL, SSET_RARE,
......
N_("Event cache for this number of turns"),
N_("Event messages are saved for this number of turns. A value of "
"0 deactivates the event cache."),
NULL, NULL, NULL, GAME_MIN_EVENT_CACHE_TURNS, GAME_MAX_EVENT_CACHE_TURNS,
GAME_DEFAULT_EVENT_CACHE_TURNS)
nullptr, nullptr, nullptr, GAME_MIN_EVENT_CACHE_TURNS,
GAME_MAX_EVENT_CACHE_TURNS, GAME_DEFAULT_EVENT_CACHE_TURNS)
GEN_INT("ec_max_size", game.server.event_cache.max_size,
SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
ALLOW_NONE, ALLOW_BASIC,
N_("Size of the event cache"),
N_("This defines the maximal number of events in the event cache."),
NULL, NULL, NULL, GAME_MIN_EVENT_CACHE_MAX_SIZE,
nullptr, nullptr, nullptr, GAME_MIN_EVENT_CACHE_MAX_SIZE,
GAME_MAX_EVENT_CACHE_MAX_SIZE, GAME_DEFAULT_EVENT_CACHE_MAX_SIZE)
GEN_BOOL("ec_chat", game.server.event_cache.chat,
......
ALLOW_NONE, ALLOW_BASIC,
N_("Save chat messages in the event cache"),
N_("If turned on, chat messages will be saved in the event "
"cache."), NULL, NULL, GAME_DEFAULT_EVENT_CACHE_CHAT)
"cache."), nullptr, nullptr, GAME_DEFAULT_EVENT_CACHE_CHAT)
GEN_BOOL("ec_info", game.server.event_cache.info,
SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
......
/* TRANS: Don't translate the text between single quotes. */
N_("If turned on, all cached events will be marked by the turn "
"and time of the event like '(T2 - 15:29:52)'."),
NULL, NULL, GAME_DEFAULT_EVENT_CACHE_INFO)
nullptr, nullptr, GAME_DEFAULT_EVENT_CACHE_INFO)
/* Game initialization parameters (only affect the first start of the game,
* and not reloads). Can not be changed after first start of game.
* and not reloads). Can not be changed after first start of game.
*/
GEN_STRING("startunits", game.server.start_units,
SSET_GAME_INIT, SSET_SOCIOLOGY, SSET_VITAL,
ALLOW_NONE, ALLOW_BASIC,
N_("List of players' initial units"),
N_("This should be a string of characters, each of which "
"specifies a unit role. The first character must be native to "
"specifies a unit role. The first character must be native to "
"at least one \"Starter\" terrain. The characters and their "
"meanings are:\n"
" c = City founder (eg., Settlers)\n"
" w = Terrain worker (eg., Engineers)\n"
" x = Explorer (eg., Explorer)\n"
" k = Gameloss (eg., King)\n"
" s = Diplomat (eg., Diplomat)\n"
"meanings are:\n"
" c = City founder (eg., Settlers)\n"
" w = Terrain worker (eg., Engineers)\n"
" x = Explorer (eg., Explorer)\n"
" k = Gameloss (eg., King)\n"
" s = Diplomat (eg., Diplomat)\n"
" f = Ferryboat (eg., Trireme)\n"
" d = Ok defense unit (eg., Warriors)\n"
" D = Good defense unit (eg., Phalanx)\n"
" a = Fast attack unit (eg., Horsemen)\n"
" A = Strong attack unit (eg., Catapult)\n"),
startunits_callback, NULL, GAME_DEFAULT_START_UNITS)
" d = Ok defense unit (eg., Warriors)\n"
" D = Good defense unit (eg., Phalanx)\n"
" a = Fast attack unit (eg., Horsemen)\n"
" A = Strong attack unit (eg., Catapult)\n"),
startunits_callback, nullptr, GAME_DEFAULT_START_UNITS)
GEN_BOOL("startcity", game.server.start_city,
SSET_GAME_INIT, SSET_SOCIOLOGY, SSET_VITAL,
......
N_("Whether player starts with a city"),
N_("If this is set, game will start with player's first "
"city already founded to starting location."),
NULL, NULL, GAME_DEFAULT_START_CITY)
nullptr, nullptr, GAME_DEFAULT_START_CITY)
GEN_INT("dispersion", game.server.dispersion,
SSET_GAME_INIT, SSET_SOCIOLOGY, SSET_SITUATIONAL,
......
N_("Area where initial units are located"),
N_("This is the radius within "
"which the initial units are dispersed."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_DISPERSION, GAME_MAX_DISPERSION, GAME_DEFAULT_DISPERSION)
GEN_INT("gold", game.info.gold,
SSET_GAME_INIT, SSET_ECONOMICS, SSET_VITAL,
ALLOW_NONE, ALLOW_BASIC,
N_("Starting gold per player"),
N_("Starting gold per player"),
N_("At the beginning of the game, each player is given this "
"much gold."), NULL, NULL, NULL,
"much gold."), nullptr, nullptr, nullptr,
GAME_MIN_GOLD, GAME_MAX_GOLD, GAME_DEFAULT_GOLD)
GEN_INT("infrapoints", game.info.infrapoints,
......
ALLOW_NONE, ALLOW_BASIC,
N_("Starting infrapoints per player"),
N_("At the beginning of the game, each player is given this "
"many infrapoints."), NULL, NULL, NULL,
"many infrapoints."), nullptr, nullptr, nullptr,
GAME_MIN_INFRA, GAME_MAX_INFRA, GAME_DEFAULT_INFRA)
GEN_INT("techlevel", game.info.tech,
SSET_GAME_INIT, SSET_SCIENCE, SSET_VITAL,
ALLOW_NONE, ALLOW_BASIC,
N_("Number of initial techs per player"),
N_("Number of initial techs per player"),
/* TRANS: The string between single quotes is a setting name and
* should not be translated. */
N_("At the beginning of the game, each player is given this "
"many technologies. The technologies chosen are random for "
"each player. Depending on the value of tech_cost_style in "
"the ruleset, a big value for 'techlevel' can make the next "
"techs really expensive."), NULL, NULL, NULL,
"techs really expensive."), nullptr, nullptr, nullptr,
GAME_MIN_TECHLEVEL, GAME_MAX_TECHLEVEL, GAME_DEFAULT_TECHLEVEL)
GEN_INT("sciencebox", game.info.sciencebox,
......
"technology. All tech costs are multiplied by this amount "
"(as a percentage). The base tech costs are determined by "
"the ruleset or other game settings."),
NULL, NULL, NULL, GAME_MIN_SCIENCEBOX, GAME_MAX_SCIENCEBOX,
nullptr, nullptr, nullptr, GAME_MIN_SCIENCEBOX, GAME_MAX_SCIENCEBOX,
GAME_DEFAULT_SCIENCEBOX)
GEN_BOOL("multiresearch", game.server.multiresearch,
......
N_("Allows switching to any technology without wasting old "
"research. Bulbs are never transferred to new technology. "
"Techpenalty options are ineffective after enabling that "
"option."), NULL, NULL,
"option."), nullptr, nullptr,
GAME_DEFAULT_MULTIRESEARCH)
GEN_INT("techpenalty", game.server.techpenalty,
......
N_("If you change your current research technology, and you have "
"positive research points, you lose this percentage of those "
"research points. This does not apply when you have just gained "
"a technology this turn."), NULL, NULL, NULL,
"a technology this turn."), nullptr, nullptr, nullptr,
GAME_MIN_TECHPENALTY, GAME_MAX_TECHPENALTY,
GAME_DEFAULT_TECHPENALTY)
......
N_("Chance to lose a technology while receiving it"),
N_("The chance that learning a technology by treaty or theft "
"will fail."),
NULL, NULL, NULL, GAME_MIN_TECHLOST_RECV, GAME_MAX_TECHLOST_RECV,
GAME_DEFAULT_TECHLOST_RECV)
nullptr, nullptr, nullptr, GAME_MIN_TECHLOST_RECV,
GAME_MAX_TECHLOST_RECV, GAME_DEFAULT_TECHLOST_RECV)
GEN_INT("techlost_donor", game.server.techlost_donor,
SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
N_("The chance that your civilization will lose a technology if "
"you teach it to someone else by treaty, or if it is stolen "
"from you."),
NULL, NULL, NULL, GAME_MIN_TECHLOST_DONOR, GAME_MAX_TECHLOST_DONOR,
GAME_DEFAULT_TECHLOST_DONOR)
nullptr, nullptr, nullptr, GAME_MIN_TECHLOST_DONOR,
GAME_MAX_TECHLOST_DONOR, GAME_DEFAULT_TECHLOST_DONOR)
GEN_INT("techleak", game.info.tech_leak_pct,
SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"percentage of tech's bulb cost gets leaked each turn. "
"This setting has no effect if the ruleset has disabled "
"tech leakage."),
NULL, NULL, NULL, GAME_MIN_TECHLEAK, GAME_MAX_TECHLEAK,
nullptr, nullptr, nullptr, GAME_MIN_TECHLEAK, GAME_MAX_TECHLEAK,
GAME_DEFAULT_TECHLEAK)
GEN_BOOL("team_pooled_research", game.info.team_pooled_research,
......
N_("If this setting is turned on, then the team mates will share "
"the science research. Else, every player of the team will "
"have to make its own."),
NULL, NULL, GAME_DEFAULT_TEAM_POOLED_RESEARCH)
nullptr, nullptr, GAME_DEFAULT_TEAM_POOLED_RESEARCH)
GEN_INT("diplbulbcost", game.server.diplbulbcost,
SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"lose research points equal to this percentage of the cost to "
"research a new technology. If this is non-zero, you can end up "
"with negative research points."),
NULL, NULL, NULL,
GAME_MIN_DIPLBULBCOST, GAME_MAX_DIPLBULBCOST, GAME_DEFAULT_DIPLBULBCOST)
nullptr, nullptr, nullptr,
GAME_MIN_DIPLBULBCOST, GAME_MAX_DIPLBULBCOST,
GAME_DEFAULT_DIPLBULBCOST)
GEN_INT("diplgoldcost", game.server.diplgoldcost,
SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
N_("When transferring gold in diplomatic treaties, this percentage "
"of the agreed sum is lost to both parties; it is deducted from "
"the donor but not received by the recipient."),
NULL, NULL, NULL,
GAME_MIN_DIPLGOLDCOST, GAME_MAX_DIPLGOLDCOST, GAME_DEFAULT_DIPLGOLDCOST)
nullptr, nullptr, nullptr,
GAME_MIN_DIPLGOLDCOST, GAME_MAX_DIPLGOLDCOST,
GAME_DEFAULT_DIPLGOLDCOST)
GEN_INT("incite_gold_loss_chance", game.server.incite_gold_loss_chance,
SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
N_("When unit trying to incite revolt is eliminated, half of the gold "
"(or quarter, if unit was caught), prepared to bribe citizens, "
"can be lost or captured by enemy."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_INCITE_GOLD_LOSS_CHANCE, GAME_MAX_INCITE_GOLD_LOSS_CHANCE,
GAME_DEFAULT_INCITE_GOLD_LOSS_CHANCE)
......
"gold, there is chance that this gold would be captured by "
"city defender. Transfer tax would be applied, though. "
"This setting is irrelevant, if incite_gold_loss_chance is zero."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_INCITE_GOLD_CAPT_CHANCE, GAME_MAX_INCITE_GOLD_CAPT_CHANCE,
GAME_DEFAULT_INCITE_GOLD_CAPT_CHANCE)
......
"lose research points equal to this percentage of the cost to "
"research a new technology. If this is non-zero, you can end up "
"with negative research points."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_CONQUERCOST, GAME_MAX_CONQUERCOST,
GAME_DEFAULT_CONQUERCOST)
......
"equal to this percentage of the cost to research a new "
"technology. If this is non-zero, you can end up "
"with negative research points."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_FREECOST, GAME_MAX_FREECOST, GAME_DEFAULT_FREECOST)
GEN_INT("techlossforgiveness", game.info.techloss_forgiveness,
......
"research, you forget a technology you already knew.\n"
"The special value -1 prevents loss of technology regardless of "
"research points."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_TECHLOSSFG, GAME_MAX_TECHLOSSFG,
GAME_DEFAULT_TECHLOSSFG)
......
"sufficient to make it positive).\n"
"The special value -1 means that your research balance is always "
"restored to zero, regardless of your previous shortfall."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_TECHLOSSREST, GAME_MAX_TECHLOSSREST,
GAME_DEFAULT_TECHLOSSREST)
......
N_("This is the base amount of food required to grow a city. "
"This value is multiplied by another factor that comes from "
"the ruleset and is dependent on the size of the city."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_FOODBOX, GAME_MAX_FOODBOX, GAME_DEFAULT_FOODBOX)
GEN_INT("aqueductloss", game.server.aqueductloss,
......
"this is the base percentage of its foodbox that is lost "
"each turn; the penalty may be reduced by buildings or other "
"circumstances, depending on the ruleset."),
NULL, NULL, NULL,
GAME_MIN_AQUEDUCTLOSS, GAME_MAX_AQUEDUCTLOSS,
nullptr, nullptr, nullptr,
GAME_MIN_AQUEDUCTLOSS, GAME_MAX_AQUEDUCTLOSS,
GAME_DEFAULT_AQUEDUCTLOSS)
GEN_INT("shieldbox", game.info.shieldbox,
......
N_("This affects how quickly units and buildings can be "
"produced. The base costs are multiplied by this value (as "
"a percentage)."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_SHIELDBOX, GAME_MAX_SHIELDBOX, GAME_DEFAULT_SHIELDBOX)
/* Notradesize and fulltradesize used to have callbacks to prevent them
* from being set illegally (notradesize > fulltradesize). However this
* from being set illegally (notradesize > fulltradesize). However this
* provided a problem when setting them both through the client's settings
* dialog, since they cannot both be set atomically. So the callbacks were
* dialog, since they cannot both be set atomically. So the callbacks were
* removed and instead the game now knows how to deal with invalid
* settings. */
GEN_INT("fulltradesize", game.info.fulltradesize,
......
"The penalty is 100% (no trade at all) for sizes up to "
"'notradesize', and decreases gradually to 0% (no penalty "
"except the normal corruption) for size='fulltradesize'. "
"See also 'notradesize'."), NULL, NULL, NULL,
GAME_MIN_FULLTRADESIZE, GAME_MAX_FULLTRADESIZE,
"See also 'notradesize'."), nullptr, nullptr, nullptr,
GAME_MIN_FULLTRADESIZE, GAME_MAX_FULLTRADESIZE,
GAME_DEFAULT_FULLTRADESIZE)
GEN_INT("notradesize", game.info.notradesize,
......
"is larger than this amount. The produced trade increases "
"gradually for cities larger than 'notradesize' and smaller "
"than 'fulltradesize'. See also 'fulltradesize'."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_NOTRADESIZE, GAME_MAX_NOTRADESIZE,
GAME_DEFAULT_NOTRADESIZE)
......
"determines how big percentage of the bonus calculation is "
"relative to world size, and how much only absolute distance "
"matters."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_TRADEWORLDRELPCT, GAME_MAX_TRADEWORLDRELPCT,
GAME_DEFAULT_TRADEWORLDRELPCT)
......
"at least two clear tiles in any direction between all existing "
"cities and the new city site. A value of 1 removes any such "
"restriction on city placement."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_CITYMINDIST, GAME_MAX_CITYMINDIST,
GAME_DEFAULT_CITYMINDIST)
......
SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("Technology trading"),
N_("If turned off, trading technologies in the diplomacy dialog "
"is not allowed."), NULL, NULL,
"is not allowed."), nullptr, nullptr,
GAME_DEFAULT_TRADING_TECH)
GEN_BOOL("trading_gold", game.info.trading_gold,
SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("Gold trading"),
N_("If turned off, trading gold in the diplomacy dialog "
"is not allowed."), NULL, NULL,
"is not allowed."), nullptr, nullptr,
GAME_DEFAULT_TRADING_GOLD)
GEN_BOOL("trading_city", game.info.trading_city,
SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("City trading"),
N_("If turned off, trading cities in the diplomacy dialog "
"is not allowed."), NULL, NULL,
"is not allowed."), nullptr, nullptr,
GAME_DEFAULT_TRADING_CITY)
GEN_ENUM("caravan_bonus_style", game.info.caravan_bonus_style,
......
"of source and destination with multipliers for overseas and "
"international destinations. LOGARITHMIC bonuses are "
"proportional to log^2(distance + trade)."),
NULL, NULL, NULL, caravanbonusstyle_name,
nullptr, nullptr, nullptr, caravanbonusstyle_name,
GAME_DEFAULT_CARAVAN_BONUS_STYLE)
GEN_ENUM("trade_revenue_style", game.info.trade_revenue_style,
......
"and international routes. "
"SIMPLE revenues are proportional to the average trade of the "
"two cities."),
NULL, NULL, NULL, traderevenuestyle_name,
GAME_DEFAULT_TRADE_REVENUE_STYLE)
nullptr, nullptr, nullptr, traderevenuestyle_name,
GAME_DEFAULT_TRADE_REVENUE_STYLE)
GEN_INT("trademindist", game.info.trademindist,
SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"a trade route, they must be at least this far apart on the "
"map. For square grids, the distance is calculated as "
"\"Manhattan distance\", that is, the sum of the displacements "
"along the x and y directions."), NULL, NULL, NULL,
"along the x and y directions."), nullptr, nullptr, nullptr,
GAME_MIN_TRADEMINDIST, GAME_MAX_TRADEMINDIST,
GAME_DEFAULT_TRADEMINDIST)
......
N_("Sets the number of turns between rapture growth of a city. "
"If set to n a city will grow after celebrating for n+1 "
"turns."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_RAPTUREDELAY, GAME_MAX_RAPTUREDELAY,
GAME_DEFAULT_RAPTUREDELAY)
......
"if any are defined by the ruleset. The relative frequency "
"of disaster types is set by the ruleset. Zero prevents "
"any random disasters from occurring."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_DISASTERS, GAME_MAX_DISASTERS,
GAME_DEFAULT_DISASTERS)
......
SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("AI trait distribution method"),
N_("How trait values are given to AI players."),
NULL, NULL, NULL, trait_dist_name, GAME_DEFAULT_TRAIT_DIST_MODE)
nullptr, nullptr, nullptr, trait_dist_name,
GAME_DEFAULT_TRAIT_DIST_MODE)
GEN_INT("razechance", game.server.razechance,
SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
N_("Chance for conquered building destruction"),
N_("When a player conquers a city, each city improvement has this "
"percentage chance to be destroyed."), NULL, NULL, NULL,
"percentage chance to be destroyed."), nullptr, nullptr, nullptr,
GAME_MIN_RAZECHANCE, GAME_MAX_RAZECHANCE, GAME_DEFAULT_RAZECHANCE)
GEN_INT("occupychance", game.server.occupychance,
......
"the combat (and no enemy units remain in the tile). If "
"set to a value between 0 and 100, this will be used as "
"the percent chance of \"occupying\" territory."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_OCCUPYCHANCE, GAME_MAX_OCCUPYCHANCE,
GAME_DEFAULT_OCCUPYCHANCE)
......
N_("Turn on/off server-side autoattack"),
N_("If set to on, units with moves left will automatically "
"consider attacking enemy units that move adjacent to them."),
NULL, NULL, GAME_DEFAULT_AUTOATTACK)
nullptr, nullptr, GAME_DEFAULT_AUTOATTACK)
GEN_BOOL("killstack", game.info.killstack,
SSET_RULES_SCENARIO, SSET_MILITARY, SSET_RARE,
......
"and is not inside a city or suitable base, all units in the same "
"tile are destroyed along with the defender. If this is disabled, "
"only the defender unit is destroyed."),
NULL, NULL, GAME_DEFAULT_KILLSTACK)
nullptr, nullptr, GAME_DEFAULT_KILLSTACK)
GEN_BOOL("killcitizen", game.info.killcitizen,
SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"after a successful attack by an enemy unit. If this is "
"disabled, population is never reduced. Even when this is "
"enabled, only some units may kill citizens."),
NULL, NULL, GAME_DEFAULT_KILLCITIZEN)
nullptr, nullptr, GAME_DEFAULT_KILLCITIZEN)
GEN_INT("killunhomed", game.server.killunhomed,
SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"given by 'killunhomed' percent of the hitpoints of the unit "
"type. At least one hitpoint is lost every turn until the "
"death of the unit."),
NULL, NULL, NULL, GAME_MIN_KILLUNHOMED, GAME_MAX_KILLUNHOMED,
nullptr, nullptr, nullptr, GAME_MIN_KILLUNHOMED, GAME_MAX_KILLUNHOMED,
GAME_DEFAULT_KILLUNHOMED)
GEN_ENUM("borders", game.info.borders,
......
"SEE_INSIDE and EXPAND makes everything inside a player's "
"borders visible at once. ENABLED will, in some rulesets, "
"grant the same visibility if certain conditions are met."),
NULL, NULL, NULL, borders_name, GAME_DEFAULT_BORDERS)
nullptr, nullptr, nullptr, borders_name, GAME_DEFAULT_BORDERS)
GEN_ENUM("happyborders", game.info.happyborders,
SSET_RULES, SSET_MILITARY, SSET_SITUATIONAL,
......
N_("Units inside borders cause no unhappiness"),
N_("If this is set, units will not cause unhappiness when "
"inside your borders, or even allies borders, depending "
"on value."), NULL, NULL, NULL,
"on value."), nullptr, nullptr, nullptr,
happyborders_name, GAME_DEFAULT_HAPPYBORDERS)
GEN_ENUM("diplomacy", game.info.diplomacy,
......
N_("Ability to do diplomacy with other players"),
N_("This setting controls the ability to do diplomacy with "
"other players."),
NULL, NULL, NULL, diplomacy_name, GAME_DEFAULT_DIPLOMACY)
nullptr, nullptr, nullptr, diplomacy_name, GAME_DEFAULT_DIPLOMACY)
GEN_ENUM("citynames", game.server.allowed_city_names,
SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"\"Globally unique\", but a player isn't allowed to use a "
"default city name of another nation unless it is a default "
"for their nation also."),
NULL, NULL, NULL, citynames_name, GAME_DEFAULT_ALLOWED_CITY_NAMES)
nullptr, nullptr, nullptr, citynames_name,
GAME_DEFAULT_ALLOWED_CITY_NAMES)
GEN_ENUM("plrcolormode", game.server.plrcolormode,
SSET_RULES, SSET_INTERNAL, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"get a random color from the list in the ruleset.\n"
"Regardless of this setting, individual player colors can be "
"changed after the game starts with the 'playercolor' command."),
NULL, plrcol_validate, plrcol_action, plrcol_name,
nullptr, plrcol_validate, plrcol_action, plrcol_name,
GAME_DEFAULT_PLRCOLORMODE)
/* Flexible rules: these can be changed after the game has started.
*
* The distinction between "rules" and "flexible rules" is not always
* clearcut, and some existing cases may be largely historical or
* accidental. However some generalizations can be made:
* accidental. However some generalizations can be made:
*
* -- Low-level game mechanics should not be flexible (eg, rulesets).
* -- Options which would affect the game "state" (city production etc)
......
* should not be translated. */
N_("This setting controls how frequently the barbarians appear "
"in the game. See also the 'onsetbarbs' setting."),
NULL, NULL, NULL, barbarians_name, GAME_DEFAULT_BARBARIANRATE)
nullptr, nullptr, nullptr, barbarians_name,
GAME_DEFAULT_BARBARIANRATE)
GEN_INT("onsetbarbs", game.server.onsetbarbarian,
SSET_RULES_FLEXIBLE, SSET_MILITARY, SSET_VITAL,
ALLOW_NONE, ALLOW_BASIC,
N_("Barbarian onset turn"),
N_("Barbarians will not appear before this turn."),
NULL, NULL, NULL,
GAME_MIN_ONSETBARBARIAN, GAME_MAX_ONSETBARBARIAN,
nullptr, nullptr, nullptr,
GAME_MIN_ONSETBARBARIAN, GAME_MAX_ONSETBARBARIAN,
GAME_DEFAULT_ONSETBARBARIAN)
GEN_ENUM("revolentype", game.info.revolentype,
......
"many times any player has changed to this type of government "
"before, so it becomes easier to establish a new system of "
"government if it has been done before."),
NULL, NULL, NULL, revolentype_name, GAME_DEFAULT_REVOLENTYPE)
nullptr, nullptr, nullptr, revolentype_name,
GAME_DEFAULT_REVOLENTYPE)
GEN_INT("revolen", game.server.revolution_length,
SSET_RULES_FLEXIBLE, SSET_SOCIOLOGY, SSET_RARE,
......
N_("When changing governments, a period of anarchy will occur. "
"Value of this setting, used the way 'revolentype' setting "
"dictates, defines the length of the anarchy."),
NULL, NULL, NULL,
GAME_MIN_REVOLUTION_LENGTH, GAME_MAX_REVOLUTION_LENGTH,
nullptr, nullptr, nullptr,
GAME_MIN_REVOLUTION_LENGTH, GAME_MAX_REVOLUTION_LENGTH,
GAME_DEFAULT_REVOLUTION_LENGTH)
GEN_BOOL("fogofwar", game.info.fogofwar,
......
"the vision range of your own units and cities will be "
"revealed to you. You will not see new cities or terrain "
"changes in tiles not observed."),
NULL, NULL, GAME_DEFAULT_FOGOFWAR)
nullptr, nullptr, GAME_DEFAULT_FOGOFWAR)
GEN_BOOL("foggedborders", game.server.foggedborders,
SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
......
"direct sight of the affected tiles. Otherwise, players "
"can see any or all changes to borders as long as they "
"have previously seen the tiles."),
NULL, NULL, GAME_DEFAULT_FOGGEDBORDERS)
nullptr, nullptr, GAME_DEFAULT_FOGGEDBORDERS)
GEN_BITWISE("airliftingstyle", game.info.airlifting_style,
SSET_RULES_FLEXIBLE, SSET_MILITARY, SSET_SITUATIONAL,
......
"(DEST_UNLIMITED): airlifting to a city doesn't "
"reduce the airlifted counter. It depends on the ruleset "
"whether this is possible even with zero airlift capacity."),
NULL, NULL, airliftingstyle_name, GAME_DEFAULT_AIRLIFTINGSTYLE)
nullptr, nullptr, airliftingstyle_name,
GAME_DEFAULT_AIRLIFTINGSTYLE)
GEN_INT("diplchance", game.server.diplchance,
SSET_RULES_FLEXIBLE, SSET_MILITARY, SSET_SITUATIONAL,
......
"Unit Bribing, and Unit Sabotaging never do. "
"Non-aggressive missions typically have no base chance "
"at all, but always success."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_DIPLCHANCE, GAME_MAX_DIPLCHANCE, GAME_DEFAULT_DIPLCHANCE)
GEN_BITWISE("victories", game.info.victory_conditions,
......
N_("What kinds of victories are possible"),
/* TRANS: The strings between double quotes are also translated
* separately (they must match!). The strings between single
* quotes are setting names and shouldn't be translated. The
* strings between parentheses and in uppercase must stay as
* quotes are setting names and shouldn't be translated.
* The strings between parentheses and in uppercase must stay as
* untranslated. */
N_("This setting controls how game can be won. One can always "
"win by conquering entire planet, but other victory conditions "
......
"domination criteria.\n"
"- \"World Peace\" (WORLDPEACE): There's no wars in the world for "
"the specified amount of turns.\n"),
NULL, NULL, victory_conditions_name, GAME_DEFAULT_VICTORY_CONDITIONS)
nullptr, nullptr, victory_conditions_name,
GAME_DEFAULT_VICTORY_CONDITIONS)
GEN_BOOL("endspaceship", game.server.endspaceship, SSET_RULES_FLEXIBLE,
SSET_SCIENCE, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
N_("Should the game end if the spaceship arrives?"),
N_("If this option is turned on, the game will end with the "
"arrival of a spaceship at Alpha Centauri."),
NULL, NULL, GAME_DEFAULT_END_SPACESHIP)
nullptr, nullptr, GAME_DEFAULT_END_SPACESHIP)
GEN_INT("spaceship_travel_pct", game.server.spaceship_travel_pct,
SSET_RULES_FLEXIBLE, SSET_SCIENCE, SSET_VITAL, ALLOW_NONE,
ALLOW_BASIC,
N_("Percentage to multiply spaceship travel time by"),
N_("This percentage is multiplied onto the time it will take for "
"a spaceship to arrive at Alpha Centauri."), NULL, NULL, NULL,
"a spaceship to arrive at Alpha Centauri."),
nullptr, nullptr, nullptr,
GAME_MIN_SPACESHIP_TRAVEL_PCT, GAME_MAX_SPACESHIP_TRAVEL_PCT,
GAME_DEFAULT_SPACESHIP_TRAVEL_PCT)
......
N_("A civil war is triggered when a player has at least this "
"many cities and the player's capital is captured. If "
"this option is set to the maximum value, civil wars are "
"turned off altogether."), NULL, NULL, NULL,
"turned off altogether."), nullptr, nullptr, nullptr,
GAME_MIN_CIVILWARSIZE, GAME_MAX_CIVILWARSIZE,
GAME_DEFAULT_CIVILWARSIZE)
......
ALLOW_NONE, ALLOW_BASIC,
N_("Restrict the use of the infrastructure for enemy units"),
N_("If this option is enabled, the use of roads and rails "
"will be restricted for enemy units."), NULL, NULL,
"will be restricted for enemy units."), nullptr, nullptr,
GAME_DEFAULT_RESTRICTINFRA)
GEN_BOOL("unreachableprotects", game.info.unreachable_protects,
......
"tiles with an unreachable unit in them cannot be attacked. "
"Some units in some rulesets may override this, never "
"protecting reachable units on their tile."),
NULL, NULL, GAME_DEFAULT_UNRPROTECTS)
nullptr, nullptr, GAME_DEFAULT_UNRPROTECTS)
GEN_INT("contactturns", game.server.contactturns,
SSET_RULES_FLEXIBLE, SSET_MILITARY, SSET_RARE,
......
"after their units have last met, even when they do not have "
"an embassy. If set to zero, then players cannot meet unless "
"they have an embassy."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_CONTACTTURNS, GAME_MAX_CONTACTTURNS,
GAME_DEFAULT_CONTACTTURNS)
......
"requirement for building a palace will be ignored. (In "
"some rulesets, buildings other than the palace are affected "
"by this setting.)"),
NULL, NULL, GAME_DEFAULT_SAVEPALACE)
nullptr, nullptr, GAME_DEFAULT_SAVEPALACE)
GEN_BOOL("homecaughtunits", game.server.homecaughtunits,
SSET_RULES_FLEXIBLE, SSET_MILITARY, SSET_RARE,
......
* should not be translated. */
N_("If unset, caught units will have no homecity and will be "
"subject to the 'killunhomed' option."),
NULL, NULL, GAME_DEFAULT_HOMECAUGHTUNITS)
nullptr, nullptr, GAME_DEFAULT_HOMECAUGHTUNITS)
GEN_BOOL("naturalcitynames", game.server.natural_city_names,
SSET_RULES_FLEXIBLE, SSET_SOCIOLOGY, SSET_RARE,
......
N_("Whether to use natural city names"),
N_("If enabled, the default city names will be determined based "
"on the surrounding terrain."),
NULL, NULL, GAME_DEFAULT_NATURALCITYNAMES)
nullptr, nullptr, GAME_DEFAULT_NATURALCITYNAMES)
GEN_BOOL("migration", game.server.migration,
SSET_RULES_FLEXIBLE, SSET_SOCIOLOGY, SSET_RARE,
......
" 'mgr_distance' - How far citizens will migrate.\n"
" 'mgr_worldchance' - Chance for inter-nation migration.\n"
" 'mgr_nationchance' - Chance for intra-nation migration."),
NULL, NULL, GAME_DEFAULT_MIGRATION)
nullptr, nullptr, GAME_DEFAULT_MIGRATION)
GEN_INT("mgr_turninterval", game.server.mgr_turninterval,
SSET_RULES_FLEXIBLE, SSET_SOCIOLOGY, SSET_RARE,
......
"current city. Migration will never occur the same turn "
"that a city is built. This setting has no effect unless "
"migration is enabled by the 'migration' setting."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_MGR_TURNINTERVAL, GAME_MAX_MGR_TURNINTERVAL,
GAME_DEFAULT_MGR_TURNINTERVAL)
......
N_("If this setting is enabled, citizens will not migrate to "
"cities which would not have enough food to support them. "
"This setting has no effect unless migration is enabled by "
"the 'migration' setting."), NULL, NULL,
"the 'migration' setting."), nullptr, nullptr,
GAME_DEFAULT_MGR_FOODNEEDED)
GEN_INT("mgr_distance", game.server.mgr_distance,
......
"destination city's working radius.) This setting has no "
"effect unless migration is enabled by the 'migration' "
"setting."),
NULL, NULL, NULL, GAME_MIN_MGR_DISTANCE, GAME_MAX_MGR_DISTANCE,
GAME_DEFAULT_MGR_DISTANCE)
nullptr, nullptr, nullptr, GAME_MIN_MGR_DISTANCE,
GAME_MAX_MGR_DISTANCE, GAME_DEFAULT_MGR_DISTANCE)
GEN_INT("mgr_nationchance", game.server.mgr_nationchance,
SSET_RULES_FLEXIBLE, SSET_SOCIOLOGY, SSET_RARE,
......
"migration will always occur if the citizens find a suitable "
"destination. This setting has no effect unless migration "
"is activated by the 'migration' setting."),
NULL, NULL, NULL,
nullptr, nullptr, nullptr,
GAME_MIN_MGR_NATIONCHANCE, GAME_MAX_MGR_NATIONCHANCE,
GAME_DEFAULT_MGR_NATIONCHANCE)
... This diff was truncated because it exceeds the maximum size that can be displayed.
    (1-1/1)