Initial Commit
This commit is contained in:
0
constants/__init__.py
Normal file
0
constants/__init__.py
Normal file
16
constants/actions.py
Normal file
16
constants/actions.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""Contains user actions"""
|
||||
IDLE = 0
|
||||
AFK = 1
|
||||
PLAYING = 2
|
||||
EDITING = 3
|
||||
MODDING = 4
|
||||
MULTIPLAYER = 5
|
||||
WATCHING = 6
|
||||
UNKNOWN = 7
|
||||
TESTING = 8
|
||||
SUBMITTING = 9
|
||||
PAUSED = 10
|
||||
LOBBY = 11
|
||||
MULTIPLAYING= 12
|
||||
OSU_DIRECT = 13
|
||||
NONE = 14
|
9
constants/bcolors.py
Normal file
9
constants/bcolors.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""Console colors"""
|
||||
PINK = '\033[95m'
|
||||
BLUE = '\033[94m'
|
||||
GREEN = '\033[92m'
|
||||
YELLOW = '\033[93m'
|
||||
RED = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
BOLD = '\033[1m'
|
||||
UNDERLINE = '\033[4m'
|
53
constants/gameModes.py
Normal file
53
constants/gameModes.py
Normal file
@@ -0,0 +1,53 @@
|
||||
STD = 0
|
||||
TAIKO = 1
|
||||
CTB = 2
|
||||
MANIA = 3
|
||||
|
||||
def getGameModeForDB(gameMode):
|
||||
"""
|
||||
Convert a game mode number to string for database table/column
|
||||
|
||||
:param gameMode: game mode number
|
||||
:return: game mode readable string for db
|
||||
"""
|
||||
|
||||
if gameMode == STD:
|
||||
return "std"
|
||||
elif gameMode == TAIKO:
|
||||
return "taiko"
|
||||
elif gameMode == CTB:
|
||||
return "ctb"
|
||||
else:
|
||||
return "mania"
|
||||
|
||||
def getGamemodeFull(gameMode):
|
||||
"""
|
||||
Get game mode name from game mode number
|
||||
|
||||
:param gameMode: game mode number
|
||||
:return: game mode readable name
|
||||
"""
|
||||
if gameMode == STD:
|
||||
return "osu!"
|
||||
elif gameMode == TAIKO:
|
||||
return "Taiko"
|
||||
elif gameMode == CTB:
|
||||
return "Catch The Beat"
|
||||
else:
|
||||
return "osu!mania"
|
||||
|
||||
def getGameModeForPrinting(gameMode):
|
||||
"""
|
||||
Convert a gamemode number to string for showing to a user (e.g. !last)
|
||||
|
||||
:param gameMode: gameMode int or variable (ex: gameMode.std)
|
||||
:return: game mode readable string for a human
|
||||
"""
|
||||
if gameMode == STD:
|
||||
return "osu!"
|
||||
elif gameMode == TAIKO:
|
||||
return "Taiko"
|
||||
elif gameMode == CTB:
|
||||
return "CatchTheBeat"
|
||||
else:
|
||||
return "osu!mania"
|
31
constants/mods.py
Normal file
31
constants/mods.py
Normal file
@@ -0,0 +1,31 @@
|
||||
NOMOD = 0
|
||||
NOFAIL = 1
|
||||
EASY = 2
|
||||
TOUCHSCREEN = 4
|
||||
HIDDEN = 8
|
||||
HARDROCK = 16
|
||||
SUDDENDEATH = 32
|
||||
DOUBLETIME = 64
|
||||
RELAX = 128
|
||||
HALFTIME = 256
|
||||
NIGHTCORE = 512
|
||||
FLASHLIGHT = 1024
|
||||
AUTOPLAY = 2048
|
||||
SPUNOUT = 4096
|
||||
RELAX2 = 8192
|
||||
PERFECT = 16384
|
||||
KEY4 = 32768
|
||||
KEY5 = 65536
|
||||
KEY6 = 131072
|
||||
KEY7 = 262144
|
||||
KEY8 = 524288
|
||||
KEYMOD = 1015808
|
||||
FADEIN = 1048576
|
||||
RANDOM = 2097152
|
||||
LASTMOD = 4194304
|
||||
KEY9 = 16777216
|
||||
KEY10 = 33554432
|
||||
KEY1 = 67108864
|
||||
KEY3 = 134217728
|
||||
KEY2 = 268435456
|
||||
SCOREV2 = 536870912
|
23
constants/privileges.py
Normal file
23
constants/privileges.py
Normal file
@@ -0,0 +1,23 @@
|
||||
USER_PUBLIC = 1
|
||||
USER_NORMAL = 2 << 0
|
||||
USER_DONOR = 2 << 1
|
||||
ADMIN_ACCESS_RAP = 2 << 2
|
||||
ADMIN_MANAGE_USERS = 2 << 3
|
||||
ADMIN_BAN_USERS = 2 << 4
|
||||
ADMIN_SILENCE_USERS = 2 << 5
|
||||
ADMIN_WIPE_USERS = 2 << 6
|
||||
ADMIN_MANAGE_BEATMAPS = 2 << 7
|
||||
ADMIN_MANAGE_SERVERS = 2 << 8
|
||||
ADMIN_MANAGE_SETTINGS = 2 << 9
|
||||
ADMIN_MANAGE_BETAKEYS = 2 << 10
|
||||
ADMIN_MANAGE_REPORTS = 2 << 11
|
||||
ADMIN_MANAGE_DOCS = 2 << 12
|
||||
ADMIN_MANAGE_BADGES = 2 << 13
|
||||
ADMIN_VIEW_RAP_LOGS = 2 << 14
|
||||
ADMIN_MANAGE_PRIVILEGES = 2 << 15
|
||||
ADMIN_SEND_ALERTS = 2 << 16
|
||||
ADMIN_CHAT_MOD = 2 << 17
|
||||
ADMIN_KICK_USERS = 2 << 18
|
||||
USER_PENDING_VERIFICATION = 2 << 19
|
||||
USER_TOURNAMENT_STAFF = 2 << 20
|
||||
ADMIN_CAKER = 20 << 21
|
Reference in New Issue
Block a user