mirror of
				https://github.com/DerTyp7/harvestdale-unity.git
				synced 2025-10-31 05:27:07 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			504 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			504 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using UnityEngine;
 | |
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| [CreateAssetMenu(fileName = "Item", menuName = "Harvestdale/Items/Item", order = 0)]
 | |
| public class Item : ScriptableObject
 | |
| {
 | |
|   public string uuid;
 | |
|   public string itemName;
 | |
| 
 | |
|   public Sprite sprite;
 | |
| 
 | |
|   [Tooltip("Tools will set this to false on Awake()")]
 | |
|   public bool stackable = true;
 | |
|   public int maxStackSize = 100;
 | |
| 
 | |
| 
 | |
|   private void OnEnable()
 | |
|   {
 | |
|     if (!stackable)
 | |
|     {
 | |
|       maxStackSize = 1;
 | |
|     }
 | |
|   }
 | |
| } | 
