TITANIC: Renaming checks for player's first class suite
This commit is contained in:
parent
3e2f084b41
commit
efb43d9621
6 changed files with 23 additions and 15 deletions
|
@ -98,9 +98,9 @@ bool CLight::TurnOn(CTurnOn *msg) {
|
|||
|
||||
bool CLight::StatusChangeMsg(CStatusChangeMsg *msg) {
|
||||
CPetControl *pet = getPetControl();
|
||||
bool flag = pet ? pet->isRoom59706() : false;
|
||||
bool isYourStateroom = pet ? pet->isFirstClassSuite() : false;
|
||||
|
||||
if (_eyePresent && flag) {
|
||||
if (_eyePresent && isYourStateroom) {
|
||||
petDisplayMessage(1, LIGHT_IS_LOOSE);
|
||||
playSound("z#144.wav", 70);
|
||||
} else {
|
||||
|
@ -113,9 +113,9 @@ bool CLight::StatusChangeMsg(CStatusChangeMsg *msg) {
|
|||
|
||||
bool CLight::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CPetControl *pet = getPetControl();
|
||||
bool flag = pet ? pet->isRoom59706() : false;
|
||||
bool isYourStateroom = pet ? pet->isFirstClassSuite() : false;
|
||||
|
||||
if (_eyePresent && flag) {
|
||||
if (_eyePresent && isYourStateroom) {
|
||||
petDisplayMessage(1, LIGHT_IS_LOOSE);
|
||||
playSound("z#144.wav", 70);
|
||||
} else {
|
||||
|
@ -141,8 +141,8 @@ bool CLight::EnterRoomMsg(CEnterRoomMsg *msg) {
|
|||
CLightsMsg lightsMsg(true, true, true, true);
|
||||
lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN);
|
||||
|
||||
bool flag = pet ? pet->isRoom59706() : false;
|
||||
if (flag)
|
||||
bool isYourStateroom = pet ? pet->isFirstClassSuite() : false;
|
||||
if (isYourStateroom)
|
||||
CTelevision::_turnOn = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ bool CLightSwitch::EnterRoomMsg(CEnterRoomMsg *msg) {
|
|||
_flag = true;
|
||||
CPetControl *pet = getPetControl();
|
||||
if (pet)
|
||||
_turnOnTV = pet->isRoom59706();
|
||||
_turnOnTV = pet->isFirstClassSuite();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -283,12 +283,12 @@ bool CTelevision::TurnOn(CTurnOn *msg) {
|
|||
|
||||
bool CTelevision::LightsMsg(CLightsMsg *msg) {
|
||||
CPetControl *pet = getPetControl();
|
||||
bool flag = false;
|
||||
bool isYourStateroom = false;
|
||||
|
||||
if (pet)
|
||||
flag = pet->isRoom59706();
|
||||
isYourStateroom = pet->isFirstClassSuite();
|
||||
|
||||
if (msg->_topLeft || !flag)
|
||||
if (msg->_topLeft || !isYourStateroom)
|
||||
_turnOn = true;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -256,10 +256,10 @@ bool CBellBot::TimerMsg(CTimerMsg *msg) {
|
|||
|
||||
bool CBellBot::TrueTalkGetStateValueMsg(CTrueTalkGetStateValueMsg *msg) {
|
||||
CPetControl *pet = getPetControl();
|
||||
bool flag = pet ? pet->isRoom59706() : false;
|
||||
bool isYourStateroom = pet ? pet->isFirstClassSuite() : false;
|
||||
|
||||
if (msg->_stateNum == 7)
|
||||
msg->_stateVal = flag ? 1 : 0;
|
||||
msg->_stateVal = isYourStateroom ? 1 : 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -561,8 +561,11 @@ public:
|
|||
_rooms.setElevatorBroken(flag);
|
||||
}
|
||||
|
||||
bool isRoom59706() const {
|
||||
return CRoomFlags(getRoomFlags()).is59706();
|
||||
/**
|
||||
* Returns true if the player is in their 1st class stateroom
|
||||
*/
|
||||
bool isFirstClassSuite() const {
|
||||
return CRoomFlags(getRoomFlags()).isFirstClassSuite();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -225,7 +225,12 @@ public:
|
|||
|
||||
bool not5() const { return getConditionally() != 5; }
|
||||
|
||||
bool is59706() const { return _data == 0x59706; }
|
||||
/**
|
||||
* Returns true if the player is in their 1st class stateroom
|
||||
*/
|
||||
bool isFirstClassSuite() const {
|
||||
return _data == 0x59706;
|
||||
}
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue