Added Mars. Excluded from public lobby playlist. Changed Africa image background to transparent.

This commit is contained in:
NewHappyRabbit
2025-02-20 20:37:36 +02:00
parent aa76c28bb1
commit 1dfc0aef39
11 changed files with 26983 additions and 1 deletions
+1
View File
@@ -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

File diff suppressed because one or more lines are too long
+43
View File
@@ -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
+1
View File
@@ -13,6 +13,7 @@ export const MapDescription: Record<keyof typeof GameMapType, string> = {
BlackSea: "Black Sea",
Africa: "Africa",
Asia: "Asia",
Mars: "Mars",
};
@customElement("map-display")
+3
View File
@@ -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 "";
}
+1
View File
@@ -46,6 +46,7 @@ export enum GameMapType {
BlackSea = "Black Sea",
Africa = "Africa",
Asia = "Asia",
Mars = "Mars",
}
export enum GameType {
+1
View File
@@ -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 {
+4 -1
View File
@@ -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);