blob: 16e4592cbb42dcfd6bfb4905a1fd23d5da505cd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "../Player.h"
#include "backend/print.h"
#include "backend/Location.h"
using namespace std;
FollowupAction Player::cmd_search(string &) {
bool found = false;
List<Object *> to_unhide;
for (Object * object : this->location.get_hidden_objects()) {
if (!found) lprtf("Je vindt:\n");
lprtf("- %s\n", object->get_displayname().c_str());
to_unhide.push_back(object);
found = true;
}
if (!found)
lprtf("Je hebt niks gevonden.\n");
for (Object * object : to_unhide)
this->location.unhide_object(object);
return FollowupAction::UPDATE;
}
|