From 583105e4aabdca19f958e2cfe93867a5c23b1b9a Mon Sep 17 00:00:00 2001 From: AlienMajik <118037572+AlienMajik@users.noreply.github.com> Date: Sat, 1 Feb 2025 20:22:55 -0800 Subject: [PATCH] Update age.py Added age_checkpoint method in plugin is a function that is called during the on_epoch event, which occurs periodically as your Pwnagotchi goes through its training or operating cycles. The purpose of this method is likely to trigger a status update or event notification when epochs are met. --- age.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/age.py b/age.py index bacd42c..dcacba1 100644 --- a/age.py +++ b/age.py @@ -17,19 +17,19 @@ class Age(plugins.Plugin): __description__ = 'Enhanced plugin with achievement tiers, configurable titles, decay mechanics, and progress tracking.' DEFAULT_AGE_TITLES = { - 500: "Newborn", - 1000: "Script Kiddie", - 2000: "WiFi Hobo", - 5000: "Packet Wizard", - 10000: "Elder Hacker", + 1000: "Newborn", + 2000: "Script Kiddie", + 5000: "WiFi Hobo", + 10000: "Packet Wizard", + 20000: "Elder Hacker", 33333: "WiFi Deity" } DEFAULT_STRENGTH_TITLES = { - 500: "Weakling", - 1000: "Lightweight", - 2000: "Deauth King", - 5000: "Handshake Titan", + 1000: "Weakling", + 2000: "Lightweight", + 5000: "Deauth King", + 10000: "Handshake Titan", 20000: "Unstoppable" } @@ -180,6 +180,13 @@ class Age(plugins.Plugin): self.save_data() + def age_checkpoint(self, agent): + # Status update at every epoch milestone (for example every 100 epochs) + view = agent.view() + view.set('face', faces.HAPPY) + view.set('status', f"Epoch milestone: {self.epochs} epochs!") + view.update(force=True) + def on_handshake(self, agent, *args): self.last_active_epoch = self.epochs enc = args[2].get('encryption', '').lower() @@ -280,3 +287,4 @@ class Age(plugins.Plugin): return f"{num:.1f}T" +