content-pack specific variables PACK_ENV and PACK_ID

This commit is contained in:
MihailRis
2024-02-12 03:22:08 +03:00
parent 49fe2108d3
commit 617017d979
5 changed files with 19 additions and 3 deletions
+1 -1
View File
@@ -274,7 +274,7 @@ void ContentLoader::loadItem(ItemDef& def, std::string full, std::string name) {
void ContentLoader::load(ContentBuilder& builder) {
std::cout << "-- loading pack [" << pack->id << "]" << std::endl;
auto runtime = new ContentPackRuntime(*pack, scripting::create_environment());
auto runtime = new ContentPackRuntime(*pack, scripting::create_pack_environment(*pack));
builder.add(runtime);
env = runtime->getEnvironment()->getId();