Skip to content

OnTechTreeNodeUnlock

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnTechTreeNodeUnlock( Workbench instance, TechTreeData.NodeInstance byID, BasePlayer player )
{
    Puts( "OnTechTreeNodeUnlock works!" );
    return null;
}

Location

  • Workbench::RPC_TechTreeUnlock(BaseEntity.RPCMessage msg)
csharp
//---
	{
		Debug.Log("Node for unlock not found :" + id);
	}
	else
	{
		if (Interface.CallHook("OnTechTreeNodeUnlock", this, byID, player) != null)
		{
			return;
		}
		int itemid = ItemManager.FindItemDefinition("scrap").itemid;
		int amount = player.inventory.GetAmount(itemid);
//---

Released under the MIT License.