namespace MrGameEng.Mods;
///
/// Base class of all data definitions loaded by from mod JSON.
/// Games subclass this per content kind (terrain, things, pawns, …) with plain
/// serializable properties.
///
public abstract class Def
{
///
/// Unique name within the def type. A later mod redefining the same name fully
/// replaces the earlier def.
///
public string DefName { get; init; } = "";
///
/// Name of the def (same type) whose fields this def starts from; own fields override
/// the inherited ones. Abstractness is not inherited.
///
public string? Parent { get; init; }
/// Abstract defs only serve as parents and are not emitted into the database.
public bool Abstract { get; init; }
/// Display label — plain text or a localization key, as the game decides.
public string Label { get; init; } = "";
///
public override string ToString() => $"{GetType().Name} {DefName}";
}