This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
smutbook:classes:persistence:persistentobject [2023/08/08 14:57] – lee | smutbook:classes:persistence:persistentobject [2023/08/08 18:39] (current) – lee | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PersistentObject ====== | ====== PersistentObject ====== | ||
- | **Inherits from:** Nothing | + | **Extends:** Nothing |
The PersistentObject is the class from which all of the more complex persistent data types are derived. People, Apparel, Transformable attributes, Inventories of various sorts, and many other classes of objects, are all are ultimately derived from PersistentObject. | The PersistentObject is the class from which all of the more complex persistent data types are derived. People, Apparel, Transformable attributes, Inventories of various sorts, and many other classes of objects, are all are ultimately derived from PersistentObject. | ||
Line 18: | Line 18: | ||
* Don't use strict equality because objects may be reallocated differently between game moments, because of the way SugarCube' | * Don't use strict equality because objects may be reallocated differently between game moments, because of the way SugarCube' | ||
- | ===== Static Properties | + | ===== Static Properties/Functions ===== |
Two static utility functions are defined on PersistentObject. | Two static utility functions are defined on PersistentObject. | ||
Line 61: | Line 61: | ||
- | ===== Constructor ===== | + | ===== Constructor( id ) ===== |
// | // | ||
Line 70: | Line 70: | ||
//**Again, do not ever use " | //**Again, do not ever use " | ||
- | None. | + | |
- | ===== Properties | + | ===== Properties/Functions ===== |
==== .id ==== | ==== .id ==== | ||
Line 224: | Line 224: | ||
==== .toJSON() ==== | ==== .toJSON() ==== | ||
Overridden to provide a reviveWrapper that grabs an instantiated copy of the object via PersistentObject.fetch(). | Overridden to provide a reviveWrapper that grabs an instantiated copy of the object via PersistentObject.fetch(). | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ==== .someProperty ==== | ||
- | Description. | ||
- | |||
- | * **Type:** void | ||
- | * **Automatic** | ||
- | * **ReadOnly** | ||
- | |||
- | ==== .someFunction( arg1, ... ) ==== | ||
- | Description. | ||
- | |||
- | * **Type:** Function | ||
- | * **Arguments: | ||
- | * //arg1//: desc | ||
- | * //arg2//: desc | ||
- | * //arg3//: desc | ||
- | * //arg4//: desc | ||
- | * //arg5//: desc | ||
- | * //arg6//: desc | ||
- | * **Returns: | ||
- | * **Throws:** Nothing | ||
- | |||
- | Example:< | ||
- | FIXME | ||
- | </ | ||
- | |||
- | |||