slumber-quest/modificators/removecontrollersmodificato...

24 lines
779 B
C++
Raw Normal View History

#include "removecontrollersmodificator.h"
#include "location.h"
RemoveControllersModificator::RemoveControllersModificator()
{}
RemoveControllersModificator::~RemoveControllersModificator()
{}
void RemoveControllersModificator::run() const
{
_location->removeControllers(_controllers_to_remove);
_location->setInteractionMessage(_new_location_message);
}
void RemoveControllersModificator::setDependentObjects(const std::shared_ptr<Location>& location,
const std::list<std::shared_ptr<Controller>>& controllers,
const std::string& new_message)
{
_location = location;
_controllers_to_remove = controllers;
_new_location_message = new_message;
}