10 #include <boost/noncopyable.hpp>
11 #include <boost/optional.hpp>
43 virtual const char*
get_type()
const = 0;
62 virtual bool undo(
int side) = 0;
65 virtual bool redo(
int side) = 0;
95 virtual const char*
get_type()
const {
return "dummy"; }
virtual void write(config &cfg) const
Writes this into the provided config.
virtual ~undo_action_base()
Various functions implementing vision (through fog of war and shroud).
undo_event(const config &cmds, const game_events::queued_event &ctx)
virtual bool undo(int)
Undoes this action.
virtual const char * get_type() const =0
Definitions for the interface to Wesnoth Markup Language (WML).
Records information to be able to undo an action.
event_vector umc_commands_undo
std::vector< undo_event > event_vector
actions wml (specified by wml) that should be executed when undoing this command. ...
static void read_event_vector(event_vector &vec, const config &cfg, const std::string &tag)
virtual const char * get_type() const
void execute_undo_umc_wml()
event_vector umc_commands_redo
undo_dummy_action(const config &cfg)
virtual bool redo(int)
Redoes this action.
Encapsulates the map of the game.
virtual void write(config &cfg) const
Writes this into the provided config.
entry for player actions that do not need any special code to be performed when undoing such as right...
static void write_event_vector(const event_vector &vec, config &cfg, const std::string &tag)
virtual bool redo(int side)=0
Redoes this action.
Define the game's event mechanism.
undo_action()
Default constructor.
virtual ~undo_dummy_action()
undo_action_base()
Default constructor.
void execute_redo_umc_wml()
A config object defines a single node in a WML file, with access to child nodes.
int unit_id_diff
the difference in the unit ids TODO: does it really make sense to allow undoing if the unit id counte...
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
virtual bool undo(int side)=0
Undoes this action.
actions that are undoable (this does not include update_shroud and auto_shroud)