mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Removed ActiveCollection since it is no longer needed.
This commit is contained in:
parent
4888bc243f
commit
3ef3e75c6a
12 changed files with 48 additions and 136 deletions
|
|
@ -26,8 +26,8 @@ public partial class SettingsInterface
|
|||
}
|
||||
|
||||
var modManager = Penumbra.ModManager;
|
||||
var items = modManager.Collections.ActiveCollection.Cache?.ChangedItems ?? new Dictionary< string, object? >();
|
||||
var forced = modManager.Collections.ForcedCollection.Cache?.ChangedItems ?? new Dictionary< string, object? >();
|
||||
var items = modManager.Collections.DefaultCollection.Cache?.ChangedItems ?? new Dictionary< string, object? >();
|
||||
var forced = modManager.Collections.ForcedCollection.Cache?.ChangedItems ?? new Dictionary< string, object? >();
|
||||
|
||||
using var raii = ImGuiRaii.DeferredEnd( ImGui.EndTabItem );
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ using System.Numerics;
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Interface;
|
||||
using ImGuiNET;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Penumbra.Api;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Structs;
|
||||
|
|
@ -47,8 +49,6 @@ public partial class SettingsInterface
|
|||
using var raii = ImGuiRaii.DeferredEnd( ImGui.EndTable );
|
||||
|
||||
var manager = Penumbra.ModManager;
|
||||
PrintValue( "Active Collection", manager.Collections.ActiveCollection.Name );
|
||||
PrintValue( " has Cache", ( manager.Collections.ActiveCollection.Cache != null ).ToString() );
|
||||
PrintValue( "Current Collection", manager.Collections.CurrentCollection.Name );
|
||||
PrintValue( " has Cache", ( manager.Collections.CurrentCollection.Cache != null ).ToString() );
|
||||
PrintValue( "Default Collection", manager.Collections.DefaultCollection.Name );
|
||||
|
|
@ -287,59 +287,6 @@ public partial class SettingsInterface
|
|||
return;
|
||||
}
|
||||
|
||||
var eqp = 0;
|
||||
ImGui.InputInt( "##EqpInput", ref eqp );
|
||||
try
|
||||
{
|
||||
var def = ExpandedEqpFile.GetDefault( eqp );
|
||||
var val = Penumbra.ModManager.Collections.ActiveCollection.Cache?.MetaManipulations.Eqp.File?[ eqp ] ?? def;
|
||||
ImGui.Text( Convert.ToString( ( long )def, 2 ).PadLeft( 64, '0' ) );
|
||||
ImGui.Text( Convert.ToString( ( long )val, 2 ).PadLeft( 64, '0' ) );
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
var eqdp = 0;
|
||||
ImGui.InputInt( "##EqdpInput", ref eqdp );
|
||||
try
|
||||
{
|
||||
var def = ExpandedEqdpFile.GetDefault( GenderRace.MidlanderMale, false, eqdp );
|
||||
var val =
|
||||
Penumbra.ModManager.Collections.ActiveCollection.Cache?.MetaManipulations.Eqdp.File( GenderRace.MidlanderMale, false )?[ eqdp ]
|
||||
?? def;
|
||||
ImGui.Text( Convert.ToString( ( ushort )def, 2 ).PadLeft( 16, '0' ) );
|
||||
ImGui.Text( Convert.ToString( ( ushort )val, 2 ).PadLeft( 16, '0' ) );
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
var est = 0;
|
||||
ImGui.InputInt( "##EstInput", ref est );
|
||||
try
|
||||
{
|
||||
var def = EstFile.GetDefault( EstManipulation.EstType.Body, GenderRace.MidlanderFemale, ( ushort )est );
|
||||
var val = Penumbra.ModManager.Collections.ActiveCollection.Cache?.MetaManipulations.Est.BodyFile?[ GenderRace.MidlanderFemale,
|
||||
( ushort )est ]
|
||||
?? def;
|
||||
ImGui.Text( def.ToString() );
|
||||
ImGui.Text( val.ToString() );
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
var gmp = 0;
|
||||
ImGui.InputInt( "##GmpInput", ref gmp );
|
||||
try
|
||||
{
|
||||
var def = ExpandedGmpFile.GetDefault( gmp );
|
||||
var val = Penumbra.ModManager.Collections.ActiveCollection.Cache?.MetaManipulations.Gmp.File?[ gmp ] ?? def;
|
||||
ImGui.Text( def.Value.ToString( "X" ) );
|
||||
ImGui.Text( val.Value.ToString( "X" ) );
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
|
||||
if( !ImGui.BeginTable( "##CharacterUtilityDebugList", 6, ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit, -Vector2.UnitX ) )
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public partial class SettingsInterface
|
|||
{
|
||||
private class TabEffective
|
||||
{
|
||||
private const string LabelTab = "Effective Changes";
|
||||
private const string LabelTab = "Effective Changes";
|
||||
|
||||
private string _gamePathFilter = string.Empty;
|
||||
private string _gamePathFilterLower = string.Empty;
|
||||
|
|
@ -140,17 +140,17 @@ public partial class SettingsInterface
|
|||
|
||||
const ImGuiTableFlags flags = ImGuiTableFlags.RowBg | ImGuiTableFlags.ScrollX;
|
||||
|
||||
var modManager = Penumbra.ModManager;
|
||||
var activeCollection = modManager.Collections.ActiveCollection.Cache;
|
||||
var forcedCollection = modManager.Collections.ForcedCollection.Cache;
|
||||
var modManager = Penumbra.ModManager;
|
||||
var defaultCollection = modManager.Collections.DefaultCollection.Cache;
|
||||
var forcedCollection = modManager.Collections.ForcedCollection.Cache;
|
||||
|
||||
var (activeResolved, activeMeta) = activeCollection != null
|
||||
? ( activeCollection.ResolvedFiles.Count, activeCollection.MetaManipulations.Count )
|
||||
var (defaultResolved, defaultMeta) = defaultCollection != null
|
||||
? ( defaultCollection.ResolvedFiles.Count, defaultCollection.MetaManipulations.Count )
|
||||
: ( 0, 0 );
|
||||
var (forcedResolved, forcedMeta) = forcedCollection != null
|
||||
? ( forcedCollection.ResolvedFiles.Count, forcedCollection.MetaManipulations.Count )
|
||||
: ( 0, 0 );
|
||||
var totalLines = activeResolved + forcedResolved + activeMeta + forcedMeta;
|
||||
var totalLines = defaultResolved + forcedResolved + defaultMeta + forcedMeta;
|
||||
if( totalLines == 0 )
|
||||
{
|
||||
return;
|
||||
|
|
@ -166,7 +166,7 @@ public partial class SettingsInterface
|
|||
|
||||
if( _filePathFilter.Length > 0 || _gamePathFilter.Length > 0 )
|
||||
{
|
||||
DrawFilteredRows( activeCollection, forcedCollection );
|
||||
DrawFilteredRows( defaultCollection, forcedCollection );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -185,18 +185,18 @@ public partial class SettingsInterface
|
|||
{
|
||||
var row = actualRow;
|
||||
ImGui.TableNextRow();
|
||||
if( row < activeResolved )
|
||||
if( row < defaultResolved )
|
||||
{
|
||||
var (gamePath, file) = activeCollection!.ResolvedFiles.ElementAt( row );
|
||||
var (gamePath, file) = defaultCollection!.ResolvedFiles.ElementAt( row );
|
||||
DrawLine( gamePath, file );
|
||||
}
|
||||
else if( ( row -= activeResolved ) < activeMeta )
|
||||
else if( ( row -= defaultResolved ) < defaultMeta )
|
||||
{
|
||||
// TODO
|
||||
//var (manip, mod) = activeCollection!.MetaManipulations.Manipulations.ElementAt( row );
|
||||
DrawLine( 0.ToString(), 0.ToString() );
|
||||
}
|
||||
else if( ( row -= activeMeta ) < forcedResolved )
|
||||
else if( ( row -= defaultMeta ) < forcedResolved )
|
||||
{
|
||||
var (gamePath, file) = forcedCollection!.ResolvedFiles.ElementAt( row );
|
||||
DrawLine( gamePath, file );
|
||||
|
|
@ -204,7 +204,7 @@ public partial class SettingsInterface
|
|||
else
|
||||
{
|
||||
// TODO
|
||||
row -= forcedResolved;
|
||||
row -= forcedResolved;
|
||||
//var (manip, mod) = forcedCollection!.MetaManipulations.Manipulations.ElementAt( row );
|
||||
DrawLine( 0.ToString(), 0.ToString() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ public partial class SettingsInterface
|
|||
foreach( var collection in modManager.Collections.Collections.Values
|
||||
.Where( c => c.Cache != null && c.Settings[ Mod!.Data.BasePath.Name ].Enabled ) )
|
||||
{
|
||||
collection.CalculateEffectiveFileList( false, collection == modManager.Collections.ActiveCollection );
|
||||
collection.CalculateEffectiveFileList( false, modManager.Collections.IsActive( collection ) );
|
||||
}
|
||||
|
||||
// If the mod is enabled in the current collection, its conflicts may have changed.
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ public partial class SettingsInterface
|
|||
var collection = Penumbra.ModManager.Collections.CurrentCollection;
|
||||
if( collection.Cache != null )
|
||||
{
|
||||
collection.CalculateEffectiveFileList( metaManips, collection == Penumbra.ModManager.Collections.ActiveCollection );
|
||||
collection.CalculateEffectiveFileList( metaManips, Penumbra.ModManager.Collections.IsActive( collection ) );
|
||||
}
|
||||
|
||||
collection.Save();
|
||||
|
|
@ -602,8 +602,8 @@ public partial class SettingsInterface
|
|||
|
||||
public Selector( SettingsInterface ui, IReadOnlySet< string > newMods )
|
||||
{
|
||||
_base = ui;
|
||||
Cache = new ModListCache( Penumbra.ModManager, newMods );
|
||||
_base = ui;
|
||||
Cache = new ModListCache( Penumbra.ModManager, newMods );
|
||||
}
|
||||
|
||||
private void DrawCollectionButton( string label, string tooltipLabel, float size, ModCollection collection )
|
||||
|
|
|
|||
|
|
@ -68,8 +68,7 @@ public partial class SettingsInterface : IDisposable
|
|||
var current = modManager.Collections.CurrentCollection;
|
||||
if( current.Cache != null )
|
||||
{
|
||||
current.CalculateEffectiveFileList( recalculateMeta,
|
||||
current == modManager.Collections.ActiveCollection );
|
||||
current.CalculateEffectiveFileList( recalculateMeta, modManager.Collections.IsActive( current ) );
|
||||
_menu.InstalledTab.Selector.Cache.TriggerFilterReset();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue