RustTip

OnFlameThrowerBurn

OxideCarbonWeapon

Called when flame thrower burn occurs.

void OnFlameThrowerBurn(FlameThrower flameThrower, BaseEntity local13)
Works — the game method in this build is the one the hook was written for.

Parameters

flameThrower
FlameThrower
local13
BaseEntity

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnFlameThrowerBurn(FlameThrower flameThrower, BaseEntity local13)
{
    Puts("OnFlameThrowerBurn");
}

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

Injection point

Rust.opj (Oxide)
void FlameThrower.FlameTick()

Passes: FlameThrower flameThrower, BaseEntity local13

WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, l13)Assembly-CSharp.dll

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

// …
	flag2 = !GamePhysics.CheckSphere(vector, 0.1f, 1084293377);
}
if (flag2)
{
	BaseEntity baseEntity = GameManager.server.CreateEntity(fireballPrefab.resourcePath, vector);
	if ((bool)baseEntity)
	{
		baseEntity.creatorEntity = ownerPlayer;
		Interface.CallHook("OnFlameThrowerBurn", this, baseEntity);
		FireBall fireBall = baseEntity as FireBall;
		if (fireBall != null && ownerPlayer.IsNpc)
		{
			fireBall.ignoreNPC = true;
		}
		baseEntity.Spawn();
	}
}
// …

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.