diff options
author | Joseph-Eugene Winzer | 2017-08-25 15:22:36 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 01:47:01 +0000 |
commit | 8c18b4432a350aa270ae7d833e3f4d3b49210c55 (patch) | |
tree | 7a450fd57bd1585efdf729f1de9b3847d64231a1 /engines | |
parent | c95efb1e3e3244dae53008699c3376021f2db578 (diff) | |
download | scummvm-rg350-8c18b4432a350aa270ae7d833e3f4d3b49210c55.tar.gz scummvm-rg350-8c18b4432a350aa270ae7d833e3f4d3b49210c55.tar.bz2 scummvm-rg350-8c18b4432a350aa270ae7d833e3f4d3b49210c55.zip |
SUPERNOVA: Adds console command 'giveall'
Adds crucial items to the inventory. It eases debugging while loading of
savestates is not possible.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/console.cpp | 16 | ||||
-rw-r--r-- | engines/supernova/console.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/supernova/console.cpp b/engines/supernova/console.cpp index 838189fc53..328c46cd1b 100644 --- a/engines/supernova/console.cpp +++ b/engines/supernova/console.cpp @@ -23,6 +23,7 @@ #include "gui/debugger.h" #include "supernova/supernova.h" +#include "supernova/state.h" #include "supernova/console.h" namespace Supernova { @@ -34,6 +35,7 @@ Console::Console(SupernovaEngine *vm, GameManager *gm) registerCmd("music", WRAP_METHOD(Console, cmdMusic)); registerCmd("list", WRAP_METHOD(Console, cmdList)); registerCmd("inventory", WRAP_METHOD(Console, cmdInventory)); + registerCmd("giveall", WRAP_METHOD(Console, cmdGiveAll)); _vm = vm; _gm = gm; @@ -90,4 +92,18 @@ bool Console::cmdInventory(int argc, const char **argv) { return true; } +bool Console::cmdGiveAll(int argc, const char **argv) { + _gm->takeObject(*_gm->_rooms[INTRO]->getObject(0)); + _gm->takeObject(*_gm->_rooms[INTRO]->getObject(1)); + _gm->takeObject(*_gm->_rooms[INTRO]->getObject(2)); + _gm->takeObject(*_gm->_rooms[GENERATOR]->getObject(2)); // Commander Keycard + _gm->takeObject(*_gm->_rooms[GENERATOR]->getObject(0)); // Power Cord with Plug + _gm->takeObject(*_gm->_rooms[CABIN_L1]->getObject(5)); // Pen + _gm->takeObject(*_gm->_rooms[CABIN_R3]->getObject(0)); // Chess Board + _gm->takeObject(*_gm->_rooms[CABIN_R3]->getObject(9)); // Rope + _gm->takeObject(*_gm->_rooms[AIRLOCK]->getObject(4)); // Helmet + _gm->takeObject(*_gm->_rooms[AIRLOCK]->getObject(5)); // Space Suit + _gm->takeObject(*_gm->_rooms[AIRLOCK]->getObject(6)); // Supply +} + } diff --git a/engines/supernova/console.h b/engines/supernova/console.h index e78c3b556b..74b40c25f8 100644 --- a/engines/supernova/console.h +++ b/engines/supernova/console.h @@ -44,6 +44,7 @@ public: bool cmdMusic(int argc, const char **argv); bool cmdList(int argc, const char **argv); bool cmdInventory(int argc, const char **argv); + bool cmdGiveAll(int argc, const char **argv); private: SupernovaEngine *_vm; GameManager *_gm; |