OnTechTreeNodeUnlocked
Usage
- No return behavior
Example Autogenerated
csharp
private void OnTechTreeNodeUnlocked( Workbench instance, NodeInstance byID, BasePlayer player )
{
Puts( "OnTechTreeNodeUnlocked works!" );
}
Location
- Workbench::RPC_TechTreeUnlock(BaseEntity/RPCMessage msg)
csharp
//---
int itemid = ItemManager.FindItemDefinition("scrap").itemid;
if (player.inventory.GetAmount(itemid) >= num + num2)
{
player.inventory.Take(null, itemid, num + num2);
player.blueprints.Unlock(byID.itemDef);
Interface.CallHook("OnTechTreeNodeUnlocked", this, byID, player);
Facepunch.Rust.Analytics.Azure.OnBlueprintLearned(player, byID.itemDef, "techtree", num + num2, this);
}
}
}
}