Freeciv-3.3
Loading...
Searching...
No Matches
Functions
server_settings.c File Reference
#include "astring.h"
#include "fc_interface.h"
#include "server_settings.h"

Go to the source code of this file.

Functions

server_setting_id server_setting_by_name (const char *name)
 
const charserver_setting_name_get (server_setting_id id)
 
enum sset_type server_setting_type_get (server_setting_id id)
 
bool server_setting_exists (server_setting_id id)
 
bool server_setting_value_bool_get (server_setting_id id)
 
int server_setting_value_int_get (server_setting_id id)
 
unsigned int server_setting_value_bitwise_get (server_setting_id id)
 
ssetv ssetv_from_values (server_setting_id setting, int value)
 
server_setting_id ssetv_setting_get (ssetv enc)
 
int ssetv_value_get (ssetv enc)
 
ssetv ssetv_by_rule_name (const char *name)
 
const charssetv_rule_name (ssetv val)
 
const charssetv_human_readable (ssetv val, bool present)
 
bool ssetv_setting_has_value (ssetv val)
 

Function Documentation

◆ server_setting_by_name()

server_setting_id server_setting_by_name ( const char name)

Returns the server setting with the specified name.

Definition at line 29 of file server_settings.c.

Referenced by action_dice_roll_initial_odds(), helptext_unit(), ssetv_by_rule_name(), and universal_value_initial().

◆ server_setting_exists()

bool server_setting_exists ( server_setting_id  id)

Returns TRUE iff a server setting with the specified id exists.

Definition at line 62 of file server_settings.c.

Referenced by sanity_check_req_individual(), and sanity_check_server_setting_value_in_req().

◆ server_setting_name_get()

const char * server_setting_name_get ( server_setting_id  id)

Returns the name of the server setting with the specified id.

Definition at line 40 of file server_settings.c.

Referenced by sanity_check_req_individual(), ssetv_human_readable(), and ssetv_rule_name().

◆ server_setting_type_get()

enum sset_type server_setting_type_get ( server_setting_id  id)

◆ server_setting_value_bitwise_get()

unsigned int server_setting_value_bitwise_get ( server_setting_id  id)

Returns the value of the server setting with the specified id.

Definition at line 94 of file server_settings.c.

◆ server_setting_value_bool_get()

bool server_setting_value_bool_get ( server_setting_id  id)

Returns the value of the server setting with the specified id.

Definition at line 70 of file server_settings.c.

Referenced by helptext_unit(), and ssetv_setting_has_value().

◆ server_setting_value_int_get()

int server_setting_value_int_get ( server_setting_id  id)

Returns the value of the server setting with the specified id.

Definition at line 82 of file server_settings.c.

Referenced by action_dice_roll_initial_odds().

◆ ssetv_by_rule_name()

ssetv ssetv_by_rule_name ( const char name)

Returns the server setting - value pair encoded in the string.

Definition at line 153 of file server_settings.c.

Referenced by universal_value_from_str().

◆ ssetv_from_values()

ssetv ssetv_from_values ( server_setting_id  setting,
int  value 
)

Returns a server setting - value pair from its setting and value;

Definition at line 106 of file server_settings.c.

Referenced by universal_kind_values(), and universal_value_initial().

◆ ssetv_human_readable()

const char * ssetv_human_readable ( ssetv  val,
bool  present 
)

Returns the server setting - value pair formatted in a user readable way.

Definition at line 181 of file server_settings.c.

Referenced by req_text_insert(), universal_name_translation(), and worklist_item_postpone_req_vec().

◆ ssetv_rule_name()

const char * ssetv_rule_name ( ssetv  val)

Returns the server setting - value pair encoded as a string.

Definition at line 169 of file server_settings.c.

Referenced by universal_kind_values(), and universal_rule_name().

◆ ssetv_setting_get()

server_setting_id ssetv_setting_get ( ssetv  enc)

Returns the server setting of the setting - value pair.

Definition at line 129 of file server_settings.c.

Referenced by sanity_check_req_individual().

◆ ssetv_setting_has_value()

bool ssetv_setting_has_value ( ssetv  val)

Returns if the server setting currently has the value in the pair.

Definition at line 201 of file server_settings.c.

Referenced by is_serversetting_req_active().

◆ ssetv_value_get()

int ssetv_value_get ( ssetv  enc)

Returns the server setting value of the setting - value pair.

Definition at line 141 of file server_settings.c.