Crossfire Server, Trunk
|
Rings the temple bells in the main cities. More...
Files | |
file | cfcitybell.cpp |
Data Structures | |
struct | Region |
Functions | |
void | cfcitybell_close () |
void | cfcitybell_init (Settings *settings) |
static int | clock_listener (int *type,...) |
static void | load_bells (BufferReader *reader, const char *filename) |
static void | ring_bell (void) |
Variables | |
std::unordered_map< std::string, std::string > | Region::bells |
std::string | Region::fallback |
static event_registration | global_handler |
static int | last_hr |
static std::unordered_map< std::string, Region * > | regions |
Rings the temple bells in the main cities.
void cfcitybell_close | ( | ) |
Definition at line 164 of file cfcitybell.cpp.
References all_regions, EVENT_CLOCK, events_unregister_global_handler(), global_handler, and regions.
void cfcitybell_init | ( | Settings * | settings | ) |
Citybells module initialisation.
settings | server settings. |
Definition at line 152 of file cfcitybell.cpp.
References Settings::add_hook(), clock_listener(), Settings::disabled_plugins, EVENT_CLOCK, events_register_global_handler(), get_tod(), global_handler, timeofday_t::hour, last_hr, load_bells(), and settings.
|
static |
Global event handling, only uses EVENT_CLOCK.
type | The event type. |
Definition at line 123 of file cfcitybell.cpp.
References make_face_from_files::args, EVENT_CLOCK, get_tod(), timeofday_t::hour, last_hr, ring_bell(), and is_valid_types_gen::type.
Referenced by cfcitybell_init().
|
static |
Load a .bells file.
reader | reader. |
filename | file name. |
Definition at line 50 of file cfcitybell.cpp.
References bufferreader_current_line(), bufferreader_next_line(), disinfect::count, replace::current, npc_dialog::filename, is_valid_types_gen::line, llevError, LOG(), regions, split(), and split_string().
Referenced by cfcitybell_init().
|
static |
Ring the city bells for each player.
Definition at line 90 of file cfcitybell.cpp.
References determine_god(), draw_ext_info(), first_player, is_valid_types_gen::found, get_region_by_map(), navar-midane_pickup::msg, MSG_SUBTYPE_NONE, MSG_TYPE_MISC, region::name, NDI_ORANGE, NDI_UNIQUE, player::ob, altar_valkyrie::pl, ring_occidental_mages::r, and regions.
Referenced by clock_listener().
std::unordered_map<std::string, std::string> Region::bells |
Map between a god's name and the message to display.
Definition at line 38 of file cfcitybell.cpp.
std::string Region::fallback |
Message if the god's name is not in Region::bells.
Definition at line 39 of file cfcitybell.cpp.
|
static |
Definition at line 146 of file cfcitybell.cpp.
Referenced by cfcitybell_close(), and cfcitybell_init().
|
static |
Definition at line 34 of file cfcitybell.cpp.
Referenced by cfcitybell_init(), and clock_listener().
|
static |
All defined regions.
Definition at line 43 of file cfcitybell.cpp.
Referenced by cfcitybell_close(), getRegions(), load_bells(), and ring_bell().