public static void AddDigit(string keyword, string digit) { if (!Debouncer.IsGood($"{keyword}.{digit}")) { return; } CreateIfNeeded(keyword); allNumbers[keyword].AddDigit(digit); TriggerNumberChanged(keyword); }
public static int GetInGameCreatureTargetNumber(string targetNumStr) { int targetNum; if (targetNumStr == "{creature.count}") { targetNum = (int)DigitManager.GetValue("creature"); } else { if (!int.TryParse(targetNumStr, out targetNum)) { return(int.MinValue); } else if (!Debouncer.IsGood("creature", targetNum)) { return(int.MinValue); } } return(targetNum); }