- Jun 10, 2017
- 11,006
- 16,292
To be fair, while the test isn't difficult by itself, it still need that you default some variables while creating them in an init block, then look what their value will be. All this while checking that you haven't forgot something that would invalidate the test.This is what happens when I type something on the forums I haven't tested beforehand.
It's New Year Eve, there's better things to do.
It check that the variable will not be assigned a default value twice, but I doubt that it effectively check if the variable exist ; it's more aI knewdefault
ran pretty late on during RenPy startup... afterinit:
, but my assumption was that it checks to see if the variable already exists before assigning a value.
variableName in defaultVariableStoringList
test than a hasattr( store, variableName )
one. After all, the doc itself have example using both default
and variables that exist for sure (preference/configuration/whatever) ; hell, even in option.rpy there's cases like that if my memory don't betray me.Don't want to lower your mood, but you also missed the leading uppercase telling you that it's a class. But well, once again, it's New Year Eve, that your mind is wandering somewhere else it natural.Grrrr. Damn you Google, you failed me yet again.
... let's completely overlook that I didn't check the context of whole page when I found my initial answer.