mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-16 05:34:25 +01:00
Fix breaking on empty mod paths and add Url field
This commit is contained in:
parent
8cfc605ed3
commit
7409d0bc2f
3 changed files with 11 additions and 10 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Dalamud.Logging;
|
using Dalamud.Logging;
|
||||||
using OtterGui.Filesystem;
|
using OtterGui.Filesystem;
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public partial class TexToolsImporter
|
||||||
_currentModDirectory = Mod.CreateModFolder( _baseDirectory, _currentModName );
|
_currentModDirectory = Mod.CreateModFolder( _baseDirectory, _currentModName );
|
||||||
Mod.CreateMeta( _currentModDirectory, _currentModName, modList.Author, string.IsNullOrEmpty( modList.Description )
|
Mod.CreateMeta( _currentModDirectory, _currentModName, modList.Author, string.IsNullOrEmpty( modList.Description )
|
||||||
? "Mod imported from TexTools mod pack"
|
? "Mod imported from TexTools mod pack"
|
||||||
: modList.Description, null, null );
|
: modList.Description, modList.Version, modList.Url );
|
||||||
|
|
||||||
// Open the mod data file from the mod pack as a SqPackStream
|
// Open the mod data file from the mod pack as a SqPackStream
|
||||||
_streamDisposer = GetSqPackStreamStream( extractedModPack, "TTMPD.mpd" );
|
_streamDisposer = GetSqPackStreamStream( extractedModPack, "TTMPD.mpd" );
|
||||||
|
|
@ -135,7 +135,7 @@ public partial class TexToolsImporter
|
||||||
_currentModName = modList.Name;
|
_currentModName = modList.Name;
|
||||||
|
|
||||||
_currentModDirectory = Mod.CreateModFolder( _baseDirectory, _currentModName );
|
_currentModDirectory = Mod.CreateModFolder( _baseDirectory, _currentModName );
|
||||||
Mod.CreateMeta( _currentModDirectory, _currentModName, modList.Author, modList.Description, modList.Version, null );
|
Mod.CreateMeta( _currentModDirectory, _currentModName, modList.Author, modList.Description, modList.Version, modList.Url );
|
||||||
|
|
||||||
if( _currentNumOptions == 0 )
|
if( _currentNumOptions == 0 )
|
||||||
{
|
{
|
||||||
|
|
@ -226,10 +226,10 @@ public partial class TexToolsImporter
|
||||||
State = ImporterState.ExtractingModFiles;
|
State = ImporterState.ExtractingModFiles;
|
||||||
|
|
||||||
_currentFileIdx = 0;
|
_currentFileIdx = 0;
|
||||||
_currentNumFiles = mods.Count;
|
_currentNumFiles = mods.Count(m => m.FullPath.Length > 0);
|
||||||
|
|
||||||
// Extract each SimpleMod into the new mod folder
|
// Extract each SimpleMod into the new mod folder
|
||||||
foreach( var simpleMod in mods )
|
foreach( var simpleMod in mods.Where(m => m.FullPath.Length > 0 ) )
|
||||||
{
|
{
|
||||||
ExtractMod( outDirectory, simpleMod );
|
ExtractMod( outDirectory, simpleMod );
|
||||||
++_currentFileIdx;
|
++_currentFileIdx;
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ internal class ExtendedModPack
|
||||||
public string Author = DefaultTexToolsData.Author;
|
public string Author = DefaultTexToolsData.Author;
|
||||||
public string Version = string.Empty;
|
public string Version = string.Empty;
|
||||||
public string Description = DefaultTexToolsData.Description;
|
public string Description = DefaultTexToolsData.Description;
|
||||||
|
public string Url = string.Empty;
|
||||||
public ModPackPage[] ModPackPages = Array.Empty< ModPackPage >();
|
public ModPackPage[] ModPackPages = Array.Empty< ModPackPage >();
|
||||||
public SimpleMod[] SimpleModsList = Array.Empty< SimpleMod >();
|
public SimpleMod[] SimpleModsList = Array.Empty< SimpleMod >();
|
||||||
}
|
}
|
||||||
|
|
@ -65,10 +66,11 @@ internal class ExtendedModPack
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class SimpleModPack
|
internal class SimpleModPack
|
||||||
{
|
{
|
||||||
public string TtmpVersion = string.Empty;
|
public string TtmpVersion = string.Empty;
|
||||||
public string Name = DefaultTexToolsData.Name;
|
public string Name = DefaultTexToolsData.Name;
|
||||||
public string Author = DefaultTexToolsData.Author;
|
public string Author = DefaultTexToolsData.Author;
|
||||||
public string Version = string.Empty;
|
public string Version = string.Empty;
|
||||||
public string Description = DefaultTexToolsData.Description;
|
public string Description = DefaultTexToolsData.Description;
|
||||||
|
public string Url = string.Empty;
|
||||||
public SimpleMod[] SimpleModsList = Array.Empty< SimpleMod >();
|
public SimpleMod[] SimpleModsList = Array.Empty< SimpleMod >();
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue