Use repr and add explanation
it's weird to define a variable then openly mutate it (mutate the list values, that is) I wonder if it could have unforeseen consequences There may be when sharing saves : achievements unlocked in the system the save is created may get silently unlocked on the system the save gets loaded...
This commit is contained in:
parent
f8251f921b
commit
7d4aa5f8fd
@ -1,4 +1,5 @@
|
|||||||
define achievements_dict = {
|
define achievements_dict = {
|
||||||
|
# id : (categoryname, title, description, unlocked, icon, secret)
|
||||||
"unlockher": ["Characters", "Granger Danger", "Awarded for unlocking Hermione Granger.", False, "interface/icons/head/hermione.webp", False],
|
"unlockher": ["Characters", "Granger Danger", "Awarded for unlocking Hermione Granger.", False, "interface/icons/head/hermione.webp", False],
|
||||||
"unlockcho": ["Characters", "Chang Dynasty", "Awarded for unlocking Cho Chang.", False, "interface/icons/head/cho.webp", False],
|
"unlockcho": ["Characters", "Chang Dynasty", "Awarded for unlocking Cho Chang.", False, "interface/icons/head/cho.webp", False],
|
||||||
"unlocklun": ["Characters", "Looney Tunes", "Awarded for unlocking Luna Lovegood.", False, "interface/icons/head/luna.webp", False],
|
"unlocklun": ["Characters", "Looney Tunes", "Awarded for unlocking Luna Lovegood.", False, "interface/icons/head/luna.webp", False],
|
||||||
@ -55,7 +56,7 @@ init python:
|
|||||||
"""Check if icons are loadable at init"""
|
"""Check if icons are loadable at init"""
|
||||||
for i in self.achievements.values():
|
for i in self.achievements.values():
|
||||||
if not renpy.loadable(i[4]):
|
if not renpy.loadable(i[4]):
|
||||||
raise IOError("\"{}\"".format(i[4]))
|
raise IOError(repr(i[4]))
|
||||||
|
|
||||||
def attempt_repair(self):
|
def attempt_repair(self):
|
||||||
"""Achievements are kept in a persistent state which is shared across versions,
|
"""Achievements are kept in a persistent state which is shared across versions,
|
||||||
|
Loading…
Reference in New Issue
Block a user