The registry object allows you to read from and write to the player registry (i.e. the persistent memory). The registry consists of named registry sections, and each registry section contains entries (key/value pairs).
To create a registry object, first load the
brightsign/registry module using the
Require() method. Then create an instance of the registry class.
Use this interface for registry read/write operations.
Returns the string registry value associated with the specified key. You must also specify the registry section where the key is stored.
Returns the specified registry section in the following format:
Returns all registry sections in the following format:
Writes a single registry entry to the specified registry section.
Writes the specified registry section to the registry. If the registry section does not exist, it will be created; otherwise, the entries will be added or updated in the existing registry section (preexisting registry entries that are not specified in the write operation will be unaffected).
Writes the specified registry sections/entries to the registry. Registry sections and entries that do not exist will be created, and existing entries will be updated (preexisting registry sections/entries that are not specified in the write operation will be unaffected).
To delete a registry entry or section, assign it a
write() operations are flushed implicitly; flush calls are not necessary.
write() method will not perform well when used to write multiple entries successively. For optimal performance, use the single-section
write() method to write multiple entries to a single section and the full-registry method to write to multiple sections.
While it is possible to read the entire registry, modfiy the return value, and write it back into the registry, this is not a reccomended practice: It may cause race conditions among different parts of the system that are attempting to write to the registry at the same time.