Scripting API
Scripting API
ProjectStamp
Record in Abyss.Core, from Abyss.Core.
The engine a project was last opened with, and the game's identity: settings/project.json, which the editor reads as it opens the project, asks about when it is another engine than its own, and then writes its own into, giving a game with no identity one.
public record ProjectStampConstructors
ProjectStamp
public ProjectStamp(string Engine)The engine a project was last opened with, and the game's identity: settings/project.json, which the editor reads as it opens the project, asks about when it is another engine than its own, and then writes its own into, giving a game with no identity one.
Parameters
Engine: The engine's version,0.1.0.
Properties
Engine
public string Engine { get; init; }The engine's version, 0.1.0.
Game
public AssetGuid Game { get; init; }The game's identity, the same for every build of it: what each pack a build makes is stamped with, so a game attaches no other game's (PackStamp). None for a game that has never been opened by an editor giving one.
Now
public static ProjectStamp Now { get; }The stamp of the engine running now, with no game's identity.
Methods
FileIn
public static string FileIn(string game)Where a game keeps it: settings/project.json in its folder.
Parameters
game
AgeOf
public static ProjectAge AgeOf(ProjectStamp? stamp)How a project compares with the engine running now.
Parameters
stamp: The project's stamp; null for none.
Read
public static ProjectStamp? Read(string game)A game's stamp; null where it has none.
Parameters
game
Exceptions
FormatException: The file is not a stamp this build reads.IOException: The file is there and cannot be read.
Write
public void Write(string game)Writes the stamp into a game's folder.
Parameters
game
Constants
FileName
public const string FileName = "project.json"The file, under the game's settings folder.
PathName
public const string PathName = "settings/project.json"What it is called in a game's folder: settings/project.json.
CurrentVersion
public const int CurrentVersion = 1The version of the file this build writes, and the newest it reads.
