21 #include <unordered_map>
22 #include <unordered_set>
31 typedef std::pair<std::set<map_location>, std::set<map_location>>
62 ,
const bool ignore_units)
const;
109 const std::vector<teleport_group>& teleport_groups
111 ,
const team &viewing_team
113 ,
const bool ignore_units
114 ,
const bool check_vision);
129 const std::unordered_set<map_location>&
get_sources()
const;
132 const std::unordered_set<map_location>&
get_targets()
const;
142 std::unordered_map<map_location, std::unordered_set<map_location>>
teleport_map_;
157 bool see_all =
false,
bool ignore_units =
false,
bool check_vision =
false);
172 void remove(
const std::string &
id);
177 const std::vector<teleport_group>&
get()
const;
A config object defines a single node in a WML file, with access to child nodes.
config to_config() const
Inherited from savegame_config.
void add(const teleport_group &group)
std::vector< teleport_group > tunnels_
void remove(const std::string &id)
const std::vector< teleport_group > & get() const
manager(const config &cfg)
std::string next_unique_id()
config to_config() const
Inherited from savegame_config.
bool always_visible() const
const std::string & get_teleport_id() const
teleport_group(const config &cfg)
bool pass_allied_units() const
void get_teleport_pair(teleport_pair &loc_pair, const unit &u, const bool ignore_units) const
bool allow_vision() const
const std::unordered_set< map_location > & get_sources() const
Returns the locations that are an entrance of the tunnel.
std::unordered_set< map_location > targets_
std::unordered_map< map_location, std::unordered_set< map_location > > teleport_map_
std::unordered_set< map_location > sources_
const std::unordered_set< map_location > & get_targets() const
Returns the locations that are an exit of the tunnel.
std::unordered_set< map_location > empty_set_
const std::unordered_set< map_location > & get_adjacents(map_location loc) const
This class stores all the data for a single 'side' (in game nomenclature).
This class represents a single unit of a specific type.
A variable-expanding proxy for the config class.
Definitions for the interface to Wesnoth Markup Language (WML).
std::pair< std::set< map_location >, std::set< map_location > > teleport_pair
const teleport_map get_teleport_locations(const unit &u, const team &viewing_team, bool see_all, bool ignore_units, bool check_vision)
Encapsulates the map of the game.