Make preevolutioncache and item script containers concurrent
Build / Build (push) Successful in 10m56s
Build / Build (push) Successful in 10m56s
This commit is contained in:
3 files changed
+10
-10
No files matched your search
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Utils;
|
||||
@@ -9,10 +10,10 @@ namespace PkmnLib.Dynamic.ScriptHandling;
|
||||
/// </summary>
|
||||
public class ScriptResolver
|
||||
{
|
||||
private IReadOnlyDictionary<(ScriptCategory, StringKey), Func<Script>> _scriptCtors;
|
||||
private IReadOnlyDictionary<StringKey, Func<IItem, ItemScript>> _itemScriptCtors;
|
||||
private readonly Dictionary<IItem, ItemScript> _itemBattleScripts = new();
|
||||
private readonly Dictionary<IItem, ItemScript> _itemScripts = new();
|
||||
private readonly IReadOnlyDictionary<(ScriptCategory, StringKey), Func<Script>> _scriptCtors;
|
||||
private readonly IReadOnlyDictionary<StringKey, Func<IItem, ItemScript>> _itemScriptCtors;
|
||||
private readonly ConcurrentDictionary<IItem, ItemScript> _itemBattleScripts = new();
|
||||
private readonly ConcurrentDictionary<IItem, ItemScript> _itemScripts = new();
|
||||
|
||||
/// <inheritdoc cref="ScriptResolver"/>
|
||||
public ScriptResolver(IReadOnlyDictionary<(ScriptCategory, StringKey), Func<Script>> scriptCtors,
|
||||
|
||||
Reference in new issue
Block a user