Open the unit card from the visible model (#153)
This commit is contained in:
@@ -80,6 +80,13 @@ pub struct Model {
|
||||
pub glow: bool,
|
||||
}
|
||||
|
||||
impl Model {
|
||||
/// Multipart models use the IDs immediately after their owning object.
|
||||
pub fn object_id(&self) -> u32 {
|
||||
self.id - self.id % PARTS
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Particle {
|
||||
pub kind: &'static str,
|
||||
pub at: DVec3,
|
||||
|
||||
Reference in New Issue
Block a user