59 ,
id_(u.underlying_id())
70 ,
id_(u.underlying_id())
83 return id_ == 0 || ( un_it.
valid() &&
id_ == un_it->underlying_id() );
std::size_t id_
The underlying ID of the unit associated with this.
bool matches_unit_filter(const unit_map::const_iterator &un_it, const vconfig &filter) const
Determines if un_it matches filter.
virtual const unit_map & units() const override
This class represents a single unit of a specific type.
const map_location & filter_loc() const
bool matches(const unit &u, const map_location &loc) const
Determine if *this matches filter at a specified location.
std::shared_ptr< const unit > unit_const_ptr
unit_const_ptr get_unit() const
static const entity_location null_entity
bool matches_unit(const unit_map::const_iterator &un_it) const
Determines if un_it matches (using underlying ID) the unit that was supplied when this was constructe...
entity_location(const map_location &loc, std::size_t id=0)
Constructor for when an event has a location but not necessarily a unit.
Encapsulates the map of the game.
unit_iterator find(std::size_t id)
pointer get_shared_ptr() const
This is exactly the same as operator-> but it's slightly more readable, and can replace &*iter syntax...
static std::string get_location(const std::string &loc)
map_location filter_loc_
This map_location allows a unit to be filtered as if it were somewhere other than where it is...
A variable-expanding proxy for the config class.
static const map_location & null_location()
Define locations as used by the game's events mechanism.