Equipment: weapon-granted abilities + gear mods (DR-027 Phase 1)

Equipment slots reusing the AbilityRef/StatModifier machinery: EquipmentSlot [GhostField] buffer (index=slot), server-only event-driven EquipSystem (RPC). Weapon -> AbilityRef.Id swaps the attack (prefab + base stats, prediction-correct); gear -> StatModifiers tagged a reserved per-slot EquipSourceId, stripped target-agnostically via RemoveBySourceId. Item mods are INLINE on ItemDefBlob (a nested BlobArray reads empty under the by-value TryGetItem copy). Atomic equip-over swap (no item loss); DefaultAbility restores the unarmed ability on weapon-unequip. Client keys + build-safe hooks; HUD equipment panel + click-to-equip. 4 catalog weapon/gear items wired + re-baked.

Play-validated host+client: weapon equip swaps AbilityRef on both worlds, gear folds into EffectiveCharacterStats, unequip reverses + restores DefaultAbility, all replicated to the owner. See DR-027.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 11:09:25 -07:00
parent 510c12a980
commit 43f355c06b
28 changed files with 709 additions and 6 deletions
+4
View File
@@ -1480,8 +1480,12 @@ MonoBehaviour:
m_EditorClassIdentifier: ProjectM.Authoring::ProjectM.Authoring.ItemDatabaseAuthoring
Items:
- {fileID: 11400000, guid: 938a882b6fbd50d4c9a051ddabc5829b, type: 2}
- {fileID: 11400000, guid: b37686ead19d68d45b84e031bfe99f59, type: 2}
- {fileID: 11400000, guid: a2a0e6d3ae0218d458d2b5305891ce89, type: 2}
- {fileID: 11400000, guid: 441dbd6676662a2459607f3b75ee821b, type: 2}
- {fileID: 11400000, guid: 4ed399a329eb6d847921aef05bde213d, type: 2}
- {fileID: 11400000, guid: c09dc2c47feaa784486e21a3b7e4cb10, type: 2}
- {fileID: 11400000, guid: b69a26c8de798624b82e6799f8130291, type: 2}
- {fileID: 11400000, guid: 31ec40cfc6e81ef4ab9bbce57a40621e, type: 2}
--- !u!4 &722706770
Transform: