/// <summary> /// Tries to initiate queued reactions. /// </summary> private void TryInitiateOpenReactions() { ShortKeyDict <ReactionType, int> .Entry entry = null; while (openReactions.GetNext(entry, out entry)) { while (entry.Value > 0) { if (InitiateReaction(entry.Key, false)) { entry.Value--; if (entry.Value == 0) { openReactions.Remove(entry.Key); break; } } else { break; } } } }