// Say something with a custom resolver
public void Say(ScriptResolver resolver, Ship ship, string scriptName, Event theEvent = null, int?priority = null, string voice = null, bool sayOutLoud = true, bool invokedFromVA = false)
{
Dictionary <string, Cottle.Value> dict = createVariables(theEvent);
string speech = resolver.resolve(scriptName, dict);
if (speech != null)
{
if (subtitles)
{
// Log a tidied version of the speech
log(Regex.Replace(speech, "<.*?>", string.Empty));
}
if (sayOutLoud && !(subtitles && subtitlesOnly))
{
SpeechService.Instance.Say(ship, speech, (priority == null ? resolver.priority(scriptName) : (int)priority), voice, false, theEvent?.type, invokedFromVA);
}
}
}