Can we get some hooks added please when time if posable. TechTreeData
public bool PlayerCanUnlock(BasePlayer player, TechTreeData.NodeInstance node)
{
if (this.PlayerHasPathForUnlock(player, node))
return !this.HasPlayerUnlocked(player, node);
return false;
}
public bool HasPlayerUnlocked(BasePlayer player, TechTreeData.NodeInstance node)
{
if (!node.IsGroup())
return player.blueprints.HasUnlocked(node.itemDef);
bool flag = true;
foreach (int output in node.outputs)
{
TechTreeData.NodeInstance byId = this.GetByID(output);
if (!this.HasPlayerUnlocked(player, byId))
flag = false;
}
return flag;
}