RustTip

OnOvenStarted

OxideCarbonEntity

Called when an oven starts.

void OnOvenStarted(BaseOven baseOven)
Works — the game method in this build is the one the hook was written for.

Parameters

baseOven
BaseOven

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnOvenStarted(BaseOven baseOven)
{
    Puts("OnOvenStarted");
}

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

Injection point

Rust.opj (Oxide)
void BaseOven.StartCooking()

Passes: BaseOven baseOven

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: true);
		}
		if (hasOpenFlame)
		{
			SingletonComponent<NpcFireManager>.Instance.Add(this);
		}
		Interface.CallHook("OnOvenStarted", this);
		UpdateIsCooking();
	}
}

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.