Freeciv-3.3: /fast/freeciv/nightly/main/server/ruleset/ruleload.h File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
ruleload.h File Reference

Go to the source code of this file.

## Macros

#define | RULESET_CAPABILITIES_BASE "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
#define | RULESET_CAPABILITIES RULESET_CAPABILITIES_BASE
#define | RSFORMAT_3_2 30
#define | RSFORMAT_3_3 40
#define | RSFORMAT_CURRENT RSFORMAT_3_3
#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_WORLD_PEACE_TURNS 20
#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__
char * | get_script_buffer (void)
char * | get_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 77 of file ruleload.h.

## ◆ GAME_DEFAULT_ACH_VALUE

#define GAME_DEFAULT_ACH_VALUE 1

Definition at line 78 of file ruleload.h.

## ◆ GAME_DEFAULT_ADDTOSIZE

#define GAME_DEFAULT_ADDTOSIZE 9

Definition at line 73 of file ruleload.h.

## ◆ GAME_DEFAULT_CHANGABLE_TAX

#define GAME_DEFAULT_CHANGABLE_TAX TRUE

Definition at line 74 of file ruleload.h.

## ◆ GAME_DEFAULT_DISASTER_FREQ

#define GAME_DEFAULT_DISASTER_FREQ 10

Definition at line 76 of file ruleload.h.

## ◆ GAME_DEFAULT_VISION_REVEAL_TILES

#define GAME_DEFAULT_VISION_REVEAL_TILES FALSE

Definition at line 75 of file ruleload.h.

## ◆ RS_DEFAULT_BASE_TECH_COST

#define RS_DEFAULT_BASE_TECH_COST 20

Definition at line 113 of file ruleload.h.

## ◆ RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY

#define RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY FALSE

Definition at line 108 of file ruleload.h.

## ◆ RS_DEFAULT_CONVERT_SPEED

#define RS_DEFAULT_CONVERT_SPEED 50

Definition at line 123 of file ruleload.h.

## ◆ RS_DEFAULT_CULTURE_MIGRATION_PML

#define RS_DEFAULT_CULTURE_MIGRATION_PML 50

Definition at line 96 of file ruleload.h.

## ◆ RS_DEFAULT_CULTURE_VIC_LEAD

#define RS_DEFAULT_CULTURE_VIC_LEAD 300

Definition at line 95 of file ruleload.h.

## ◆ RS_DEFAULT_CULTURE_VIC_POINTS

#define RS_DEFAULT_CULTURE_VIC_POINTS 1000

Definition at line 94 of file ruleload.h.

## ◆ RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE

#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE TRUE

Definition at line 109 of file ruleload.h.

## ◆ RS_DEFAULT_EXTRA_APPEARANCE

#define RS_DEFAULT_EXTRA_APPEARANCE 15

Definition at line 103 of file ruleload.h.

## ◆ RS_DEFAULT_EXTRA_DISAPPEARANCE

#define RS_DEFAULT_EXTRA_DISAPPEARANCE 15

Definition at line 104 of file ruleload.h.

## ◆ RS_DEFAULT_GOLD_UPKEEP_STYLE

#define RS_DEFAULT_GOLD_UPKEEP_STYLE "City"

Definition at line 89 of file ruleload.h.

## ◆ RS_DEFAULT_GOODS_SELECTION

#define RS_DEFAULT_GOODS_SELECTION GSM_LEAVING

Definition at line 101 of file ruleload.h.

## ◆ RS_DEFAULT_HISTORY_INTEREST_PML

#define RS_DEFAULT_HISTORY_INTEREST_PML 0

Definition at line 97 of file ruleload.h.

## ◆ RS_DEFAULT_MIN_TECH_COST

#define RS_DEFAULT_MIN_TECH_COST 20

Definition at line 117 of file ruleload.h.

## ◆ RS_DEFAULT_MUUK_FOOD_WIPE

#define RS_DEFAULT_MUUK_FOOD_WIPE TRUE

Definition at line 79 of file ruleload.h.

## ◆ RS_DEFAULT_MUUK_GOLD_WIPE

#define RS_DEFAULT_MUUK_GOLD_WIPE TRUE

Definition at line 80 of file ruleload.h.

## ◆ RS_DEFAULT_MUUK_SHIELD_WIPE

#define RS_DEFAULT_MUUK_SHIELD_WIPE FALSE

Definition at line 81 of file ruleload.h.

## ◆ RS_DEFAULT_NATIONALITY

#define RS_DEFAULT_NATIONALITY FALSE

Definition at line 121 of file ruleload.h.

## ◆ RS_DEFAULT_ONLY_KILLING_VETERAN

