More moves implemented
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
@@ -61,8 +62,10 @@ public static class AbilityDataLoader
|
||||
var parameters = serialized.Parameters.ToDictionary(x => (StringKey)x.Key, x => x.Value.ToParameter());
|
||||
|
||||
StringKey? effectName = effect == null ? null! : new StringKey(effect);
|
||||
|
||||
var flags = serialized.Flags.Select(x => new StringKey(x)).ToImmutableHashSet();
|
||||
|
||||
var ability = new AbilityImpl(name, effectName, parameters);
|
||||
var ability = new AbilityImpl(name, effectName, parameters, flags);
|
||||
return ability;
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,5 @@ public class SerializedAbility
|
||||
{
|
||||
public string? Effect { get; set; }
|
||||
public Dictionary<string, JsonNode> Parameters { get; set; } = new();
|
||||
public string[] Flags { get; set; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user