|
9.
|
|
|
There are cases where Ren'Py has to merge persistent data from two sources. For example, Ren'Py may need to merge persistent data stored on a USB drive with persistent data from the local machine.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/persistent.rst:46
|
|
10.
|
|
|
Ren'Py does this merging on a field-by-field basis, taking the value of the field that was updated more recently. In some cases, this is not the desired behavior. In that case, the :func:`renpy.register_persistent` function can be used.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/persistent.rst:50
|
|
11.
|
|
|
For example, if we have a set of seen endings, we'd like to take the union of that set when merging data. ::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/persistent.rst:55
|
|
12.
|
|
|
Persistent Functions
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/persistent.rst:69
|
|
13.
|
|
|
Registers a function that is used to merge values of a persistent field loaded from disk with values of current persistent object.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/persistent:5
|
|
14.
|
|
|
`field`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/persistent:9
|
|
15.
|
|
|
The name of a field on the persistent object.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/persistent:9
|
|
16.
|
|
|
`function`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/persistent:26
|
|
17.
|
|
|
A function that is called with three parameters, `old`, `new`, and `current`:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/persistent:12
|
|
18.
|
|
|
`old`
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/inc/persistent:16
|