public void Initialize(IDataStoreManager dataStoreManager) { variableTypeStore = dataStoreManager.Get("ConjugationTypes"); variableStore = dataStoreManager.Get("Variables"); irregularStore = dataStoreManager.Get("Irregulars"); conjugator = new Conjugator(irregularStore); }
public void Initialize(IDataStoreManager dataStoreManager) { invDataStore = dataStoreManager.Get("Inventory"); factoidDataStore = dataStoreManager.Get("Factoids"); variableHandler.DefineMagicVariable("item", GetRandomItem); variableHandler.DefineMagicVariable("giveitem", GetRandomItemAndDiscard); variableHandler.DefineMagicVariable("newitem", GetNewItem); }
public void Initialize(IDataStoreManager dataStoreManager) { quotesDataStore = dataStoreManager.Get("Quotes"); variableHandler.DefineMagicVariable("quote", msg => GetRandomQuoteFromAnyUser()); }
public void Initialize(IDataStoreManager dataStoreManager) { dataStore = dataStoreManager.Get("Factoids"); }
public void Initialize(IDataStoreManager dataStoreManager) { genderStore = dataStoreManager.Get("Genders"); var subjectivePronouns = new Dictionary<Gender, string> { {Gender.Androgynous, "they"}, {Gender.Male, "he"}, {Gender.Female, "she"}, {Gender.Inanimate, "it"} }; var objectivePronouns = new Dictionary<Gender, string> { {Gender.Androgynous, "them"}, {Gender.Male, "him"}, {Gender.Female, "her"}, {Gender.Inanimate, "it"} }; var reflexivePronouns = new Dictionary<Gender, string> { {Gender.Androgynous, "themself"}, {Gender.Male, "himself"}, {Gender.Female, "herself"}, {Gender.Inanimate, "itself"} }; var possessivePronouns = new Dictionary<Gender, string> { {Gender.Androgynous, "theirs"}, {Gender.Male, "his"}, {Gender.Female, "hers"}, {Gender.Inanimate, "its"} }; var possessiveDeterminers = new Dictionary<Gender, string> { {Gender.Androgynous, "their"}, {Gender.Male, "his"}, {Gender.Female, "her"}, {Gender.Inanimate, "its"} }; var subjectiveHandler = new Func<IMessage, string>( (IMessage context) => subjectivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var objectiveHandler = new Func<IMessage, string>( (IMessage context) => objectivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var reflexiveHandler = new Func<IMessage, string>( (IMessage context) => reflexivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var possessiveHandler = new Func<IMessage, string>( (IMessage context) => possessivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var possessiveDHandler = new Func<IMessage, string>( (IMessage context) => possessiveDeterminers[ GetGender(KnownPeopleListener.LastReferencedPerson)]); foreach ( var pronoun in new[] {"subjective", "shehe", "heshe", "he", "she", "they", "it"}) variableHandler.DefineMagicVariable(pronoun, subjectiveHandler); foreach ( var pronoun in new[] {"objective", "him", "her", "them", "himher", "herhim"}) variableHandler.DefineMagicVariable(pronoun, objectiveHandler); foreach ( var pronoun in new[] { "reflexive", "himselfherself", "herselfhimself", "himself", "herself", "themself", "itself" }) variableHandler.DefineMagicVariable(pronoun, reflexiveHandler); foreach ( var pronoun in new[] {"possessive", "hishers", "hershis", "hers", "theirs"} ) variableHandler.DefineMagicVariable(pronoun, possessiveHandler); foreach ( var pronoun in new[] {"determiner", "hisher", "herhis", "their"} ) variableHandler.DefineMagicVariable(pronoun, possessiveDHandler); }
public void Initialize(IDataStoreManager dataStoreManager) { variableStore = dataStoreManager.Get("Variables"); }
public void Initialize(IDataStoreManager dataStoreManager) { invDataStore = dataStoreManager.Get("Inventory"); }
public void Initialize(IDataStoreManager dataStoreManager) { factoidDataStore = dataStoreManager.Get("Factoids"); tlaDataStore = dataStoreManager.Get("TLAs"); }
public void Initialize(IDataStoreManager dataStoreManager) { quotesDataStore = dataStoreManager.Get("Quotes"); }
public void Initialize(IDataStoreManager dataStoreManager) { genderStore = dataStoreManager.Get("Genders"); var subjectivePronouns = new Dictionary <Gender, string> { { Gender.Androgynous, "they" }, { Gender.Male, "he" }, { Gender.Female, "she" }, { Gender.Inanimate, "it" } }; var objectivePronouns = new Dictionary <Gender, string> { { Gender.Androgynous, "them" }, { Gender.Male, "him" }, { Gender.Female, "her" }, { Gender.Inanimate, "it" } }; var reflexivePronouns = new Dictionary <Gender, string> { { Gender.Androgynous, "themself" }, { Gender.Male, "himself" }, { Gender.Female, "herself" }, { Gender.Inanimate, "itself" } }; var possessivePronouns = new Dictionary <Gender, string> { { Gender.Androgynous, "theirs" }, { Gender.Male, "his" }, { Gender.Female, "hers" }, { Gender.Inanimate, "its" } }; var possessiveDeterminers = new Dictionary <Gender, string> { { Gender.Androgynous, "their" }, { Gender.Male, "his" }, { Gender.Female, "her" }, { Gender.Inanimate, "its" } }; var subjectiveHandler = new Func <IMessage, string>( (IMessage context) => subjectivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var objectiveHandler = new Func <IMessage, string>( (IMessage context) => objectivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var reflexiveHandler = new Func <IMessage, string>( (IMessage context) => reflexivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var possessiveHandler = new Func <IMessage, string>( (IMessage context) => possessivePronouns[ GetGender(KnownPeopleListener.LastReferencedPerson)]); var possessiveDHandler = new Func <IMessage, string>( (IMessage context) => possessiveDeterminers[ GetGender(KnownPeopleListener.LastReferencedPerson)]); foreach ( var pronoun in new[] { "subjective", "shehe", "heshe", "he", "she", "they", "it" }) { variableHandler.DefineMagicVariable(pronoun, subjectiveHandler); } foreach ( var pronoun in new[] { "objective", "him", "her", "them", "himher", "herhim" }) { variableHandler.DefineMagicVariable(pronoun, objectiveHandler); } foreach ( var pronoun in new[] { "reflexive", "himselfherself", "herselfhimself", "himself", "herself", "themself", "itself" }) { variableHandler.DefineMagicVariable(pronoun, reflexiveHandler); } foreach ( var pronoun in new[] { "possessive", "hishers", "hershis", "hers", "theirs" } ) { variableHandler.DefineMagicVariable(pronoun, possessiveHandler); } foreach ( var pronoun in new[] { "determiner", "hisher", "herhis", "their" } ) { variableHandler.DefineMagicVariable(pronoun, possessiveDHandler); } }
public void Initialize(IDataStoreManager dataStoreManager) { ratingsStore = dataStoreManager.Get("Ratings"); }
public void Initialize(IDataStoreManager dataStoreManager) { tlaDataStore = dataStoreManager.Get("TLAs"); }