Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
ruleset.h File Reference

Go to the source code of this file.

Macros

#define RULESET_CAPABILITIES_BASE   "+Freeciv-3.2-ruleset"
 
#define RULESET_CAPABILITIES   RULESET_CAPABILITIES_BASE
 
#define RSFORMAT_3_2   30
 
#define ruleset_error(logger, level, format, ...)
 
#define GAME_DEFAULT_ADDTOSIZE   9
 
#define GAME_DEFAULT_CHANGABLE_TAX   TRUE
 
#define GAME_DEFAULT_VISION_REVEAL_TILES   FALSE
 
#define GAME_DEFAULT_DISASTER_FREQ   10
 
#define GAME_DEFAULT_ACH_UNIQUE   TRUE
 
#define GAME_DEFAULT_ACH_VALUE   1
 
#define RS_DEFAULT_MUUK_FOOD_WIPE   TRUE
 
#define RS_DEFAULT_MUUK_GOLD_WIPE   TRUE
 
#define RS_DEFAULT_MUUK_SHIELD_WIPE   FALSE
 
#define RS_DEFAULT_TECH_STEAL_HOLES   TRUE
 
#define RS_DEFAULT_TECH_TRADE_HOLES   TRUE
 
#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES   TRUE
 
#define RS_DEFAULT_TECH_PARASITE_HOLES   TRUE
 
#define RS_DEFAULT_TECH_LOSS_HOLES   TRUE
 
#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL   FALSE
 
#define RS_DEFAULT_GOLD_UPKEEP_STYLE   "City"
 
#define RS_DEFAULT_TECH_COST_STYLE   "Civ I|II"
 
#define RS_DEFAULT_TECH_LEAKAGE   "None"
 
#define RS_DEFAULT_TECH_UPKEEP_STYLE   "None"
 
#define RS_DEFAULT_CULTURE_VIC_POINTS   1000
 
#define RS_DEFAULT_CULTURE_VIC_LEAD   300
 
#define RS_DEFAULT_CULTURE_MIGRATION_PML   50
 
#define RS_DEFAULT_HISTORY_INTEREST_PML   0
 
#define RS_DEFAULT_GOODS_SELECTION   GSM_LEAVING
 
#define RS_DEFAULT_EXTRA_APPEARANCE   15
 
#define RS_DEFAULT_EXTRA_DISAPPEARANCE   15
 
#define RS_DEFAULT_ONLY_KILLING_VETERAN   FALSE
 
#define RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN   FALSE
 
#define RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY   FALSE
 
#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE   TRUE
 
#define RS_DEFAULT_SMALL_WONDER_VISIBILITY   "Always"
 
#define RS_DEFAULT_BASE_TECH_COST   20
 
#define RS_MIN_BASE_TECH_COST   0
 
#define RS_MAX_BASE_TECH_COST   20000
 
#define RS_DEFAULT_MIN_TECH_COST   20
 
#define RS_MIN_MIN_TECH_COST   0
 
#define RS_MAX_MIN_TECH_COST   20000
 
#define RS_DEFAULT_NATIONALITY   FALSE
 
#define RS_DEFAULT_UBUILD_NAT   FALSE
 
#define RS_DEFAULT_CONVERT_SPEED   50
 

Typedefs

typedef void(* rs_conversion_logger) (const char *msg)
 

Functions

