WTS/game/scripts/utility/periodic_functions.rpy

33 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-05-16 23:48:22 +00:00
init python:
def periodic_achievements():
if _in_replay is None:
if not achievements.status('gold') and game.gold >= 10000:
achievements.unlock("gold")
if not achievements.status('drunkard') and wine_ITEM.owned >= 25:
achievements.unlock("drunkard")
if not achievements.status('peta') and (game.day-states.bird_fed_times) >= 50:
2022-05-16 23:48:22 +00:00
achievements.unlock("peta")
if not achievements.status('petpal') and states.bird_petted_times >= 25:
2022-05-16 23:48:22 +00:00
achievements.unlock("petpal")
if not achievements.status('bros') and states.sna.level >= 100:
2022-05-16 23:48:22 +00:00
achievements.unlock("bros")
if not achievements.status('overwhored') and states.her.level >= 24:
2022-05-16 23:48:22 +00:00
achievements.unlock("overwhored")
if not achievements.status('fireplace') and states.fireplace_started_times >= 5:
2022-05-16 23:48:22 +00:00
achievements.unlock("fireplace")
if not achievements.status('workaholic') and states.paperwork_reports_times >= 5:
2022-05-16 23:48:22 +00:00
achievements.unlock("workaholic")
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