Spaces:
Runtime error
Runtime error
| """ | |
| Plugin Registry - Sample Configuration | |
| This file demonstrates how plugins can be configured and loaded | |
| """ | |
| # Plugin configuration registry | |
| PLUGIN_REGISTRY = { | |
| "weather_plugin": { | |
| "enabled": True, | |
| "file": "weather_plugin.py", | |
| "config": { | |
| "weather_change_interval": 180, # Change weather every 3 minutes | |
| "enable_seasons": True, | |
| "weather_effects_enabled": True | |
| }, | |
| "auto_load": True, | |
| "priority": 1 | |
| }, | |
| "enhanced_chat_plugin": { | |
| "enabled": True, | |
| "file": "enhanced_chat_plugin.py", | |
| "config": { | |
| "enable_emotes": True, | |
| "enable_channels": True, | |
| "max_message_length": 300, | |
| "chat_cooldown": 2 # 2 second cooldown between messages | |
| }, | |
| "auto_load": True, | |
| "priority": 2 | |
| }, | |
| "trading_system_plugin": { | |
| "enabled": True, | |
| "file": "trading_system_plugin.py", | |
| "config": { | |
| "enable_direct_trading": True, | |
| "enable_marketplace": True, | |
| "trade_tax_rate": 0.03, # 3% tax on marketplace trades | |
| "max_trade_distance": 150 | |
| }, | |
| "auto_load": True, | |
| "priority": 3, | |
| "dependencies": ["enhanced_chat_plugin"] | |
| } | |
| } | |
| # Plugin load order (based on dependencies and priority) | |
| LOAD_ORDER = [ | |
| "enhanced_chat_plugin", # No dependencies | |
| "weather_plugin", # No dependencies | |
| "trading_system_plugin" # Depends on enhanced_chat | |
| ] | |
| # Default plugin directory | |
| PLUGIN_DIRECTORY = "plugins" | |
| # Plugin file extension | |
| PLUGIN_EXTENSION = ".py" | |
| # Plugin factory function name | |
| PLUGIN_FACTORY_FUNCTION = "create_plugin" | |