~starkingdoms/starkingdoms

ref: aa2aadee626d8d90bc9fb67699cda2a588a6a992 starkingdoms/server/src/crafting/components.rs -rw-r--r-- 466 bytes
aa2aadee — core switch to matricies for sprite positioning 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use std::collections::HashMap;

use bevy::prelude::Component;

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum MaterialType {
    Silicon,   // Mercury
    Sulfur,    // Venus
    Iron,      // Mars
    Hydrogen,  // Jupiter
    Helium,    // Saturn
    Rubber,    // Uranus
    Composite, // Neptune
    Ice,       // Pluto
}

#[derive(Component, Debug, Clone)]
pub struct MaterialStorage {
    pub materials: HashMap<MaterialType, u32>,
    pub capacity: u32,
}