#define RS_DEFAULT_ONLY_KILLING_VETERAN FALSE

Definition at line 106 of file ruleload.h.

## ◆ RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN

#define RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN FALSE

Definition at line 107 of file ruleload.h.

## ◆ RS_DEFAULT_PYTHAGOREAN_DIAGONAL

#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL FALSE

Definition at line 87 of file ruleload.h.

## ◆ RS_DEFAULT_SMALL_WONDER_VISIBILITY

#define RS_DEFAULT_SMALL_WONDER_VISIBILITY "Always"

Definition at line 111 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_COST_STYLE

#define RS_DEFAULT_TECH_COST_STYLE "Civ I|II"

Definition at line 90 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_LEAKAGE

#define RS_DEFAULT_TECH_LEAKAGE "None"

Definition at line 91 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_LOSS_HOLES

#define RS_DEFAULT_TECH_LOSS_HOLES TRUE

Definition at line 86 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_PARASITE_HOLES

#define RS_DEFAULT_TECH_PARASITE_HOLES TRUE

Definition at line 85 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_STEAL_HOLES

#define RS_DEFAULT_TECH_STEAL_HOLES TRUE

Definition at line 82 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_TRADE_HOLES

#define RS_DEFAULT_TECH_TRADE_HOLES TRUE

Definition at line 83 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_TRADE_LOSS_HOLES

#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES TRUE

Definition at line 84 of file ruleload.h.

## ◆ RS_DEFAULT_TECH_UPKEEP_STYLE

#define RS_DEFAULT_TECH_UPKEEP_STYLE "None"

Definition at line 92 of file ruleload.h.

## ◆ RS_DEFAULT_UBUILD_NAT

#define RS_DEFAULT_UBUILD_NAT FALSE

Definition at line 122 of file ruleload.h.

## ◆ RS_DEFAULT_WORLD_PEACE_TURNS

#define RS_DEFAULT_WORLD_PEACE_TURNS 20

Definition at line 99 of file ruleload.h.

## ◆ RS_MAX_BASE_TECH_COST

#define RS_MAX_BASE_TECH_COST 20000

Definition at line 115 of file ruleload.h.

## ◆ RS_MAX_MIN_TECH_COST

#define RS_MAX_MIN_TECH_COST 20000

Definition at line 119 of file ruleload.h.

## ◆ RS_MIN_BASE_TECH_COST

#define RS_MIN_BASE_TECH_COST 0

Definition at line 114 of file ruleload.h.

## ◆ RS_MIN_MIN_TECH_COST

#define RS_MIN_MIN_TECH_COST 0

Definition at line 118 of file ruleload.h.

## ◆ RSFORMAT_3_2

#define RSFORMAT_3_2 30

Definition at line 36 of file ruleload.h.

## ◆ RSFORMAT_3_3

#define RSFORMAT_3_3 40

Definition at line 37 of file ruleload.h.

## ◆ RSFORMAT_CURRENT

#define RSFORMAT_CURRENT RSFORMAT_3_3

Definition at line 38 of file ruleload.h.

## ◆ RULESET_CAPABILITIES

#define RULESET_CAPABILITIES RULESET_CAPABILITIES_BASE

Definition at line 24 of file ruleload.h.

## ◆ RULESET_CAPABILITIES_BASE

#define RULESET_CAPABILITIES_BASE "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"

Definition at line 20 of file ruleload.h.

## ◆ ruleset_error

#define ruleset_error | ( |  | logger,
|  |  | level,
|  |  | format,
|  |  | ...
| ) |  |

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

Definition at line 59 of file ruleload.h.

## Typedef Documentation

## ◆ rs_conversion_logger

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

Definition at line 42 of file ruleload.h.

## Function Documentation

## ◆ get_parser_buffer()

char * get_parser_buffer | ( | void |  | ) |

Return current parser.lua buffer.

Definition at line 562 of file ruleload.c.

Referenced by save_ruleset().

## ◆ get_script_buffer()

char * get_script_buffer | ( | void |  | ) |

Return current script.lua buffer.

Definition at line 554 of file ruleload.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
| ) |  |

Loads the rulesets.

Definition at line 9185 of file ruleload.c.

Referenced by ruledit_gui::launch_now(), main(), manual_command(), savegame2_load(), savegame3_load(), set_rulesetdir(), sg_load_ruleset(), sg_load_savefile(), srv_main(), and srv_prepare().

## ◆ reload_rulesets_settings()

bool reload_rulesets_settings | ( | void |  | ) |

Reload the game settings saved in the ruleset file.

Definition at line 9513 of file ruleload.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 ruleload.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 ruleload.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 9265 of file ruleload.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 9536 of file ruleload.c.

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