Skip to content

OnDispenserBonusReceived

Usage

  • No return behavior

Example Autogenerated

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

Location

  • ResourceDispenser::AssignFinishBonus(BasePlayer player, float fraction, AttackEntity weapon)
csharp
//---
				{
					item = (Item)returnvar;
				}
				this.ApplyItemOwnership(player, item);
				Facepunch.Rust.Analytics.Azure.OnGatherItem(item.info.shortname, item.amount, base.baseEntity, player, weapon);
				Interface.CallHook("OnDispenserBonusReceived", this, player, item);
				while (item.amount > item.MaxStackable())
				{
					Item item2 = item.SplitItem(item.MaxStackable());
					player.GiveItem(item2, BaseEntity.GiveItemReason.ResourceHarvested);
				}
//---

Released under the MIT License.