From: MegaBrutal <code+git@megabrutal.com>
Date: Sun, 18 Nov 2018 05:40:00 +0000 (+0100)
Subject: Let Carlos afternoon dialogue triggered by Saiki
X-Git-Url: http://git.megabrutal.com/?p=wgj58.git;a=commitdiff_plain;h=4ec2bf940a0f1f0ada6a93271ba3789a45e66e49

Let Carlos afternoon dialogue triggered by Saiki

... instead of Peter.

	modified:   wgj58.js
---

diff --git a/wgj58.js b/wgj58.js
index c69dcbe..b98719d 100644
--- a/wgj58.js
+++ b/wgj58.js
@@ -309,7 +309,7 @@ class NPC_Clara extends GameNPC {
 class NPC_Carlos extends GameNPC {
 	actionTalk() {
 		if (logic.clara.alive) {
-			if (logic.peter.talkcount == 0) {
+			if (logic.saiki.talkcount == 0) {
 				switch (this.talkcount) {
 					case 0:
 						logic.gameinterface.talk(new Dialogue( [ { actor: logic.player, text: "Good morning, Carlos! What's up?" },
@@ -417,7 +417,7 @@ class NPC_Carlos extends GameNPC {
 	}
 
 	actionLeave() {
-		if ((logic.clara.alive) && (logic.peter.talkcount == 0)) {
+		if ((logic.clara.alive) && (logic.saiki.talkcount == 0)) {
 			logic.gameinterface.dropNotice(this.shortname + ": Bye, John! Pass on my greetings to Saiki!");
 		}
 	}
@@ -429,7 +429,7 @@ class NPC_Carlos extends GameNPC {
 	}
 
 	endTalk() {
-		return ((logic.clara.alive) && (logic.peter.talkcount == 0)) || (this.talkcount < 3);
+		return ((logic.clara.alive) && (logic.saiki.talkcount == 0)) || (this.talkcount < 3);
 	}
 
 	tpDone(value) {
@@ -456,6 +456,7 @@ class NPC_Saiki extends GameNPC {
 					logic.closeDoor("carlosdoor");
 					logic.openDoor("saikidoor");
 					logic.openDoor("peterdoor");
+					logic.carlos.resetTalk();
 					break;
 				case 1:
 					logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Now that I think about it, there's still one thing. You could look into why the access control system is acting so funny today." },
@@ -576,7 +577,6 @@ class NPC_Peter extends GameNPC {
 					logic.closeDoor("saikidoor");
 					logic.openDoor("peterdoor");
 					logic.openDoor("biancadoor");
-					logic.carlos.resetTalk();
 					break;
 				case 1:
 					logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "See... Would you talk to Bianca? We don't understand each other pretty well. That's why I'd rather wouldn't make a shot." } ] ));