36 class move_unit_spectator;
48 std::unique_ptr<movetype::terrain_costs>
costs;
91 const std::set<map_location>* known_units =
nullptr,
92 std::size_t * enemy_count =
nullptr, std::size_t * friend_count =
nullptr,
100 const std::set<map_location>* known_units =
nullptr,
101 std::size_t * enemy_count =
nullptr, std::size_t * friend_count =
nullptr,
109 team &view_team,
bool instant)
110 {
return clear_unit(view_loc, viewer, view_team,
nullptr,
nullptr,
nullptr,
nullptr, instant); }
122 bool can_delay =
false,
bool invalidate =
true,
123 bool instant =
true);
135 void invalidate_after_clear();
142 void calculate_jamming(
const team * new_team);
146 const map_location &event_non_loc, std::size_t viewer_id,
147 bool check_units, std::size_t &enemy_count, std::size_t &friend_count,
151 inline void record_sighting(
const unit & seen,
const map_location & seen_loc,
152 std::size_t sighter_id,
const map_location & sighter_loc);
172 bool clear_shroud(
int side,
bool reset_fog =
false,
bool fire_events =
true);
Class that stores the part of a unit's data that is needed for fog clearing.
A const-only interface for how many (movement, vision, or "jamming") points a unit needs for each hex...
std::vector< sight_data > sightings_
This class represents a single unit of a specific type.
A record of a sighting event.
bool clear_unit(const map_location &view_loc, const unit &viewer, team &view_team, bool instant)
Clears shroud (and fog) around the provided location for view_team as if viewer was standing there...
std::size_t underlying_id
clearer_info(const unit &viewer)
Constructor from a unit.
This class stores all the data for a single 'side' (in game nomenclature).
void recalculate_fog(int side)
Function that recalculates the fog of war.
Encapsulates the map of the game.
void write(config &cfg) const
Writes to a config.
bool clear_shroud(int side, bool reset_fog, bool fire_events)
Function that will clear shroud (and fog) based on current unit positions.
std::unique_ptr< movetype::terrain_costs > costs
costs is always non-null, all of the constructors initialize it
const team * view_team_
Keeps track of the team associated with jamming_.
std::map< map_location, int > jamming_
void cache_units(const team *new_team=nullptr)
Function to be called if units have moved or otherwise changed.
Class to encapsulate fog/shroud clearing and the resultant sighted events.
std::tuple< bool, bool > pump_result_t
A config object defines a single node in a WML file, with access to child nodes.
std::vector< int > get_sides_not_seeing(const unit &target)
Returns the sides that cannot currently see target.
game_events::pump_result_t actor_sighted(const unit &target, const std::vector< int > *cache)
Fires sighted events for the sides that can see target.