From 9d7786c089b10dfea97b597d9834e1b1a232a12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Pivo=C5=88ka?= Date: Wed, 22 Nov 2023 00:13:48 +0100 Subject: [PATCH 1/5] Remove password from maps --- EnvimixForTmuf/EnvimixForTmufTool.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EnvimixForTmuf/EnvimixForTmufTool.cs b/EnvimixForTmuf/EnvimixForTmufTool.cs index 1cdcfb2..0f7fc86 100644 --- a/EnvimixForTmuf/EnvimixForTmufTool.cs +++ b/EnvimixForTmuf/EnvimixForTmufTool.cs @@ -72,6 +72,8 @@ 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); + map.CrackPassword(); + var pureFileName = $"{TextFormatter.Deformat(map.MapName)}.Challenge.Gbx"; var validFileName = string.Join("_", pureFileName.Split(Path.GetInvalidFileNameChars())); From 42526ff82bfa496dcf7765ed1dc5832bcb2f5424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Pivo=C5=88ka?= Date: Wed, 22 Nov 2023 00:14:54 +0100 Subject: [PATCH 2/5] Add validation mode --- EnvimixForTmuf/EnvimixForTmufConfig.cs | 1 + EnvimixForTmuf/EnvimixForTmufTool.cs | 20 ++++++++++++++++++++ EnvimixForTmuf/ValidationMode.cs | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 EnvimixForTmuf/ValidationMode.cs 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 0f7fc86..dc7f666 100644 --- a/EnvimixForTmuf/EnvimixForTmufTool.cs +++ b/EnvimixForTmuf/EnvimixForTmufTool.cs @@ -72,6 +72,26 @@ 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"; 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 From 2d9d51fb7c3a65638bd6e81f34715b040fda4b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Pivo=C5=88ka?= Date: Wed, 22 Nov 2023 00:16:44 +0100 Subject: [PATCH 3/5] Update to 1.0.2 --- EnvimixForTmuf/EnvimixForTmuf.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EnvimixForTmuf/EnvimixForTmuf.csproj b/EnvimixForTmuf/EnvimixForTmuf.csproj index c5c23bb..53a9d1d 100644 --- a/EnvimixForTmuf/EnvimixForTmuf.csproj +++ b/EnvimixForTmuf/EnvimixForTmuf.csproj @@ -1,4 +1,8 @@ + + + 1.0.2 + net7.0 From bfe85a1afa202fee5bdc27c8e59144a387deec2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Pivo=C5=88ka?= Date: Wed, 22 Nov 2023 00:17:33 +0100 Subject: [PATCH 4/5] Fix version --- EnvimixForTmuf/EnvimixForTmuf.csproj | 2 +- EnvimixForTmufCLI/EnvimixForTmufCLI.csproj | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/EnvimixForTmuf/EnvimixForTmuf.csproj b/EnvimixForTmuf/EnvimixForTmuf.csproj index 53a9d1d..531dc1e 100644 --- a/EnvimixForTmuf/EnvimixForTmuf.csproj +++ b/EnvimixForTmuf/EnvimixForTmuf.csproj @@ -1,7 +1,7 @@ - 1.0.2 + 1.0.2 diff --git a/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj b/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj index 39ebb52..b5dce46 100644 --- a/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj +++ b/EnvimixForTmufCLI/EnvimixForTmufCLI.csproj @@ -1,5 +1,9 @@ + + 1.0.2 + + Exe net7.0 From 86d8073158a8250d92e15c52910dfbe09a89ec4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Pivo=C5=88ka?= Date: Wed, 22 Nov 2023 00:22:31 +0100 Subject: [PATCH 5/5] Remove old version --- EnvimixForTmuf/EnvimixForTmuf.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/EnvimixForTmuf/EnvimixForTmuf.csproj b/EnvimixForTmuf/EnvimixForTmuf.csproj index a04561f..531dc1e 100644 --- a/EnvimixForTmuf/EnvimixForTmuf.csproj +++ b/EnvimixForTmuf/EnvimixForTmuf.csproj @@ -4,10 +4,6 @@ 1.0.2 - - 1.0.1 - - net7.0 enable