From e256423dfa63da0e14e901173ac82cd5a1160c9a Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 23 Oct 2020 23:12:11 -0300 Subject: [PATCH] remove comments and don't be canadian --- src/bin/main.rs | 8 ++++---- src/entity/item/unit.rs | 6 +++--- src/ship/drops/generic_unit.rs | 4 ++-- src/ship/drops/rare_drop_table.rs | 2 +- src/ship/items/manager.rs | 6 +++--- src/ship/shops/armor.rs | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index 4d8bed7..9146fa2 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -234,7 +234,7 @@ fn main() { item::unit::Unit { unit: item::unit::UnitType::PriestMind, modifier: Some(item::unit::UnitModifier::Minus), - armour_slot: 0, + armor_slot: 0, } ), location: ItemLocation::Inventory { @@ -250,7 +250,7 @@ fn main() { item::unit::Unit { unit: item::unit::UnitType::PriestMind, modifier: Some(item::unit::UnitModifier::Minus), - armour_slot: 1, + armor_slot: 1, } ), location: ItemLocation::Inventory { @@ -266,7 +266,7 @@ fn main() { item::unit::Unit { unit: item::unit::UnitType::PriestMind, modifier: Some(item::unit::UnitModifier::Minus), - armour_slot: 2, + armor_slot: 2, } ), location: ItemLocation::Inventory { @@ -282,7 +282,7 @@ fn main() { item::unit::Unit { unit: item::unit::UnitType::PriestMind, modifier: Some(item::unit::UnitModifier::Minus), - armour_slot: 3, + armor_slot: 3, } ), location: ItemLocation::Inventory { diff --git a/src/entity/item/unit.rs b/src/entity/item/unit.rs index 716454e..477c422 100644 --- a/src/entity/item/unit.rs +++ b/src/entity/item/unit.rs @@ -335,7 +335,7 @@ pub enum UnitModifier { pub struct Unit { pub unit: UnitType, pub modifier: Option, - pub armour_slot: u8, // 0 - 3 = armour slot 1 - 4 + pub armor_slot: u8, } @@ -362,7 +362,7 @@ impl Unit { }, } } - result[4] = self.armour_slot; + result[4] = self.armor_slot; result } @@ -380,7 +380,7 @@ impl Unit { Ok(Unit{ unit: u.unwrap(), modifier: m, - armour_slot: data[4], + armor_slot: data[4], }) } else { diff --git a/src/ship/drops/generic_unit.rs b/src/ship/drops/generic_unit.rs index e071d8d..9ba7e65 100644 --- a/src/ship/drops/generic_unit.rs +++ b/src/ship/drops/generic_unit.rs @@ -89,7 +89,7 @@ impl GenericUnitTable { ItemDropType::Unit(Unit { unit: unit_type, modifier: unit_modifier, - armour_slot: 0, + armor_slot: 0, }) }) } @@ -117,7 +117,7 @@ mod test { assert!(gut.get_drop(&area, &mut rng) == Some(ItemDropType::Unit(Unit { unit: unit, modifier: umod, - armour_slot: 0, + armor_slot: 0, }))); } } diff --git a/src/ship/drops/rare_drop_table.rs b/src/ship/drops/rare_drop_table.rs index a464bdf..1056f99 100644 --- a/src/ship/drops/rare_drop_table.rs +++ b/src/ship/drops/rare_drop_table.rs @@ -128,7 +128,7 @@ impl RareDropTable { ItemDropType::Unit(Unit { unit: unit, modifier: None, - armour_slot: 0, + armor_slot: 0, }) }, RareDropItem::Tool(tool) => { diff --git a/src/ship/items/manager.rs b/src/ship/items/manager.rs index e5e095d..9ee674d 100644 --- a/src/ship/items/manager.rs +++ b/src/ship/items/manager.rs @@ -912,13 +912,13 @@ impl ItemManager { inventory_item.item = ItemDetail::Unit(unit::Unit { unit: u.unit, modifier: u.modifier, - armour_slot: ((equip_slot & 0x7) - 1) % 4, + armor_slot: ((equip_slot & 0x7) - 1) % 4, }); } else { inventory_item.item = ItemDetail::Unit(unit::Unit { unit: u.unit, modifier: u.modifier, - armour_slot: 0, + armor_slot: 0, }); } }; @@ -953,7 +953,7 @@ impl ItemManager { inventory_item.item = ItemDetail::Unit(unit::Unit { unit: u.unit, modifier: u.modifier, - armour_slot: 0, + armor_slot: 0, }); }; entity_gateway.change_item_location(&inventory_item.entity_id, ItemLocation::Inventory{ diff --git a/src/ship/shops/armor.rs b/src/ship/shops/armor.rs index 3ac3fab..17869d9 100644 --- a/src/ship/shops/armor.rs +++ b/src/ship/shops/armor.rs @@ -89,7 +89,7 @@ impl ShopItem for ArmorShopItem { ItemDetail::Unit(Unit { unit: *unit, modifier: None, - armour_slot: 0, + armor_slot: 0, }) }, }