29 #define ERR_NG LOG_STREAM(err, log_engine)
30 #define LOG_NG LOG_STREAM(info, log_engine)
35 const map_location& from,
int orig_village_owner,
bool time_bonus)
38 , u_type(recruited->
type())
74 if ( un_it == units.
end() ) {
78 const unit &un = *un_it;
87 gui.invalidate(recruit_loc);
88 units.
erase(recruit_loc);
A config object defines a single node in a WML file, with access to child nodes.
config & mandatory_child(config_key_type key, int n=0)
Returns the nth child with the given key, or throws an error if there is none.
config & add_child(config_key_type key)
virtual const unit_map & units() const override
static game_display * get_singleton()
statistics_t & statistics()
void un_recruit_unit(const unit &u)
This class stores all the data for a single 'side' (in game nomenclature).
void set_action_bonus_count(const int count)
int action_bonus_count() const
void spend_gold(const int amount)
Container associating units to locations.
unit_iterator find(std::size_t id)
std::size_t erase(const map_location &l)
Erases the unit at location l, if any.
A single unit type that the player may recruit.
const std::string & parent_id() const
The id of the original type from which this (variation) descended.
This class represents a single unit of a specific type.
const unit_type & type() const
This unit's type, accounting for gender and variation.
Standard logging facilities (interface).
play_controller * controller
std::shared_ptr< const unit > unit_const_ptr
base class for classes that clear srhoud (move/recruit/recall)
route_t route
The hexes occupied by the affected unit during this action.
void return_village()
Change village owner on undo.
void write(config &cfg) const
map_location recruit_from
virtual void write(config &cfg) const
Writes this into the provided config.
virtual bool undo(int side)
Undoes this action.
recruit_action(const unit_const_ptr recruited, const map_location &loc, const map_location &from, int orig_village_owner, bool time_bonus)
actions that are undoable (this does not include update_shroud and auto_shroud)
virtual void write(config &cfg) const
Writes this into the provided config.
void execute_undo_umc_wml()
Encapsulates the map of the game.
void write(config &cfg) const
static lg::log_domain log_engine("engine")