1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use derive_new::new;
use getset::Getters;
use legion::Entity;
use smallvec::SmallVec;
use crate::def::building::storage::population as storage;
use crate::SetupEcs;
#[derive(Debug, Getters)]
pub struct StorageList {
#[getset(get = "pub")]
storages: SmallVec<[Entity; 2]>,
}
#[derive(Getters, new)]
pub struct Storage {
#[getset(get = "pub")]
capacity: u32,
}
codegen::component_depends! {
Storage = (
Storage,
) + ?()
}
#[derive(new, getset::CopyGetters)]
pub struct Housing {
#[getset(get_copy = "pub")]
storage: storage::Id,
}
pub fn setup_ecs(setup: SetupEcs) -> SetupEcs { setup }