Ok, i looked source file and re-read thread.
You have to separate state of gallery entry from information how does it look.
Locked attribute get reset when game is over, and rightly so as whole game get restarted.
I would replace locked attribute with locked property what will read entry state from persistents and when manually changed will update persistent.
Code: Select all
if not kwargs.get('locked',True):
return not renpy.seen_image(self.img)
if not isinstance(name,tuple):
If you want to check if label was visited, use renpy.seen_label and renpy.game.persistent._seen_ever.
Something like. (Code not tested, but should give idea what i mean) With this approach you could remove BaseClass as gallpic class will not participate in save/load/rollback.
What is 'unclean' with using persistents btw?
P.S.: Unless i really misunderstood your intentions.