From d0330be51f701c33e9a853b5baad4a1d56d3687e Mon Sep 17 00:00:00 2001 From: Julien Date: Fri, 27 Dec 2024 20:42:58 +0100 Subject: [PATCH] Empty textures or models should not fail at UnpackModels --- GameRealisticMap.Arma3/Edit/SimpleWrpModGenerator.cs | 2 +- GameRealisticMap.Arma3/GameEngine/DependencyUnpacker.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GameRealisticMap.Arma3/Edit/SimpleWrpModGenerator.cs b/GameRealisticMap.Arma3/Edit/SimpleWrpModGenerator.cs index 40930bad..7c079ef4 100644 --- a/GameRealisticMap.Arma3/Edit/SimpleWrpModGenerator.cs +++ b/GameRealisticMap.Arma3/Edit/SimpleWrpModGenerator.cs @@ -40,7 +40,7 @@ private void UnpackModels(IProgressScope progress, List usedModels) { foreach (var model in usedModels) { - if (!projectDrive.EnsureLocalFileCopy(model)) + if (!projectDrive.EnsureLocalFileCopy(model) && !string.IsNullOrWhiteSpace(model)) { throw new ApplicationException($"File '{model}' is missing. Have you added all required mods in application configuration?"); } diff --git a/GameRealisticMap.Arma3/GameEngine/DependencyUnpacker.cs b/GameRealisticMap.Arma3/GameEngine/DependencyUnpacker.cs index 53539a4c..56b1867c 100644 --- a/GameRealisticMap.Arma3/GameEngine/DependencyUnpacker.cs +++ b/GameRealisticMap.Arma3/GameEngine/DependencyUnpacker.cs @@ -48,7 +48,7 @@ private void UnpackFiles(IProgressScope progress, IReadOnlyCollection fi using var report = progress.CreateInteger("UnpackFiles", files.Count); foreach (var model in files) { - if (!projectDrive.EnsureLocalFileCopy(model)) + if (!projectDrive.EnsureLocalFileCopy(model) && !string.IsNullOrWhiteSpace(model)) { throw new ApplicationException($"File '{model}' is missing. Have you added all required mods in application configuration?"); }