mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-30 12:23:41 +01:00
A few comments, further cleanup. A few TODOs handled.
This commit is contained in:
parent
dbb9931189
commit
c78725d7d5
47 changed files with 347 additions and 3664 deletions
|
|
@ -251,7 +251,7 @@ public partial class ModCollection
|
|||
return;
|
||||
}
|
||||
|
||||
var mod = Penumbra.ModManager.Mods[ modIdx ];
|
||||
var mod = Penumbra.ModManager[ modIdx ];
|
||||
AddSubMod( mod.Default, new FileRegister( modIdx, settings.Priority, 0, 0 ), withManipulations );
|
||||
for( var idx = 0; idx < mod.Groups.Count; ++idx )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public partial class ModCollection
|
|||
if( oldValue != newValue )
|
||||
{
|
||||
var inheritance = FixInheritance( idx, false );
|
||||
_settings[ idx ]!.SetValue( Penumbra.ModManager.Mods[ idx ], groupIdx, newValue );
|
||||
_settings[ idx ]!.SetValue( Penumbra.ModManager[ idx ], groupIdx, newValue );
|
||||
ModSettingChanged.Invoke( ModSettingChange.Setting, idx, inheritance ? -1 : ( int )oldValue, groupIdx, false );
|
||||
}
|
||||
}
|
||||
|
|
@ -137,7 +137,7 @@ public partial class ModCollection
|
|||
return false;
|
||||
}
|
||||
|
||||
_settings[ idx ] = inherit ? null : this[ idx ].Settings?.DeepCopy() ?? ModSettings.DefaultSettings( Penumbra.ModManager.Mods[ idx ] );
|
||||
_settings[ idx ] = inherit ? null : this[ idx ].Settings?.DeepCopy() ?? ModSettings.DefaultSettings( Penumbra.ModManager[ idx ] );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@ public partial class ModCollection
|
|||
public IReadOnlyList< ModSettings? > Settings
|
||||
=> _settings;
|
||||
|
||||
// Returns whether there are settings not in use by any current mod.
|
||||
public bool HasUnusedSettings
|
||||
=> _unusedSettings.Count > 0;
|
||||
|
||||
// Evaluates the settings along the whole inheritance tree.
|
||||
public IEnumerable< ModSettings? > ActualSettings
|
||||
=> Enumerable.Range( 0, _settings.Count ).Select( i => this[ i ].Settings );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue