2022-05-16 23:48:22 +00:00
|
|
|
init python:
|
|
|
|
def periodic_achievements():
|
2023-07-04 14:55:11 +00:00
|
|
|
if not hasattr(store, "achievements") or _in_replay:
|
2023-07-02 16:03:44 +00:00
|
|
|
return
|
|
|
|
|
2024-04-25 19:12:50 +00:00
|
|
|
if not achievements.status('gold') and states.env.gold >= 10000:
|
2023-07-04 14:55:11 +00:00
|
|
|
achievements.unlock("gold")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-07-04 14:55:11 +00:00
|
|
|
if not achievements.status('drunkard') and wine_ITEM.owned >= 25:
|
|
|
|
achievements.unlock("drunkard")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-04-25 19:14:25 +00:00
|
|
|
if not achievements.status('peta') and (states.env.day-states.bird_fed_times) >= 50:
|
2023-07-04 14:55:11 +00:00
|
|
|
achievements.unlock("peta")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-07-04 14:55:11 +00:00
|
|
|
if not achievements.status('petpal') and states.bird_petted_times >= 25:
|
|
|
|
achievements.unlock("petpal")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-07-04 14:55:11 +00:00
|
|
|
if not achievements.status('bros') and states.sna.level >= 100:
|
|
|
|
achievements.unlock("bros")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-09-13 18:52:19 +00:00
|
|
|
if not achievements.status('overwhored') and (states.her.level >= 24 or states.cho.level >= 24 or states.lun.level >= 24):
|
2023-07-04 14:55:11 +00:00
|
|
|
achievements.unlock("overwhored")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-07-04 14:55:11 +00:00
|
|
|
if not achievements.status('fireplace') and states.fireplace_started_times >= 5:
|
|
|
|
achievements.unlock("fireplace")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-07-04 14:55:11 +00:00
|
|
|
if not achievements.status('workaholic') and states.paperwork_reports_times >= 5:
|
|
|
|
achievements.unlock("workaholic")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
def periodic_callbacks():
|
|
|
|
"""Call functions that need to be checked periodically (i.e. achievement unlocks) at around 20Hz"""
|
|
|
|
periodic_achievements()
|
|
|
|
|
|
|
|
define config.periodic_callback = periodic_callbacks
|