mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
contentpack removal feature + refactor
This commit is contained in:
parent
3f0c710a47
commit
daaba374a3
24 changed files with 345 additions and 295 deletions
|
|
@ -67,6 +67,13 @@ bool List::flag(size_t index) const {
|
|||
}
|
||||
}
|
||||
|
||||
Value* List::getValueWriteable(size_t index) const {
|
||||
if (index > values.size()) {
|
||||
throw std::runtime_error("index error");
|
||||
}
|
||||
return values.at(index).get();
|
||||
}
|
||||
|
||||
List& List::put(std::string value) {
|
||||
valvalue val;
|
||||
val.str = new std::string(value);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace dynamic {
|
|||
|
||||
std::string str(size_t index) const;
|
||||
double num(size_t index) const;
|
||||
int64_t integer(size_t num) const;
|
||||
int64_t integer(size_t index) const;
|
||||
Map* map(size_t index) const;
|
||||
List* list(size_t index) const;
|
||||
bool flag(size_t index) const;
|
||||
|
|
@ -64,6 +64,8 @@ namespace dynamic {
|
|||
List& put(List* value);
|
||||
List& put(bool value);
|
||||
|
||||
Value* getValueWriteable(size_t index) const;
|
||||
|
||||
List& putList();
|
||||
Map& putMap();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue