Пример #1
0
        private static void CountableOption_Click(object sender, RoutedEventArgs e)
        {
            Label label = sender as Label;

            string[] id = label.Tag.ToString().Split('|');

            int optionID = Other.IntParse(id[1]);
            int unitID   = Other.IntParse(id[0]);

            Army.Data.Units[unitID].ChangeCountableOption(optionID, direction: label.Content.ToString());

            Reload.ReloadArmyData();
            UpdateUnitDescription(unitID, Army.Data.Units[unitID]);
        }
Пример #2
0
        private static void AddOption_Click(object sender, RoutedEventArgs e)
        {
            string id_tag = (sender as Label).Tag.ToString();

            string[] id = id_tag.Split('|');

            int optionID = Other.IntParse(id[1]);
            int unitID   = Other.IntParse(id[0]);

            Army.Data.Units[unitID].AddOption(optionID);
            Army.Data.Units[unitID].ThrowAwayIncompatibleOption();

            Reload.ReloadArmyData();
            Mod.SetArtefactAlreadyUsed(Other.IntParse(id[1]), false);
            UpdateUnitDescription(unitID, Army.Data.Units[unitID]);
        }