Warn about using reset_variables

(cherry picked from commit 04f76d2b54)
This commit is contained in:
Gouvernathor 2024-03-26 20:36:44 +01:00 committed by LoafyLemon
parent a7a9fe2d9e
commit 068629d34d
1 changed files with 4 additions and 1 deletions

View File

@ -102,7 +102,10 @@ init python early:
print(e)
def reset_variables(*args):
"""Resets the given variables to their default values."""
"""
Resets the given variables to their default values.
Should not be used : instead, define the base value and have a function set the defaulted one to the defined value (or a copy of it).
"""
# Refer to renpy.ast.Default.set_default for implementation details
defaults_set = renpy.store._defaults_set
changed_set = renpy.store.__dict__.ever_been_changed