Freeciv-3.3
Loading...
Searching...
No Matches
Functions | Variables
multipliers.c File Reference
#include "game.h"
#include "multipliers.h"

Go to the source code of this file.

Functions

void multipliers_init (void)
 
void multipliers_free (void)
 
struct multipliermultiplier_by_number (Multiplier_type_id id)
 
Multiplier_type_id multiplier_number (const struct multiplier *pmul)
 
Multiplier_type_id multiplier_index (const struct multiplier *pmul)
 
Multiplier_type_id multiplier_count (void)
 
const charmultiplier_name_translation (const struct multiplier *pmul)
 
const charmultiplier_rule_name (const struct multiplier *pmul)
 
struct multipliermultiplier_by_rule_name (const char *name)
 
bool multiplier_can_be_changed (struct multiplier *pmul, struct player *pplayer)
 

Variables

static struct multiplier multipliers [MAX_NUM_MULTIPLIERS]
 

Function Documentation

◆ multiplier_by_number()

struct multiplier * multiplier_by_number ( Multiplier_type_id  id)

Returns multiplier associated to given number

Definition at line 57 of file multipliers.c.

Referenced by tab_multiplier::add_now(), handle_player_multiplier(), handle_ruleset_multiplier(), and recv_ruleset_effect().

◆ multiplier_by_rule_name()

struct multiplier * multiplier_by_rule_name ( const char name)

Returns multiplier matching rule name, or NULL if there is no multiplier with such a name.

Definition at line 115 of file multipliers.c.

Referenced by tab_multiplier::initialize_new_multiplier(), load_ruleset_effects(), effect_edit::multiplier_menu(), tab_multiplier::select_multiplier(), sg_load_savefile(), and sg_load_savefile().

◆ multiplier_can_be_changed()

bool multiplier_can_be_changed ( struct multiplier pmul,
struct player pplayer 
)

◆ multiplier_count()

Multiplier_type_id multiplier_count ( void  )

◆ multiplier_index()

Multiplier_type_id multiplier_index ( const struct multiplier pmul)

◆ multiplier_name_translation()

const char * multiplier_name_translation ( const struct multiplier pmul)

Return the (translated) name of the multiplier. You don't have to free the return pointer.

Definition at line 97 of file multipliers.c.

Referenced by create_multiplier_dialog(), end_phase(), get_effect_req_text(), and multipler_rates_dialog::multipler_rates_dialog().

◆ multiplier_number()

Multiplier_type_id multiplier_number ( const struct multiplier pmul)

Returns multiplier number.

Definition at line 67 of file multipliers.c.

Referenced by multiplier_index(), send_ruleset_cache(), and send_ruleset_multipliers().

◆ multiplier_rule_name()

const char * multiplier_rule_name ( const struct multiplier pmul)

◆ multipliers_free()

void multipliers_free ( void  )

Free all multipliers

Definition at line 43 of file multipliers.c.

Referenced by game_ruleset_free().

◆ multipliers_init()

void multipliers_init ( void  )

Initialize all multipliers

Definition at line 28 of file multipliers.c.

Referenced by game_ruleset_init().

Variable Documentation

◆ multipliers

struct multiplier multipliers[MAX_NUM_MULTIPLIERS]
static