Merge branch 'main' into blocks-metadata
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "constants.hpp"
|
||||
#include "data/dynamic.hpp"
|
||||
#include "data/dv.hpp"
|
||||
#include "typedefs.hpp"
|
||||
#include "Content.hpp"
|
||||
#include "files/world_regions_fwd.hpp"
|
||||
@@ -64,10 +64,10 @@ public:
|
||||
names.emplace_back("");
|
||||
}
|
||||
}
|
||||
void setup(dynamic::List* list, const ContentUnitDefs<U>& defs) {
|
||||
if (list) {
|
||||
for (size_t i = 0; i < list->size(); i++) {
|
||||
std::string name = list->str(i);
|
||||
void setup(const dv::value& list, const ContentUnitDefs<U>& defs) {
|
||||
if (list != nullptr) {
|
||||
for (size_t i = 0; i < list.size(); i++) {
|
||||
const std::string& name = list[i].asString();
|
||||
if (auto def = defs.find(name)) {
|
||||
set(i, name, def->rt.id);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user