public void ForgetRecipe(CraftingRecipe recipe)
        {
            GetKnownRecipesInCategory(recipe.Category).Remove(recipe);

            //Prevent message being sent twice when local host
            if (playerScript == PlayerManager.LocalPlayerScript)
            {
                if (CraftingMenu.Instance == null)
                {
                    return;
                }

                //Remove button from crafting Ui for local host
                CraftingMenu.Instance.OnPlayerForgotRecipe(recipe);
                return;
            }

            SendForgottenCraftingRecipe.SendTo(playerScript.connectedPlayer, recipe);
        }
示例#2
0
 public void ForgetRecipe(CraftingRecipe recipe)
 {
     GetKnownRecipesInCategory(recipe.Category).Remove(recipe);
     SendForgottenCraftingRecipe.SendTo(playerScript.connectedPlayer, recipe);
 }