41 const unsigned int id_;
92 void handle_generic_event(
const std::string &event_name);
96 void remove(
const std::string &
id);
98 bool contains(
const std::string&
id);
108 void write_sourcespecs(
config& cfg)
const;
134 sourcespec(
const std::string&
id,
const std::string& files,
int min_delay,
int chance) :
137 min_delay_(min_delay),
142 check_fogged_(false),
143 check_shrouded_(false),
166 check_fogged_ = value;
170 check_shrouded_ = value;
205 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_
bool contains(const Container &container, const Value &value)
Returns true iff value is found in container.
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_
std::string id
Text to match against addon_info.tags()
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_files(const std::string &f)
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
void set_locations(const std::vector< map_location > &locs)