diff options
Diffstat (limited to 'engines/titanic/carry/plug_in.cpp')
-rw-r--r-- | engines/titanic/carry/plug_in.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/titanic/carry/plug_in.cpp b/engines/titanic/carry/plug_in.cpp index ff8d9b158f..e4fe54dd27 100644 --- a/engines/titanic/carry/plug_in.cpp +++ b/engines/titanic/carry/plug_in.cpp @@ -24,6 +24,10 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CPlugIn, CCarry) + ON_MESSAGE(UseWithOtherMsg) +END_MESSAGE_MAP() + CPlugIn::CPlugIn() : CCarry(), _field12C(0) { } @@ -37,4 +41,28 @@ void CPlugIn::load(SimpleFile *file) { CCarry::load(file); } +bool CPlugIn::UseWithOtherMsg(CUseWithOtherMsg *msg) { + CGameObject *other = msg->_other; + CString otherName = other->getName(); + + if (otherName == "PET") { + return CCarry::UseWithOtherMsg(msg); + } else if (otherName == "DatasideTransporter") { + CString name = getName(); + if (name == "DatasideTransporter") { + // TODO + if (name != "SendYourself") { + // TODO + } + } else { + // TODO + } + } else { + CShowTextMsg textMsg("This item is incorrectly calibrated."); + textMsg.execute("PET"); + } + + return true; +} + } // End of namespace Titanic |