2020-07-10 17:49:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-07-25 14:29:05 +00:00
|
|
|
#include <map>
|
|
|
|
|
2020-07-10 17:49:16 +00:00
|
|
|
struct Voxel {
|
|
|
|
unsigned char Density;
|
|
|
|
unsigned short Material;
|
2020-07-25 14:29:05 +00:00
|
|
|
};
|
|
|
|
struct Item {
|
|
|
|
unsigned long long Count;
|
|
|
|
unsigned short Material;
|
|
|
|
};
|
|
|
|
struct ItemList: std::map<unsigned short, unsigned long long> {
|
|
|
|
void add(const std::optional<Item>& item) {
|
|
|
|
if(item) {
|
|
|
|
(*this)[item.value().Material] += item.value().Count;
|
|
|
|
}
|
|
|
|
}
|
2020-07-10 17:49:16 +00:00
|
|
|
};
|