Project

General

Profile

Feature #601 » 0087-Rename-requirement-type-UnitFlag-as-UnitTypeFlag.patch

Marko Lindqvist, 05/12/2024 11:51 PM

View differences:

gen_headers/enums/fc_types_enums.def
TERRAIN "Terrain"
NATION "Nation"
UTYPE "UnitType"
UTFLAG "UnitFlag"
UTFLAG "UnitTypeFlag"
UCLASS "UnitClass"
UCFLAG "UnitClassFlag"
OTYPE "OutputType"
server/ruleset/rscompat.c
return old_name;
}
/**********************************************************************//**
Convert 3.2 universal name to a 3.3 one.
**************************************************************************/
const char *rscompat_universal_name_3_3(const char *old_name)
{
if (!fc_strcasecmp("UnitFlag", old_name)) {
return "UnitTypeFlag";
}
return old_name;
}
server/ruleset/rscompat.h
/* Functions specific to 3.2 -> 3.3 transition */
const char *rscompat_utype_flag_name_3_3(const char *old_name);
const char *rscompat_universal_name_3_3(const char *old_name);
#ifdef __cplusplus
}
server/ruleset/ruleload.c
"'%s.%s%d'.", filename, sec, sub, j);
}
/* TODO: Allow only in compat mode. */
if (TRUE /* compat->compat_mode && compat->version < RSFORMAT_3_3 */) {
type = rscompat_universal_name_3_3(type);
}
req = req_from_str(type, range, survives, present, quiet, name);
if (req.source.kind == universals_n_invalid()) {
ruleset_error(NULL, LOG_ERROR,
(1-1/3)