OnLoseCondition
Called right before the condition of the item is modified
Usage
- No return behavior
Example Autogenerated
csharp
private void OnLoseCondition( Item item, ref float amount )
{
Puts( "OnLoseCondition works!" );
}
Location
- RustCore::IOnLoseCondition(Item item, float amount)
csharp
private object IOnLoseCondition(Item item, float amount)
{
object[] arguments = { item, amount };
Interface.CallHook("OnLoseCondition", arguments);
amount = (float)arguments[1];
float condition = item.condition;
item.condition -= amount;
if (item.condition <= 0f && item.condition < condition)
{
item.OnBroken();
}
return true;
}