OnSupplyDropLanded
OxideCarbonEntityCalled when a supply drop is landed.
void OnSupplyDropLanded(SupplyDrop supplyDrop)Method changed — check — the game method differs from the one the hook is recorded for in Oxide. The hook is still called, but its place may have shifted — worth checking after an update.
Parameters
- supplyDrop
- SupplyDrop
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnSupplyDropLanded(SupplyDrop supplyDrop)
{
Puts("OnSupplyDropLanded");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void SupplyDrop.OnCollisionEnter(Collision)
Passes: SupplyDrop supplyDrop
Method changed — checkReturnBehavior: ContinueArgumentBehavior: JustThisAssembly-CSharp.dll
Where it is called (this branch's game code)
private void OnCollisionEnter(Collision collision)
{
if (((1 << collision.collider.gameObject.layer) & 0x100200) > 0 && HasFlag(Flags.Reserved3) && collision.rigidbody != null && collision.rigidbody.collisionDetectionMode == CollisionDetectionMode.ContinuousDynamic)
{
collision.rigidbody.collisionDetectionMode = CollisionDetectionMode.ContinuousSpeculative;
}
bool flag = ((1 << collision.collider.gameObject.layer) & 0x40A10111) > 0;
bool flag2 = ((1 << collision.collider.gameObject.layer) & 0x8000000) > 0;
Interface.CallHook("OnSupplyDropLanded", this);
BaseEntity entity = collision.GetEntity();
if (flag2 && entity is Tugboat)
{
flag = true;
}
if (flag2 && (entity is BoatBuildingBlock || PlayerBoat.IsChildOfFinishedPlayerBoat(entity)))
{
flag = true;
// …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.