use serde::{Deserialize, Serialize};
use crate::data::stars::StarKey;
use crate::data::types::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Star {
pub key: StarKey,
pub name: String,
pub star_type: StarType,
pub scope: Scope,
pub brightness: Option<Brightness>,
pub mutagen: Option<Mutagen>,
}
impl Star {
pub fn with_mutagen(&self, mutagens: &[Mutagen]) -> bool {
self.mutagen.is_some_and(|m| mutagens.contains(&m))
}
pub fn with_brightness(&self, brightness: &[Brightness]) -> bool {
self.brightness.is_some_and(|b| brightness.contains(&b))
}
}