mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 13:53:42 +01:00
Fix meta change counting and reloading on manual meta change edits.
This commit is contained in:
parent
bf355114f2
commit
1eee89ab4c
5 changed files with 23 additions and 13 deletions
|
|
@ -22,8 +22,8 @@ namespace Penumbra.Meta
|
|||
|
||||
|
||||
// Store total number of manipulations for some ease of access.
|
||||
[JsonProperty]
|
||||
public int Count { get; private set; } = 0;
|
||||
[JsonIgnore]
|
||||
internal int Count = 0;
|
||||
|
||||
|
||||
// Return an enumeration of all active meta manipulations for a given mod with given settings.
|
||||
|
|
@ -216,6 +216,12 @@ namespace Penumbra.Meta
|
|||
var collection = JsonConvert.DeserializeObject< MetaCollection >( text,
|
||||
new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore } );
|
||||
|
||||
if( collection != null )
|
||||
{
|
||||
collection.Count = collection.DefaultData.Count
|
||||
+ collection.GroupData.Values.SelectMany( kvp => kvp.Values ).Sum( l => l.Count );
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
catch( Exception e )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue