Add level selection system. Add levels upto jester

This commit is contained in:
WillJeynes
2026-08-27 10:49:57 +01:00
parent e24539fbb1
commit 0767961bc0
50 changed files with 5381 additions and 68 deletions
+26 -10
View File
@@ -189,6 +189,9 @@ public class DialogManager : Singleton<DialogManager>
public void SubmitButtonPress()
{
AudioManager.Instance.PlaySound("Select");
var FullQuestionCopt = FullQuestion + "";
//formulate query string in format PERPSECTIVE%ITEM#PROPERTY
//slightly wack way of doing it, hoping it is future proof
while (FullQuestionPrefixes.Count > 0)
@@ -228,19 +231,32 @@ public class DialogManager : Singleton<DialogManager>
Debug.Log(FullQuestion);
//now get a response from the guard being questioned
var response = currentGuard.Answer(FullQuestion);
r = r.Replace("NOREC_", "");
r = Regex.Replace(
r,
@"^is\s+(?:\S+\s+)*guard\s+\(you\)",
"are you",
RegexOptions.IgnoreCase
);
if (!r.Contains(":"))
{
r = Regex.Replace(
r,
@"is.*\(you\)",
"are you",
RegexOptions.IgnoreCase
);
}
var response = FullQuestionCopt;
if (!FullQuestion.Contains("$"))
{
//now get a response from the guard being questioned
response = currentGuard.Answer(FullQuestion).ToRandomString();
}
response = response.Replace("$", "");
string responsePrefix = "";
if (FullQuestion.Contains("%"))
{
@@ -250,7 +266,7 @@ public class DialogManager : Singleton<DialogManager>
SpeechManager.Instance.StartText(new[]
{
new KeyValuePair<string, string>(r, "PLAYER"),
new KeyValuePair<string, string>(responsePrefix + response.ToRandomString(), "GUARD")
new KeyValuePair<string, string>(responsePrefix + response, "GUARD")
});
reset();