Minor cleanup

master
Mark 2024-01-01 15:53:00 -08:00
parent fa992d3fb5
commit fef4e5ed23
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
1 changed files with 5 additions and 35 deletions

View File

@ -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)
}
}