Equipment Repair Component¶
Overview¶
UMIPEquipmentRepairComponent handles repairing equipment (restore durability) using materials or currency. It extends UMIPApplyItemOnEquipmentComponent and implements repair-one (single item selection) or repair-all flows; uses UMIPRepairOneItemSelectionChecker for item selection and UMIPRepairItemEffect / durability data for the actual repair. Struct FMIPItemToRepairStruct holds storage type and item indexes to repair.
Key traits:
- Base: UMIPApplyItemOnEquipmentComponent.
- Overrides: OnUseItem (apply repair to item), DoThisFeature (server repair logic). Integrates with repair widget and NPC secondary dialogue (UMIPNPCSecondaryDialogueActionAsset).
- Durability: Reads/writes durability via item piece (e.g. ItemPiece_Durability); repair restores current durability toward max.
All paths below are relative to Plugins/ModularInventoryPlus/Source/ModularInventoryPlus/.
Key Classes & Files¶
| Class | File |
|---|---|
UMIPEquipmentRepairComponent |
Public/Repair/MIPEquipmentRepairComponent.h |
UMIPEquipmentRepairComponent¶
- Struct: FMIPItemToRepairStruct – StorageTypeTag, ItemIndexesToRepair.
- Flow: Interaction → repair widget; user selects one item (repair one) or multiple; fee check; DoThisFeature applies repair (consumes materials/currency, updates durability piece). ClientOnAppliedInternal for feedback.
- Integration: UMIPItemSelectionComponent (UMIPRepairOneItemSelectionChecker for “repair one”), UMIPRepairWidget, UMIPPlayerServerIMC (item entry and durability piece).