Echo Hollow

Gender-Bending Interactive Stories! :D

User Tools

Site Tools


smutbook:classes:persistence:persistentobject

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
smutbook:classes:persistence:persistentobject [2023/08/08 14:57] leesmutbook: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's game state history works.   * Don't use strict equality because objects may be reallocated differently between game moments, because of the way SugarCube's game state history works.
  
-===== Static Properties and Member Functions =====+===== Static Properties/Functions =====
  
 Two static utility functions are defined on PersistentObject.  These are called through the global class name rather than through specific instances of objects. Two static utility functions are defined on PersistentObject.  These are called through the global class name rather than through specific instances of objects.
Line 61: Line 61:
  
  
-===== Constructor =====+===== Constructor( id ) =====
  
 //**ALERT!  TAKE NOTE!  ALERT!**// //**ALERT!  TAKE NOTE!  ALERT!**//
Line 70: Line 70:
  
 //**Again, do not ever use "new" to instantiate a PersistentObject.  Instead, store the result of PersistentObject.define() somewhere and reference it when needed, or fetch the object by its 'id' with PersistentObject.fetch().**// //**Again, do not ever use "new" to instantiate a PersistentObject.  Instead, store the result of PersistentObject.define() somewhere and reference it when needed, or fetch the object by its 'id' with PersistentObject.fetch().**//
- None. + 
-===== Properties and Member Functions =====+===== 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:** void 
-  * **Throws:** Nothing 
- 
-Example:<code> 
-FIXME 
-</code> 
- 
- 
  
smutbook/classes/persistence/persistentobject.1691531861.txt.gz · Last modified: 2023/08/08 14:57 by lee