Skip to content

Commit

Permalink
Added support for the new Scream Fortress maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kataiser committed Oct 6, 2021
1 parent d121354 commit 83bf48f
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 7 additions & 1 deletion TF2 Rich Presence/map list generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ def main():
gamemode_replacements = [('d(M', 'd (M'), ('t(D', 't (D'), (' Mode', ''), ('Developer aidTest', 'No gamemode'), ('Developer aidControl Point', 'Control Point')]
map_gamemodes = {'itemtest': ('itemtest', 'unknown', 'Unknown gamemode'),
'devtest': ('devtest', 'unknown', 'Unknown gamemode'),
'background01': ('background01', 'unknown', 'Unknown gamemode')}
'background01': ('background01', 'unknown', 'Unknown gamemode'),
'pd_farmageddon': ('Farmageddon', 'player-destruction', 'Player Destruction'),
'koth_synthetic_event': ('Sinthetic', 'koth', 'King of the Hill'),
'koth_los_muertos': ('Los Muertos', 'koth', 'King of the Hill'),
'cp_ambush_event': ('Erebus', 'attack-defend', 'Attack/Defend'),
'pl_terror_event': ('Terror', 'payload', 'Payload'),
'arena_lumberyard_event': ('Graveyard', 'arena', 'Arena')}

r = requests.get('https://wiki.teamfortress.com/wiki/List_of_maps')
soup = BeautifulSoup(r.text, 'lxml')
Expand Down
6 changes: 6 additions & 0 deletions TF2 Rich Presence/maps.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"arena_byre": ["Byre", "arena", "Arena"],
"arena_granary": ["Granary", "arena", "Arena"],
"arena_lumberyard": ["Lumberyard", "arena", "Arena"],
"arena_lumberyard_event": ["Graveyard", "arena", "Arena"],
"arena_nucleus": ["Nucleus", "arena", "Arena"],
"arena_offblast_final": ["Offblast", "arena", "Arena"],
"arena_ravine": ["Ravine", "arena", "Arena"],
Expand All @@ -11,6 +12,7 @@
"arena_well": ["Well", "arena", "Arena"],
"background01": ["background01", "unknown", "Unknown gamemode"],
"cp_5gorge": ["5Gorge", "control-point", "Control Point"],
"cp_ambush_event": ["Erebus", "attack-defend", "Attack/Defend"],
"cp_badlands": ["Badlands", "control-point", "Control Point"],
"cp_cloak": ["Cloak", "control-point", "Control Point"],
"cp_coldfront": ["Coldfront", "control-point", "Control Point"],
Expand Down Expand Up @@ -66,6 +68,7 @@
"koth_lakeside_event": ["Ghost Fort", "koth", "King of the Hill"],
"koth_lakeside_final": ["Lakeside", "koth", "King of the Hill"],
"koth_lazarus": ["Lazarus", "koth", "King of the Hill"],
"koth_los_muertos": ["Los Muertos", "koth", "King of the Hill"],
"koth_maple_ridge_event": ["Maple Ridge Event", "koth", "King of the Hill"],
"koth_megalo": ["Megalo", "koth", "King of the Hill"],
"koth_moonshine_event": ["Moonshine Event", "koth", "King of the Hill"],
Expand All @@ -75,6 +78,7 @@
"koth_slasher": ["Slasher", "koth", "King of the Hill"],
"koth_slaughter_event": ["Laughter", "koth", "King of the Hill"],
"koth_suijin": ["Suijin", "koth", "King of the Hill"],
"koth_synthetic_event": ["Sinthetic", "koth", "King of the Hill"],
"koth_undergrove_event": ["Moldergrove", "koth", "King of the Hill"],
"koth_viaduct": ["Viaduct", "koth", "King of the Hill"],
"koth_viaduct_event": ["Eyeaduct", "koth", "King of the Hill"],
Expand All @@ -90,6 +94,7 @@
"pass_district": ["District", "passtime", "PASS Time"],
"pass_timbertown": ["Timbertown", "passtime", "PASS Time"],
"pd_cursed_cove_event": ["Cursed Cove", "player-destruction", "Player Destruction"],
"pd_farmageddon": ["Farmageddon", "player-destruction", "Player Destruction"],
"pd_monster_bash": ["Monster Bash", "player-destruction", "Player Destruction"],
"pd_pit_of_death_event": ["Pit of Death", "player-destruction", "Player Destruction"],
"pd_snowville_event": ["SnowVille", "player-destruction", "Player Destruction"],
Expand All @@ -111,6 +116,7 @@
"pl_rumble_event": ["Gravestone", "payload", "Payload"],
"pl_snowycoast": ["Snowycoast", "payload", "Payload"],
"pl_swiftwater_final1": ["Swiftwater", "payload", "Payload"],
"pl_terror_event": ["Terror", "payload", "Payload"],
"pl_thundermountain": ["Thunder Mountain", "payload", "Payload"],
"pl_upward": ["Upward", "payload", "Payload"],
"pl_wutville_event": ["Wutville", "payload", "Payload"],
Expand Down
2 changes: 1 addition & 1 deletion TF2 Rich Presence/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def test_get_api_key(self):

def test_load_maps_db(self):
maps_db = gamemodes.load_maps_db()
self.assertEqual(len(maps_db), 126)
self.assertEqual(len(maps_db), 132)

for map_ in maps_db:
map_data = maps_db[map_]
Expand Down

0 comments on commit 83bf48f

Please sign in to comment.