diff --git a/app/data/gamemodes.csv b/app/data/gamemodes.csv index ce769d3..36c96c7 100644 --- a/app/data/gamemodes.csv +++ b/app/data/gamemodes.csv @@ -1,6 +1,7 @@ key,name,description assault,Assault,"Teams fight to capture or defend two successive points against the enemy team. It's an inactive Overwatch 1 gamemode, also called 2CP." capture-the-flag,Capture the Flag,Teams compete to capture the enemy team’s flag while defending their own. +clash,Clash,"Vie for dominance across a series of capture points with dynamic spawns and linear map routes, so you spend less time running back to the battle and more time in the heart of it." control,Control,Teams fight to hold a single objective. The first team to win two rounds wins the map. deathmatch,Deathmatch,Race to reach 20 points first by racking up kills in a free-for-all format. elimination,Elimination,"Dispatch all enemies to win the round. Win three rounds to claim victory. Available with teams of one, three, or six." diff --git a/app/data/maps.csv b/app/data/maps.csv index 5fa4415..d8f9732 100644 --- a/app/data/maps.csv +++ b/app/data/maps.csv @@ -40,4 +40,6 @@ antarctic_peninsula,Antarctic Peninsula,control,Antarctica,AQ new_junk_city,New Junk City,flashpoint,Central Australia,AU suravasa,Suravasa,flashpoint,India,IN samoa,Samoa,control,Samoa,WS -runasapi,Runasapi,push,Peru,PE \ No newline at end of file +runasapi,Runasapi,push,Peru,PE +hanaoka,Hanaoka,clash,"Tokyo, Japan",JP +throne_of_anubis,Throne of Anubis,clash,"Giza Plateau, Egypt",EG \ No newline at end of file diff --git a/static/gamemodes/clash-icon.svg b/static/gamemodes/clash-icon.svg new file mode 100755 index 0000000..a9ded1e --- /dev/null +++ b/static/gamemodes/clash-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/gamemodes/clash.avif b/static/gamemodes/clash.avif new file mode 100755 index 0000000..2f314cc Binary files /dev/null and b/static/gamemodes/clash.avif differ diff --git a/static/maps/hanaoka.jpg b/static/maps/hanaoka.jpg new file mode 100755 index 0000000..fef2133 Binary files /dev/null and b/static/maps/hanaoka.jpg differ diff --git a/static/maps/throne_of_anubis.jpg b/static/maps/throne_of_anubis.jpg new file mode 100755 index 0000000..a9c1eee Binary files /dev/null and b/static/maps/throne_of_anubis.jpg differ diff --git a/tests/fixtures/json/gamemodes.json b/tests/fixtures/json/gamemodes.json index f095b18..c1b4060 100644 --- a/tests/fixtures/json/gamemodes.json +++ b/tests/fixtures/json/gamemodes.json @@ -13,6 +13,13 @@ "description": "Teams compete to capture the enemy team’s flag while defending their own.", "screenshot": "https://overfast-api.tekrop.fr/static/gamemodes/capture-the-flag.avif" }, + { + "key": "clash", + "name": "Clash", + "icon": "https://overfast-api.tekrop.fr/static/gamemodes/clash-icon.svg", + "description": "Vie for dominance across a series of capture points with dynamic spawns and linear map routes, so you spend less time running back to the battle and more time in the heart of it.", + "screenshot": "https://overfast-api.tekrop.fr/static/gamemodes/clash.avif" + }, { "key": "control", "name": "Control", diff --git a/tests/fixtures/json/maps.json b/tests/fixtures/json/maps.json index dc8fa45..8ee539b 100644 --- a/tests/fixtures/json/maps.json +++ b/tests/fixtures/json/maps.json @@ -1 +1,402 @@ -[{"name":"Hanamura","screenshot":"https://overfast-api.tekrop.fr/static/maps/hanamura.jpg","gamemodes":["assault"],"location":"Tokyo, Japan","country_code":"JP"},{"name":"Horizon Lunar Colony","screenshot":"https://overfast-api.tekrop.fr/static/maps/horizon.jpg","gamemodes":["assault"],"location":"Earth's moon","country_code":null},{"name":"Paris","screenshot":"https://overfast-api.tekrop.fr/static/maps/paris.jpg","gamemodes":["assault"],"location":"Paris, France","country_code":"FR"},{"name":"Temple of Anubis","screenshot":"https://overfast-api.tekrop.fr/static/maps/anubis.jpg","gamemodes":["assault"],"location":"Giza Plateau, Egypt","country_code":"EG"},{"name":"Volskaya Industries","screenshot":"https://overfast-api.tekrop.fr/static/maps/volskaya.jpg","gamemodes":["assault"],"location":"St. Petersburg, Russia","country_code":"RU"},{"name":"Ayutthaya","screenshot":"https://overfast-api.tekrop.fr/static/maps/ayutthaya.jpg","gamemodes":["capture-the-flag"],"location":"Thailand","country_code":"TH"},{"name":"Busan","screenshot":"https://overfast-api.tekrop.fr/static/maps/busan.jpg","gamemodes":["control"],"location":"South Korea","country_code":"KR"},{"name":"Nepal","screenshot":"https://overfast-api.tekrop.fr/static/maps/nepal.jpg","gamemodes":["control"],"location":"Nepal","country_code":"NP"},{"name":"Ilios","screenshot":"https://overfast-api.tekrop.fr/static/maps/ilios.jpg","gamemodes":["control"],"location":"Greece","country_code":"GR"},{"name":"Oasis","screenshot":"https://overfast-api.tekrop.fr/static/maps/oasis.jpg","gamemodes":["control"],"location":"Iraq","country_code":"IQ"},{"name":"Lijiang Tower","screenshot":"https://overfast-api.tekrop.fr/static/maps/lijiang.jpg","gamemodes":["control"],"location":"China","country_code":"CN"},{"name":"Château Guillard","screenshot":"https://overfast-api.tekrop.fr/static/maps/chateau_guillard.jpg","gamemodes":["deathmatch","team-deathmatch"],"location":"Annecy, France","country_code":"FR"},{"name":"Kanezaka","screenshot":"https://overfast-api.tekrop.fr/static/maps/kanezaka.jpg","gamemodes":["deathmatch","team-deathmatch"],"location":"Tokyo, Japan","country_code":"JP"},{"name":"Malevento","screenshot":"https://overfast-api.tekrop.fr/static/maps/malevento.jpg","gamemodes":["deathmatch","team-deathmatch"],"location":"Italy","country_code":"IT"},{"name":"Petra","screenshot":"https://overfast-api.tekrop.fr/static/maps/petra.jpg","gamemodes":["deathmatch","team-deathmatch"],"location":"Southern Jordan","country_code":"JO"},{"name":"Black Forest","screenshot":"https://overfast-api.tekrop.fr/static/maps/black_forest.jpg","gamemodes":["elimination"],"location":"Germany","country_code":"DE"},{"name":"Castillo","screenshot":"https://overfast-api.tekrop.fr/static/maps/castillo.jpg","gamemodes":["elimination"],"location":"Mexico","country_code":"MX"},{"name":"Ecopoint: Antarctica","screenshot":"https://overfast-api.tekrop.fr/static/maps/ecopoint_antarctica.jpg","gamemodes":["elimination"],"location":"Antarctica","country_code":"AQ"},{"name":"Necropolis","screenshot":"https://overfast-api.tekrop.fr/static/maps/necropolis.jpg","gamemodes":["elimination"],"location":"Egypt","country_code":"EG"},{"name":"Circuit Royal","screenshot":"https://overfast-api.tekrop.fr/static/maps/circuit_royal.jpg","gamemodes":["escort"],"location":"Monte Carlo, Monaco","country_code":"MC"},{"name":"Dorado","screenshot":"https://overfast-api.tekrop.fr/static/maps/dorado.jpg","gamemodes":["escort"],"location":"Mexico","country_code":"MX"},{"name":"Route 66","screenshot":"https://overfast-api.tekrop.fr/static/maps/route_66.jpg","gamemodes":["escort"],"location":"Albuquerque, New Mexico, United States","country_code":"US"},{"name":"Junkertown","screenshot":"https://overfast-api.tekrop.fr/static/maps/junkertown.jpg","gamemodes":["escort"],"location":"Central Australia","country_code":"AU"},{"name":"Rialto","screenshot":"https://overfast-api.tekrop.fr/static/maps/rialto.jpg","gamemodes":["escort"],"location":"Venice, Italy","country_code":"IT"},{"name":"Havana","screenshot":"https://overfast-api.tekrop.fr/static/maps/havana.jpg","gamemodes":["escort"],"location":"Havana, Cuba","country_code":"CU"},{"name":"Watchpoint: Gibraltar","screenshot":"https://overfast-api.tekrop.fr/static/maps/gibraltar.jpg","gamemodes":["escort"],"location":"Gibraltar","country_code":"GI"},{"name":"Shambali Monastery","screenshot":"https://overfast-api.tekrop.fr/static/maps/shambali.jpg","gamemodes":["escort"],"location":"Nepal","country_code":"NP"},{"name":"Blizzard World","screenshot":"https://overfast-api.tekrop.fr/static/maps/blizzard_world.jpg","gamemodes":["hybrid"],"location":"Irvine, California, United States","country_code":"US"},{"name":"Numbani","screenshot":"https://overfast-api.tekrop.fr/static/maps/numbani.jpg","gamemodes":["hybrid"],"location":"Numbani (near Nigeria)","country_code":null},{"name":"Hollywood","screenshot":"https://overfast-api.tekrop.fr/static/maps/hollywood.jpg","gamemodes":["hybrid"],"location":"Los Angeles, United States","country_code":"US"},{"name":"Eichenwalde","screenshot":"https://overfast-api.tekrop.fr/static/maps/eichenwalde.jpg","gamemodes":["hybrid"],"location":"Stuttgart, Germany","country_code":"DE"},{"name":"King’s Row","screenshot":"https://overfast-api.tekrop.fr/static/maps/kings_row.jpg","gamemodes":["hybrid"],"location":"London, United Kingdom","country_code":"UK"},{"name":"Midtown","screenshot":"https://overfast-api.tekrop.fr/static/maps/midtown.jpg","gamemodes":["hybrid"],"location":"New York, United States","country_code":"US"},{"name":"Paraíso","screenshot":"https://overfast-api.tekrop.fr/static/maps/paraiso.jpg","gamemodes":["hybrid"],"location":"Rio de Janeiro, Brazil","country_code":"BR"},{"name":"Colosseo","screenshot":"https://overfast-api.tekrop.fr/static/maps/colosseo.jpg","gamemodes":["push"],"location":"Rome, Italy","country_code":"IT"},{"name":"Esperança","screenshot":"https://overfast-api.tekrop.fr/static/maps/esperanca.jpg","gamemodes":["push"],"location":"Portugal","country_code":"PT"},{"name":"New Queen Street","screenshot":"https://overfast-api.tekrop.fr/static/maps/new_queen_street.jpg","gamemodes":["push"],"location":"Toronto, Canada","country_code":"CA"},{"name":"Antarctic Peninsula","screenshot":"https://overfast-api.tekrop.fr/static/maps/antarctic_peninsula.jpg","gamemodes":["control"],"location":"Antarctica","country_code":"AQ"},{"name":"New Junk City","screenshot":"https://overfast-api.tekrop.fr/static/maps/new_junk_city.jpg","gamemodes":["flashpoint"],"location":"Central Australia","country_code":"AU"},{"name":"Suravasa","screenshot":"https://overfast-api.tekrop.fr/static/maps/suravasa.jpg","gamemodes":["flashpoint"],"location":"India","country_code":"IN"},{"name":"Samoa","screenshot":"https://overfast-api.tekrop.fr/static/maps/samoa.jpg","gamemodes":["control"],"location":"Samoa","country_code":"WS"}, {"name": "Runasapi", "screenshot": "https://overfast-api.tekrop.fr/static/maps/runasapi.jpg","gamemodes":["push"],"location":"Peru","country_code":"PE"}] \ No newline at end of file +[ + { + "name": "Hanamura", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/hanamura.jpg", + "gamemodes": [ + "assault" + ], + "location": "Tokyo, Japan", + "country_code": "JP" + }, + { + "name": "Horizon Lunar Colony", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/horizon.jpg", + "gamemodes": [ + "assault" + ], + "location": "Earth's moon", + "country_code": null + }, + { + "name": "Paris", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/paris.jpg", + "gamemodes": [ + "assault" + ], + "location": "Paris, France", + "country_code": "FR" + }, + { + "name": "Temple of Anubis", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/anubis.jpg", + "gamemodes": [ + "assault" + ], + "location": "Giza Plateau, Egypt", + "country_code": "EG" + }, + { + "name": "Volskaya Industries", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/volskaya.jpg", + "gamemodes": [ + "assault" + ], + "location": "St. Petersburg, Russia", + "country_code": "RU" + }, + { + "name": "Ayutthaya", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/ayutthaya.jpg", + "gamemodes": [ + "capture-the-flag" + ], + "location": "Thailand", + "country_code": "TH" + }, + { + "name": "Busan", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/busan.jpg", + "gamemodes": [ + "control" + ], + "location": "South Korea", + "country_code": "KR" + }, + { + "name": "Nepal", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/nepal.jpg", + "gamemodes": [ + "control" + ], + "location": "Nepal", + "country_code": "NP" + }, + { + "name": "Ilios", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/ilios.jpg", + "gamemodes": [ + "control" + ], + "location": "Greece", + "country_code": "GR" + }, + { + "name": "Oasis", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/oasis.jpg", + "gamemodes": [ + "control" + ], + "location": "Iraq", + "country_code": "IQ" + }, + { + "name": "Lijiang Tower", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/lijiang.jpg", + "gamemodes": [ + "control" + ], + "location": "China", + "country_code": "CN" + }, + { + "name": "Château Guillard", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/chateau_guillard.jpg", + "gamemodes": [ + "deathmatch", + "team-deathmatch" + ], + "location": "Annecy, France", + "country_code": "FR" + }, + { + "name": "Kanezaka", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/kanezaka.jpg", + "gamemodes": [ + "deathmatch", + "team-deathmatch" + ], + "location": "Tokyo, Japan", + "country_code": "JP" + }, + { + "name": "Malevento", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/malevento.jpg", + "gamemodes": [ + "deathmatch", + "team-deathmatch" + ], + "location": "Italy", + "country_code": "IT" + }, + { + "name": "Petra", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/petra.jpg", + "gamemodes": [ + "deathmatch", + "team-deathmatch" + ], + "location": "Southern Jordan", + "country_code": "JO" + }, + { + "name": "Black Forest", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/black_forest.jpg", + "gamemodes": [ + "elimination" + ], + "location": "Germany", + "country_code": "DE" + }, + { + "name": "Castillo", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/castillo.jpg", + "gamemodes": [ + "elimination" + ], + "location": "Mexico", + "country_code": "MX" + }, + { + "name": "Ecopoint: Antarctica", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/ecopoint_antarctica.jpg", + "gamemodes": [ + "elimination" + ], + "location": "Antarctica", + "country_code": "AQ" + }, + { + "name": "Necropolis", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/necropolis.jpg", + "gamemodes": [ + "elimination" + ], + "location": "Egypt", + "country_code": "EG" + }, + { + "name": "Circuit Royal", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/circuit_royal.jpg", + "gamemodes": [ + "escort" + ], + "location": "Monte Carlo, Monaco", + "country_code": "MC" + }, + { + "name": "Dorado", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/dorado.jpg", + "gamemodes": [ + "escort" + ], + "location": "Mexico", + "country_code": "MX" + }, + { + "name": "Route 66", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/route_66.jpg", + "gamemodes": [ + "escort" + ], + "location": "Albuquerque, New Mexico, United States", + "country_code": "US" + }, + { + "name": "Junkertown", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/junkertown.jpg", + "gamemodes": [ + "escort" + ], + "location": "Central Australia", + "country_code": "AU" + }, + { + "name": "Rialto", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/rialto.jpg", + "gamemodes": [ + "escort" + ], + "location": "Venice, Italy", + "country_code": "IT" + }, + { + "name": "Havana", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/havana.jpg", + "gamemodes": [ + "escort" + ], + "location": "Havana, Cuba", + "country_code": "CU" + }, + { + "name": "Watchpoint: Gibraltar", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/gibraltar.jpg", + "gamemodes": [ + "escort" + ], + "location": "Gibraltar", + "country_code": "GI" + }, + { + "name": "Shambali Monastery", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/shambali.jpg", + "gamemodes": [ + "escort" + ], + "location": "Nepal", + "country_code": "NP" + }, + { + "name": "Blizzard World", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/blizzard_world.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "Irvine, California, United States", + "country_code": "US" + }, + { + "name": "Numbani", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/numbani.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "Numbani (near Nigeria)", + "country_code": null + }, + { + "name": "Hollywood", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/hollywood.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "Los Angeles, United States", + "country_code": "US" + }, + { + "name": "Eichenwalde", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/eichenwalde.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "Stuttgart, Germany", + "country_code": "DE" + }, + { + "name": "King’s Row", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/kings_row.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "London, United Kingdom", + "country_code": "UK" + }, + { + "name": "Midtown", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/midtown.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "New York, United States", + "country_code": "US" + }, + { + "name": "Paraíso", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/paraiso.jpg", + "gamemodes": [ + "hybrid" + ], + "location": "Rio de Janeiro, Brazil", + "country_code": "BR" + }, + { + "name": "Colosseo", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/colosseo.jpg", + "gamemodes": [ + "push" + ], + "location": "Rome, Italy", + "country_code": "IT" + }, + { + "name": "Esperança", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/esperanca.jpg", + "gamemodes": [ + "push" + ], + "location": "Portugal", + "country_code": "PT" + }, + { + "name": "New Queen Street", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/new_queen_street.jpg", + "gamemodes": [ + "push" + ], + "location": "Toronto, Canada", + "country_code": "CA" + }, + { + "name": "Antarctic Peninsula", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/antarctic_peninsula.jpg", + "gamemodes": [ + "control" + ], + "location": "Antarctica", + "country_code": "AQ" + }, + { + "name": "New Junk City", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/new_junk_city.jpg", + "gamemodes": [ + "flashpoint" + ], + "location": "Central Australia", + "country_code": "AU" + }, + { + "name": "Suravasa", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/suravasa.jpg", + "gamemodes": [ + "flashpoint" + ], + "location": "India", + "country_code": "IN" + }, + { + "name": "Samoa", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/samoa.jpg", + "gamemodes": [ + "control" + ], + "location": "Samoa", + "country_code": "WS" + }, + { + "name": "Runasapi", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/runasapi.jpg", + "gamemodes": [ + "push" + ], + "location": "Peru", + "country_code": "PE" + }, + { + "name": "Hanaoka", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/hanaoka.jpg", + "gamemodes": [ + "clash" + ], + "location": "Tokyo, Japan", + "country_code": "JP" + }, + { + "name": "Throne of Anubis", + "screenshot": "https://overfast-api.tekrop.fr/static/maps/throne_of_anubis.jpg", + "gamemodes": [ + "clash" + ], + "location": "Giza Plateau, Egypt", + "country_code": "EG" + } +] \ No newline at end of file diff --git a/tests/views/test_maps_route.py b/tests/views/test_maps_route.py index afb0889..31f7623 100644 --- a/tests/views/test_maps_route.py +++ b/tests/views/test_maps_route.py @@ -39,10 +39,10 @@ def test_get_maps_invalid_gamemode(client: TestClient): { "type": "enum", "loc": ["query", "gamemode"], - "msg": "Input should be 'assault', 'capture-the-flag', 'control', 'deathmatch', 'elimination', 'escort', 'flashpoint', 'hybrid', 'push' or 'team-deathmatch'", + "msg": "Input should be 'assault', 'capture-the-flag', 'clash', 'control', 'deathmatch', 'elimination', 'escort', 'flashpoint', 'hybrid', 'push' or 'team-deathmatch'", "input": "invalid", "ctx": { - "expected": "'assault', 'capture-the-flag', 'control', 'deathmatch', 'elimination', 'escort', 'flashpoint', 'hybrid', 'push' or 'team-deathmatch'", + "expected": "'assault', 'capture-the-flag', 'clash', 'control', 'deathmatch', 'elimination', 'escort', 'flashpoint', 'hybrid', 'push' or 'team-deathmatch'", }, }, ],