OnItemRepair
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnItemRepair( BasePlayer player, Item itemToRepair )
{
Puts( "OnItemRepair works!" );
}
Location
- RepairBench::RepairAnItem(Item itemToRepair, BasePlayer player, BaseEntity repairBenchEntity, float maxConditionLostOnRepair, bool mustKnowBlueprint)
csharp
//---
if (!player.blueprints.HasUnlocked(itemDefinition) && (!(itemDefinition.Blueprint != null) || itemDefinition.Blueprint.isResearchable))
{
return;
}
}
if (Interface.CallHook("OnItemRepair", player, itemToRepair) != null)
{
return;
}
float num = RepairBench.RepairCostFraction(itemToRepair);
bool flag = false;
//---