Skip to content

OnResearchCostDetermine

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnResearchCostDetermine( Item item )
{
    Puts( "OnResearchCostDetermine works!" );
}
csharp
private void OnResearchCostDetermine( ItemDefinition info )
{
    Puts( "OnResearchCostDetermine works!" );
}

Location

  • ResearchTable::ScrapForResearch(Item item)
  • ResearchTable::ScrapForResearch(ItemDefinition info)
csharp
public static int ScrapForResearch(Item item)
{
	object returnvar = Interface.CallHook("OnResearchCostDetermine", item);
	if (returnvar is int)
	{
		return (int)returnvar;
	}
	return ResearchTable.ScrapForResearch(item.info);
//---
csharp
public static int ScrapForResearch(ItemDefinition info)
{
	object returnvar = Interface.CallHook("OnResearchCostDetermine", info);
	if (returnvar is int)
	{
		return (int)returnvar;
	}
	if (info.isRedirectOf != null)
//---

Released under the MIT License.