# HG changeset patch # User IBBoard # Date 1296073670 0 # Node ID 92d10b06ab0fec73f6a72e742e44cb7bd086274d # Parent 1e82cac3716d093e4d636fb948db0358417b4621 Fixes #62: Delete obsolete methods * All obsolete methods deleted. No other changes required - usage had already been phased out. Also: * Add app.config to appease VS.Net diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/AbstractUnitEquipmentItemSelection.cs --- a/api/Objects/AbstractUnitEquipmentItemSelection.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/AbstractUnitEquipmentItemSelection.cs Wed Jan 26 20:27:50 2011 +0000 @@ -88,8 +88,5 @@ { get; } - - [Obsolete("Implementation is down to the UI")] - public abstract string GetEquipmentAmountString(); } } diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/Army.cs --- a/api/Objects/Army.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/Army.cs Wed Jan 26 20:27:50 2011 +0000 @@ -155,12 +155,6 @@ } } } - - [Obsolete("Use Points instead")] - public double PointsTotal - { - get { return TotalPoints; } - } public double Points { diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/ArmyCategory.cs --- a/api/Objects/ArmyCategory.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/ArmyCategory.cs Wed Jan 26 20:27:50 2011 +0000 @@ -113,12 +113,6 @@ } } - [Obsolete("Use Points instead")] - public double PointsTotal - { - get { return TotalPoints; } - } - public double Points { get { return TotalPoints; } diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/Category.cs --- a/api/Objects/Category.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/Category.cs Wed Jan 26 20:27:50 2011 +0000 @@ -23,15 +23,6 @@ { } - [Obsolete("Use the two argument constructor and the appropriate 'set' methods")] - public Category(string id, string name, int minPoints, int maxPoints, int minPercent, int maxPercent, int minChoices, int maxChoices, int baseValue, int incrementValue, int incrementAmount) : base(id, name) - { - MinimumPoints = minPoints; - MaximumPoints = maxPoints; - MinimumPercentage = minPercent; - MaximumPercentage = maxPercent; - } - protected override string DefaultName() { return ""; diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/Race.cs --- a/api/Objects/Race.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/Race.cs Wed Jan 26 20:27:50 2011 +0000 @@ -234,15 +234,6 @@ abilities.Add(newAbility.ID, newAbility); } - [Obsolete("Use AddAbility method instead")] - public void SetAbilities(Dictionary newAbilities) - { - foreach (Ability ability in newAbilities.Values) - { - AddAbility(ability); - } - } - public Ability GetAbility(string id) { EnsureFullyLoaded(); diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/Unit.cs --- a/api/Objects/Unit.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/Unit.cs Wed Jan 26 20:27:50 2011 +0000 @@ -176,12 +176,6 @@ set { cat = value; } } - [Obsolete("Use Points instead")] - public double PointsValue - { - get { return Points; } - } - public double Points { get @@ -239,12 +233,6 @@ } } - [Obsolete("Use UnitEquipmentUtil.GetAllowedEquipmentItems(Unit) instead")] - public UnitEquipmentItem[] GetAllowedAdditionalEquipment() - { - return UnitEquipmentUtil.GetAllowedEquipmentItems(this); - } - public UnitEquipmentItem[] GetEquipment() { return DictionaryUtils.ToKeyArray(equipment); @@ -270,42 +258,6 @@ return DictionaryUtils.GetValue(equipment, item); } - [Obsolete("Use UnitEquipmentUtil method instead")] - public double GetEquipmentAmount(UnitEquipmentItem item) - { - return UnitEquipmentUtil.GetEquipmentAmount(this, item); - } - - [Obsolete("Use UnitEquipmentUtil method instead")] - public double GetEquipmentAmount(string equipID) - { - return GetEquipmentAmount(UnitType.GetEquipmentItem(equipID)); - } - - [Obsolete("Use UnitEquipmentUtil method instead")] - public bool GetEquipmentAmountIsRatio(UnitEquipmentItem item) - { - return UnitEquipmentUtil.GetEquipmentAmountIsRatio(this, item); - } - - [Obsolete("Use UnitEquipmentUtil method instead")] - public bool GetEquipmentAmountIsRatio(string itemID) - { - return GetEquipmentAmountIsRatio(UnitType.GetEquipmentItem(itemID)); - } - - [Obsolete("Implementation is down to the UI")] - public string GetEquipmentAmountString(string equipID) - { - return ""; - } - - [Obsolete("Implementation is down to the UI")] - public string GetEquipmentAmountString(UnitEquipmentItem item) - { - return ""; - } - public void SetEquipmentAmount(UnitEquipmentItem equip, int amount) { if (amount < 1 && amount != WarFoundryCore.INFINITY) @@ -451,12 +403,6 @@ return canEquip; } - [Obsolete("Use UnitEquipmentUtil.GetBlockingEquipmentItems(Unit, UnitEquipmentItem) instead")] - public List GetBlockingEquipmentItems(UnitEquipmentItem item) - { - return UnitEquipmentUtil.GetBlockingEquipmentItems(this, item); - } - public bool CanEquipWithItem(string equipID) { return CanEquipWithItem(UnitType.GetEquipmentItem(equipID)); @@ -486,23 +432,11 @@ } } - [Obsolete("Use UnitStatsArrays instead")] - public Stat[] UnitStatsArray - { - get { return UnitType.UnitStatsArray; } - } - public Stat[][] UnitStatsArrays { get { return UnitType.UnitStatsArrays; } } - [Obsolete("Use UnitStatsArraysWithName instead")] - public Stat[] UnitStatsArrayWithName - { - get { return UnitType.UnitStatsArrayWithName; } - } - public Stat[][] UnitStatsArraysWithName { get { return UnitType.UnitStatsArraysWithName; } diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/UnitEquipmentItem.cs --- a/api/Objects/UnitEquipmentItem.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/UnitEquipmentItem.cs Wed Jan 26 20:27:50 2011 +0000 @@ -112,12 +112,6 @@ set { roundUp = value; } } - [Obsolete("Use MutexGroups instead for greater flexibility")] - public string MutexGroup - { - get { return (mutexGroups.Length == 0 ? "" : mutexGroups[0]); } - } - public String[] MutexGroups { get { return (string[]) mutexGroups.Clone(); } @@ -239,12 +233,6 @@ return EquipmentItem.CanBeUsedWithItem(item); } - [Obsolete("Use UnitEquipmentUtil method instead")] - public bool IsMutuallyExclusive(UnitEquipmentItem item) - { - return UnitEquipmentUtil.ItemsAreMutuallyExclusive(this, item); - } - public string SlotName { get { return slotName; } diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/UnitEquipmentNumericSelection.cs --- a/api/Objects/UnitEquipmentNumericSelection.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/UnitEquipmentNumericSelection.cs Wed Jan 26 20:27:50 2011 +0000 @@ -35,18 +35,6 @@ protected override bool IsValidValue (double newValue) { return base.IsValidValue(newValue) && IsWholeNumber(newValue); - } - - [Obsolete("Implementation is down to the UI")] - public override string GetEquipmentAmountString () - { - return GetEquipmentAmountString(AmountTaken); - } - - [Obsolete("Implementation is down to the UI")] - public static string GetEquipmentAmountString(double amount) - { - return amount.ToString(); } } } diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/UnitEquipmentRatioSelection.cs --- a/api/Objects/UnitEquipmentRatioSelection.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/UnitEquipmentRatioSelection.cs Wed Jan 26 20:27:50 2011 +0000 @@ -38,30 +38,6 @@ int maxTaken = UnitEquipmentUtil.GetMaxEquipmentCount (unit, item); int minTaken = UnitEquipmentUtil.GetMinEquipmentCount (unit, item); return Math.Min (Math.Max (wholeNumberTaken, minTaken), maxTaken); - } - - [Obsolete("Implementation is down to the UI")] - public override string GetEquipmentAmountString () - { - return GetEquipmentAmountString(AmountTaken); - } - - [Obsolete("Implementation is down to the UI")] - public static string GetEquipmentAmountString(double amount) - { - string amountString; - - if (amount == 100) - { - amountString = "all"; - } - else - { - amountString = amount + "%"; - } - - return amountString; } - } } diff -r 1e82cac3716d -r 92d10b06ab0f api/Objects/UnitType.cs --- a/api/Objects/UnitType.cs Wed Jan 26 20:24:10 2011 +0000 +++ b/api/Objects/UnitType.cs Wed Jan 26 20:27:50 2011 +0000 @@ -42,24 +42,6 @@ race = parentRace; } - [Obsolete("Use three parameter constructor and setters")] - public UnitType(string id, string typeName, string mainCategoryID, string[] allCategoryIDs, int minNum, int maxNum, int minimumSize, int maximumSize, double unitCost, double trooperCost, Stats unitStats, UnitRequirement[] unitRequirements, Race parentRace) : this (id, typeName, parentRace) - { - mainCat = race.GetCategory(mainCategoryID); - MinNumber = minNum; - MaxNumber = maxNum; - MinSize = minimumSize; - MaxSize = maximumSize; - BaseUnitCost = unitCost; - CostPerTrooper = trooperCost; - SetUnitStats(unitStats); - - foreach (UnitRequirement requirement in requirements) - { - AddRequirement(requirement); - } - } - public GameSystem GameSystem { get { return Race.GameSystem; } @@ -226,30 +208,6 @@ { throw new InvalidOperationException("Unit type with id "+id+" did not have a name specified"); } - - /// - /// The first of the s lines for the unit. - /// - [Obsolete("Use UnitStatsArrays instead")] - public Stat[] UnitStatsArray - { - get - { - return UnitStatsArrays[0]; - } - } - - //// - /// The first ot the s lines for the unit including an additional column that contains the unit type name - /// - [Obsolete("Use UnitStatsArrays instead")] - public Stat[] UnitStatsArrayWithName - { - get - { - return UnitStatsArraysWithName[0]; - } - } /// /// The array of s for each of the unit's stat lines diff -r 1e82cac3716d -r 92d10b06ab0f app.config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app.config Wed Jan 26 20:27:50 2011 +0000 @@ -0,0 +1,3 @@ + + +