Example #1
0
 /// <summary>
 /// Returns the named blueprint if it is this one or exists amongst the <see cref="MandatoryActors"/>, <see cref="MandatoryItems"/> etc
 /// </summary>
 public override HasStatsBlueprint TryGetBlueprint(string name)
 {
     return(base.TryGetBlueprint(name) ??
            MandatoryActors.Select(a => a.TryGetBlueprint(name)).FirstOrDefault(b => b != null) ??
            MandatoryItems.Select(a => a.TryGetBlueprint(name)).FirstOrDefault(b => b != null) ??
            OptionalActors.Select(a => a.TryGetBlueprint(name)).FirstOrDefault(b => b != null) ??
            (HasStatsBlueprint)OptionalItems.Select(a => a.TryGetBlueprint(name)).FirstOrDefault(b => b != null));
 }
Example #2
0
 public Vector CountVector()
 => OptionalItems.Select(i => (double)Counter[i]).ToArray().ToVector();