Reimplement Achievements interface
This commit is contained in:
parent
45695350c9
commit
352091267c
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,7 @@ default desk_OBJ = RoomObject(
|
|||||||
"Do Paperwork": (Text("📝", align=(0.5, 0.5)), Jump("paperwork"), "states.paperwork_unlocked"),
|
"Do Paperwork": (Text("📝", align=(0.5, 0.5)), Jump("paperwork"), "states.paperwork_unlocked"),
|
||||||
"Open Deck Builder": (Text("🃏", align=(0.5, 0.5)), Jump("deck_builder"), "states.cardgame.unlocked"),
|
"Open Deck Builder": (Text("🃏", align=(0.5, 0.5)), Jump("deck_builder"), "states.cardgame.unlocked"),
|
||||||
"Open Cheats Menu": (Text("🕹️", align=(0.5, 0.5)), Jump("cheats"), "states.env.cheats"),
|
"Open Cheats Menu": (Text("🕹️", align=(0.5, 0.5)), Jump("cheats"), "states.env.cheats"),
|
||||||
|
"Open Achievements Menu": (Text("⭐", align=(0.5, 0.5)), Jump("achievements"), "True"),
|
||||||
},
|
},
|
||||||
hovered=Show(
|
hovered=Show(
|
||||||
"gui_tooltip",
|
"gui_tooltip",
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
init python hide:
|
||||||
|
# keep the achievements from earlier versions
|
||||||
|
if isinstance(persistent.achievements, dict):
|
||||||
|
# id : [categoryname, title, description, unlocked, icon, secret]
|
||||||
|
for k, v in persistent.achievements.items():
|
||||||
|
if v[3]:
|
||||||
|
achievement.grant(k)
|
||||||
|
del persistent.achievements
|
||||||
|
|
||||||
init python:
|
init python:
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user