OnFlameExplosion
OxideCarbonWeaponCalled when flame explosion occurs.
void OnFlameExplosion(FlameExplosive flameExplosive, Collider local1)Works — the game method in this build is the one the hook was written for.
Parameters
- flameExplosive
- FlameExplosive
- local1
- Collider
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnFlameExplosion(FlameExplosive flameExplosive, Collider local1)
{
Puts("OnFlameExplosion");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void FlameExplosive.FlameExplode(Vector3)
Passes: FlameExplosive flameExplosive, Collider local1
WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, l1)Assembly-CSharp.dll
Where it is called (this branch's game code)
// …
{
float num = (float)i / numToCreate;
Vector3 modifiedAimConeDirection = AimConeUtil.GetModifiedAimConeDirection(spreadAngle * spreadCurve.Evaluate(num), surfaceNormal);
float y = Random.Range(0f, 360f);
Quaternion rotation = Quaternion.Euler(0f, y, 0f);
baseEntity.transform.SetPositionAndRotation(position, rotation);
baseEntity.creatorEntity = ((creatorEntity == null) ? baseEntity : creatorEntity);
baseEntity.Spawn();
Interface.CallHook("OnFlameExplosion", this, component);
Vector3 vector = modifiedAimConeDirection.normalized * Random.Range(minVelocity, maxVelocity) * velocityCurve.Evaluate(num * Random.Range(1f, 1.1f));
FireBall component2 = baseEntity.GetComponent<FireBall>();
if (component2 != null)
{
component2.SetDelayedVelocity(vector);
}
else
{
// …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.