OnSupplyDropDropped
OxideCarbonEntityCalled when a supply drop is dropped.
void OnSupplyDropDropped(BaseEntity local1, CargoPlane cargoPlane)Works — the game method in this build is the one the hook was written for.
Parameters
- local1
- BaseEntity
- cargoPlane
- CargoPlane
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnSupplyDropDropped(BaseEntity local1, CargoPlane cargoPlane)
{
Puts("OnSupplyDropDropped");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void CargoPlane.Update()
Passes: BaseEntity local1, CargoPlane cargoPlane
WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (l1, this)Assembly-CSharp.dll
Where it is called (this branch's game code)
// …
dropped = true;
BaseEntity baseEntity = GameManager.server.CreateEntity(prefabDrop.resourcePath, transform.position);
if ((bool)baseEntity)
{
baseEntity.globalBroadcast = true;
baseEntity.Spawn();
}
}
Interface.CallHook("OnSupplyDropDropped", baseEntity, this);
transform.position = Vector3.Lerp(startPos, endPos, num);
transform.hasChanged = true;
if (num >= 1f)
{
Kill();
}
}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.