Skip to content

OnXmasStockingFill

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnXmasStockingFill( Stocking instance )
{
    Puts( "OnXmasStockingFill works!" );
    return null;
}

Location

  • Stocking::SpawnLoot()
csharp
//---
{
	if (base.inventory == null)
	{
		Debug.Log("CONTACT DEVELOPERS! Stocking::PopulateLoot has null inventory!!! " + base.name);
	}
	else if (IsEmpty() && Interface.CallHook("OnXmasStockingFill", this) == null)
	{
		base.SpawnLoot();
		SetFlag(Flags.On, b: true);
		Hurt(MaxHealth() * 0.1f, DamageType.Generic, null, useProtection: false);
	}
//---

Released under the MIT License.