OnBigWheelLoss
OxideCarbonEntityCalled when big wheel loss occurs.
object OnBigWheelLoss(BigWheelGame bigWheelGame, Item item, BigWheelBettingTerminal bigWheelBettingTerminal)Works — the game method in this build is the one the hook was written for.
Parameters
- bigWheelGame
- BigWheelGame
- item
- Item
- bigWheelBettingTerminal
- BigWheelBettingTerminal
Return value
objectReturn non-null to stop the game method.
Example
object — you can affect the game: return a value to change or cancel the action.
private object OnBigWheelLoss(BigWheelGame bigWheelGame, Item item, BigWheelBettingTerminal bigWheelBettingTerminal)
{
Puts("OnBigWheelLoss");
// 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 BigWheelGame.Payout()
Passes: BigWheelGame bigWheelGame, Item item, BigWheelBettingTerminal bigWheelBettingTerminal
WorksReturnBehavior: ExitWhenNonNullAssembly-CSharp.dll
Where it is called (this branch's game code)
// …
flag = true;
Analytics.Azure.OnGamblingResult(terminal.lastPlayer, terminal, amount, slot.amount, value);
}
for (int i = 0; i < 5; i++)
{
Item slot2 = terminal.inventory.GetSlot(i);
if (slot2 != null)
{
if (Interface.CallHook("OnBigWheelLoss", this, slot2, bigWheelBettingTerminal) == null)
{
return;
}
Analytics.Azure.OnGamblingResult(terminal.lastPlayer, terminal, slot2.amount, 0, value);
slot2.Remove();
flag2 = 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.