qlpycon/config.py
2025-12-29 17:06:14 +01:00

102 lines
2.1 KiB
Python

#!/usr/bin/env python3
"""
Configuration and constants for QLPyCon
"""
VERSION = "0.8.1"
# Network defaults
DEFAULT_HOST = 'tcp://127.0.0.1:27961'
POLL_TIMEOUT = 100
# UI dimensions
INFO_WINDOW_HEIGHT = 12
INFO_WINDOW_Y = 2
OUTPUT_WINDOW_Y = 14
INPUT_WINDOW_HEIGHT = 2
# Event deduplication
MAX_RECENT_EVENTS = 10
# Team game modes
TEAM_MODES = [
"Team Deathmatch",
"Clan Arena",
"Capture The Flag",
"One Flag CTF",
"Overload",
"Harvester",
"Freeze Tag"
]
# Team mappings
TEAM_MAP = {
0: 'FREE',
1: 'RED',
2: 'BLUE',
3: 'SPECTATOR'
}
TEAM_COLORS = {
'RED': '^1(RED)^7',
'BLUE': '^4(BLUE)^7',
'FREE': '',
'SPECTATOR': '^3(SPEC)^7'
}
# Weapon names
WEAPON_NAMES = {
'ROCKET': 'Rocket Launcher',
'LIGHTNING': 'Lightning Gun',
'RAILGUN': 'Railgun',
'SHOTGUN': 'Shotgun',
'GAUNTLET': 'Gauntlet',
'GRENADE': 'Grenade Launcher',
'PLASMA': 'Plasma Gun',
'MACHINEGUN': 'Machine Gun'
}
# Weapon names for kill messages
WEAPON_KILL_NAMES = {
'ROCKET': 'the Rocket Launcher',
'LIGHTNING': 'the Lightning Gun',
'RAILGUN': 'the Railgun',
'SHOTGUN': 'the Shotgun',
'GAUNTLET': 'the Gauntlet',
'GRENADE': 'the Grenade Launcher',
'PLASMA': 'the Plasma Gun',
'MACHINEGUN': 'the Machine Gun'
}
# Death messages
DEATH_MESSAGES = {
'FALLING': "%s^0%s^9 ^7cratered.",
'HURT': "%s^0%s^9 ^7was in the wrong place.",
'LAVA': "%s^0%s^9 ^7does a backflip into the lava.",
'WATER': "%s^0%s^9 ^7sank like a rock.",
'SLIME': "%s^0%s^9 ^7melted.",
'CRUSH': "%s^0%s^9 ^7was crushed."
}
# Powerup names and colors
POWERUP_COLORS = {
'Quad Damage': '^5Quad Damage^7',
'Battle Suit': '^3Battle Suit^7',
'Regeneration': '^1Regeneration^7',
'Haste': '^3Haste^7',
'Invisibility': '^5Invisibility^7',
'Flight': '^5Flight^7',
'Medkit': '^1Medkit^7',
'MegaHealth': '^4MegaHealth^7'
}
# Curses color pairs
COLOR_PAIRS = {
1: 1, # Red
2: 2, # Green
3: 3, # Yellow
4: 4, # Blue
5: 6, # Cyan (swapped)
6: 5 # Magenta (swapped)
}