savemap修改:根据地图存档map

This commit is contained in:
strawberry 2025-10-10 14:41:43 +08:00
parent d48bada8de
commit d4d70e0c9a
2 changed files with 37 additions and 4 deletions

View File

@ -487,12 +487,37 @@ maps.prototype.saveMap = function (floorId) {
var maps = core.status.maps;
if (!floorId) {
var map = {};
if(flags.MapStatus.Map==="新手教程"){
var obj = this.saveMap("Tutorial1");
if (Object.keys(obj).length > 0) map.Tutorial1 = obj;
}else if(flags.MapStatus.Map==="进阶教程"){
var obj = this.saveMap("Advance1");
if (Object.keys(obj).length > 0) map.Advance1 = obj;
}else {
for (var id in maps) {
switch (flags.MapStatus?.Map) {
case "星趴·梦想号":
if(!id.startsWith('MT'))continue;
break;
case "水乡古镇":
if(!id.startsWith('SX'))continue;
break;
case "魔法学院":
if(!id.startsWith('MA'))continue;
break;
case "御魂庆典":
if(!id.startsWith('SC'))continue;
break;
case "龙宫游乐园":
if(!id.startsWith('DP'))continue;
break;
}
var obj = this.saveMap(id);
if (Object.keys(obj).length > 0) map[id] = obj;
}
return map;
}
}
// 砍层状态:直接返回
if ((flags.__removed__ || []).indexOf(floorId) >= 0) {
return {};

View File

@ -2,6 +2,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{
"main": {
"floorIds": [
"Tutorial1",
"Advance1",
"MT0",
"MT1",
"MT2",
@ -338,8 +340,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"SC48_5",
"SC49_5",
"SC50",
"Tutorial1",
"Advance1",
"DP0_0",
"DP1_1",
"DP1_2",
@ -388,8 +388,12 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"floorPartitions": [
[
"LOADING",
"LOADING"
"Tutorial1",
"Tutorial1"
],
[
"Advance1",
"Advance1"
],
[
"MT0",
@ -402,6 +406,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
[
"MAL1",
"MAC5"
],
[
"DP0_0",
"DP8"
]
],
"images": [