diff --git a/EnvimixForTmuf/EnvimixForTmuf.csproj b/EnvimixForTmuf/EnvimixForTmuf.csproj index c7603b8..531dc1e 100644 --- a/EnvimixForTmuf/EnvimixForTmuf.csproj +++ b/EnvimixForTmuf/EnvimixForTmuf.csproj @@ -1,7 +1,7 @@ - + - 1.0.1 + 1.0.2 diff --git a/EnvimixForTmuf/EnvimixForTmufConfig.cs b/EnvimixForTmuf/EnvimixForTmufConfig.cs index ef7db3c..72197a3 100644 --- a/EnvimixForTmuf/EnvimixForTmufConfig.cs +++ b/EnvimixForTmuf/EnvimixForTmufConfig.cs @@ -13,4 +13,5 @@ public class EnvimixForTmufConfig : Config public bool IncludeCoastCar { get; set; } = true; public bool IncludeStadiumCar { get; set; } = true; public bool GenerateDefaultCarVariant { get; set; } + public ValidationMode ValidationMode { get; set; } = ValidationMode.Real; } \ No newline at end of file diff --git a/EnvimixForTmuf/EnvimixForTmufTool.cs b/EnvimixForTmuf/EnvimixForTmufTool.cs index 1cdcfb2..dc7f666 100644 --- a/EnvimixForTmuf/EnvimixForTmufTool.cs +++ b/EnvimixForTmuf/EnvimixForTmufTool.cs @@ -72,6 +72,28 @@ public IEnumerable> Produce() map.MapUid = $"{Convert.ToBase64String(Encoding.ASCII.GetBytes(Guid.NewGuid().ToString()))[..10]}{defaultMapUid.Substring(9, 10)}ENVIMIX"; map.MapName = string.Format(Config.MapNameFormat, defaultMapName, modernCar); + switch (Config.ValidationMode) + { + case ValidationMode.None: + break; + case ValidationMode.Fake: + map.TMObjective_AuthorTime = TimeInt32.MaxValue; + map.TMObjective_GoldTime = TimeInt32.MaxValue; + map.TMObjective_SilverTime = TimeInt32.MaxValue; + map.TMObjective_BronzeTime = TimeInt32.MaxValue; + break; + case ValidationMode.Real: + map.TMObjective_AuthorTime = new(-1); + map.TMObjective_GoldTime = new(-1); + map.TMObjective_SilverTime = new(-1); + map.TMObjective_BronzeTime = new(-1); + break; + default: + throw new ArgumentOutOfRangeException(); + } + + map.CrackPassword(); + var pureFileName = $"{TextFormatter.Deformat(map.MapName)}.Challenge.Gbx"; var validFileName = string.Join("_", pureFileName.Split(Path.GetInvalidFileNameChars())); diff --git a/EnvimixForTmuf/ValidationMode.cs b/EnvimixForTmuf/ValidationMode.cs new file mode 100644 index 0000000..d3ac8a7 --- /dev/null +++ b/EnvimixForTmuf/ValidationMode.cs @@ -0,0 +1,8 @@ +namespace EnvimixForTmuf; + +public enum ValidationMode +{ + None, + Fake, + Real +} \ No newline at end of file diff --git a/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj b/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj index 32f1cb5..134620e 100644 --- a/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj +++ b/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj @@ -1,7 +1,7 @@ - 1.0.1 + 1.0.2