Skip to content

OnItemResearched

Usage

  • Return TYPE to prevent default behavior

Example Autogenerated

csharp
private void OnItemResearched( ResearchTable instance, int num )
{
    Puts( "OnItemResearched works!" );
}

Location

  • ResearchTable::ResearchAttemptFinished()
csharp
//---
	Item targetItem = this.GetTargetItem();
	Item scrapItem = this.GetScrapItem();
	if (targetItem != null && scrapItem != null)
	{
		int num = ResearchTable.ScrapForResearch(targetItem);
		object returnvar = Interface.CallHook("OnItemResearched", this, num);
		if (returnvar is int)
		{
			num = (int)returnvar;
		}
		if (scrapItem.amount >= num)
//---

Released under the MIT License.