84 virtual bool undo(
int side) = 0;
110 virtual const char*
get_type()
const {
return "dummy"; }
A config object defines a single node in a WML file, with access to child nodes.
Definitions for the interface to Wesnoth Markup Language (WML).
std::string tag(const std::string &tag_name, Args &&... contents)
Records information to be able to undo an action.
virtual const char * get_type() const =0
undo_action_base(const undo_action_base &)=delete
undo_action_base()
Default constructor.
virtual void write(config &cfg) const
Writes this into the provided config.
undo_action_base & operator=(const undo_action_base &)=delete
virtual ~undo_action_base()
actions that are undoable (this does not include update_shroud and auto_shroud)
event_vector umc_commands_undo
virtual void write(config &cfg) const
Writes this into the provided config.
std::vector< undo_event > event_vector
actions wml (specified by wml) that should be executed when undoing this command.
undo_action()
Default constructor.
void execute_undo_umc_wml()
static void read_event_vector(event_vector &vec, const config &cfg, const std::string &tag)
virtual bool undo(int side)=0
Undoes this action.
static void write_event_vector(const event_vector &vec, config &cfg, const std::string &tag)
int unit_id_diff
the difference in the unit ids TODO: does it really make sense to allow undoing if the unit id counte...
entry for player actions that do not need any special code to be performed when undoing such as right...
virtual bool undo(int)
Undoes this action.
undo_dummy_action(const config &cfg)
virtual ~undo_dummy_action()
virtual const char * get_type() const
undo_event(int fcn_idx, const config &args, const game_events::queued_event &ctx)
utils::optional< int > lua_idx
Encapsulates the map of the game.