From c2dad69c8a9898524caa055b25bc4a762062af2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Pivo=C5=88ka?= Date: Thu, 13 Jul 2023 17:36:26 +0200 Subject: [PATCH] Change MapUid --- EnvimixForTmuf/EnvimixForTmufTool.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EnvimixForTmuf/EnvimixForTmufTool.cs b/EnvimixForTmuf/EnvimixForTmufTool.cs index 286577b..1cdcfb2 100644 --- a/EnvimixForTmuf/EnvimixForTmufTool.cs +++ b/EnvimixForTmuf/EnvimixForTmufTool.cs @@ -1,5 +1,6 @@ using GBX.NET.Engines.Game; using GbxToolAPI; +using System.Text; using TmEssentials; namespace EnvimixForTmuf; @@ -35,6 +36,7 @@ public IEnumerable> Produce() }; var prevPlayerModel = map.PlayerModel; + var defaultMapUid = map.MapUid; var defaultMapName = map.MapName; for (int i = 0; i < cars.Length; i++) @@ -67,6 +69,7 @@ public IEnumerable> Produce() }; map.PlayerModel = (car, "Vehicles", ""); + map.MapUid = $"{Convert.ToBase64String(Encoding.ASCII.GetBytes(Guid.NewGuid().ToString()))[..10]}{defaultMapUid.Substring(9, 10)}ENVIMIX"; map.MapName = string.Format(Config.MapNameFormat, defaultMapName, modernCar); var pureFileName = $"{TextFormatter.Deformat(map.MapName)}.Challenge.Gbx";