- 组合式单位与数值基础重构:scripts/Models/UnitModel.cs, scripts/Models/UnitComponents.cs, scripts/Models/StudentModel.cs, scripts/Models/MentorModel.cs, scripts/Models/StaffModel.cs, scripts/Models/PropertyValue.cs, scripts/Models/StatusValue.cs - 任务与运行时状态骨架:scripts/Models/Task.cs, scripts/Models/TaskDefinitions.cs, scripts/Models/GameState.cs - 配置与规则定义骨架:scripts/Models/DefinitionSupport.cs, scripts/Models/DomainEnums.cs, scripts/Models/Modifiers.cs, scripts/Models/DisciplineDefinitions.cs, scripts/Models/SynergyDefinitions.cs, scripts/Models/ItemDefinitions.cs, scripts/Models/PaperDefinitions.cs, scripts/Models/RogueliteDefinitions.cs, scripts/Models/GameContentDatabase.cs, scripts/Models/CoreIds.cs - MVC/会话/系统/i18n/Mod 支撑:scripts/Core/GameSession.cs, scripts/Core/GameSystems.cs, scripts/Core/GameController.cs, scripts/Core/Mvc.cs, scripts/Core/LocalizationService.cs, scripts/Core/ContentRegistry.cs, scripts/Core/ModManifest.cs, scripts/Core/EventBus.cs - 主控流程衔接:scripts/GameManager.cs
60 lines
1.3 KiB
C#
60 lines
1.3 KiB
C#
using System.Collections.Generic;
|
||
|
||
namespace Models;
|
||
|
||
/// <summary>
|
||
/// 装备/设施定义(通用 + 学科专用)
|
||
/// 设计说明:
|
||
/// 1) Facility 与 Equipment 统一为 ItemDefinition,不同类别通过枚举区分。
|
||
/// 2) 效果使用 ModifierBundle + RuleIds 组合,便于特殊规则注入。
|
||
/// 注意事项:
|
||
/// - Placement/Slot 为 UI 与摆放系统提供约束,不做逻辑判断。
|
||
/// 未来扩展:
|
||
/// - 可加入“耐久度/维护成本/占地大小”等字段。
|
||
/// </summary>
|
||
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<string> RuleIds { get; } = new();
|
||
}
|
||
|