Mercurial > repos > IBDev-IBBoard.WarFoundry.API
changeset 216:65553d2c8612
* Line-ending fix
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 22 Nov 2009 20:14:51 +0000 |
parents | 391446c9b250 |
children | 89e26d51afc2 |
files | api/Commands/AbstractSetUnitEquipmentAmountCommand.cs api/Exporters/WarFoundryHtmlExporter.cs api/Factories/Xml/WarFoundryXmlSaver.cs api/Objects/Unit.cs |
diffstat | 4 files changed, 30 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Commands/AbstractSetUnitEquipmentAmountCommand.cs Sun Nov 22 20:08:45 2009 +0000 +++ b/api/Commands/AbstractSetUnitEquipmentAmountCommand.cs Sun Nov 22 20:14:51 2009 +0000 @@ -5,7 +5,7 @@ using System; using IBBoard.Commands; using IBBoard.Lang; -using IBBoard.WarFoundry.API.Objects; +using IBBoard.WarFoundry.API.Objects; using IBBoard.WarFoundry.API.Util; namespace IBBoard.WarFoundry.API.Commands @@ -26,7 +26,7 @@ { this.unit = unit; equip = item; - oldAmount = UnitEquipmentUtil.GetEquipmentAmount(unit, equip); + oldAmount = UnitEquipmentUtil.GetEquipmentAmount(unit, equip); oldAmountWasRatio = UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, equip); }
--- a/api/Exporters/WarFoundryHtmlExporter.cs Sun Nov 22 20:08:45 2009 +0000 +++ b/api/Exporters/WarFoundryHtmlExporter.cs Sun Nov 22 20:14:51 2009 +0000 @@ -10,7 +10,7 @@ using System.Xml.Schema; using IBBoard.Lang; using IBBoard.Xml; -using IBBoard.WarFoundry.API.Objects; +using IBBoard.WarFoundry.API.Objects; using IBBoard.WarFoundry.API.Util; namespace IBBoard.WarFoundry.API.Exporters @@ -159,29 +159,29 @@ else { sb.Append(", "); - } - - string amountString; - double amount = UnitEquipmentUtil.GetEquipmentAmount(unit, equip); - - if (UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, equip)) - { - int number = UnitEquipmentUtil.GetEquipmentAmountTaken(unit, equip); - - if (amount == 100) - { - amountString = Translation.GetTranslation("armyHtmlExportEquipAmountAll", "all ({1})", amount, number); - } - else - { - amountString = Translation.GetTranslation("armyHtmlExportEquipAmountPercentage", "{0}% ({1})", amount, number); - } - } - else - { - amountString = amount.ToString(); - } - + } + + string amountString; + double amount = UnitEquipmentUtil.GetEquipmentAmount(unit, equip); + + if (UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, equip)) + { + int number = UnitEquipmentUtil.GetEquipmentAmountTaken(unit, equip); + + if (amount == 100) + { + amountString = Translation.GetTranslation("armyHtmlExportEquipAmountAll", "all ({1})", amount, number); + } + else + { + amountString = Translation.GetTranslation("armyHtmlExportEquipAmountPercentage", "{0}% ({1})", amount, number); + } + } + else + { + amountString = amount.ToString(); + } + sb.Append(Translation.GetTranslation("armyHtmlExportEquipAmountRatio", "{0} for {1}", equip.Name, amountString)); }
--- a/api/Factories/Xml/WarFoundryXmlSaver.cs Sun Nov 22 20:08:45 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlSaver.cs Sun Nov 22 20:14:51 2009 +0000 @@ -10,8 +10,8 @@ using IBBoard.Lang; using IBBoard.Xml; using IBBoard.WarFoundry.API.Factories.Xml.Zip; -using IBBoard.WarFoundry.API.Objects; -using IBBoard.WarFoundry.API.Savers; +using IBBoard.WarFoundry.API.Objects; +using IBBoard.WarFoundry.API.Savers; using IBBoard.WarFoundry.API.Util; using ICSharpCode.SharpZipLib.Zip; @@ -147,7 +147,7 @@ { XmlElement equipmentItemElem = doc.CreateElement("equipItem"); equipmentItemElem.SetAttribute("id", item.ID); - equipmentItemElem.SetAttribute("amount", UnitEquipmentUtil.GetEquipmentAmount(unit, item).ToString()); + equipmentItemElem.SetAttribute("amount", UnitEquipmentUtil.GetEquipmentAmount(unit, item).ToString()); equipmentItemElem.SetAttribute("amountType", UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, item) ? "ratio" : "fixed"); return equipmentItemElem; }