Skip to content

OnExcavatorMiningToggled

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnExcavatorMiningToggled( ExcavatorArm instance )
{
    Puts( "OnExcavatorMiningToggled works!" );
}

Location

  • ExcavatorArm::BeginMining()
  • ExcavatorArm::StopMining()
csharp
//---
		this.nextNotificationTime = Time.time + 60f;
	}
	ExcavatorServerEffects.SetMining(true, false);
	Facepunch.Rust.Analytics.Server.ExcavatorStarted();
	this.excavatorStartTime = this.GetNetworkTime();
	Interface.CallHook("OnExcavatorMiningToggled", this);
}
csharp
//---
	if (base.HasFlag(BaseEntity.Flags.On))
	{
		Facepunch.Rust.Analytics.Server.ExcavatorStopped(this.GetNetworkTime() - this.excavatorStartTime);
	}
	base.SetFlag(BaseEntity.Flags.On, false, false, true);
	Interface.CallHook("OnExcavatorMiningToggled", this);
}

Released under the MIT License.