66 std::string name = T::get_type_impl();
68 auto res = std::make_unique<T>(cfg);
89 virtual bool undo(
int side) = 0;
107 virtual bool undo(
int side);
std::vector< t_step_ptr > t_steps
void set_unit_id_diff(int id_diff)
std::unique_ptr< undo_action > t_step_ptr
void read(const config &cfg)
Creates the list of undo steps based on a config.
std::map< std::string, t_factory > t_factory_map
void add(t_step_ptr &&action)
static t_factory_map & get_factories()
std::function< t_step_ptr(const config &)> t_factory
undo_event(int fcn_idx, const config &args, const game_events::queued_event &ctx)
static const char * get_type_impl()
virtual bool undo(int side)
Undoes this action.
utils::optional< int > lua_idx
virtual const char * get_type() const
virtual void write(config &cfg) const
Writes this into the provided config.
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).
Records information to be able to undo an action.
virtual void write(config &cfg) const
Writes this into the provided config.
virtual const char * get_type() const =0
virtual bool undo(int side)=0
Undoes this action.
Encapsulates the map of the game.