OnTattooApplied
OxidePlayervoid OnTattooApplied(BasePlayer basePlayer, BasePlayer artist, byte[] headPng, byte[] bodyPng)Works — the game method in this build is the one the hook was written for.
Parameters
- basePlayer
- BasePlayer
- artist
- BasePlayer
- headPng
- byte[]
- bodyPng
- byte[]
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnTattooApplied(BasePlayer basePlayer, BasePlayer artist, byte[] headPng, byte[] bodyPng)
{
Puts("OnTattooApplied");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
void BasePlayer.ApplyTattoo(BasePlayer, byte[], byte[])
Passes: BasePlayer basePlayer, BasePlayer artist, byte[] headPng, byte[] bodyPng
WorksReturnBehavior: ContinueArgumentBehavior: AllAssembly-CSharp.dll
Where it is called (this branch's game code)
// …
if (tattooHeadCrc != num)
{
UGCModeration.Send(artist, this, "tattoo", tattooHeadCrc, FileStorage.Type.png, 0, debounce: false);
}
if (tattooBodyCrc != num2)
{
UGCModeration.Send(artist, this, "tattoo", tattooBodyCrc, FileStorage.Type.png, 1, debounce: false);
}
Interface.CallHook("OnTattooApplied", this, artist, headPng, bodyPng);
}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.