From 04f76d2b548941cb61f570a6211a681b898be115 Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Tue, 26 Mar 2024 20:36:44 +0100 Subject: [PATCH] Warn about using reset_variables --- game/scripts/utility/common_functions.rpy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/game/scripts/utility/common_functions.rpy b/game/scripts/utility/common_functions.rpy index 2fe4f051..964e7543 100644 --- a/game/scripts/utility/common_functions.rpy +++ b/game/scripts/utility/common_functions.rpy @@ -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