2018-06-28 00:25:45 -04:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "startrek/room.h"
|
|
|
|
|
2018-06-28 18:44:22 -04:00
|
|
|
#define OBJECT_MUDD 8
|
|
|
|
#define OBJECT_9 9
|
|
|
|
#define OBJECT_ALIEN_IMAGE 10
|
|
|
|
#define OBJECT_ALIENDV 11
|
|
|
|
#define OBJECT_NORTH_DOOR 12
|
|
|
|
#define OBJECT_REPAIR_TOOL 13
|
2018-06-28 00:25:45 -04:00
|
|
|
|
2018-06-28 18:44:22 -04:00
|
|
|
#define HOTSPOT_SCREEN 0x20
|
|
|
|
#define HOTSPOT_SPHERE 0x21
|
|
|
|
#define HOTSPOT_NORTH_DOOR 0x22
|
|
|
|
#define HOTSPOT_EAST_DOOR 0x23
|
2018-06-28 00:25:45 -04:00
|
|
|
|
|
|
|
namespace StarTrek {
|
|
|
|
|
2018-06-28 23:17:09 -04:00
|
|
|
// BUG-ish: trying to scan the sphere while someone is behind it causes it to scan that
|
|
|
|
// object instead.
|
|
|
|
|
2018-06-28 00:25:45 -04:00
|
|
|
void Room::mudd3Tick1() {
|
2018-06-28 18:44:22 -04:00
|
|
|
playVoc("MUD3LOOP");
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_REDSHIRT] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
if (_awayMission->mudd.databaseDestroyed) {
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorAnim(OBJECT_9, "s4lbpb", 0xa2, 0x9f);
|
|
|
|
|
|
|
|
// FIXME: is this supposed to be in this if statement?
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.tookRepairTool)
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorAnim(OBJECT_REPAIR_TOOL, "s4lbdv", 0xb7, 0xa8);
|
|
|
|
}
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.muddInDatabaseRoom = false;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddVisitedDatabaseRoom && _awayMission->mudd.translatedAlienLanguage && !_awayMission->mudd.muddUnavailable) {
|
|
|
|
_awayMission->mudd.muddVisitedDatabaseRoom = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorAnim(OBJECT_MUDD, "s4lbhs", 0xa2, 0x9f);
|
|
|
|
playMidiMusicTracks(3);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.muddInDatabaseRoom = true;
|
|
|
|
_awayMission->timers[2] = 10;
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseCommunicator() {
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_003);
|
|
|
|
showText(TX_SPEAKER_UHURA, TX_STATICU1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtScreen() {
|
2018-06-30 23:53:52 -04:00
|
|
|
// BUGFIX: the condition was flipped in the original; the more "vague" description
|
|
|
|
// should be shown before the alien language is understood.
|
2018-07-27 20:32:29 -04:00
|
|
|
if (_awayMission->mudd.translatedAlienLanguage)
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_038);
|
2018-06-30 23:53:52 -04:00
|
|
|
else
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N017);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseSTricorderOnScreen() {
|
|
|
|
if (_roomVar.mudd.tricordersUnavailable)
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_039);
|
|
|
|
else
|
|
|
|
spockScan(DIR_S, TX_MUD3_017, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
// BUGFIX: Event was actually "use screen on kirk", which makes no sense.
|
|
|
|
void Room::mudd3UseKirkOnScreen() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.translatedAlienLanguage) {
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N011);
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_037);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseSpockOnSphere() {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_SPOCK);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
if (_awayMission->mudd.computerDataErasedOrDestroyed) {
|
|
|
|
if (!_awayMission->mudd.databaseDestroyed) {
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N000);
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_052);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_012);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_024);
|
|
|
|
}
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_006);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_048);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_008);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_051);
|
2018-07-27 20:32:29 -04:00
|
|
|
} else if (_awayMission->mudd.translatedAlienLanguage) {
|
|
|
|
if (_awayMission->mudd.accessedAlienDatabase)
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_035);
|
|
|
|
else {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.accessedAlienDatabase = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_054);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_032);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_050);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_049);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_046);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_007);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.missionScore++;
|
2018-06-28 18:44:22 -04:00
|
|
|
playVoc("LSHAIANS");
|
|
|
|
loadActorAnim(OBJECT_ALIEN_IMAGE, "s4lbap", 0x32, 0x64);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_W;
|
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
|
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
|
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_REDSHIRT] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_KIRK);
|
|
|
|
loadActorStandAnim(OBJECT_SPOCK);
|
|
|
|
loadActorStandAnim(OBJECT_MCCOY);
|
|
|
|
loadActorStandAnim(OBJECT_REDSHIRT);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = true;
|
|
|
|
_awayMission->timers[3] = 40;
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
2018-07-27 20:32:29 -04:00
|
|
|
} else if (_awayMission->mudd.discoveredBase3System) {
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_043);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_022);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_056);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_015);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_047);
|
|
|
|
_roomVar.mudd.suggestedUsingTricorders = true;
|
|
|
|
} else {
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_044);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_SPOCK, 0xcd, 0x87);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Finished looking at alien image
|
|
|
|
void Room::mudd3Timer3Expired() {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = false;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_027);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_053);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_028);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_026);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseMccoyOnSphere() {
|
|
|
|
// ENHANCEMENT: Turn to face south
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_MCCOY);
|
|
|
|
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_021);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_MCCOY, 0xec, 0x84);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseRedshirtOnSphere() {
|
|
|
|
// ENHANCEMENT: Turn to face south
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_REDSHIRT] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_REDSHIRT);
|
|
|
|
|
|
|
|
showText(TX_SPEAKER_BUCHERT, TX_MUD3_068); // BUGFIX: original played McCoy's audio by mistake
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_REDSHIRT] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_REDSHIRT, 0xec, 0x84);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseMTricorderOnSphere() {
|
|
|
|
if (_roomVar.mudd.tricordersUnavailable)
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_039); // BUGFIX: speaker is Spock
|
|
|
|
else {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_MCCOY);
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.translatedAlienLanguage && _roomVar.mudd.suggestedUsingTricorders && _awayMission->mudd.discoveredBase3System) {
|
|
|
|
_awayMission->disableInput = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_MCCOY, 0xac, 0x88);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewmanC(OBJECT_SPOCK, 0xa5, 0x8c, &Room::mudd3ReadyToHookUpTricorders);
|
|
|
|
} else {
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_021);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_MCCOY, 0xec, 0x84);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseSTricorderOnSphere() {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_SPOCK);
|
|
|
|
|
|
|
|
if (_roomVar.mudd.tricordersUnavailable)
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_039); // BUGFIX: speaker is Spock
|
2018-07-27 20:32:29 -04:00
|
|
|
else if (_awayMission->mudd.translatedAlienLanguage || (_awayMission->mudd.discoveredBase3System && !_roomVar.mudd.suggestedUsingTricorders)) {
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_041);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_SPOCK, 0xcd, 0x87);
|
2018-07-27 20:32:29 -04:00
|
|
|
} else if (_awayMission->mudd.discoveredBase3System && _roomVar.mudd.suggestedUsingTricorders) { // Hooking up tricorders
|
|
|
|
_awayMission->disableInput = true;
|
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewmanC(OBJECT_MCCOY, 0xca, 0x88, &Room::mudd3ReadyToHookUpTricorders);
|
|
|
|
} else { // No idea how to access it
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_042);
|
|
|
|
walkCrewman(OBJECT_SPOCK, 0xcd, 0x87);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3ReadyToHookUpTricorders() {
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_018);
|
|
|
|
|
|
|
|
_roomVar.mudd.tricordersUnavailable = true;
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->timers[1] = 50;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
|
|
|
loadActorAnim2(OBJECT_SPOCK, "sscans");
|
|
|
|
playSoundEffectIndex(SND_TRICORDER);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3Timer1Expired() { // Tricorders ready for use again
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_040);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_034);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = false;
|
2018-06-28 18:44:22 -04:00
|
|
|
_roomVar.mudd.tricordersUnavailable = false;
|
|
|
|
_roomVar.mudd.suggestedUsingTricorders = false;
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.translatedAlienLanguage = true;
|
|
|
|
_awayMission->mudd.missionScore++;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
|
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_SPOCK, 0xcd, 0x87);
|
|
|
|
walkCrewman(OBJECT_MCCOY, 0xec, 0x84);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Harry Mudd stumbled into the room
|
|
|
|
void Room::mudd3Timer2Expired() {
|
2018-08-09 14:37:35 +01:00
|
|
|
const TextRef choices[] = {
|
2018-06-28 18:44:22 -04:00
|
|
|
TX_SPEAKER_KIRK,
|
|
|
|
TX_MUD3_010,
|
|
|
|
TX_MUD3_009,
|
|
|
|
TX_BLANK
|
|
|
|
};
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.computerDataErasedOrDestroyed = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_065);
|
2019-06-11 01:28:12 +03:00
|
|
|
int choice = showMultipleTexts(choices);
|
2018-06-28 18:44:22 -04:00
|
|
|
|
2018-06-30 23:53:52 -04:00
|
|
|
if (choice == 0) { // Allow him to access the database (he ends up erasing it)
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_066);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.muddErasedDatabase = true;
|
2018-06-30 23:53:52 -04:00
|
|
|
|
|
|
|
// ENHANCEMENT: Add a few lines to make it clear that Mudd erased the databanks.
|
|
|
|
// Otherwise, the end of the mission when you confront Mudd doesn't make sense
|
|
|
|
// unless the player happened to try accessing the database again. Also, if you
|
|
|
|
// talk to the crew, they berate him for no apparent reason if this isn't clear.
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N000);
|
2018-06-30 23:53:52 -04:00
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_031);
|
|
|
|
|
2018-06-28 18:44:22 -04:00
|
|
|
} else { // Don't allow it (he destroys it by accident)
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_064);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->timers[4] = 98;
|
|
|
|
_awayMission->disableInput = 2;
|
2018-06-28 18:44:22 -04:00
|
|
|
playMidiMusicTracks(26);
|
|
|
|
loadActorAnim(OBJECT_MUDD, "s4lbhb", 0xa2, 0x9f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3Timer4Expired() {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.databaseDestroyed = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_063);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_031);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = false;
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseMemoryDiskOnSphere() {
|
2018-06-30 23:53:52 -04:00
|
|
|
// ENHANCEMENT: Turn to face south
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
|
2018-06-30 23:53:52 -04:00
|
|
|
loadActorStandAnim(OBJECT_KIRK);
|
|
|
|
|
2018-07-27 20:32:29 -04:00
|
|
|
if (_awayMission->mudd.databaseDestroyed)
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N014);
|
2018-07-27 20:32:29 -04:00
|
|
|
else if (_awayMission->mudd.translatedAlienLanguage && !_awayMission->mudd.muddErasedDatabase) {
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N020);
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.gotPointsForDownloadingData) {
|
|
|
|
_awayMission->mudd.missionScore += 3;
|
|
|
|
_awayMission->mudd.gotPointsForDownloadingData = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
} else
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N019);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Room::mudd3GetRepairTool() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (_awayMission->mudd.tookRepairTool)
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N018); // NOTE: unused, since the object disappears, can't be selected again
|
2018-06-28 18:44:22 -04:00
|
|
|
else {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = true;
|
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_N;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewmanC(OBJECT_KIRK, 0xba, 0xc1, &Room::mudd3ReachedRepairTool);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3ReachedRepairTool() {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_N;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorAnimC(OBJECT_KIRK, "kusemn", -1, -1, &Room::mudd3PickedUpRepairTool);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3PickedUpRepairTool() {
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = false;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_REPAIR_TOOL);
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->mudd.tookRepairTool = true;
|
|
|
|
_awayMission->mudd.missionScore++;
|
2018-06-28 18:44:22 -04:00
|
|
|
giveItem(OBJECT_IDOOVER);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtSphere() {
|
|
|
|
// ENHANCEMENT: Turn to face south
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
|
2018-06-28 18:44:22 -04:00
|
|
|
loadActorStandAnim(OBJECT_KIRK);
|
|
|
|
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N015);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3WalkToNorthDoor() {
|
|
|
|
_roomVar.mudd.walkingToDoor = true;
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_KIRK, 0xb8, 0x70);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TouchedHotspot0() { // Triggers north door
|
|
|
|
if (_roomVar.mudd.walkingToDoor) {
|
|
|
|
playVoc("SMADOOR3");
|
|
|
|
loadActorAnim(OBJECT_NORTH_DOOR, "s4lbdo", 0xba, 0x6f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3WalkToEastDoor() {
|
|
|
|
_roomVar.mudd.walkingToDoor = true;
|
2018-07-27 20:32:29 -04:00
|
|
|
_awayMission->disableInput = true;
|
2018-06-28 18:44:22 -04:00
|
|
|
walkCrewman(OBJECT_KIRK, 0x121, 0x81);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TouchedHotspot1() {
|
|
|
|
if (_roomVar.mudd.walkingToDoor) {
|
|
|
|
playVoc("SMADOOR3");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtKirk() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom)
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N005);
|
2018-06-28 18:44:22 -04:00
|
|
|
else
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N004);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtSpock() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom)
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N012);
|
2018-06-28 18:44:22 -04:00
|
|
|
else
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N002);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtMccoy() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom)
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N010);
|
2018-06-28 18:44:22 -04:00
|
|
|
else
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N009);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtRedshirt() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom)
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N007);
|
2018-06-28 18:44:22 -04:00
|
|
|
else
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N006);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3LookAtMudd() {
|
2019-06-11 01:28:12 +03:00
|
|
|
showDescription(TX_MUD3N003);
|
2018-06-28 18:44:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TalkToKirk() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom) {
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_014);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_057);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_025);
|
|
|
|
} else
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_002);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TalkToSpock() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom) {
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_055);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_033);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_011);
|
|
|
|
} else
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3_019);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TalkToMccoy() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom)
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_023);
|
|
|
|
else {
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_030);
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_062);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TalkToRedshirt() {
|
2018-07-27 20:32:29 -04:00
|
|
|
if (!_awayMission->mudd.muddInDatabaseRoom) {
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_BUCHERT, TX_MUD3_070);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_016);
|
|
|
|
showText(TX_SPEAKER_BUCHERT, TX_MUD3_071);
|
|
|
|
} else
|
|
|
|
showText(TX_SPEAKER_BUCHERT, TX_MUD3_067);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3TalkToMudd() {
|
2018-06-30 23:53:52 -04:00
|
|
|
// ENHANCEMENT: the 2nd part of the if condition is new; whether he physically
|
|
|
|
// destroys the database or does through software, he should give this reaction.
|
2018-07-27 20:32:29 -04:00
|
|
|
if (_awayMission->mudd.databaseDestroyed || _awayMission->mudd.muddErasedDatabase) {
|
2018-06-28 18:44:22 -04:00
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_060);
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_029);
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_061);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_013);
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_058);
|
|
|
|
showText(TX_SPEAKER_SPOCK, TX_MUD3C001);
|
|
|
|
showText(TX_SPEAKER_BUCHERT, TX_MUD3_069);
|
|
|
|
showText(TX_SPEAKER_MUDD, TX_MUD3_059);
|
|
|
|
showText(TX_SPEAKER_KIRK, TX_MUD3_005);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Room::mudd3UseMedkit() {
|
|
|
|
showText(TX_SPEAKER_MCCOY, TX_MUD3_020);
|
2018-06-28 00:25:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|