mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:30:45 +00:00
Added Mars. Excluded from public lobby playlist. Changed Africa image background to transparent.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
*.bin
|
||||
*.png
|
||||
*.jpg
|
||||
*.jpeg
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
+21550
File diff suppressed because one or more lines are too long
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "Mars",
|
||||
"width": 2000,
|
||||
"height": 1000,
|
||||
"nations": [
|
||||
{
|
||||
"coordinates": [650, 415],
|
||||
"name": "United States",
|
||||
"strength": 3,
|
||||
"flag": "us"
|
||||
},
|
||||
{
|
||||
"coordinates": [122, 750],
|
||||
"name": "USSR",
|
||||
"strength": 2,
|
||||
"flag": ""
|
||||
},
|
||||
{
|
||||
"coordinates": [1232, 735],
|
||||
"name": "Russia",
|
||||
"strength": 2,
|
||||
"flag": "ru"
|
||||
},
|
||||
{
|
||||
"coordinates": [966, 511],
|
||||
"name": "European Space Agency",
|
||||
"strength": 2,
|
||||
"flag": ""
|
||||
},
|
||||
{
|
||||
"coordinates": [1460, 488],
|
||||
"name": "United Kingdom",
|
||||
"strength": 3,
|
||||
"flag": "gb"
|
||||
},
|
||||
{
|
||||
"coordinates": [1850, 415],
|
||||
"name": "China",
|
||||
"strength": 3,
|
||||
"flag": "cn"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 933 KiB |
File diff suppressed because one or more lines are too long
@@ -13,6 +13,7 @@ export const MapDescription: Record<keyof typeof GameMapType, string> = {
|
||||
BlackSea: "Black Sea",
|
||||
Africa: "Africa",
|
||||
Asia: "Asia",
|
||||
Mars: "Mars",
|
||||
};
|
||||
|
||||
@customElement("map-display")
|
||||
|
||||
@@ -6,6 +6,7 @@ import northAmerica from "../../../resources/maps/NorthAmerica.png";
|
||||
import blackSea from "../../../resources/maps/BlackSea.png";
|
||||
import africa from "../../../resources/maps/Africa.png";
|
||||
import asia from "../../../resources/maps/Asia.png";
|
||||
import mars from "../../../resources/maps/Mars.png";
|
||||
|
||||
import { GameMapType } from "../../core/game/Game";
|
||||
|
||||
@@ -27,6 +28,8 @@ export function getMapsImage(map: GameMapType): string {
|
||||
return africa;
|
||||
case GameMapType.Asia:
|
||||
return asia;
|
||||
case GameMapType.Mars:
|
||||
return mars;
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ export enum GameMapType {
|
||||
BlackSea = "Black Sea",
|
||||
Africa = "Africa",
|
||||
Asia = "Asia",
|
||||
Mars = "Mars",
|
||||
}
|
||||
|
||||
export enum GameType {
|
||||
|
||||
@@ -32,6 +32,7 @@ const MAP_FILE_NAMES: Record<GameMapType, string> = {
|
||||
[GameMapType.BlackSea]: "BlackSea",
|
||||
[GameMapType.Africa]: "Africa",
|
||||
[GameMapType.Asia]: "Asia",
|
||||
[GameMapType.Mars]: "Mars",
|
||||
};
|
||||
|
||||
class GameMapLoader {
|
||||
|
||||
@@ -83,7 +83,10 @@ export class GameManager {
|
||||
return this.mapsPlaylist.shift();
|
||||
}
|
||||
while (true) {
|
||||
this.mapsPlaylist = Object.values(GameMapType);
|
||||
const ignoreMaps = ["Mars"];
|
||||
this.mapsPlaylist = Object.values(GameMapType).filter(
|
||||
(map) => !ignoreMaps.includes(map),
|
||||
);
|
||||
this.mapsPlaylist.push(GameMapType.World);
|
||||
this.mapsPlaylist.push(GameMapType.Europe);
|
||||
this.random.shuffleArray(this.mapsPlaylist);
|
||||
|
||||
Reference in New Issue
Block a user