mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
WAGE: Implement handleTakeCommand()
This commit is contained in:
parent
b90e9361fe
commit
3cdc17be94
@ -1057,7 +1057,21 @@ void Script::handleAcceptCommand() {
|
||||
}
|
||||
|
||||
void Script::handleTakeCommand(const char *target) {
|
||||
warning("STUB: handleTakeCommand");
|
||||
Common::String t(target);
|
||||
|
||||
for (ObjList::const_iterator it = _world->_player->_currentScene->_objs.begin(); it != _world->_player->_currentScene->_objs.end(); ++it) {
|
||||
Common::String n((*it)->_name);
|
||||
n.toLowercase();
|
||||
|
||||
if (t.contains(n)) {
|
||||
if ((*it)->_type == Obj::IMMOBILE_OBJECT) {
|
||||
appendText((char *)"You can't move it.");
|
||||
} else {
|
||||
takeObj(*it);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Script::handleDropCommand(const char *target) {
|
||||
|
Loading…
Reference in New Issue
Block a user