47 std::unique_ptr<editor_action>
clone()
const override;
50 const std::string&
get_name()
const override;
67 std::unique_ptr<editor_action>
clone()
const override;
70 const std::string&
get_name()
const override;
82 std::unique_ptr<editor_action>
clone()
const override;
85 const std::string&
get_name()
const override;
97 , new_direction_(new_direction)
98 , old_direction_(old_direction)
102 std::unique_ptr<editor_action>
clone()
const override;
105 const std::string&
get_name()
const override;
editor_action_unit_delete(map_location loc)
This class represents a single unit of a specific type.
void perform_without_undo(map_context &mc) const override
Perform the action without creating an undo action.
const std::string & get_name() const override
std::unique_ptr< editor_action > perform(map_context &mc) const override
Perform the action, returning an undo action that, when performed, shall reverse any effects of this ...
Base class for actions which act on a specified location (and possibly on other locations that can be...
std::shared_ptr< unit > unit_ptr
std::unique_ptr< editor_action > clone() const override
Action cloning.
editor_action_unit_replace(map_location loc, map_location new_loc)
Manage the empty-palette in the editor.
Encapsulates the map of the game.
place a new unit on the map
editor_action_unit(map_location loc, const unit &u)
editor_action_unit_facing(map_location loc, map_location::DIRECTION new_direction, map_location::DIRECTION old_direction)
DIRECTION
Valid directions which can be moved in our hexagonal world.
This class wraps around a map to provide a concise interface for the editor to work with...
Remove a unit from the map.
map_location::DIRECTION old_direction_
map_location::DIRECTION new_direction_