~starkingdoms/starkingdoms

ref: 587a01e5174fdce92fac6fb938538790d6edf3dc starkingdoms/server/src/crafting/components.rs -rw-r--r-- 443 bytes
587a01e5 — ghostly_zsh all planets, module attachment broke 1 year, 2 days 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,
}