Browse Source

Initialize mod scope of loaded rmg template in template editor

Ivan Savenko 3 months ago
parent
commit
a5c6cfe922
1 changed files with 2 additions and 0 deletions
  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())
 	{