RustTip

OnLiquidWeaponFiringStopped

OxideCarbonWeapon

Called when a liquid weapon firing stops.

void OnLiquidWeaponFiringStopped(LiquidWeapon liquidWeapon)
Works — the game method in this build is the one the hook was written for.

Parameters

liquidWeapon
LiquidWeapon

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnLiquidWeaponFiringStopped(LiquidWeapon liquidWeapon)
{
    Puts("OnLiquidWeaponFiringStopped");
}

Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.

Injection point

Rust.opj (Oxide)
void LiquidWeapon.StopFiring()

Passes: LiquidWeapon liquidWeapon

WorksReturnBehavior: ContinueArgumentBehavior: JustThisAssembly-CSharp.dll

Where it is called (this branch's game code)

// …
	using (FlagsUpdateScope flagsUpdateScope = StartSetFlags(FlagsUpdateMode.SendNetworkUpdate))
	{
		flagsUpdateScope.Set(Flags.On, b: false);
	}
	if (isServer)
	{
		SendNetworkUpdateImmediate();
	}
Interface.CallHook("OnLiquidWeaponFiringStopped", this);
}

Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.