~starkingdoms/starkingdoms

ref: efb107d0e34ca6c555672d3ce690b4bc6a2b52c0 starkingdoms/crates/server/src/crafting/components.rs -rw-r--r-- 466 bytes
efb107d0 — ghostly_zsh merge rust-rendering-2 to master 8 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,
}