using ProjectM.Simulation; using UnityEngine; namespace ProjectM.Authoring { /// /// Designer-facing definition of one item (resource, tool, weapon, gear, consumable). Numeric/byte fields /// are baked into the ItemDatabase blob (immutable, Burst-fast runtime config). Category and Tier are /// BYTES, not enums, to dodge BOTH the MCP enum-drop hazard (manage_* silently drop enum fields when set /// via tooling) AND the cross-assembly enum-in-Burst hazard. UI icon/description are deferred to a later /// managed lookup keyed by id, exactly like AbilityDefinition. /// [CreateAssetMenu(menuName = "Project M/Item Definition", fileName = "Item_")] public class ItemDefinition : ScriptableObject { [Tooltip("Stable item id (ushort range). Keep 1=Aether, 2=Ore, 3=Biomass; reserve >3 for new items; 0 = none.")] public int ItemId = 4; public string DisplayName = "Item"; [Tooltip("ItemCategory byte: 0=Resource, 1=Tool, 2=Weapon, 3=Gear, 4=Consumable.")] public byte Category = ItemCategory.Resource; [Tooltip("Progression tier (0 = base). Higher-tier tools harvest higher-tier nodes / hit harder.")] public byte Tier = 0; [Min(1)] [Tooltip("Max units that stack in one inventory slot (1 for non-stacking equipment).")] public int StackMax = 999; } }