/// <summary> /// Increases number count to 'item' in current speadsheet /// </summary> public void ItemDropped(DefinitionParserData.Item item, int amount = 1) { if (!string.IsNullOrWhiteSpace(currentEnemy)) { mobDrops.UpdateDrops(currentEnemy, item); } ExcelCellAddress address = Program.interaction.GetAddress(item.mainPronounciation); Program.interaction.AddNumberTo(address, amount); stack.Push(new ItemInsertion(address, amount)); }
protected override void SpeechRecognized(object sender, SpeechRecognizedEventDetails args) { if (SpeechRecognitionHelper.reverseModifierDict.ContainsKey(args.text)) { ModifierRecognized(this, args); return; } Console.WriteLine(args.text + " -- " + args.confidence); string mainPronounciation = DefinitionParser.instance.currentGrammarFile.GetMainPronounciation(args.text); ExcelCellAddress address = Program.interaction.GetAddress(mainPronounciation); StopRecognition(); numbers.RecognizeAsync(RecognizeMode.Multiple); evnt.Wait(); //Now we have an address and how many items they received Console.WriteLine("Parsed: " + _count); stack.Push(new ItemInsertion(address, _count)); Program.interaction.AddNumberTo(address, _count); evnt.Reset(); }