RustTip

OnLivestockAnimalFamiliarityAdd

OxideCarbonAnimal
object OnLivestockAnimalFamiliarityAdd(Rust.Ai.Gen2.LivestockAnimal livestockAnimal)
Method missing — this game build has no method the hook is injected into: until it is updated, the hook is not called.

Parameters

livestockAnimal
Rust.Ai.Gen2.LivestockAnimal

Return value

objectReturn non-null to cancel the game action.

Example

object — you can affect the game: return a value to change or cancel the action.

private object OnLivestockAnimalFamiliarityAdd(Rust.Ai.Gen2.LivestockAnimal livestockAnimal)
{
    Puts("OnLivestockAnimalFamiliarityAdd");

    // change nothing — the game continues as usual
    return null;

    // to affect the game:
    // return false; // non-null cancels the game action
}

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

Injection point

Rust.opj (Oxide)
void Rust.Ai.Gen2.LivestockAnimal.AddFamiliarity(ulong, float, Rust.Ai.Gen2.LivestockAnimal.FamiliarityReason)
Method missingReturnBehavior: ExitWhenNonNullArgumentBehavior: AllAssembly-CSharp.dll

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.