Mercurial > repos > IBBoard.WarFoundry.API
changeset 305:92d10b06ab0f
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
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 26 Jan 2011 20:27:50 +0000 |
parents | 1e82cac3716d |
children | 886d28c1b6e5 |
files | api/Objects/AbstractUnitEquipmentItemSelection.cs api/Objects/Army.cs api/Objects/ArmyCategory.cs api/Objects/Category.cs api/Objects/Race.cs api/Objects/Unit.cs api/Objects/UnitEquipmentItem.cs api/Objects/UnitEquipmentNumericSelection.cs api/Objects/UnitEquipmentRatioSelection.cs api/Objects/UnitType.cs app.config |
diffstat | 11 files changed, 3 insertions(+), 189 deletions(-) [+] |
line wrap: on
line diff
--- 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(); } }
--- 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 {
--- 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; }
--- 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 "";
--- 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<string, Ability> newAbilities) - { - foreach (Ability ability in newAbilities.Values) - { - AddAbility(ability); - } - } - public Ability GetAbility(string id) { EnsureFullyLoaded();
--- 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<UnitEquipmentItem> 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; }
--- 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; }
--- 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(); } } }
--- 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; } - } }
--- 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"); } - - /// <value> - /// The first of the <see cref="Stat"/>s lines for the unit. - /// </value> - [Obsolete("Use UnitStatsArrays instead")] - public Stat[] UnitStatsArray - { - get - { - return UnitStatsArrays[0]; - } - } - - //// <value> - /// The first ot the <see cref="Stat"/>s lines for the unit including an additional column that contains the unit type name - /// </value> - [Obsolete("Use UnitStatsArrays instead")] - public Stat[] UnitStatsArrayWithName - { - get - { - return UnitStatsArraysWithName[0]; - } - } /// <value> /// The array of <see cref="Stat"/>s for each of the unit's stat lines