RustTip

OnCargoPlaneSignaled

OxideCarbonEntity

Called when a cargo plane is signaled.

void OnCargoPlaneSignaled(BaseEntity local0, SupplySignal supplySignal)
Works — the game method in this build is the one the hook was written for.

Parameters

local0
BaseEntity
supplySignal
SupplySignal

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnCargoPlaneSignaled(BaseEntity local0, SupplySignal supplySignal)
{
    Puts("OnCargoPlaneSignaled");
}

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

Injection point

Rust.opj (Oxide)
void SupplySignal.Explode()

Passes: BaseEntity local0, SupplySignal supplySignal

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

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

// …
{
	BaseEntity baseEntity = GameManager.server.CreateEntity(EntityToCreate.resourcePath);
	if ((bool)baseEntity)
	{
		Vector3 vector = new Vector3(Random.Range(-20f, 20f), 0f, Random.Range(-20f, 20f));
		baseEntity.SendMessage("InitDropPosition", transform.position + vector, SendMessageOptions.DontRequireReceiver);
		baseEntity.Spawn();
	}
	Interface.CallHook("OnCargoPlaneSignaled", baseEntity, this);
	Invoke(FinishUp, 210f);
	SetFlagLocal(Flags.On, b: true);
	SendNetworkUpdateImmediate();
}

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.