40 const unsigned int id_;
91 void handle_generic_event(
const std::string &event_name);
95 void remove(
const std::string &id);
96 config get(
const std::string &id);
106 void write_sourcespecs(
config& cfg)
const;
132 sourcespec(
const std::string&
id,
const std::string& files,
int min_delay,
int chance) :
135 min_delay_(min_delay),
140 check_fogged_(false),
141 check_shrouded_(false),
164 check_fogged_ = value;
168 check_shrouded_ = value;
199 const std::string&
id()
const {
return id_; }
int calculate_volume(const map_location &loc, const display &disp)
void set_fade_range(int value)
void set_minimum_delay(int value)
const std::vector< map_location > & get_locations() const
const std::string & id() const
unsigned int last_played_
positional_source_map::iterator positional_source_iterator
void update(unsigned int time, const display &disp)
std::vector< map_location > locations_
void write(std::ostream &out, const configr_of &cfg, unsigned int level)
positional_source_map sources_
void write_config(config &cfg) const
Serializes attributes as WML config.
void set_full_range(int value)
bool check_shrouded() const
int minimum_delay() const
const std::string & files() const
void set_loops(int value)
void update_positions(unsigned int time, const display &disp)
std::map< std::string, std::unique_ptr< positional_source > > positional_source_map
Encapsulates the map of the game.
void set_check_shrouded(bool value)
std::vector< map_location > locations_
bool check_fogged() const
positional_source(const sourcespec &spec)
sourcespec(const std::string &id, const std::string &files, int min_delay, int chance)
Parameter-list constructor.
void set_chance(int value)
A config object defines a single node in a WML file, with access to child nodes.
void set_check_fogged(bool value)
std::string::const_iterator iterator
positional_source_map::const_iterator positional_source_const_iterator
static unsigned int last_id