Minor cleanup
parent
fa992d3fb5
commit
fef4e5ed23
|
@ -31,67 +31,37 @@ impl PartialEq for TextureHandle {
|
|||
}
|
||||
|
||||
/// A lightweight representation of an outfit
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct OutfitHandle {
|
||||
/// TODO
|
||||
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
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct GunHandle {
|
||||
/// TODO
|
||||
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
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct ShipHandle {
|
||||
/// TODO
|
||||
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
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct SystemHandle {
|
||||
/// TODO
|
||||
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
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct FactionHandle {
|
||||
/// The index of this faction in content.factions
|
||||
/// TODO: pub in crate, currently for debug (same with all other handles)
|
||||
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