14 #define ERR_NG LOG_STREAM(err, log_engine)
15 #define LOG_NG LOG_STREAM(info, log_engine)
42 team ¤t_team = (*resources::teams)[side-1];
46 if ( un_it == units.
end() ) {
68 units.
erase(recall_loc);
81 team ¤t_team = (*resources::teams)[side-1];
88 ERR_NG <<
"Trying to redo a recall of '" <<
id
89 <<
"', but that unit is not in the recall list.";
98 recall_unit(
id, current_team, loc, from,
true,
false);
101 if ( loc !=
route.front() ) {
102 ERR_NG <<
"When redoing a recall at " <<
route.front()
103 <<
", the location was moved to " << loc <<
".\n";
bool invalidate(const map_location &loc)
Function to invalidate a specific tile for redrawing.
void do_final_checkup(bool dont_throw=false)
void un_recall_unit(const unit &u)
virtual bool undo(int side)
Undoes this action.
void show_transient_message(CVideo &video, const std::string &title, const std::string &message, const std::string &image, const bool message_use_markup, const bool title_use_markup, const bool restore_background)
Shows a transient message to the user.
void return_village()
Change village owner on undo.
This class stores all the data for a single 'side' (in game nomenclature).
virtual bool redo(int side)
Redoes this action.
unit_ptr find_if_matches_id(const std::string &unit_id)
Find a unit by id. Null pointer if not found.
void redo(const config &dst)
pointer get_shared_ptr() const
void execute_undo_umc_wml()
int un_recall_unit_cost(const unit &u)
config & add_child(const std::string &key)
void spend_gold(const int amount)
void write(config &cfg) const
Encapsulates the map of the game.
virtual void write(config &cfg) const
Writes this into the provided config.
Various functions related to the creation of units (recruits, recalls, and placed units)...
t_route route
The hexes occupied by the affected unit during this action.
static lg::log_domain log_engine("engine")
std::string find_recall_location(const int side, map_location &recall_location, map_location &recall_from, const unit &unit_recall)
Finds a location on which to recall unit_recall.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
virtual void write(config &cfg) const
Writes this into the provided config.
size_t erase(const map_location &l)
Erases the unit at location l, if any.
Standard logging facilities (interface).
CVideo & video()
Gets the underlying screen object.
bool recall_unit(const std::string &id, team ¤t_team, const map_location &loc, const map_location &from, bool show, bool use_undo)
Recalls the unit with the indicated ID for the provided team.
recall_list_manager & recall_list()
void add(const unit_ptr &ptr)
Add a unit to the list.
Container associating units to locations.
void write(config &cfg) const
unit_iterator find(size_t id)
A config object defines a single node in a WML file, with access to child nodes.
config replay_data
the replay data to do this action, this is only !empty() when this action is on the redo stack we nee...
GLsizei const GLcharARB ** string