add some extra assets FX and SFX
This commit is contained in:
@@ -16,6 +16,8 @@ public class craftingSystem : MonoBehaviour
|
||||
|
||||
public bool ignoreCheckMaterialsNeededToCraftEnabled;
|
||||
|
||||
public bool spawnAllInventoryObjects;
|
||||
|
||||
[Space]
|
||||
[Header ("Blueprints/recipes unlocked")]
|
||||
[Space]
|
||||
@@ -231,10 +233,37 @@ public class craftingSystem : MonoBehaviour
|
||||
mainInventorymanager.removeObjectAmountFromInventory (objectIndex, amountToMove);
|
||||
}
|
||||
|
||||
public bool checkIfPlayerInventoryIsFull (string inventoryObjectName, int inventoryObjectAmount)
|
||||
{
|
||||
bool isInventoryFull = mainInventorymanager.isInventoryFull ();
|
||||
|
||||
if (isInventoryFull) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mainInventorymanager.existInventoryInfoFromName (inventoryObjectName)) {
|
||||
|
||||
inventoryInfo currentInventoryInfo = new inventoryInfo (mainInventorymanager.getInventoryInfoByName (inventoryObjectName));
|
||||
|
||||
if (currentInventoryInfo.inventoryGameObject != null) {
|
||||
|
||||
bool enoughFreeSpace = mainInventorymanager.checkIfObjectCanBeStored (currentInventoryInfo.inventoryGameObject, inventoryObjectAmount);
|
||||
|
||||
return enoughFreeSpace;
|
||||
} else {
|
||||
print ("WARNING: Inventory object called " + inventoryObjectName + " not found or is not configured properly in the inventory list manager");
|
||||
}
|
||||
} else {
|
||||
print ("WARNING: Inventory object called " + inventoryObjectName + " not found or is not configured properly in the inventory list manager");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void giveInventoryObjectToCharacter (string objectName, int objectAmount)
|
||||
{
|
||||
applyDamage.giveInventoryObjectToCharacter (playerGameObject, objectName, objectAmount,
|
||||
positionToSpawnObjectsIfNotSpaceOnInventory, 0, 2, ForceMode.Force, 0, false, false, false);
|
||||
positionToSpawnObjectsIfNotSpaceOnInventory, 0, 2, ForceMode.Force, 0, spawnAllInventoryObjects, false, true);
|
||||
}
|
||||
|
||||
public List<inventoryInfo> getInventoryList ()
|
||||
@@ -612,10 +641,12 @@ public class craftingSystem : MonoBehaviour
|
||||
mainCraftingUISystem.setCraftObjectInTimeInfoList (newCraftObjectInTimeSimpleInfoList);
|
||||
}
|
||||
|
||||
public void setOpenFromWorkbenchState (bool state, List<string> newObjectCategoriesToCraftAvailableOnCurrentBench)
|
||||
public void setOpenFromWorkbenchState (bool state, List<string> newObjectCategoriesToCraftAvailableOnCurrentBench,
|
||||
bool allowToCraftAllObjectsOnCurrentBenchValue)
|
||||
{
|
||||
if (mainCraftingUISystem != null) {
|
||||
mainCraftingUISystem.setOpenFromWorkbenchState (state, newObjectCategoriesToCraftAvailableOnCurrentBench);
|
||||
mainCraftingUISystem.setOpenFromWorkbenchState (state, newObjectCategoriesToCraftAvailableOnCurrentBench,
|
||||
allowToCraftAllObjectsOnCurrentBenchValue);
|
||||
|
||||
menuOpenedFromWorkbench = state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user