Files
Shopkeeper/Assets/Scripts/Items/ShopItemData.cs
Caleb Sandford deQuincey e9c9bc4409 initial game submission
2025-06-11 13:04:35 +01:00

36 lines
969 B
C#

using UnityEngine;
[CreateAssetMenu(fileName = "ShopItemData", menuName = "Shop/Shop Item Data", order = 1)]
public class ShopItemData : ScriptableObject
{
[Header("Basic Info")]
public string itemName;
public string displayName;
[TextArea]
public string description;
[Header("Category")]
public ShopItemCategory itemCategory;
public ShelfData.ShelfType requiredShelfType;
[Header("Pricing & Stock")]
public float price = 1.0f;
public int packSize = 1; // How many per crate/delivery
[Header("Prefabs")]
public GameObject prefab; // The actual item prefab
public GameObject cratePrefab; // Optional: crate for bulk delivery
[Header("Perishables")]
public bool perishable = false;
public float maxHealth = 100f; // For perishable/decay logic
// Add more fields as needed (icon, weight, etc.)
public enum ShopItemCategory
{
Food,
Electronics,
Misc
}
}