For example in Truck Lightbox template, user can export without selecting the truck. That causes the following issue...
ERROR LOG:
-----------------------------------------------------------------------------
Date : 02/06/2024 22:19:14
System.IO.DirectoryNotFoundException
Message : Could not find a part of the path 'C:\Mods Studio 2\Data\ModProjects\ETS2\Templates\TruckLightbox\vehicle\truck\upgrade\ms2\acc'.
StackTrace : at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
at ModsStudio2Library.Logic.Actions.CopyFile.Execute(Template template) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Library\Logic\Actions\CopyFile.cs:line 63
at ModsStudio2Library.Models.Template.Build(VariableList enviroment) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Library\Models\Template.cs:line 42
at ModsStudio2Library.Models.ScsMod.ScsProject.Build(VariableList enviromentVariables) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Library\Models\ScsMod\ScsProject.cs:line 107
at ModsStudio2Core.Logic.Build.BuildProjectFile(String inputPath, String outputPath, Boolean scsWorkshopUploader) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Core\Logic\Build.cs:line 76
at ModsStudio2Core.CLI.BuildOptionsHandler.ParseOptions(BuildOptions opts) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Core\CLI\BuildOptions.cs:line 53
at ModsStudio2Core.Program.<>c.<ProcessInput>b__3_2(BuildOptions opts) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Core\Program.cs:line 105
at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action)
at ModsStudio2Core.Program.ProcessInput(String[] args) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Core\Program.cs:line 96
at ModsStudio2Core.Program.Main(String[] args) in D:\a\ModsStudio2\ModsStudio2\ModsStudio2Core\Program.cs:line 77
To Reproduce
Steps to reproduce the behavior:
Start a new ETS2 project
Add Truck Lightbox template
Do NOT select any vehicles in the Truck tab
Fill in all other info
Try exporting the mod
Expected behavior
User expect exported mod
Screenshots
Desktop (please complete the following information):
Version 2024.01
Additional context
This might be affecting other templates as well.
Proposed solution
Adding a NotEmptyValidator to the truck variable. In this and other templates.
Updating the NotEmptyValidator so it can handle this scenario.
Describe the bug
For example in Truck Lightbox template, user can export without selecting the truck. That causes the following issue...
To Reproduce Steps to reproduce the behavior:
ETS2
projectTruck Lightbox
templateTruck
tabExpected behavior User expect exported mod
Screenshots
Desktop (please complete the following information):
Additional context This might be affecting other templates as well.
Proposed solution Adding a
NotEmptyValidator
to the truck variable. In this and other templates. Updating theNotEmptyValidator
so it can handle this scenario.