Feature #1677 » 1677Main.patch
client/packhand.c | ||
---|---|---|
pterrain->irrigation_time = p->irrigation_time;
|
||
pterrain->mining_shield_incr = p->mining_shield_incr;
|
||
pterrain->mining_time = p->mining_time;
|
||
if (p->animal < 0) {
|
||
pterrain->animal = NULL;
|
||
pterrain->num_animals = p->num_animals;
|
||
if (p->num_animals == 0) {
|
||
pterrain->animals = nullptr;
|
||
} else {
|
||
pterrain->animal = utype_by_number(p->animal);
|
||
pterrain->animals = fc_calloc(p->num_animals,
|
||
sizeof(*pterrain->animals));
|
||
for (j = 0; j < p->num_animals; j++) {
|
||
pterrain->animals[j] = utype_by_number(p->animals[j]);
|
||
}
|
||
}
|
||
pterrain->transform_result = terrain_by_number(p->transform_result);
|
||
pterrain->transform_time = p->transform_time;
|
||
pterrain->placing_time = p->placing_time;
|
common/fc_types.h | ||
---|---|---|
#define MAX_NUM_STARTPOS_NATIONS 1024 /* Used in the network protocol. */
|
||
#define MAX_CALENDAR_FRAGMENTS 52 /* Used in the network protocol. */
|
||
#define MAX_NUM_TECH_CLASSES 16 /* Used in the network protocol. */
|
||
#define MAX_NUM_ANIMALS 32 /* Used in the network protocol. */
|
||
/* Changing these will probably break network compatibility. */
|
||
#define MAX_LEN_NAME 48
|
common/movement.c | ||
---|---|---|
}
|
||
/* 6) */
|
||
if (puowner->ai_common.barbarian_type == ANIMAL_BARBARIAN
|
||
&& dst_tile->terrain->animal != punittype) {
|
||
return MR_ANIMAL_DISALLOWED;
|
||
if (puowner->ai_common.barbarian_type == ANIMAL_BARBARIAN) {
|
||
bool ok = FALSE;
|
||
terrain_animals_iterate(dst_tile->terrain, panimal) {
|
||
if (panimal == punittype) {
|
||
ok = TRUE;
|
||
break;
|
||
}
|
||
} terrain_animals_iterate_end;
|
||
if (!ok) {
|
||
return MR_ANIMAL_DISALLOWED;
|
||
}
|
||
}
|
||
/* 7) */
|
||
... | ... | |
}
|
||
/* 2) */
|
||
if (puowner->ai_common.barbarian_type == ANIMAL_BARBARIAN
|
||
&& dst_tile->terrain->animal != punittype) {
|
||
return MR_ANIMAL_DISALLOWED;
|
||
if (puowner->ai_common.barbarian_type == ANIMAL_BARBARIAN) {
|
||
bool ok = FALSE;
|
||
terrain_animals_iterate(dst_tile->terrain, panimal) {
|
||
if (panimal == punittype) {
|
||
ok = TRUE;
|
||
break;
|
||
}
|
||
} terrain_animals_iterate_end;
|
||
if (!ok) {
|
||
return MR_ANIMAL_DISALLOWED;
|
||
}
|
||
}
|
||
/* 3) */
|
common/networking/packets.def | ||
---|---|---|
UINT8 mining_shield_incr;
|
||
UINT8 mining_time;
|
||
SINT16 animal;
|
||
UINT8 num_animals;
|
||
SINT16 animals[MAX_NUM_ANIMALS:num_animals];
|
||
TERRAIN transform_result;
|
||
UINT8 transform_time;
|
common/terrain.c | ||
---|---|---|
civ_terrains[i].ruledit_disabled = FALSE;
|
||
civ_terrains[i].ruledit_dlg = nullptr;
|
||
civ_terrains[i].rgb = nullptr;
|
||
civ_terrains[i].animal = nullptr;
|
||
for (j = 0; j < MAX_EXTRA_TYPES; j++) {
|
||
civ_terrains[i].extra_removal_times[j] = 0;
|
common/terrain.h | ||
---|---|---|
/* Currently only clean times, but named for future */
|
||
int extra_removal_times[MAX_EXTRA_TYPES];
|
||
const struct unit_type *animal;
|
||
int num_animals;
|
||
const struct unit_type **animals;
|
||
/* May be nullptr if the transformation is impossible. */
|
||
struct terrain *warmer_wetter_result, *warmer_drier_result;
|
||
... | ... | |
} \
|
||
}
|
||
#define terrain_animals_iterate(pterrain, _animal) \
|
||
if (NULL != pterrain && pterrain->num_animals > 0) { \
|
||
int _animal##_index; \
|
||
for (_animal##_index = 0; \
|
||
_animal##_index < pterrain->num_animals; \
|
||
_animal##_index++) { \
|
||
const struct unit_type *_animal = pterrain->animals[_animal##_index]; \
|
||
#define terrain_animals_iterate_end \
|
||
} \
|
||
}
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif /* __cplusplus */
|
data/alien/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; doesn''t count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
data/civ1/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Arctic"
|
data/civ2/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
{ "extra", "removal_time"
|
||
"Pollution", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Glacier"
|
data/civ2civ3/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "Storm"
|
||
animals = "Storm"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "Storm"
|
||
animals = "Storm"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Tundra"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Tundra"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Desert"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Tundra"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
data/classic/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Tundra"
|
||
warmer_drier_result = "Tundra"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Grassland"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Plains"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "Plains"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
data/goldkeep/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Tundra"
|
||
warmer_drier_result = "Tundra"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Grassland"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Plains"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "Plains"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
data/granularity/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; doesn''t count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
data/multiplayer/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Tundra"
|
||
warmer_drier_result = "Tundra"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Grassland"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Plains"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "Plains"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
data/ruledit/comments-3.4.txt | ||
---|---|---|
; - \"extra\" - Name of the extra\n\
|
||
; - \"removal_time\" - Time for cleaning activities (0 = impossible)\n\
|
||
; Nonzero values only affect extras with removal_time 0.\n\
|
||
; animal = unit type that can appear as animal on the terrain\n\
|
||
; animals = list of unit types that can appear as animal on the terrain\n\
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:\n\
|
||
; \"no\" -- no change; does not count for warming\n\
|
||
; \"yes\" -- no change; counts for warming\n\
|
data/sandbox/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "Storm"
|
||
animals = "Storm"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "Storm"
|
||
animals = "Storm"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Tundra"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Tundra"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Desert"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Desert"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Tundra"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Swamp"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
data/stub/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; doesn''t count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
extra_settings =
|
||
{ "extra", "removal_time"
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
data/webperimental/terrain.ruleset | ||
---|---|---|
; - "extra" - Name of the extra
|
||
; - "removal_time" - Time for cleaning activities (0 = impossible)
|
||
; Nonzero values only affect extras with removal_time 0.
|
||
; animal = unit type that can appear as animal on the terrain
|
||
; animals = list of unit types that can appear as animal on the terrain
|
||
; warmer_wetter_result = result of global warming for wet terrains; one of:
|
||
; "no" -- no change; does not count for warming
|
||
; "yes" -- no change; counts for warming
|
||
... | ... | |
transform_time = 0
|
||
placing_time = 0
|
||
pillage_time = 0
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "Swamp"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Tundra"
|
||
warmer_drier_result = "Tundra"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Grassland"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "Plains"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Jungle"
|
||
warmer_drier_result = "Plains"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Swamp"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "no"
|
||
warmer_drier_result = "no"
|
||
cooler_wetter_result = "no"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
||
... | ... | |
"Pollution", 3
|
||
"Fallout", 3
|
||
}
|
||
animal = "None"
|
||
animals = "None"
|
||
warmer_wetter_result = "Lake"
|
||
warmer_drier_result = "Desert"
|
||
cooler_wetter_result = "Glacier"
|
server/animals.c | ||
---|---|---|
#include <fc_config.h>
|
||
#endif
|
||
/* utility */
|
||
#include "rand.h" /* fc_rand() */
|
||
/* common */
|
||
#include "ai.h"
|
||
#include "game.h"
|
||
... | ... | |
#include "animals.h"
|
||
/************************************************************************//**
|
||
Return suitable animal type for the terrain
|
||
Return a randon suitable animal type for the terrain
|
||
****************************************************************************/
|
||
static const struct unit_type *animal_for_terrain(struct terrain *pterr)
|
||
{
|
||
return pterr->animal;
|
||
if (pterr->num_animals == 0) {
|
||
return nullptr;
|
||
} else {
|
||
return pterr->animals[fc_rand(pterr->num_animals)];
|
||
}
|
||
}
|
||
/************************************************************************//**
|
server/ruleset/rssanity.c | ||
---|---|---|
} music_styles_re_active_iterate_end;
|
||
terrain_re_active_iterate(pterr) {
|
||
if (pterr->animal != NULL) {
|
||
if (!is_native_to_class(utype_class(pterr->animal), pterr, NULL)) {
|
||
terrain_animals_iterate(pterr, panimal) {
|
||
if (!is_native_to_class(utype_class(panimal), pterr, nullptr)) {
|
||
ruleset_error(logger, LOG_ERROR,
|
||
_("%s has %s as animal to appear, but it's not native to the terrain."),
|
||
terrain_rule_name(pterr), utype_rule_name(pterr->animal));
|
||
terrain_rule_name(pterr), utype_rule_name(panimal));
|
||
ok = FALSE;
|
||
break;
|
||
}
|
||
}
|
||
} terrain_animals_iterate_end
|
||
terrain_resources_iterate(pterr, pres, freq) {
|
||
(void) freq;
|
server/ruleset/ruleload.c | ||
---|---|---|
break;
|
||
}
|
||
if (!lookup_unit_type(file, tsection, "animal",
|
||
&pterrain->animal, filename,
|
||
rule_name_get(&pterrain->name))) {
|
||
ok = FALSE;
|
||
res = secfile_lookup_str_vec(file, &nval, "%s.animals", tsection);
|
||
/* if "None", adjust */
|
||
if (nval == 1 && strcmp(res[0], "None") == 0) {
|
||
pterrain->num_animals = 0;
|
||
} else {
|