Made gamemode and map filter for /stats

This commit is contained in:
2023-06-30 00:11:45 +02:00
parent 27925b0eb0
commit 1217231a19
5 changed files with 112 additions and 15 deletions
+28
View File
@@ -0,0 +1,28 @@
def getgamemodeid(givengamemode):
gamemode_dict = {
'attrition': 'aitdm',
'bounty hunt': 'at',
'one in the chamber': 'chamber',
'amped hardpoint': 'cp',
'capture the flag': 'ctf',
'frontier defense': 'fd',
'free for all': 'ffa',
'frontier war': 'fw',
'gungame': 'gg',
'infection': 'inf',
'last titan standing': 'lts',
'marked for death': 'mfd',
'pilots vs. pilots': 'ps',
'sticks and stones': 'sns',
'skirmish': 'tdm',
'titan brawl': 'ttdm'
}
gamemodeid = ""
gamemode = ""
for gamemode_in_dict in gamemode_dict:
if(givengamemode.lower().replace(" ", "") in gamemode_in_dict.lower().replace(" ", "")):
gamemodeid = gamemode_dict[gamemode_in_dict]
gamemode = gamemode_in_dict
break
return gamemodeid, gamemode