mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-22 15:57:46 +01:00
Merge branch 'master' into Textures
# Conflicts: # Penumbra/Import/TexToolsImporter.Archives.cs # Penumbra/UI/Classes/ModEditWindow.Textures.cs
This commit is contained in:
commit
19e5e94c64
97 changed files with 861 additions and 651 deletions
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Logging;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
|
|
@ -134,7 +133,7 @@ public partial class ModEditWindow
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Could not parse {_fileType} file {_currentPath.File.FullName}:\n{e}" );
|
||||
Penumbra.Log.Error( $"Could not parse {_fileType} file {_currentPath.File.FullName}:\n{e}" );
|
||||
_currentFile = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Logging;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
|
|
@ -321,7 +320,7 @@ public partial class ModEditWindow
|
|||
var failedFiles = _editor!.ApplyFiles();
|
||||
if( failedFiles > 0 )
|
||||
{
|
||||
PluginLog.Information( $"Failed to apply {failedFiles} file redirections to {_editor.CurrentOption.FullName}." );
|
||||
Penumbra.Log.Information( $"Failed to apply {failedFiles} file redirections to {_editor.CurrentOption.FullName}." );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.IO;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface.ImGuiFileDialog;
|
||||
using Dalamud.Logging;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
|
|
@ -123,7 +122,7 @@ public partial class ModEditWindow
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Unknown Error while drawing textures:\n{e}" );
|
||||
Penumbra.Log.Error( $"Unknown Error while drawing textures:\n{e}" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.ImGuiFileDialog;
|
||||
using Dalamud.Logging;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Filesystem;
|
||||
|
|
@ -14,7 +13,6 @@ using System.Collections.Concurrent;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Penumbra.Util;
|
||||
|
||||
namespace Penumbra.UI.Classes;
|
||||
|
||||
|
|
@ -100,7 +98,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Could not create directory for new Mod {_newModName}:\n{e}" );
|
||||
Penumbra.Log.Error( $"Could not create directory for new Mod {_newModName}:\n{e}" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +198,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
private void AddImportModButton( Vector2 size )
|
||||
{
|
||||
var button = ImGuiUtil.DrawDisabledButton( FontAwesomeIcon.FileImport.ToIconString(), size,
|
||||
"Import one or multiple mods from Tex Tools Mod Pack Files.", !Penumbra.ModManager.Valid, true );
|
||||
"Import one or multiple mods from Tex Tools Mod Pack Files or Penumbra Mod Pack Files.", !Penumbra.ModManager.Valid, true );
|
||||
ConfigWindow.OpenTutorial( ConfigWindow.BasicTutorialSteps.ModImport );
|
||||
if( !button )
|
||||
{
|
||||
|
|
@ -213,7 +211,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
_hasSetFolder = true;
|
||||
|
||||
_fileManager.OpenFileDialog( "Import Mod Pack",
|
||||
"Mod Packs{.ttmp,.ttmp2,.zip,.7z,.rar},TexTools Mod Packs{.ttmp,.ttmp2},Archives{.zip,.7z,.rar}", ( s, f ) =>
|
||||
"Mod Packs{.ttmp,.ttmp2,.pmp},TexTools Mod Packs{.ttmp,.ttmp2},Penumbra Mod Packs{.pmp},Archives{.zip,.7z,.rar}", ( s, f ) =>
|
||||
{
|
||||
if( s )
|
||||
{
|
||||
|
|
@ -273,13 +271,13 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Error cleaning up failed mod extraction of {file.FullName} to {dir.FullName}:\n{e}" );
|
||||
Penumbra.Log.Error( $"Error cleaning up failed mod extraction of {file.FullName} to {dir.FullName}:\n{e}" );
|
||||
}
|
||||
}
|
||||
|
||||
if( error is not OperationCanceledException )
|
||||
{
|
||||
PluginLog.Error( $"Error extracting {file.FullName}, mod skipped:\n{error}" );
|
||||
Penumbra.Log.Error( $"Error extracting {file.FullName}, mod skipped:\n{error}" );
|
||||
}
|
||||
}
|
||||
else if( dir != null )
|
||||
|
|
@ -445,7 +443,7 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Warning(
|
||||
Penumbra.Log.Warning(
|
||||
$"Could not move newly imported mod {mod.Name} to default import folder {Penumbra.Config.DefaultImportFolder}:\n{e}" );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using Lumina.Excel.GeneratedSheets;
|
||||
using OtterGui.Widgets;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
|
@ -9,23 +8,57 @@ public partial class ConfigWindow
|
|||
|
||||
public static Changelog CreateChangelog()
|
||||
{
|
||||
var ret = new Changelog( "Penumbra Changelog", () => Penumbra.Config.LastSeenVersion, version =>
|
||||
{
|
||||
Penumbra.Config.LastSeenVersion = version;
|
||||
Penumbra.Config.Save();
|
||||
} );
|
||||
var ret = new Changelog( "Penumbra Changelog", () => ( Penumbra.Config.LastSeenVersion, Penumbra.Config.ChangeLogDisplayType ),
|
||||
( version, type ) =>
|
||||
{
|
||||
Penumbra.Config.LastSeenVersion = version;
|
||||
Penumbra.Config.ChangeLogDisplayType = type;
|
||||
Penumbra.Config.Save();
|
||||
} );
|
||||
|
||||
Add5_7_0( ret );
|
||||
Add5_7_1( ret );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static void Add5_8_0( Changelog log )
|
||||
=> log.NextVersion( "Version 0.5.8.0" )
|
||||
.RegisterEntry( "Added choices what Change Logs are to be displayed. It is recommended to just keep showing all." )
|
||||
.RegisterEntry( "Fixed an issue with Actor 201 using Your Character collections in cutscenes." )
|
||||
.RegisterEntry( "Fixed issues with and improved mod option editing." )
|
||||
.RegisterEntry( "Backend optimizations." );
|
||||
|
||||
private static void Add5_7_1( Changelog log )
|
||||
=> log.NextVersion( "Version 0.5.7.1" )
|
||||
.RegisterEntry( "Fixed the Changelog window not considering UI Scale correctly." )
|
||||
.RegisterEntry( "Reworked Changelog display slightly." );
|
||||
|
||||
private static void Add5_7_0( Changelog log )
|
||||
=> log.NextVersion( "Version 0.5.7.0" )
|
||||
.RegisterEntry( "Added a Changelog!" )
|
||||
.RegisterEntry( "Files in the UI category will no longer be deduplicated for the moment." )
|
||||
.RegisterHighlight( "If you experience UI-related crashes, please re-import your UI mods.", 1 )
|
||||
.RegisterEntry( "This is a temporary fix against those not-yet fully understood crashes and may be reworked later.", 1 )
|
||||
.RegisterHighlight(
|
||||
"There is still a possibility of UI related mods crashing the game, we are still investigating - they behave very weirdly. If you continue to experience crashing, try disabling your UI mods.",
|
||||
1 )
|
||||
.RegisterEntry(
|
||||
"On import, Penumbra will now show files with extensions '.ttmp', '.ttmp2' and '.pmp'. You can still select showing generic archive files." )
|
||||
.RegisterEntry(
|
||||
"Penumbra Mod Pack ('.pmp') files are meant to be renames of any of the archive types that could already be imported that contain the necessary Penumbra meta files.",
|
||||
1 )
|
||||
.RegisterHighlight(
|
||||
"If you distribute any mod as an archive specifically for Penumbra, you should change its extension to '.pmp'. Supported base archive types are ZIP, 7-Zip and RAR.",
|
||||
1 )
|
||||
.RegisterEntry( "Penumbra will now save mod backups with the file extension '.pmp'. They still are regular ZIP files.", 1 )
|
||||
.RegisterEntry(
|
||||
"Existing backups in your current mod directory should be automatically renamed. If you manage multiple mod directories, you may need to migrate the other ones manually.",
|
||||
1 )
|
||||
.RegisterEntry( "Fixed assigned collections not working correctly on adventurer plates." )
|
||||
.RegisterEntry( "Fixed a wrongly displayed folder line in some circumstances." )
|
||||
.RegisterEntry( "Fixed crash after deleting mod options." )
|
||||
.RegisterEntry( "Fixed Inspect Window collections not working correctly." )
|
||||
.RegisterEntry( "Made identically named options selectable in mod configuration. Do not name your options identically." )
|
||||
.RegisterEntry( "Added some additional functionality for Mare Synchronos." );
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ using OtterGui;
|
|||
using OtterGui.Raii;
|
||||
using Penumbra.Collections;
|
||||
using Penumbra.UI.Classes;
|
||||
using Penumbra.Util;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ using ImGuiNET;
|
|||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using Penumbra.Collections;
|
||||
using Penumbra.Util;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ using OtterGui;
|
|||
using OtterGui.Raii;
|
||||
using Penumbra.GameData.ByteString;
|
||||
using Penumbra.Interop.Loader;
|
||||
using Penumbra.Interop.Resolver;
|
||||
using Penumbra.Interop.Structs;
|
||||
using CharacterUtility = Penumbra.Interop.CharacterUtility;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
|
|
@ -13,7 +12,6 @@ using Penumbra.GameData.ByteString;
|
|||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.Interop.Structs;
|
||||
using Penumbra.UI.Classes;
|
||||
using Penumbra.Util;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ using System.IO;
|
|||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Logging;
|
||||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
|
|
@ -51,7 +50,7 @@ public partial class ConfigWindow
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Warning( e.Message );
|
||||
Penumbra.Log.Warning( e.Message );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +477,7 @@ public partial class ConfigWindow
|
|||
EditOption( panel, group, groupIdx, optionIdx );
|
||||
}
|
||||
|
||||
DrawNewOption( panel._mod, groupIdx, panel._window._iconButtonSize );
|
||||
DrawNewOption( panel, groupIdx, panel._window._iconButtonSize );
|
||||
}
|
||||
|
||||
// Draw a line for a single option.
|
||||
|
|
@ -519,9 +518,14 @@ public partial class ConfigWindow
|
|||
}
|
||||
|
||||
// Draw the line to add a new option.
|
||||
private static void DrawNewOption( Mod mod, int groupIdx, Vector2 iconButtonSize )
|
||||
private static void DrawNewOption( ModPanel panel, int groupIdx, Vector2 iconButtonSize )
|
||||
{
|
||||
var mod = panel._mod;
|
||||
var group = mod.Groups[ groupIdx ];
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.Selectable( $"Option #{group.Count + 1}" );
|
||||
Target( panel, group, groupIdx, group.Count );
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth( -1 );
|
||||
var tmp = _newOptionNameIdx == groupIdx ? _newOptionName : string.Empty;
|
||||
|
|
@ -565,14 +569,13 @@ public partial class ConfigWindow
|
|||
|
||||
private static void Target( ModPanel panel, IModGroup group, int groupIdx, int optionIdx )
|
||||
{
|
||||
// TODO drag options to other groups without options.
|
||||
using var target = ImRaii.DragDropTarget();
|
||||
if( !target.Success || !ImGuiUtil.IsDropping( DragDropLabel ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( _dragDropGroupIdx >= 0 && _dragDropOptionIdx >= 0 )
|
||||
if( _dragDropGroupIdx >= 0 && _dragDropOptionIdx >= 0 )
|
||||
{
|
||||
if( _dragDropGroupIdx == groupIdx )
|
||||
{
|
||||
|
|
@ -581,15 +584,18 @@ public partial class ConfigWindow
|
|||
}
|
||||
else
|
||||
{
|
||||
// Move from one group to another by deleting, then adding the option.
|
||||
var sourceGroup = _dragDropGroupIdx;
|
||||
var sourceOption = _dragDropOptionIdx;
|
||||
var option = group[ _dragDropOptionIdx ];
|
||||
var priority = group.OptionPriority( _dragDropGroupIdx );
|
||||
// Move from one group to another by deleting, then adding, then moving the option.
|
||||
var sourceGroupIdx = _dragDropGroupIdx;
|
||||
var sourceOption = _dragDropOptionIdx;
|
||||
var sourceGroup = panel._mod.Groups[ sourceGroupIdx ];
|
||||
var currentCount = group.Count;
|
||||
var option = sourceGroup[sourceOption];
|
||||
var priority = sourceGroup.OptionPriority( _dragDropGroupIdx );
|
||||
panel._delayedActions.Enqueue( () =>
|
||||
{
|
||||
Penumbra.ModManager.DeleteOption( panel._mod, sourceGroup, sourceOption );
|
||||
Penumbra.ModManager.DeleteOption( panel._mod, sourceGroupIdx, sourceOption );
|
||||
Penumbra.ModManager.AddOption( panel._mod, groupIdx, option, priority );
|
||||
Penumbra.ModManager.MoveOption( panel._mod, groupIdx, currentCount, optionIdx );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
using ImGuiNET;
|
||||
|
|
@ -168,10 +167,13 @@ public partial class ConfigWindow
|
|||
{
|
||||
for( var idx2 = 0; idx2 < group.Count; ++idx2 )
|
||||
{
|
||||
id.Push( idx2 );
|
||||
if( ImGui.Selectable( group[ idx2 ].Name, idx2 == selectedOption ) )
|
||||
{
|
||||
Penumbra.CollectionManager.Current.SetModSetting( _mod.Index, groupIdx, ( uint )idx2 );
|
||||
}
|
||||
|
||||
id.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -201,6 +203,7 @@ public partial class ConfigWindow
|
|||
Widget.BeginFramedGroup( group.Name, group.Description );
|
||||
for( var idx2 = 0; idx2 < group.Count; ++idx2 )
|
||||
{
|
||||
id.Push( idx2 );
|
||||
var flag = 1u << idx2;
|
||||
var setting = ( flags & flag ) != 0;
|
||||
if( ImGui.Checkbox( group[ idx2 ].Name, ref setting ) )
|
||||
|
|
@ -208,6 +211,8 @@ public partial class ConfigWindow
|
|||
flags = setting ? flags | flag : flags & ~flag;
|
||||
Penumbra.CollectionManager.Current.SetModSetting( _mod.Index, groupIdx, flags );
|
||||
}
|
||||
|
||||
id.Pop();
|
||||
}
|
||||
|
||||
Widget.EndFramedGroup();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ using Penumbra.UI.Classes;
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Logging;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
||||
|
|
@ -42,8 +41,8 @@ public partial class ConfigWindow
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Exception thrown during ModPanel Render:\n{e}" );
|
||||
PluginLog.Error( $"{Penumbra.ModManager.Count} Mods\n"
|
||||
Penumbra.Log.Error( $"Exception thrown during ModPanel Render:\n{e}" );
|
||||
Penumbra.Log.Error( $"{Penumbra.ModManager.Count} Mods\n"
|
||||
+ $"{Penumbra.CollectionManager.Current.AnonymizedName} Current Collection\n"
|
||||
+ $"{Penumbra.CollectionManager.Current.Settings.Count} Settings\n"
|
||||
+ $"{_selector.SortMode.Name} Sort Mode\n"
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ public partial class ConfigWindow
|
|||
+ "Not directly affiliated and potentially, but not usually out of date." );
|
||||
}
|
||||
|
||||
private static void DrawSupportButtons()
|
||||
private void DrawSupportButtons()
|
||||
{
|
||||
var width = ImGui.CalcTextSize( SupportInfoButtonText ).X + ImGui.GetStyle().FramePadding.X * 2;
|
||||
var xPos = ImGui.GetWindowWidth() - width;
|
||||
|
|
@ -363,7 +363,7 @@ public partial class ConfigWindow
|
|||
ImGui.SetCursorPos( new Vector2( xPos, 4 * ImGui.GetFrameHeightWithSpacing() ) );
|
||||
if( ImGui.Button( "Show Changelogs", new Vector2( width, 0 ) ) )
|
||||
{
|
||||
Penumbra.Config.LastSeenVersion = 0;
|
||||
_window._penumbra.ForceChangelogOpen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Numerics;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Logging;
|
||||
using ImGuiNET;
|
||||
using OtterGui.Raii;
|
||||
using Penumbra.UI.Classes;
|
||||
|
|
@ -92,7 +91,7 @@ public sealed partial class ConfigWindow : Window, IDisposable
|
|||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
PluginLog.Error( $"Exception thrown during UI Render:\n{e}" );
|
||||
Penumbra.Log.Error( $"Exception thrown during UI Render:\n{e}" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue