Browse Source

remove comments and don't be canadian

pbs
andy 4 years ago
parent
commit
e256423dfa
  1. 8
      src/bin/main.rs
  2. 6
      src/entity/item/unit.rs
  3. 4
      src/ship/drops/generic_unit.rs
  4. 2
      src/ship/drops/rare_drop_table.rs
  5. 6
      src/ship/items/manager.rs
  6. 2
      src/ship/shops/armor.rs

8
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 {

6
src/entity/item/unit.rs

@ -335,7 +335,7 @@ pub enum UnitModifier {
pub struct Unit {
pub unit: UnitType,
pub modifier: Option<UnitModifier>,
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 {

4
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,
})));
}
}

2
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) => {

6
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{

2
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,
})
},
}

Loading…
Cancel
Save