update item tpl generator to use MongoIDs (#441)

* update item tpl generator to use MongoIDs

* make generation readonly
This commit is contained in:
Cj
2025-07-03 10:43:44 -04:00
committed by GitHub
parent ebe8f9ded5
commit dab6fd5291
3 changed files with 4590 additions and 5424 deletions
+4 -2
View File
@@ -583,7 +583,8 @@ public class ItemTplGenerator(
)
{
var enumFileData =
"// This is an auto generated file, do not modify. Re-generate by running ItemTplGenerator.exe";
"using SPTarkov.Server.Core.Models.Common;\n\n"
+ "// This is an auto generated file, do not modify. Re-generate by running ItemTplGenerator.exe";
foreach (var (enumName, data) in enumEntries)
{
@@ -591,7 +592,8 @@ public class ItemTplGenerator(
foreach (var (key, value) in data)
{
enumFileData += $" public const string {key} = \"{value}\";\n";
enumFileData +=
$" public static readonly MongoId {key} = new MongoId(\"{value}\");\n";
}
enumFileData += "}\n";