Freeciv-3.3
Loading...
Searching...
No Matches
ruleload.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__RULELOAD_H
14#define FC__RULELOAD_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20#define RULESET_CAPABILITIES_BASE "+Freeciv-ruleset-3.3-Devel-2023.Feb.24"
21#ifdef FREECIV_WEB
22#define RULESET_CAPABILITIES RULESET_CAPABILITIES_BASE " +web-compatible"
23#else /* FREECIV_WEB */
24#define RULESET_CAPABILITIES RULESET_CAPABILITIES_BASE
25#endif /* FREECIV_WEB */
26/*
27 * Ruleset capabilities acceptable to this program:
28 *
29 * +Freeciv-3.3-ruleset
30 * - basic ruleset format for Freeciv versions 3.3.x; required
31 *
32 * +Freeciv-ruleset-V.V-Devel-YYYY.MMM.DD
33 * - ruleset of the development version at the given date
34 */
35
36#define RSFORMAT_3_2 30
37#define RSFORMAT_3_3 40
38#define RSFORMAT_CURRENT RSFORMAT_3_3
39
40struct conn_list;
41
42typedef void (*rs_conversion_logger)(const char *msg);
43
44/* Functions */
45bool load_rulesets(const char *restore, const char *alt, bool compat_mode,
47 bool act, bool buffer_script, bool load_luadata);
49void send_rulesets(struct conn_list *dest);
50
51void rulesets_deinit(void);
52
54 const char *file, const char *function,
55 int line, enum log_level level,
56 const char *format, ...)
58
59#define ruleset_error(logger, level, format, ...) \
60 do { \
61 ruleset_error_real(logger, __FILE__, __FUNCTION__, __FC_LINE__, \
62 level, format, ## __VA_ARGS__); \
63 } while (FALSE);
64
65char *get_script_buffer(void);
66char *get_parser_buffer(void);
67
70
71/* Default ruleset values that are not settings (in game.h) */
72
73#define GAME_DEFAULT_ADDTOSIZE 9
74#define GAME_DEFAULT_CHANGABLE_TAX TRUE
75#define GAME_DEFAULT_VISION_REVEAL_TILES FALSE
76#define GAME_DEFAULT_DISASTER_FREQ 10
77#define GAME_DEFAULT_ACH_UNIQUE TRUE
78#define GAME_DEFAULT_ACH_VALUE 1
79#define RS_DEFAULT_MUUK_FOOD_WIPE TRUE
80#define RS_DEFAULT_MUUK_GOLD_WIPE TRUE
81#define RS_DEFAULT_MUUK_SHIELD_WIPE FALSE
82#define RS_DEFAULT_TECH_STEAL_HOLES TRUE
83#define RS_DEFAULT_TECH_TRADE_HOLES TRUE
84#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES TRUE
85#define RS_DEFAULT_TECH_PARASITE_HOLES TRUE
86#define RS_DEFAULT_TECH_LOSS_HOLES TRUE
87#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL FALSE
88
89#define RS_DEFAULT_GOLD_UPKEEP_STYLE "City"
90#define RS_DEFAULT_TECH_COST_STYLE "Civ I|II"
91#define RS_DEFAULT_TECH_LEAKAGE "None"
92#define RS_DEFAULT_TECH_UPKEEP_STYLE "None"
93
94#define RS_DEFAULT_CULTURE_VIC_POINTS 1000
95#define RS_DEFAULT_CULTURE_VIC_LEAD 300
96#define RS_DEFAULT_CULTURE_MIGRATION_PML 50
97#define RS_DEFAULT_HISTORY_INTEREST_PML 0
98
99#define RS_DEFAULT_WORLD_PEACE_TURNS 20
100
101#define RS_DEFAULT_GOODS_SELECTION GSM_LEAVING
102
103#define RS_DEFAULT_EXTRA_APPEARANCE 15
104#define RS_DEFAULT_EXTRA_DISAPPEARANCE 15
105
106#define RS_DEFAULT_ONLY_KILLING_VETERAN FALSE
107#define RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN FALSE
108#define RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY FALSE
109#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE TRUE
110
111#define RS_DEFAULT_SMALL_WONDER_VISIBILITY "Always"
112
113#define RS_DEFAULT_BASE_TECH_COST 20
114#define RS_MIN_BASE_TECH_COST 0
115#define RS_MAX_BASE_TECH_COST 20000
116
117#define RS_DEFAULT_MIN_TECH_COST 20
118#define RS_MIN_MIN_TECH_COST 0
119#define RS_MAX_MIN_TECH_COST 20000
120
121#define RS_DEFAULT_NATIONALITY FALSE
122#define RS_DEFAULT_UBUILD_NAT FALSE
123#define RS_DEFAULT_CONVERT_SPEED 50
124
125#ifdef __cplusplus
126}
127#endif /* __cplusplus */
128
129#endif /* FC__RULELOAD_H */
char * incite_cost
Definition comments.c:76
log_level
Definition log.h:29
int ruleset_purge_unused_entities(void)
Definition ruleload.c:315
void(* rs_conversion_logger)(const char *msg)
Definition ruleload.h:42
void rulesets_deinit(void)
Definition ruleload.c:9268
bool load_rulesets(const char *restore, const char *alt, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
Definition ruleload.c:9188
int ruleset_purge_redundant_reqs(void)
Definition ruleload.c:492
bool reload_rulesets_settings(void)
Definition ruleload.c:9516
char * get_parser_buffer(void)
Definition ruleload.c:564
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__
void send_rulesets(struct conn_list *dest)
Definition ruleload.c:9539
char * get_script_buffer(void)
Definition ruleload.c:556
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
#define fc__attribute(x)
Definition support.h:99