Biome specific mappreview support and previews for Aethiopia and Gulf Of Bothnia, fixes #4962, refs #4954.

This was SVN commit r21506.
This commit is contained in:
elexis 2018-03-11 18:11:56 +00:00
parent 6c3f93a33d
commit 8cde469501
12 changed files with 21 additions and 8 deletions

Binary file not shown.

View File

@ -241,7 +241,8 @@ function loadBiomes()
return {
"Id": biomeID,
"Title": translateWithContext("biome definition", description.Title),
"Description": description.Description ? translateWithContext("biome definition", description.Description) : ""
"Description": description.Description ? translateWithContext("biome definition", description.Description) : "",
"Preview": description.Preview || undefined
};
});
}

View File

@ -1636,6 +1636,10 @@ function getMapDisplayName(map)
function getMapPreview(map)
{
let mapBiome = g_Settings.Biomes.find(biome => biome.Id == g_GameAttributes.settings.Biome);
if (mapBiome && mapBiome.Preview)
return mapBiome.Preview;
let mapData = loadMapData(map);
if (!mapData || !mapData.settings || !mapData.settings.Preview)
return "nopreview.png";

View File

@ -3,7 +3,7 @@
"Name" : "Aethiopia",
"Script" : "aethiopia.js",
"Description" : "Aethiopia, land of the Kushites. Arid and hostile as the terrain might look, the region is surprisingly lush. The presence of several life-bringing oases serve to make this a prized haven for man and beast alike.",
"Preview" : "aethiopia.png",
"Preview" : "aethiopia_dry.png",
"Keywords": ["new"],
"CircularMap" : true,
"SupportedBiomes": "aethiopia/"

View File

@ -3,7 +3,7 @@
"Name" : "Gulf of Bothnia",
"Script" : "gulf_of_bothnia.js",
"Description" : "Players start around a gulf dotted with small islands.\n\nThe Gulf of Bothnia is the northernmost arm of the Baltic Sea.",
"Preview" : "gulf_of_bothnia.png",
"Preview" : "gulf_of_bothnia_frozen_lake.png",
"CircularMap" : true,
"SupportedBiomes": "gulf_of_bothnia/"
}

View File

@ -1,7 +1,8 @@
{
"Description": {
"Title": "Dry Season",
"Description": "The vitalizing waters of the Nile sustain life along its banks, while the long dry season scorches the land."
"Description": "The vitalizing waters of the Nile sustain life along its banks, while the long dry season scorches the land.",
"Preview" : "aethiopia_dry.png"
},
"Environment": {
"SkySet": "sunny",

View File

@ -1,7 +1,8 @@
{
"Description": {
"Title": "Rainy Season",
"Description": "Revelling in the much awaited rain, the baked land transforms into a lush haven for both man and beast."
"Description": "Revelling in the much awaited rain, the baked land transforms into a lush haven for both man and beast.",
"Preview" : "aethiopia_rainy.png"
},
"Environment": {
"SkySet": "stormy",

View File

@ -1,7 +1,8 @@
{
"Description": {
"Title": "Frozen Lake",
"Description": "Solidifying it's grip, the harsh cold has succeeded in freezing up the gulf. The thick ice formed is capable of withstanding any weight."
"Description": "Solidifying it's grip, the harsh cold has succeeded in freezing up the gulf. The thick ice formed is capable of withstanding any weight.",
"Preview" : "gulf_of_bothnia_frozen_lake.png"
},
"Environment": {
"SkySet": "stormy",

View File

@ -1,7 +1,8 @@
{
"Description": {
"Title": "Late Spring",
"Description": "A late spring breeze ripples through the conifer forests of the Gulf of Bothnia. Herds of deer dot the landscape and playful rabbits frolick in the undergrowth."
"Description": "A late spring breeze ripples through the conifer forests of the Gulf of Bothnia. Herds of deer dot the landscape and playful rabbits frolick in the undergrowth.",
"Preview" : "gulf_of_bothnia_late_spring.png"
},
"Environment": {
"SkySet": "stormy",

View File

@ -1,7 +1,8 @@
{
"Description": {
"Title": "Winter",
"Description": "Winter has set in, carpeting the land with its first snow. The still unfrozen gulf offers great fishing opportunities."
"Description": "Winter has set in, carpeting the land with its first snow. The still unfrozen gulf offers great fishing opportunities.",
"Preview" : "gulf_of_bothnia_winter.png"
},
"Environment": {
"SkySet": "stormy",