From 65d6edf829e66751636afd481a3e94c916a6dcb5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 16 Jan 2017 08:17:48 -0500 Subject: TITANIC: Workaround to dispense a cold chicken when the fuse is removed I'm pretty certain this was the original intention of the dispensor, as it not only makes sense, but there was code in place in the dispensor StatusChangeMsg method that handled two different types of dispensing, depending on whether the fuse was in place. But the code was identical; given other nastyness and code duplication in the whole dispensor logic, it's pretty clear that this was what was originally intended. Though given that the dispensor fuse is present in the fusebox by default, it's likely no-one ever played around with the dispensor with the fuse removed. --- engines/titanic/game/chicken_dispensor.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'engines/titanic/game') diff --git a/engines/titanic/game/chicken_dispensor.cpp b/engines/titanic/game/chicken_dispensor.cpp index dd87848456..8a56f43fff 100644 --- a/engines/titanic/game/chicken_dispensor.cpp +++ b/engines/titanic/game/chicken_dispensor.cpp @@ -21,6 +21,7 @@ */ #include "titanic/game/chicken_dispensor.h" +#include "titanic/carry/chicken.h" #include "titanic/core/project_item.h" #include "titanic/pet_control/pet_control.h" @@ -92,9 +93,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) { playSound("z#400.wav"); } else { playMovie(12, 16, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); - _dispensed = true; } - _dispenseMode = DISPENSE_NONE; break; default: @@ -113,6 +112,17 @@ bool CChickenDispensor::MovieEndMsg(CMovieEndMsg *msg) { playSound("b#50.wav", 50); CActMsg actMsg("Dispense Chicken"); actMsg.execute("Chicken"); + + if (_dispenseMode == DISPENSE_HOT) { + // A properly hot chicken is dispensed, no further ones will be + // until the current one is used up, and the fuse in Titania's + // fusebox is removed and replaced + _dispenseMode = DISPENSE_NONE; + } else { + // WORKAROUND: If the fuse for the dispensor is removed in Titania's fusebox, + // make the dispensed chicken already cold + CChicken::_temperature = 0; + } } else if (_dispensed) { // Chicken dispensed whilst dispensor is "disabled", which basically // spits the chicken out at high speed directly into the SuccUBus -- cgit v1.2.3