Remove obsolete project files for MrGameEng.AI, MrGameEng.Assets, MrGameEng.Atlases, and MrGameEng.Collisions modules. Introduce new AssetManager and related classes for asset loading and management, including support for texture atlases and mod definitions. Enhance mod loading capabilities with DefDatabase and LanguageManager for JSON-based definitions and localization. Implement a shelf packing algorithm for efficient texture atlas creation.

This commit is contained in:
Leonid Pershin
2026-06-12 07:47:04 +03:00
parent 1f87fb0b74
commit c30e2ce764
70 changed files with 0 additions and 233 deletions
+30
View File
@@ -0,0 +1,30 @@
namespace MrGameEng.Mods;
/// <summary>
/// Base class of all data definitions loaded by <see cref="DefDatabase"/> from mod JSON.
/// Games subclass this per content kind (terrain, things, pawns, …) with plain
/// serializable properties.
/// </summary>
public abstract class Def
{
/// <summary>
/// Unique name within the def type. A later mod redefining the same name fully
/// replaces the earlier def.
/// </summary>
public string DefName { get; init; } = "";
/// <summary>
/// Name of the def (same type) whose fields this def starts from; own fields override
/// the inherited ones. Abstractness is not inherited.
/// </summary>
public string? Parent { get; init; }
/// <summary>Abstract defs only serve as parents and are not emitted into the database.</summary>
public bool Abstract { get; init; }
/// <summary>Display label — plain text or a localization key, as the game decides.</summary>
public string Label { get; init; } = "";
/// <inheritdoc />
public override string ToString() => $"{GetType().Name} {DefName}";
}