OnExcavatorGather
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnExcavatorGather( ExcavatorArm instance, Item item )
{
Puts( "OnExcavatorGather works!" );
}
Location
- ExcavatorArm::ProduceResources()
csharp
//---
int num3 = Mathf.FloorToInt(itemAmount.amount / (float)this.outputPiles.Count);
itemAmount.amount -= (float)(num3 * 2);
foreach (ExcavatorOutputPile current in this.outputPiles)
{
Item item = ItemManager.Create(this.resourcesToMine[this.resourceMiningIndex].itemDef, num3, 0uL, true);
if (Interface.CallHook("OnExcavatorGather", this, item) != null)
{
return;
}
Facepunch.Rust.Analytics.Azure.OnExcavatorProduceItem(item, this);
if (!item.MoveToContainer(current.inventory, -1, true, false, null, true))
//---