#include <undo_move_action.hpp>
Public Member Functions | |
move_action (const unit_const_ptr moved, const std::vector< map_location >::const_iterator &begin, const std::vector< map_location >::const_iterator &end, int sm, int timebonus, int orig, const map_location::direction dir) | |
move_action (const config &cfg, const config &unit_cfg, int sm, const map_location::direction dir) | |
virtual const char * | get_type () const |
virtual | ~move_action () |
virtual void | write (config &cfg) const |
Writes this into the provided config. More... | |
virtual bool | undo (int side) |
Undoes this action. More... | |
Public Member Functions inherited from actions::undo_action | |
undo_action () | |
Default constructor. More... | |
undo_action (const config &cfg) | |
virtual | ~undo_action () |
void | execute_undo_umc_wml () |
Public Member Functions inherited from actions::undo_action_base | |
undo_action_base (const undo_action_base &)=delete | |
undo_action_base & | operator= (const undo_action_base &)=delete |
undo_action_base () | |
Default constructor. More... | |
virtual | ~undo_action_base () |
Public Member Functions inherited from actions::shroud_clearing_action | |
shroud_clearing_action (const config &cfg) | |
shroud_clearing_action (const unit_const_ptr u, const map_location &loc, int village_owner, bool village_bonus) | |
shroud_clearing_action (const unit_const_ptr u, const route_t::const_iterator &begin, const route_t::const_iterator &end, int village_owner, bool village_bonus) | |
void | return_village () |
Change village owner on undo. More... | |
void | take_village () |
Change village owner on redo. More... | |
void | write (config &cfg) const |
virtual | ~shroud_clearing_action () |
Public Attributes | |
int | starting_moves |
map_location::direction | starting_dir |
map_location | goto_hex |
Public Attributes inherited from actions::undo_action | |
int | unit_id_diff |
the difference in the unit ids TODO: does it really make sense to allow undoing if the unit id counter has changed? More... | |
event_vector | umc_commands_undo |
Public Attributes inherited from actions::shroud_clearing_action | |
route_t | route |
The hexes occupied by the affected unit during this action. More... | |
clearer_info | view_info |
A record of the affected unit's ability to see. More... | |
int | original_village_owner |
The number of the side that preivously owned the village that the unit stepped on Note, that recruit/recall actions can also take a village if the unit was recruits/recalled onto a village. More... | |
bool | take_village_timebonus |
Whether this actions got a timebonus because it took a village. More... | |
Additional Inherited Members | |
Public Types inherited from actions::undo_action | |
typedef std::vector< undo_event > | event_vector |
actions wml (specified by wml) that should be executed when undoing this command. More... | |
Public Types inherited from actions::shroud_clearing_action | |
typedef std::vector< map_location > | route_t |
Static Public Member Functions inherited from actions::undo_action | |
static void | read_event_vector (event_vector &vec, const config &cfg, const std::string &tag) |
static void | write_event_vector (const event_vector &vec, config &cfg, const std::string &tag) |
Definition at line 23 of file undo_move_action.hpp.
actions::undo::move_action::move_action | ( | const unit_const_ptr | moved, |
const std::vector< map_location >::const_iterator & | begin, | ||
const std::vector< map_location >::const_iterator & | end, | ||
int | sm, | ||
int | timebonus, | ||
int | orig, | ||
const map_location::direction | dir | ||
) |
Definition at line 32 of file undo_move_action.cpp.
References moved.
|
inline |
Definition at line 34 of file undo_move_action.hpp.
|
inlinevirtual |
Definition at line 45 of file undo_move_action.hpp.
|
inlinevirtual |
Implements actions::undo_action_base.
Definition at line 44 of file undo_move_action.hpp.
|
virtual |
Undoes this action.
Implements actions::undo_action.
Definition at line 81 of file undo_move_action.cpp.
References _(), unit::clear_status_caches(), unit_map::end(), ERR_NG, actions::undo_action::execute_undo_umc_wml(), unit_map::find(), resources::gameboard, unit_map::iterator_base< iter_types >::get_shared_ptr(), game_display::get_singleton(), goto_hex, unit_map::move(), unit_display::move_unit(), actions::undo::reset_adjacent(), actions::shroud_clearing_action::return_village(), actions::shroud_clearing_action::route, starting_dir, starting_moves, and game_board::units().
|
virtual |
Writes this into the provided config.
Reimplemented from actions::undo_action.
Definition at line 47 of file undo_move_action.cpp.
References goto_hex, config::mandatory_child(), starting_dir, starting_moves, map_location::wml_x(), map_location::wml_y(), actions::shroud_clearing_action::write(), actions::undo_action::write(), and map_location::write_direction().
map_location actions::undo::move_action::goto_hex |
Definition at line 27 of file undo_move_action.hpp.
map_location::direction actions::undo::move_action::starting_dir |
Definition at line 26 of file undo_move_action.hpp.
int actions::undo::move_action::starting_moves |
Definition at line 25 of file undo_move_action.hpp.