Class Database
- Namespace
- Dec
- Assembly
- dec.dll
Contains information on all decs that exist.
public static class Database
- Inheritance
-
objectDatabase
Remarks
This is generally not useful for anything except debug functionality.
Properties
Count
The total number of decs that exist.
public static int Count { get; }
Property Value
List
All decs.
public static IEnumerable<Dec> List { get; }
Property Value
Remarks
Decs are listed in no guaranteed or stable order.
Methods
Clear()
Clears all global dec state, preparing the environment for a new Parser run.
public static void Clear()
Remarks
This exists mostly for the sake of unit tests. It is generally not recommended to use this during actual gameplay. Be aware that re-parsing XML files will create an entire new set of Dec objects, it will not replace data in existing objects.
Create(Type, string)
Creates a Dec.
public static Dec Create(Type type, string decName)
Parameters
Returns
Remarks
This will be supported for dynamically-generated Decs in the future, but right now exists mostly for the Composer functionality. It is currently not recommended to use this during actual gameplay.
At this time, this will not register Indexes. This behavior may change at some point in the future.
Create<T>(string)
Creates a Dec.
public static T Create<T>(string decName) where T : Dec, new()
Parameters
decName
string
Returns
- T
Type Parameters
T
Remarks
This will be supported for dynamically-generated Decs in the future, but right now exists mostly for the Composer functionality. It is currently not recommended to use this during actual gameplay.
At this time, this will not register Indexes. This behavior may change at some point in the future.
Delete(Dec)
Deletes an existing dec.
public static void Delete(Dec dec)
Parameters
dec
Dec
Remarks
This exists mostly for the Composer functionality. It is generally not recommended to use this during actual gameplay.
At this time, this will not unregister existing Indexes. This behavior may change at some point in the future.
Get(Type, string)
Retrieves a dec by base dec type and name.
public static Dec Get(Type type, string name)
Parameters
Returns
Remarks
Returns null if no such dec exists.
RegisterLookup(object, Path)
Registers a path lookup with the database.
public static void RegisterLookup(object obj, Path path)
Parameters
obj
objectpath
Path
Remarks
This is a hack job put in because I need the functionality on my own project. Don't be surprised if this behavior changes dramatically at some point.
Rename(Dec, string)
Renames an existing dec.
public static void Rename(Dec dec, string decName)
Parameters
Remarks
This exists mostly for the Composer functionality. It is generally not recommended to use this during actual gameplay.