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"),
|
||||
"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 Achievements Menu": (Text("⭐", align=(0.5, 0.5)), Jump("achievements"), "True"),
|
||||
},
|
||||
hovered=Show(
|
||||
"gui_tooltip",
|
||||
@ -136,4 +137,4 @@ label main_room_menu:
|
||||
if states.env.daytime:
|
||||
jump day_resume
|
||||
else:
|
||||
jump night_resume
|
||||
jump night_resume
|
||||
|
@ -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:
|
||||
import requests
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user