Equipment: slots, gear traits, archetype limits and stat bonuses, equip actions and schema
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
f834d1e914
28 files changed
+1065
No files matched your search
@@ -0,0 +1,22 @@
|
||||
namespace Cthangover.Mods.Equipment
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using Cthangover.Mods.Stats;
|
||||
|
||||
/// <summary>The traits of everything a character wears: each worn item's <c>"Traits"</c> list.</summary>
|
||||
public class EquipmentTraitSource : ITraitSource
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public string Id => "equipment";
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<TraitInfo> TraitsOf(string characterId)
|
||||
{
|
||||
foreach (var item in EquipmentService.Worn(characterId).Values)
|
||||
{
|
||||
foreach (var trait in ExtraData.Traits(EquipmentService.Item(item)?.ExtraProperties, item))
|
||||
yield return trait;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user