Freeciv-3.3
|
#include "fcintl.h"
#include "fc_types.h"
#include "game.h"
#include "name_translation.h"
#include "disaster.h"
Go to the source code of this file.
Variables | |
static struct disaster_type | disaster_types [MAX_DISASTER_TYPES] |
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().
|
static |
Definition at line 28 of file disaster.c.
Referenced by disaster_by_number(), disaster_index(), and disaster_types_init().