private void DoCraft() { //EVAN - some sort of ding or "crafting complete!" sound AkSoundEngine.PostEvent("Crafting_Success", gameObject); CraftingModule.CraftConsumable(stationInv, playerInv, playerResourceInv, naniteRecipe); //var poptext = Instantiate(popText); //poptext.popText.SetText($"{queuedRecipe.DisplayName} crafted"); //poptext.gameObject.transform.SetParent(CraftButton.transform); //poptext.GetComponent<RectTransform>().anchoredPosition = Vector3.zero; //var amountOwned = playerInventory.GetItemAmount(queuedRecipe.Output.item); //if (amountOwned < 0) //{ // amountOwned = 0; //} ////show the player how many of the output item they already have //amountInInventory.SetText($"{queuedRecipe.Output.item.Name} in inventory: {amountOwned}"); //storageDials.UpdateDials(); //UpdateOwnedAmounts(); //queuedRecipe = null; popTextMSG = null; isSoundPlayed = false; }
private void DoCraft() { //EVAN - some sort of ding or "crafting complete!" sound AkSoundEngine.PostEvent("Crafting_Success", gameObject); CraftingModule.CraftConsumable(shipInventory, playerInventory, playerResourceInventory, queuedRecipe); var poptext = Instantiate(popText); poptext.popText.SetText($"{queuedRecipe.DisplayName} crafted"); poptext.gameObject.transform.SetParent(CraftButton.transform); poptext.GetComponent <RectTransform>().anchoredPosition = Vector3.zero; storageDials.UpdateDials(); UpdateOwnedAmounts(); queuedRecipe = null; popTextMSG = null; }