mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
WAGE: Implement wearObj()
This commit is contained in:
parent
42c7440376
commit
605a32d9bf
@ -1206,7 +1206,22 @@ void Script::handleWearCommand(const char *t) {
|
||||
}
|
||||
|
||||
void Script::wearObj(Obj *o, int pos) {
|
||||
warning("STUB: wearObj()");
|
||||
Chr *player = _world->_player;
|
||||
char buf[512];
|
||||
|
||||
if (player->_armor[pos] == o) {
|
||||
snprintf(buf, 512, "You are already wearing the %s.", o->_name.c_str());
|
||||
appendText(buf);
|
||||
} else {
|
||||
if (player->_armor[pos] != NULL) {
|
||||
snprintf(buf, 512, "You are no longer wearing the %s.", player->_armor[pos]->_name.c_str());
|
||||
appendText(buf);
|
||||
}
|
||||
|
||||
player->_armor[pos] = o;
|
||||
snprintf(buf, 512, "You are now wearing the %s.", o->_name.c_str());
|
||||
appendText(buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user