Freeciv-3.2
|
Go to the source code of this file.
Data Structures | |
struct | disaster_type |
Macros | |
#define | SPECENUM_NAME disaster_effect_id |
#define | SPECENUM_VALUE0 DE_DESTROY_BUILDING |
#define | SPECENUM_VALUE0NAME "DestroyBuilding" |
#define | SPECENUM_VALUE1 DE_REDUCE_POP |
#define | SPECENUM_VALUE1NAME "ReducePopulation" |
#define | SPECENUM_VALUE2 DE_EMPTY_FOODSTOCK |
#define | SPECENUM_VALUE2NAME "EmptyFoodStock" |
#define | SPECENUM_VALUE3 DE_EMPTY_PRODSTOCK |
#define | SPECENUM_VALUE3NAME "EmptyProdStock" |
#define | SPECENUM_VALUE4 DE_POLLUTION |
#define | SPECENUM_VALUE4NAME "Pollution" |
#define | SPECENUM_VALUE5 DE_FALLOUT |
#define | SPECENUM_VALUE5NAME "Fallout" |
#define | SPECENUM_VALUE6 DE_REDUCE_DESTROY |
#define | SPECENUM_VALUE6NAME "ReducePopDestroy" |
#define | SPECENUM_COUNT DE_COUNT |
#define | SPECENUM_BITVECTOR bv_disaster_effects |
#define | DISASTER_BASE_RARITY 1000000 |
#define | disaster_type_iterate(_p) |
#define | disaster_type_iterate_end |
#define | disaster_type_re_active_iterate(_p) disaster_type_iterate(_p) |
#define | disaster_type_re_active_iterate_end disaster_type_iterate_end; |
#define DISASTER_BASE_RARITY 1000000 |
Definition at line 44 of file disaster.h.
Definition at line 80 of file disaster.h.
#define disaster_type_iterate_end |
Definition at line 86 of file disaster.h.
#define disaster_type_re_active_iterate | ( | _p | ) | disaster_type_iterate(_p) |
Definition at line 91 of file disaster.h.
#define disaster_type_re_active_iterate_end disaster_type_iterate_end; |
Definition at line 94 of file disaster.h.
#define SPECENUM_BITVECTOR bv_disaster_effects |
Definition at line 41 of file disaster.h.
Definition at line 40 of file disaster.h.
Definition at line 25 of file disaster.h.
#define SPECENUM_VALUE0 DE_DESTROY_BUILDING |
Definition at line 26 of file disaster.h.
#define SPECENUM_VALUE0NAME "DestroyBuilding" |
Definition at line 27 of file disaster.h.
#define SPECENUM_VALUE1 DE_REDUCE_POP |
Definition at line 28 of file disaster.h.
#define SPECENUM_VALUE1NAME "ReducePopulation" |
Definition at line 29 of file disaster.h.
#define SPECENUM_VALUE2 DE_EMPTY_FOODSTOCK |
Definition at line 30 of file disaster.h.
#define SPECENUM_VALUE2NAME "EmptyFoodStock" |
Definition at line 31 of file disaster.h.
#define SPECENUM_VALUE3 DE_EMPTY_PRODSTOCK |
Definition at line 32 of file disaster.h.
#define SPECENUM_VALUE3NAME "EmptyProdStock" |
Definition at line 33 of file disaster.h.
#define SPECENUM_VALUE4 DE_POLLUTION |
Definition at line 34 of file disaster.h.
#define SPECENUM_VALUE4NAME "Pollution" |
Definition at line 35 of file disaster.h.
#define SPECENUM_VALUE5 DE_FALLOUT |
Definition at line 36 of file disaster.h.
#define SPECENUM_VALUE5NAME "Fallout" |
Definition at line 37 of file disaster.h.
#define SPECENUM_VALUE6 DE_REDUCE_DESTROY |
Definition at line 38 of file disaster.h.
#define SPECENUM_VALUE6NAME "ReducePopDestroy" |
Definition at line 39 of file disaster.h.
Whether disaster can happen in given city.
Definition at line 139 of file disaster.c.
Referenced by check_disasters(), and impr_prevents_disaster().
struct disaster_type * disaster_by_number | ( | Disaster_type_id | id | ) |
Return disaster type of given id.
Definition at line 87 of file disaster.c.
Referenced by api_find_disaster(), and handle_ruleset_disaster().
struct disaster_type * disaster_by_rule_name | ( | const char * | name | ) |
Return disaster matching rule name or NULL if there is no disaster with such a name.
Definition at line 114 of file disaster.c.
Referenced by api_find_disaster_by_name().
Disaster_type_id disaster_count | ( | void | ) |
Return the number of disaster_types.
Definition at line 79 of file disaster.c.
bool disaster_has_effect | ( | const struct disaster_type * | pdis, |
enum disaster_effect_id | effect | ||
) |
Check if disaster provides effect
Definition at line 130 of file disaster.c.
Referenced by apply_disaster().
Disaster_type_id disaster_index | ( | const struct disaster_type * | pdis | ) |
Return the disaster index.
Currently same as disaster_number(), paired with disaster_count() indicates use as an array index.
Definition at line 69 of file disaster.c.
Referenced by load_ruleset_game().
const char * disaster_name_translation | ( | struct disaster_type * | pdis | ) |
Return translated name of this disaster type.
Definition at line 97 of file disaster.c.
Referenced by api_methods_disaster_name_translation(), and apply_disaster().
Disaster_type_id disaster_number | ( | const struct disaster_type * | pdis | ) |
Return the disaster id.
Definition at line 56 of file disaster.c.
Referenced by send_ruleset_disasters().
const char * disaster_rule_name | ( | struct disaster_type * | pdis | ) |
Return untranslated name of this disaster type.
Definition at line 105 of file disaster.c.
Referenced by api_methods_disaster_rule_name(), apply_disaster(), disaster_by_rule_name(), is_universal_needed(), load_ruleset_game(), and sanity_check_ruleset_data().
Free the memory associated with disaster types
Definition at line 46 of file disaster.c.
Referenced by game_ruleset_free().
Initialize disaster_type structures.
Definition at line 33 of file disaster.c.
Referenced by game_ruleset_init().