add block.reload_script, item.reload_script

This commit is contained in:
MihailRis
2025-03-13 22:05:53 +03:00
parent 1bb25e99c6
commit 4400f7fbfb
7 changed files with 77 additions and 19 deletions
+8
View File
@@ -121,6 +121,14 @@ public:
return *found->second;
}
T& require(const std::string& id) {
const auto& found = defs.find(id);
if (found == defs.end()) {
throw std::runtime_error("missing content unit " + id);
}
return *found->second;
}
const auto& getDefs() const {
return defs;
}