Minor cleanup
parent
fa992d3fb5
commit
fef4e5ed23
|
@ -31,67 +31,37 @@ impl PartialEq for TextureHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A lightweight representation of an outfit
|
/// A lightweight representation of an outfit
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct OutfitHandle {
|
pub struct OutfitHandle {
|
||||||
/// TODO
|
/// TODO
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for OutfitHandle {
|
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
|
||||||
self.index.hash(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A lightweight representation of a gun
|
/// A lightweight representation of a gun
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct GunHandle {
|
pub struct GunHandle {
|
||||||
/// TODO
|
/// TODO
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for GunHandle {
|
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
|
||||||
self.index.hash(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A lightweight representation of a ship
|
/// A lightweight representation of a ship
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct ShipHandle {
|
pub struct ShipHandle {
|
||||||
/// TODO
|
/// TODO
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for ShipHandle {
|
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
|
||||||
self.index.hash(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A lightweight representation of a star system
|
/// A lightweight representation of a star system
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct SystemHandle {
|
pub struct SystemHandle {
|
||||||
/// TODO
|
/// TODO
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for SystemHandle {
|
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
|
||||||
self.index.hash(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A lightweight representation of a faction
|
/// A lightweight representation of a faction
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct FactionHandle {
|
pub struct FactionHandle {
|
||||||
/// The index of this faction in content.factions
|
/// The index of this faction in content.factions
|
||||||
/// TODO: pub in crate, currently for debug (same with all other handles)
|
/// TODO: pub in crate, currently for debug (same with all other handles)
|
||||||
pub index: usize,
|
pub index: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Hash for FactionHandle {
|
|
||||||
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
|
||||||
self.index.hash(state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue