浏览代码

Initialize mod scope of loaded rmg template in template editor

Ivan Savenko 3 月之前
父节点
当前提交
a5c6cfe922
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      mapeditor/helper.cpp

+ 2 - 0
mapeditor/helper.cpp

@@ -84,6 +84,8 @@ std::map<std::string, std::shared_ptr<CRmgTemplate>> Helper::openTemplateInterna
 	auto data = CResourceHandler::get()->load(resId)->readAll();
 	JsonNode nodes(reinterpret_cast<std::byte *>(data.first.get()), data.second, resId.getName());
 
+	nodes.setModScope(ModScope::scopeGame());
+
 	std::map<std::string, std::shared_ptr<CRmgTemplate>> templates;
 	for(auto & node : nodes.Struct())
 	{