using System.Collections.Generic; namespace Models; /// /// 装备/设施定义(通用 + 学科专用) /// 设计说明: /// 1) Facility 与 Equipment 统一为 ItemDefinition,不同类别通过枚举区分。 /// 2) 效果使用 ModifierBundle + RuleIds 组合,便于特殊规则注入。 /// 注意事项: /// - Placement/Slot 为 UI 与摆放系统提供约束,不做逻辑判断。 /// 未来扩展: /// - 可加入“耐久度/维护成本/占地大小”等字段。 /// public enum ItemCategory { Facility, Equipment, Consumable } public enum FacilityPlacement { Lab, ServerRoom, Admin, Library, RestArea, Field, Global } public enum EquipmentSlot { Tool, Accessory, Body, Head, Hand } public sealed class ItemDefinition { public DefinitionHeader Header { get; set; } = new(); public ItemCategory Category { get; set; } public string DisciplineId { get; set; } public FacilityPlacement Placement { get; set; } public EquipmentSlot Slot { get; set; } public ItemEffect Effect { get; set; } = new(); public bool IsUnique { get; set; } public int MaxStack { get; set; } = 1; } public sealed class ItemEffect { public ModifierBundle Modifiers { get; set; } = new(); public List RuleIds { get; } = new(); }