Skip to content

OnDispenserGathered

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnDispenserGathered( ResourceDispenser instance, BasePlayer entity, Item item )
{
    Puts( "OnDispenserGathered works!" );
}

Location

  • ResourceDispenser::GiveResourceFromItem(BasePlayer entity, ItemAmount itemAmt, float gatherDamage, float destroyFraction, AttackEntity attackWeapon)
csharp
//---
		{
			return;
		}
		this.OverrideOwnership(item, attackWeapon);
		Facepunch.Rust.Analytics.Azure.OnGatherItem(item.info.shortname, item.amount, base.baseEntity, entity, attackWeapon);
		Interface.CallHook("OnDispenserGathered", this, entity, item);
		entity.GiveItem(item, BaseEntity.GiveItemReason.ResourceHarvested);
	}
}

Released under the MIT License.