37#define SPECENUM_NAME sset_category
38#define SPECENUM_VALUE0 SSET_GEOLOGY
39#define SPECENUM_VALUE0NAME N_("Geological")
40#define SPECENUM_VALUE1 SSET_SOCIOLOGY
41#define SPECENUM_VALUE1NAME N_("Sociological")
42#define SPECENUM_VALUE2 SSET_ECONOMICS
43#define SPECENUM_VALUE2NAME N_("Economic")
44#define SPECENUM_VALUE3 SSET_MILITARY
45#define SPECENUM_VALUE3NAME N_("Military")
46#define SPECENUM_VALUE4 SSET_SCIENCE
47#define SPECENUM_VALUE4NAME N_("Scientific")
48#define SPECENUM_VALUE5 SSET_INTERNAL
49#define SPECENUM_VALUE5NAME N_("Internal")
50#define SPECENUM_VALUE6 SSET_NETWORK
51#define SPECENUM_VALUE6NAME N_("Networking")
53#define SPECENUM_COUNT SSET_NUM_CATEGORIES
57#define SPECENUM_NAME sset_level
58#define SPECENUM_VALUE0 SSET_NONE
59#define SPECENUM_VALUE0NAME N_("?ssetlevel:None")
60#define SPECENUM_VALUE1 SSET_ALL
61#define SPECENUM_VALUE1NAME N_("All")
62#define SPECENUM_VALUE2 SSET_VITAL
63#define SPECENUM_VALUE2NAME N_("Vital")
64#define SPECENUM_VALUE3 SSET_SITUATIONAL
65#define SPECENUM_VALUE3NAME N_("Situational")
66#define SPECENUM_VALUE4 SSET_RARE
67#define SPECENUM_VALUE4NAME N_("Rare")
68#define SPECENUM_VALUE5 SSET_CHANGED
69#define SPECENUM_VALUE5NAME N_("Changed")
70#define SPECENUM_VALUE6 SSET_LOCKED
71#define SPECENUM_VALUE6NAME N_("Locked")
73#define SPECENUM_COUNT OLEVELS_NUM
157 int bit,
bool pretty);
177#define SPECLIST_TAG setting
178#define SPECLIST_TYPE struct setting
181#define setting_list_iterate(_setting_list, _setting) \
182 TYPED_LIST_ITERATE(struct setting, _setting_list, _setting)
183#define setting_list_iterate_end \
188#define settings_iterate(_level, _pset) \
190 struct setting_list *_setting_list = settings_list_get(_level); \
191 if (_setting_list != NULL) { \
192 setting_list_iterate(_setting_list, _pset) {
194#define settings_iterate_end \
195 } setting_list_iterate_end; \
const void * secfile_data_t
static struct compatibility compat[]
struct setting_list * level[OLEVELS_NUM]
bool setting_ruleset_locked(const struct setting *pset)
bool setting_int_validate(const struct setting *pset, int val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void settings_init(bool act)
void setting_action(const struct setting *pset)
void setting_ruleset_lock_clear(struct setting *pset)
void setting_admin_lock_clear(struct setting *pset)
int setting_int_get(struct setting *pset)
const char * setting_default_name(const struct setting *pset, bool pretty, char *buf, size_t buf_len)
bool setting_enum_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
struct setting * setting_by_name(const char *name)
void setting_set_to_default(struct setting *pset)
const char * setting_value_name(const struct setting *pset, bool pretty, char *buf, size_t buf_len)
void settings_game_load(struct section_file *file, const char *section)
const char * setting_extra_help(const struct setting *pset, bool constant)
int setting_number(const struct setting *pset)
struct setting * setting_by_number(int id)
bool setting_int_set(struct setting *pset, int val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
enum sset_category setting_category(const struct setting *pset)
bool setting_is_visible(const struct setting *pset, struct connection *caller)
bool setting_locked(const struct setting *pset)
bool setting_non_default(const struct setting *pset)
enum sset_type setting_type(const struct setting *pset)
void setting_admin_lock_set(struct setting *pset)
bool setting_str_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
int setting_int_max(const struct setting *pset)
enum sset_level setting_level(const struct setting *pset)
bool setting_bitwise_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
const char * setting_enum_secfile_str(secfile_data_t data, int val)
void settings_game_save(struct section_file *file, const char *section)
int settings_number(void)
bool setting_str_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
const char * setting_enum_val(const struct setting *pset, int val, bool pretty)
void setting_changed(struct setting *pset)
enum setting_default_level setting_get_setdef(const struct setting *pset)
void settings_game_start(void)
bool setting_enum_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
const char * setting_short_help(const struct setting *pset)
void send_server_setting_control(struct connection *pconn)
const char * setting_bitwise_bit(const struct setting *pset, int bit, bool pretty)
int setting_int_min(const struct setting *pset)
bool setting_bitwise_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void setting_ruleset_lock_set(struct setting *pset)
bool setting_bool_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
struct setting_list * settings_list_get(enum sset_level level)
bool setting_is_changeable(const struct setting *pset, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void settings_reset(void)
const char * setting_name(const struct setting *pset)
bool settings_game_reset(void)
int setting_bitwise_get(struct setting *pset)
void settings_list_update(void)
char * setting_str_get(struct setting *pset)
bool settings_ruleset(struct section_file *file, const char *section, bool act, bool compat)
bool setting_bool_get(struct setting *pset)
const char * setting_bitwise_secfile_str(secfile_data_t data, int bit)
bool setting_is_visible_at_level(const struct setting *pset, enum cmdlevel plevel)
bool setting_bool_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void send_server_setting(struct conn_list *dest, const struct setting *pset)
void send_server_settings(struct conn_list *dest)
void send_server_access_level_settings(struct conn_list *dest, enum cmdlevel old_level, enum cmdlevel new_level)
int read_enum_value(const struct setting *pset)