Add HSchool.Content project for JSONC definitions, catalog, and map validation. Update solution structure to include new content and tests projects. Enhance school management to support mod packs and map instances, ensuring proper loading and validation. Revise documentation to reflect these changes and update tests for new functionality.
ci / server (push) Failing after 3m36s
ci / client (push) Successful in 13s

This commit is contained in:
Leonid Pershin
2026-08-18 14:35:09 +03:00
parent 37c39a3beb
commit 1bc75244e8
55 changed files with 2289 additions and 59 deletions
+58
View File
@@ -0,0 +1,58 @@
namespace HSchool.Content;
public enum DefKind
{
Action,
Thing,
Position,
Work,
Room,
Building,
Floor,
Territory,
}
/// <summary>Shared JSONC fields. Kind comes from the folder under <c>defs/</c>, not from the file.</summary>
public abstract class Def
{
public required string DefName { get; init; }
public string? Parent { get; init; }
public bool Abstract { get; init; }
}
public sealed class ActionDef : Def;
public sealed class ThingDef : Def
{
public IReadOnlyList<string> Actions { get; init; } = [];
}
public sealed class PositionDef : Def;
public sealed class WorkDef : Def;
public sealed class RoomSlot
{
public required string Key { get; init; }
public required string Thing { get; init; }
public int Count { get; init; } = 1;
}
public sealed class RoomDef : Def
{
public IReadOnlyList<RoomSlot> Slots { get; init; } = [];
public IReadOnlyList<string> Positions { get; init; } = [];
public IReadOnlyList<string> Works { get; init; } = [];
}
public sealed class BuildingDef : Def;
public sealed class FloorDef : Def;
public sealed class TerritoryDef : Def;