bool load_rulesets (const char *restore, const char *alt, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
 
bool reload_rulesets_settings (void)
 
void send_rulesets (struct conn_list *dest)
 
void rulesets_deinit (void)
 
void ruleset_error_real (rs_conversion_logger logger, const char *file, const char *function, int line, enum log_level level, const char *format,...) fc__attribute((__format__(__printf__
 
charget_script_buffer (void)
 
charget_parser_buffer (void)
 
int ruleset_purge_unused_entities (void)
 
int ruleset_purge_redundant_reqs (void)
 

Macro Definition Documentation

◆ GAME_DEFAULT_ACH_UNIQUE

#define GAME_DEFAULT_ACH_UNIQUE   TRUE

Definition at line 75 of file ruleset.h.

◆ GAME_DEFAULT_ACH_VALUE

#define GAME_DEFAULT_ACH_VALUE   1

Definition at line 76 of file ruleset.h.

◆ GAME_DEFAULT_ADDTOSIZE

#define GAME_DEFAULT_ADDTOSIZE   9

Definition at line 71 of file ruleset.h.

◆ GAME_DEFAULT_CHANGABLE_TAX

#define GAME_DEFAULT_CHANGABLE_TAX   TRUE

Definition at line 72 of file ruleset.h.

◆ GAME_DEFAULT_DISASTER_FREQ

#define GAME_DEFAULT_DISASTER_FREQ   10

Definition at line 74 of file ruleset.h.

◆ GAME_DEFAULT_VISION_REVEAL_TILES

#define GAME_DEFAULT_VISION_REVEAL_TILES   FALSE

Definition at line 73 of file ruleset.h.

◆ RS_DEFAULT_BASE_TECH_COST

#define RS_DEFAULT_BASE_TECH_COST   20

Definition at line 109 of file ruleset.h.

◆ RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY

#define RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY   FALSE

Definition at line 104 of file ruleset.h.

◆ RS_DEFAULT_CONVERT_SPEED

#define RS_DEFAULT_CONVERT_SPEED   50

Definition at line 119 of file ruleset.h.

◆ RS_DEFAULT_CULTURE_MIGRATION_PML

#define RS_DEFAULT_CULTURE_MIGRATION_PML   50

Definition at line 94 of file ruleset.h.

◆ RS_DEFAULT_CULTURE_VIC_LEAD

#define RS_DEFAULT_CULTURE_VIC_LEAD   300

Definition at line 93 of file ruleset.h.

◆ RS_DEFAULT_CULTURE_VIC_POINTS

#define RS_DEFAULT_CULTURE_VIC_POINTS   1000

Definition at line 92 of file ruleset.h.

◆ RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE

#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE   TRUE

Definition at line 105 of file ruleset.h.

◆ RS_DEFAULT_EXTRA_APPEARANCE

#define RS_DEFAULT_EXTRA_APPEARANCE   15

Definition at line 99 of file ruleset.h.

◆ RS_DEFAULT_EXTRA_DISAPPEARANCE

#define RS_DEFAULT_EXTRA_DISAPPEARANCE   15

Definition at line 100 of file ruleset.h.

◆ RS_DEFAULT_GOLD_UPKEEP_STYLE

#define RS_DEFAULT_GOLD_UPKEEP_STYLE   "City"

Definition at line 87 of file ruleset.h.

◆ RS_DEFAULT_GOODS_SELECTION

#define RS_DEFAULT_GOODS_SELECTION   GSM_LEAVING

Definition at line 97 of file ruleset.h.

◆ RS_DEFAULT_HISTORY_INTEREST_PML

#define RS_DEFAULT_HISTORY_INTEREST_PML   0

Definition at line 95 of file ruleset.h.

◆ RS_DEFAULT_MIN_TECH_COST

#define RS_DEFAULT_MIN_TECH_COST   20

Definition at line 113 of file ruleset.h.

◆ RS_DEFAULT_MUUK_FOOD_WIPE

#define RS_DEFAULT_MUUK_FOOD_WIPE   TRUE

Definition at line 77 of file ruleset.h.

◆ RS_DEFAULT_MUUK_GOLD_WIPE

#define RS_DEFAULT_MUUK_GOLD_WIPE   TRUE

Definition at line 78 of file ruleset.h.

◆ RS_DEFAULT_MUUK_SHIELD_WIPE

#define RS_DEFAULT_MUUK_SHIELD_WIPE   FALSE

Definition at line 79 of file ruleset.h.

◆ RS_DEFAULT_NATIONALITY

#define RS_DEFAULT_NATIONALITY   FALSE

Definition at line 117 of file ruleset.h.

◆ RS_DEFAULT_ONLY_KILLING_VETERAN

#define RS_DEFAULT_ONLY_KILLING_VETERAN   FALSE

Definition at line 102 of file ruleset.h.

◆ RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN

#define RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN   FALSE

Definition at line 103 of file ruleset.h.

◆ RS_DEFAULT_PYTHAGOREAN_DIAGONAL

#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL   FALSE

Definition at line 85 of file ruleset.h.

◆ RS_DEFAULT_SMALL_WONDER_VISIBILITY

#define RS_DEFAULT_SMALL_WONDER_VISIBILITY   "Always"

Definition at line 107 of file ruleset.h.

◆ RS_DEFAULT_TECH_COST_STYLE

#define RS_DEFAULT_TECH_COST_STYLE   "Civ I|II"

Definition at line 88 of file ruleset.h.

◆ RS_DEFAULT_TECH_LEAKAGE

#define RS_DEFAULT_TECH_LEAKAGE   "None"

Definition at line 89 of file ruleset.h.

◆ RS_DEFAULT_TECH_LOSS_HOLES

#define RS_DEFAULT_TECH_LOSS_HOLES   TRUE

Definition at line 84 of file ruleset.h.

◆ RS_DEFAULT_TECH_PARASITE_HOLES

#define RS_DEFAULT_TECH_PARASITE_HOLES   TRUE

Definition at line 83 of file ruleset.h.

◆ RS_DEFAULT_TECH_STEAL_HOLES

#define RS_DEFAULT_TECH_STEAL_HOLES   TRUE

Definition at line 80 of file ruleset.h.

◆ RS_DEFAULT_TECH_TRADE_HOLES

#define RS_DEFAULT_TECH_TRADE_HOLES   TRUE

Definition at line 81 of file ruleset.h.

◆ RS_DEFAULT_TECH_TRADE_LOSS_HOLES

#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES   TRUE

Definition at line 82 of file ruleset.h.

◆ RS_DEFAULT_TECH_UPKEEP_STYLE

#define RS_DEFAULT_TECH_UPKEEP_STYLE   "None"

Definition at line 90 of file ruleset.h.

◆ RS_DEFAULT_UBUILD_NAT

#define RS_DEFAULT_UBUILD_NAT   FALSE

Definition at line 118 of file ruleset.h.

◆ RS_MAX_BASE_TECH_COST

#define RS_MAX_BASE_TECH_COST   20000

Definition at line 111 of file ruleset.h.

◆ RS_MAX_MIN_TECH_COST

#define RS_MAX_MIN_TECH_COST   20000

Definition at line 115 of file ruleset.h.

◆ RS_MIN_BASE_TECH_COST

#define RS_MIN_BASE_TECH_COST   0

Definition at line 110 of file ruleset.h.

◆ RS_MIN_MIN_TECH_COST

#define RS_MIN_MIN_TECH_COST   0

Definition at line 114 of file ruleset.h.

◆ RSFORMAT_3_2

#define RSFORMAT_3_2   30

Definition at line 36 of file ruleset.h.

◆ RULESET_CAPABILITIES

#define RULESET_CAPABILITIES   RULESET_CAPABILITIES_BASE

Definition at line 24 of file ruleset.h.

◆ RULESET_CAPABILITIES_BASE

#define RULESET_CAPABILITIES_BASE   "+Freeciv-3.2-ruleset"

Definition at line 20 of file ruleset.h.

◆ ruleset_error

#define ruleset_error (   logger,
  level,
  format,
  ... 
)
Value:
do { \
level, format, ## __VA_ARGS__); \
} while (FALSE);
char * incite_cost
Definition comments.c:75
#define __FC_LINE__
Definition log.h:40
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
#define FALSE
Definition support.h:47

Definition at line 57 of file ruleset.h.

Typedef Documentation

◆ rs_conversion_logger

typedef void(* rs_conversion_logger) (const char *msg)

Definition at line 40 of file ruleset.h.

Function Documentation

◆ get_parser_buffer()

char * get_parser_buffer ( void  )

Return current parser.lua buffer.

Definition at line 562 of file ruleset.c.

Referenced by save_ruleset().

◆ get_script_buffer()

char * get_script_buffer ( void  )

Return current script.lua buffer.

Definition at line 554 of file ruleset.c.

Referenced by save_ruleset().

◆ load_rulesets()

bool load_rulesets ( const char restore,
const char alt,
bool  compat_mode,
rs_conversion_logger  logger,
bool  act,
bool  buffer_script,
bool  load_luadata 
)

◆ reload_rulesets_settings()

bool reload_rulesets_settings ( void  )

Reload the game settings saved in the ruleset file.

Definition at line 9705 of file ruleset.c.

Referenced by reset_command().

◆ ruleset_error_real()

void ruleset_error_real ( rs_conversion_logger  logger,
const char file,
const char function,
int  line,
enum log_level  level,
const char format,
  ... 
)

◆ ruleset_purge_redundant_reqs()

int ruleset_purge_redundant_reqs ( void  )

Purge redundant requirement in requirement vectors.

Returns
the number of purged requirements.

Definition at line 490 of file ruleset.c.

Referenced by main().

◆ ruleset_purge_unused_entities()

int ruleset_purge_unused_entities ( void  )

Purge unused entities from the ruleset.

Definition at line 313 of file ruleset.c.

Referenced by main().

◆ rulesets_deinit()

void rulesets_deinit ( void  )

Completely deinitialize ruleset system. Server is not in usable state after this.

Definition at line 9438 of file ruleset.c.

Referenced by server_quit().

◆ send_rulesets()

void send_rulesets ( struct conn_list dest)

Send all ruleset information to the specified connections.

Definition at line 9728 of file ruleset.c.

Referenced by establish_new_connection(), load_command(), and set_rulesetdir().