Skip to content

OnPowergridStageChange

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnPowergridStageChange( PowergridManager instance, int num2 )
{
    Puts( "OnPowergridStageChange works!" );
    return null;
}
csharp
private void OnPowergridStageChange(  )
{
    Puts( "OnPowergridStageChange works!" );
}

Location

  • PowergridManager::ServerTick()
  • PowergridManager::ServerTick()
csharp
//---
		{
			previousInsertedFusesCount = num;
			int num2 = CalculateCurrentStage();
			if (CurrentStage != num2 || !hasTickedOnce)
			{
				if (Interface.CallHook("OnPowergridStageChange", this, num2) != null)
				{
					return;
				}
				Facepunch.Rust.Analytics.Azure.OnPowerGridStageChanged(CurrentStage, num2);
				CurrentStage = num2;
//---
csharp
//---
		{
			previousInsertedFusesCount = num;
			int num2 = CalculateCurrentStage();
			if (CurrentStage != num2 || !hasTickedOnce)
			{
				if (Interface.CallHook("OnPowergridStageChange", this, num2) != null)
				{
					return;
				}
				Facepunch.Rust.Analytics.Azure.OnPowerGridStageChanged(CurrentStage, num2);
				CurrentStage = num2;
//---

Released under the MIT License.