From 28b39d00c67e68d0cf5154b054da8f8f342ff933 Mon Sep 17 00:00:00 2001 From: T'kael Date: Sun, 19 May 2024 22:38:03 -0700 Subject: [PATCH] Add a `{version}` variable to Cottle. --- EDDI/ChangeLog.md | 2 ++ SpeechResponder/ScriptResolverService/ScriptResolver.cs | 4 ++-- SpeechResponder/Variables.md | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/EDDI/ChangeLog.md b/EDDI/ChangeLog.md index 7c98ce7932..b41d65c491 100644 --- a/EDDI/ChangeLog.md +++ b/EDDI/ChangeLog.md @@ -25,6 +25,8 @@ Full details of the variables available for each noted event, and VoiceAttack in * Speech Responder * Functions * `Play()` now supports relative file system paths. (#2581) + * Variables + * `{version}` top level variable added. ## 4.0.3 * EDSM Responder diff --git a/SpeechResponder/ScriptResolverService/ScriptResolver.cs b/SpeechResponder/ScriptResolverService/ScriptResolver.cs index dc0c0e8795..d64f721d61 100644 --- a/SpeechResponder/ScriptResolverService/ScriptResolver.cs +++ b/SpeechResponder/ScriptResolverService/ScriptResolver.cs @@ -182,8 +182,8 @@ protected internal Dictionary> CompileVariables(Event ["va_active"] = new Tuple(typeof(bool), App.FromVA), ["vehicle"] = new Tuple(typeof(string), EDDI.Instance.Vehicle), ["icao_active"] = new Tuple(typeof(bool), SpeechService.Instance.Configuration.EnableIcao), - ["ipa_active"] = new Tuple(typeof(bool), !SpeechService.Instance.Configuration.DisableIpa) - + ["ipa_active"] = new Tuple(typeof(bool), !SpeechService.Instance.Configuration.DisableIpa), + ["version"] = new Tuple(typeof(string), Constants.EDDI_VERSION.ShortString) }; // Standard objects diff --git a/SpeechResponder/Variables.md b/SpeechResponder/Variables.md index 9e4ef8cc2b..db7c3ba221 100644 --- a/SpeechResponder/Variables.md +++ b/SpeechResponder/Variables.md @@ -23,6 +23,7 @@ Information on game state is available at the top level i.e. these values can be - *icao_active* - true if ICAO is currently enabled - *ipa_active* - true if phonetic speech ssml tags are currently enabled - *va_active* - true when the Voice Attack plug-in is active + - *version* - the version level of EDDI which is currently running ---