diff options
Diffstat (limited to 'engines/titanic/carry/nose.cpp')
-rw-r--r-- | engines/titanic/carry/nose.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/titanic/carry/nose.cpp b/engines/titanic/carry/nose.cpp index 4f3afe24ac..a08d02a88c 100644 --- a/engines/titanic/carry/nose.cpp +++ b/engines/titanic/carry/nose.cpp @@ -21,9 +21,15 @@ */ #include "titanic/carry/nose.h" +#include "titanic/game/head_slot.h" namespace Titanic { +BEGIN_MESSAGE_MAP(CNose, CHeadPiece) + ON_MESSAGE(ChangeSeasonMsg) + ON_MESSAGE(UseWithOtherMsg) +END_MESSAGE_MAP() + CNose::CNose() : CHeadPiece() { } @@ -37,4 +43,23 @@ void CNose::load(SimpleFile *file) { CHeadPiece::load(file); } +bool CNose::ChangeSeasonMsg(CChangeSeasonMsg *msg) { + // WORKAROUND: Redundant code in original skipped + return true; +} + +bool CNose::UseWithOtherMsg(CUseWithOtherMsg *msg) { + CHeadSlot *slot = dynamic_cast<CHeadSlot *>(msg->_other); + if (!slot) + return CCarry::UseWithOtherMsg(msg); + + petMoveToHiddenRoom(); + _flag = false; + CAddHeadPieceMsg addMsg(getName()); + if (addMsg._value != "NULL") + addMsg.execute("NoseSlot"); + + return true; +} + } // End of namespace Titanic |