Freeciv-3.3: /fast/freeciv/nightly/main/server/ruleset/rscompat.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
rscompat.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__RSCOMPAT_H
14#define FC__RSCOMPAT_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* utility */
21#include "support.h"
22
23/* server */
24#include "ruleload.h"
25#include "settings.h"
26
27#define RULESET_COMPAT_CAP "+Freeciv-ruleset-3.2-Devel-2022.Feb.02"
28
29 struct rscompat_info
30{
31 bool compat_mode;
32 rs_conversion_logger log_cb;
33 int version;
34};
35
36void rscompat_init_info(struct rscompat_info *info);
37
38int rscompat_check_capabilities(struct section_file *file, const char *filename,
39 const struct rscompat_info *info);
40bool rscompat_check_cap_and_version(struct section_file *file,
41 const char *filename,
42 const struct rscompat_info *info);
43
44bool rscompat_names(struct rscompat_info *info);
45
46void rscompat_postprocess(struct rscompat_info *info);
47
48/* General upgrade functions that should be kept to avoid regressions in
49 * corner case handling. */
50void rscompat_enablers_add_obligatory_hard_reqs(void);
51
52/* Functions from ruleset.c made visible to rscompat.c */
53struct requirement_vector *lookup_req_list(struct section_file *file,
54 struct rscompat_info *compat,
55 const char *sec,
56 const char *sub,
57 const char *rfor);
58
59/* Functions specific to 3.2 -> 3.3 transition */
60const char *rscompat_utype_flag_name_3_3(const char *old_name);
61
62#ifdef __cplusplus
63}
64#endif /* __cplusplus */
65
66#endif /* FC__RSCOMPAT_H */
incite_cost
char * incite_cost
Definition comments.c:74
rscompat_names
bool rscompat_names(struct rscompat_info *info)
Definition rscompat.c:341
rscompat_postprocess
void rscompat_postprocess(struct rscompat_info *info)
Definition rscompat.c:405
rscompat_utype_flag_name_3_3
const char * rscompat_utype_flag_name_3_3(const char *old_name)
Definition rscompat.c:472
rscompat_check_capabilities
int rscompat_check_capabilities(struct section_file *file, const char *filename, const struct rscompat_info *info)
Definition rscompat.c:66
lookup_req_list
struct requirement_vector * lookup_req_list(struct section_file *file, struct rscompat_info *compat, const char *sec, const char *sub, const char *rfor)
Definition ruleload.c:654
rscompat_enablers_add_obligatory_hard_reqs
void rscompat_enablers_add_obligatory_hard_reqs(void)
Definition rscompat.c:286
rscompat_init_info
void rscompat_init_info(struct rscompat_info *info)
Definition rscompat.c:57
rscompat_check_cap_and_version
bool rscompat_check_cap_and_version(struct section_file *file, const char *filename, const struct rscompat_info *info)
Definition rscompat.c:131
ruleload.h
rs_conversion_logger
void(* rs_conversion_logger)(const char *msg)
Definition ruleload.h:42
compat
static struct compatibility compat[]
Definition savecompat.c:112
settings.h
rscompat_info
Definition rscompat.h:30
rscompat_info::version
int version
Definition rscompat.h:33
rscompat_info::compat_mode
bool compat_mode
Definition rscompat.h:31
rscompat_info::log_cb
rs_conversion_logger log_cb
Definition rscompat.h:32
section_file
Definition section_file.h:36
support.h