Untitled
unknown
plain_text
a year ago
4.6 kB
7
Indexable
def _create_default_metrics(self) -> Dict:
"""Create default metrics structure"""
current_time = datetime.now()
month = current_time.month
current_season = 'summer' if 5 <= month <= 8 else 'winter'
# Create initial achievements dictionary with all achievements locked
initial_achievements = {
'first_sort': {
'status': 'locked',
'unlock_date': None,
'name': 'Beginner Sorter',
'description': 'Sort your first item'
},
'early_bird': {
'status': 'locked',
'unlock_date': None,
'name': 'Early Bird',
'description': 'Sort items before 9 AM'
},
'night_owl': {
'status': 'locked',
'unlock_date': None,
'name': 'Night Owl',
'description': 'Sort items after 8 PM'
},
'sorting_expert_bronze': {
'status': 'locked',
'unlock_date': None,
'name': 'Sorting Expert Bronze',
'description': 'Sort 100 items'
},
'sorting_expert_silver': {
'status': 'locked',
'unlock_date': None,
'name': 'Sorting Expert Silver',
'description': 'Sort 500 items'
},
'sorting_expert_gold': {
'status': 'locked',
'unlock_date': None,
'name': 'Sorting Expert Gold',
'description': 'Sort 1000 items'
},
'perfect_balance': {
'status': 'locked',
'unlock_date': None,
'name': 'Perfect Balance',
'description': 'Keep all bins within 20% fill level of each other for 7 days'
},
'time_lord': {
'status': 'locked',
'unlock_date': None,
'name': 'Time Lord',
'description': 'Sort items in every hour of the day'
},
'weekend_warrior': {
'status': 'locked',
'unlock_date': None,
'name': 'Weekend Warrior',
'description': 'Sort items on 4 consecutive weekends'
},
'seasonal_master': {
'status': 'locked',
'unlock_date': None,
'name': 'Seasonal Master',
'description': 'Sort items in both summer and winter'
},
'summer_sorter': {
'status': 'locked',
'unlock_date': None,
'name': 'Summer Sorter',
'description': 'Sort 500 items during summer months'
},
'daily_dedication': {
'status': 'locked',
'unlock_date': None,
'name': 'Daily Dedication',
'description': 'Sort items 7 days in a row'
},
'monthly_master': {
'status': 'locked',
'unlock_date': None,
'name': 'Monthly Master',
'description': 'Sort items every day for a month'
},
'quick_draw': {
'status': 'locked',
'unlock_date': None,
'name': 'Quick Draw',
'description': 'Sort 3 items within 5 minutes'
},
'tree_hero': {
'status': 'locked',
'unlock_date': None,
'name': 'Tree Hero',
'description': 'Save equivalent of 10 trees through paper recycling'
},
# Add bin specialization achievements
'paper_specialist': {
'status': 'locked',
'unlock_date': None,
'name': 'Paper Champion',
'description': 'Sort 100 paper items'
},
'organic_specialist': {
'status': 'locked',
'unlock_date': None,
'name': 'Organic Expert',
'description': 'Sort 100 organic items'
},
'recycling_specialist': {
'status': 'locked',
'unlock_date': None,
'name': 'Recycling Rockstar',
'description': 'Sort 100 recycling items'
},
'residual_specialist': {
'status': 'locked',
'unlock_date': None,
'name': 'Residual Master',
'description': 'Sort 100 residual items'
}
}
# Add eco warrior tiers
for tier in ['bronze', 'silver', 'gold']:
initial_achievements[f'eco_warrior_{tier}'] = {
'status': 'locked',
'unlock_date': None,
'name': f'Earth Saver {tier.title()}',
'description': f'Save CO2 through proper recycling ({tier})',
'tier': tier
}
return {Editor is loading...
Leave a Comment