RustTip

OnMixingTableFinished

OxideCarbonEntity

Called when a mixing table finishes.

void OnMixingTableFinished(MixingTable mixingTable, BasePlayer mixStartingPlayer, Recipe recipe, int quantity)
Работает — метод игры в этой сборке тот же, под который написан хук.

Параметры

mixingTable
MixingTable
mixStartingPlayer
BasePlayer
recipe
Recipe
quantity
int

Возвращаемое значение

voidВозвращаемое значение игнорируется — хук только уведомляет.

Пример

private void OnMixingTableFinished(MixingTable mixingTable, BasePlayer mixStartingPlayer, Recipe recipe, int quantity)
{
    Puts("OnMixingTableFinished");
}

Работает и в Oxide, и в Carbon: Carbon загружает плагины Oxide без изменений.

Место встраивания

Rust.opj (Oxide)
void MixingTable.ProduceItem(Recipe, int)

Передаёт: MixingTable mixingTable, BasePlayer mixStartingPlayer, Recipe recipe, int quantity

РаботаетReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, this.MixStartingPlayer, a0, a1)Assembly-CSharp.dll

Где вызывается (код игры этой ветки)

private void ProduceItem(Recipe recipe, int quantity)
{
	pendingItemId = recipe.ProducedItem.itemid;
	StopMixing();
	ConsumeInventory(recipe, quantity);
	CreateRecipeItems(recipe, quantity);
Interface.CallHook("OnMixingTableFinished", this, this.MixStartingPlayer, recipe, quantity);
}

Источники: Rust.opj из OxideMod/Oxide.Rust (MIT) и метаданные хуков документации Carbon (MIT). Код методов — декомпиляция сервера этой ветки.