mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 08:44:29 +08:00
- 实现面向静态游戏内容的AI-First配置方案,支持怪物、物品、技能、任务等数据管理 - 集成YAML作为配置源文件格式,JSON Schema作为结构描述标准 - 提供一对象一文件的目录组织结构和运行时只读查询功能 - 实现Source Generator生成配置类型、表包装和注册/访问辅助代码 - 添加VS Code插件支持配置浏览、raw编辑、schema打开和递归校验功能 - 创建YamlConfigSchemaValidator类提供YAML与JSON Schema的运行时校验能力 - 支持嵌套对象、对象数组、标量数组的递归校验和深层约束检查 - 实现跨表引用验证和配置热重载功能 - 提供详细的错误诊断信息和开发期工具链支持
126 lines
4.2 KiB
Plaintext
126 lines
4.2 KiB
Plaintext
// <auto-generated />
|
|
#nullable enable
|
|
|
|
namespace GFramework.Game.Config.Generated;
|
|
|
|
/// <summary>
|
|
/// Auto-generated config type for schema file 'monster.schema.json'.
|
|
/// Represents one monster entry generated from schema metadata.
|
|
/// </summary>
|
|
public sealed partial class MonsterConfig
|
|
{
|
|
/// <summary>
|
|
/// Unique monster identifier.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'id'.
|
|
/// </remarks>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Localized monster display name.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'name'.
|
|
/// Display title: 'Monster Name'.
|
|
/// Allowed values: Slime, Goblin.
|
|
/// Constraints: minLength = 3, maxLength = 16.
|
|
/// Generated default initializer: = "Slime";
|
|
/// </remarks>
|
|
public string Name { get; set; } = "Slime";
|
|
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'hp'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'hp'.
|
|
/// Constraints: minimum = 1, maximum = 999.
|
|
/// Generated default initializer: = 10;
|
|
/// </remarks>
|
|
public int? Hp { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Referenced drop ids.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'dropItems'.
|
|
/// Allowed values: potion, slime_gel.
|
|
/// References config table: 'item'.
|
|
/// Item constraints: minLength = 3, maxLength = 12.
|
|
/// Generated default initializer: = new string[] { "potion" };
|
|
/// </remarks>
|
|
public global::System.Collections.Generic.IReadOnlyList<string> DropItems { get; set; } = new string[] { "potion" };
|
|
|
|
/// <summary>
|
|
/// Reward payload.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'reward'.
|
|
/// Generated default initializer: = new();
|
|
/// </remarks>
|
|
public RewardConfig Reward { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Encounter phases.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'phases'.
|
|
/// Generated default initializer: = global::System.Array.Empty<PhasesItemConfig>();
|
|
/// </remarks>
|
|
public global::System.Collections.Generic.IReadOnlyList<PhasesItemConfig> Phases { get; set; } = global::System.Array.Empty<PhasesItemConfig>();
|
|
|
|
/// <summary>
|
|
/// Auto-generated nested config type for schema property path 'reward'.
|
|
/// Reward payload.
|
|
/// </summary>
|
|
public sealed partial class RewardConfig
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'reward.gold'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'reward.gold'.
|
|
/// Constraints: minimum = 0.
|
|
/// Generated default initializer: = 10;
|
|
/// </remarks>
|
|
public int Gold { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'reward.currency'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'reward.currency'.
|
|
/// Allowed values: coin, gem.
|
|
/// Generated default initializer: = string.Empty;
|
|
/// </remarks>
|
|
public string Currency { get; set; } = string.Empty;
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Auto-generated nested config type for schema property path 'phases[]'.
|
|
/// This nested type is generated so object-valued schema fields remain strongly typed in consumer code.
|
|
/// </summary>
|
|
public sealed partial class PhasesItemConfig
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the value mapped from schema property path 'phases[].wave'.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'phases[].wave'.
|
|
/// </remarks>
|
|
public int Wave { get; set; }
|
|
|
|
/// <summary>
|
|
/// Monster reference id.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Schema property path: 'phases[].monsterId'.
|
|
/// Constraints: minLength = 2, maxLength = 32.
|
|
/// Generated default initializer: = string.Empty;
|
|
/// </remarks>
|
|
public string MonsterId { get; set; } = string.Empty;
|
|
|
|
}
|
|
}
|