Feature #1333 ยป 0029-Load-access_unit-for-access_area-from-the-ruleset.patch
common/accessarea.c | ||
---|---|---|
}
|
||
}
|
||
/*********************************************************************//**
|
||
Get access_unit of the access_info
|
||
*************************************************************************/
|
||
const struct unit_type *access_info_access_unit(void)
|
||
{
|
||
return ainfo.access_unit;
|
||
}
|
||
/*********************************************************************//**
|
||
Free access area list.
|
||
@param alist List to clear
|
common/accessarea.h | ||
---|---|---|
void access_info_init(const struct unit_type *aunit);
|
||
void access_info_close(void);
|
||
const struct unit_type *access_info_access_unit(void);
|
||
void access_areas_refresh(struct civ_map *nmap, struct player *plr);
|
||
data/alien/game.ruleset | ||
---|---|---|
replace_priority = 1
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/civ1/game.ruleset | ||
---|---|---|
flags = "Bidirectional"
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/civ2/game.ruleset | ||
---|---|---|
flags = "Bidirectional"
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/civ2civ3/game.ruleset | ||
---|---|---|
; "Arrival" - Goods are chosen when trade route is established, when unit arrives to destination
|
||
goods_selection = "Leaving"
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Goods types:
|
data/classic/game.ruleset | ||
---|---|---|
replace_priority = 1
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/goldkeep/game.ruleset | ||
---|---|---|
replace_priority = 1
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/granularity/game.ruleset | ||
---|---|---|
replace_priority = 1
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/multiplayer/game.ruleset | ||
---|---|---|
[clause_embassy]
|
||
type = "Embassy"
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;Counter types
|
||
;
|
data/sandbox/game.ruleset | ||
---|---|---|
flags = "Depletes"
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/stub/game.ruleset | ||
---|---|---|
replace_priority = 1
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
data/webperimental/game.ruleset | ||
---|---|---|
replace_priority = 1
|
||
[aarea]
|
||
; Unit type to use to determine access areas. Access area is the area this unit
|
||
; can access (move to)
|
||
access_unit = ""
|
||
; /* <-- avoid gettext warnings
|
||
;
|
||
; Clause types
|
server/ruleset/ruleload.c | ||
---|---|---|
section_list_destroy(sec);
|
||
}
|
||
if (ok) {
|
||
const char *uname = secfile_lookup_str_default(file, nullptr,
|
||
"aarea.access_unit");
|
||
const struct unit_type *access_unit = nullptr;
|
||
if (uname != nullptr && uname[0] != '\0') {
|
||
access_unit = unit_type_by_rule_name(uname);
|
||
if (access_unit == nullptr) {
|
||
ruleset_error(nullptr, LOG_ERROR, "%s: access unit %s unknown.",
|
||
filename, uname);
|
||
ok = FALSE;
|
||
}
|
||
}
|
||
access_info_init(access_unit);
|
||
}
|
||
if (ok) {
|
||
sec = secfile_sections_by_name_prefix(file, CLAUSE_SECTION_PREFIX);
|
||
... | ... | |
} unit_type_iterate_end;
|
||
city_production_caravan_shields_init();
|
||
access_info_init(nullptr);
|
||
/* Build advisors unit class cache corresponding to loaded rulesets */
|
||
adv_units_ruleset_init();
|
||
CALL_FUNC_EACH_AI(units_ruleset_init);
|
tools/ruleutil/rulesave.c | ||
---|---|---|
#include "string_vector.h"
|
||
/* common */
|
||
#include "accessarea.h"
|
||
#include "achievements.h"
|
||
#include "counters.h"
|
||
#include "game.h"
|
||
... | ... | |
save_strvec(sfile, pgood->helptext, path, "helptext");
|
||
} goods_type_re_active_iterate_end;
|
||
{
|
||
const struct unit_type *access_unit = access_info_access_unit();
|
||
if (access_unit != nullptr) {
|
||
secfile_insert_str(sfile, utype_rule_name(access_unit),
|
||
"aarea.access_unit");
|
||
}
|
||
}
|
||
/* Clauses */
|
||
comment_clauses(sfile);
|
||