Roles backfill: read each stat with as, so Stryker can mutate the command
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
80b51d63ea
commit
e97968e271
1 changed files with 2 additions and 1 deletions
|
|
@ -1782,7 +1782,8 @@ public static class Program
|
|||
foreach (var behavior in design.Behaviors.Where(b => b != null))
|
||||
foreach (var field in behavior.GetType().GetFields().Where(f => f.FieldType == typeof(PerformanceStat)))
|
||||
{
|
||||
if (!map.TryGetValue(field.Name, out var role) || !(field.GetValue(behavior) is PerformanceStat stat)) continue;
|
||||
var stat = field.GetValue(behavior) as PerformanceStat;
|
||||
if (stat == null || !map.TryGetValue(field.Name, out var role)) continue;
|
||||
stat.Terms ??= new List<StatTerm>();
|
||||
var quality = stat.Terms.FirstOrDefault(t => t.Source == StatSource.Quality);
|
||||
var value = stat.Min;
|
||||
|
|
|
|||
Loading…
Reference in a new issue