ModuleAssemblies
namespace Griff;
public static class ModuleAssembliesThe assemblies Griff’s modules run from (see Griff.Runtime.GameModule). A module’s running parts are an assembly of their own, Griff.Modules.<Genre>, and its editor parts another beside it (Griff.Modules.<Genre>.Editor), so Griff names none of them: a program plays with the module assemblies it has, found by their names beside it (the editor, the tests and the tools have them all), and an exported game’s host loads those its export carries (Load: the modules its project uses, in its game folder’s ExportLayout.ModulesFolder) before it reads the game. What’s worked out from them (GameModule.All, the components every game knows, the dialogue tags modules do) follows Revision.
Properties
Section titled “Properties”public static IReadOnlyList<Assembly> All { get; }The module assemblies this program plays with: those beside it, and any a host has loaded since.
Revision
Section titled “Revision”public static int Revision { get; }Changes whenever a host loads more module assemblies, so what was worked out from them is again.
Methods
Section titled “Methods”IsGriffs
Section titled “IsGriffs”public static bool IsGriffs(Type type)Whether type is Griff’s own or a module’s, rather than a script’s.
IsModule
Section titled “IsModule”public static bool IsModule(Assembly assembly)Whether assembly is a module’s running parts (not its editor parts).
IsModuleName
Section titled “IsModuleName”public static bool IsModuleName(string? name)Whether an assembly called name is a module’s running parts: “Griff.Modules.Match3”.
public static IReadOnlyList<Assembly> Load(string folder)Loads the module assemblies in folder (an exported game’s ExportLayout.ModulesFolder) that aren’t loaded yet, each once, from their bytes (so the files aren’t held while the game runs). Returns them all, those that were already loaded too. A folder that isn’t there has none.
public static Assembly Load(string name, byte[] image)Loads the module assembly called name from image (one a browser fetched with its game, “Griff.Modules.Match3”), unless one of that name is loaded already, which it returns.
Fields
Section titled “Fields”EditorSuffix
Section titled “EditorSuffix”public const string EditorSuffixWhat a module’s editor parts’ assembly is called after its module’s: “.Editor”.
Prefix
Section titled “Prefix”public const string PrefixWhat a module’s running assembly is called before its genre: “Griff.Modules.”.