Merge pull request #45 from SunnyBoyWTF/main

Add Africa Map
This commit is contained in:
evanpelle
2025-02-19 09:25:54 -08:00
committed by GitHub
8 changed files with 23400 additions and 0 deletions
File diff suppressed because one or more lines are too long
+31
View File
@@ -0,0 +1,31 @@
{
"name": "Africa",
"width": 2000,
"height": 2128,
"nations": [
{
"coordinates": [1173, 1984],
"name": "South Africa",
"strength": 3,
"flag": "za"
},
{
"coordinates": [1681, 752],
"name": "Sudan",
"strength": 2,
"flag": "sd"
},
{
"coordinates": [1850, 1691],
"name": "Madagascar",
"strength": 1,
"flag": "mg"
},
{
"coordinates": [1111, 1019],
"name": "Central African Republic",
"strength": 2,
"flag": "cf"
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

File diff suppressed because one or more lines are too long
+1
View File
@@ -11,6 +11,7 @@ export const MapDescription: Record<keyof typeof GameMapType, string> = {
NorthAmerica: "North America",
Oceania: "Oceania",
BlackSea: "Black Sea",
Africa: "Africa",
};
@customElement("map-display")
+4
View File
@@ -4,6 +4,8 @@ import europe from "../../../resources/maps/Europe.png";
import mena from "../../../resources/maps/Mena.png";
import northAmerica from "../../../resources/maps/NorthAmerica.png";
import blackSea from "../../../resources/maps/BlackSea.png";
import africa from "../../../resources/maps/Africa.png";
import { GameMapType } from "../../core/game/Game";
export function getMapsImage(map: GameMapType): string {
@@ -20,6 +22,8 @@ export function getMapsImage(map: GameMapType): string {
return northAmerica;
case GameMapType.BlackSea:
return blackSea;
case GameMapType.Africa:
return africa;
default:
return "";
}
+1
View File
@@ -44,6 +44,7 @@ export enum GameMapType {
NorthAmerica = "North America",
Oceania = "Oceania",
BlackSea = "Black Sea",
Africa = "Africa",
}
export enum GameType {
+1
View File
@@ -30,6 +30,7 @@ const MAP_FILE_NAMES: Record<GameMapType, string> = {
[GameMapType.NorthAmerica]: "NorthAmerica",
[GameMapType.Oceania]: "Oceania",
[GameMapType.BlackSea]: "BlackSea",
[GameMapType.Africa]: "Africa",
};
class GameMapLoader {