File size: 1,766 Bytes
4c75d73 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
"""
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"
|