ashscript_types/
chunk.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use hashbrown::HashMap;

use crate::unit::Unit;

pub type Chunks = HashMap<ChunkId, Chunk>;

pub type ChunkId = u32;

#[derive(Default)]
pub struct Chunk {
    pub id: ChunkId,
    pub units: HashMap<u32, Unit>,
}

impl Chunk {
    pub fn new() -> Self {
        Self {
            ..Default::default()
        }
    }
}