下载小地图

This commit is contained in:
unanmed 2023-01-23 14:38:50 +08:00
parent 041dd25bcc
commit 747c1b8c83
17 changed files with 247 additions and 58 deletions

1
components.d.ts vendored
View File

@ -7,6 +7,7 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
AButton: typeof import('ant-design-vue/es')['Button']
ADivider: typeof import('ant-design-vue/es')['Divider']
ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']

View File

@ -170,11 +170,11 @@
<div id="gameDraw">
<div id="gif"></div>
<div id="gif2"></div>
<canvas class='gameCanvas' id='bg'></canvas>
<canvas class='gameCanvas' id='event'></canvas>
<canvas class='gameCanvas' id='hero'></canvas>
<canvas class='gameCanvas' id='event2'></canvas>
<canvas class='gameCanvas' id='fg'></canvas>
<canvas class='gameCanvas draw-canvas' id='bg'></canvas>
<canvas class='gameCanvas draw-canvas' id='event'></canvas>
<canvas class='gameCanvas draw-canvas' id='hero'></canvas>
<canvas class='gameCanvas draw-canvas' id='event2'></canvas>
<canvas class='gameCanvas draw-canvas' id='fg'></canvas>
<canvas class='gameCanvas' id='damage'></canvas>
<canvas class='gameCanvas' id='animate'></canvas>
<canvas class='gameCanvas' id='curtain'></canvas>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

@ -288,10 +288,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"startBackground": "project/images/bg.jpg",
"startVerticalBackground": "project/images/bg.jpg",
"startLogoStyle": " ",
"startButtonsStyle": "background-color: #32369F; opacity: 0.85; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;",
"statusLeftBackground": "url(project/images/cave1.jpg)",
"statusTopBackground": "url(project/images/cave2.jpg) no-repeat",
"toolsBackground": "url(project/images/cave2.jpg) no-repeat",
"startButtonsStyle": " ",
"statusLeftBackground": " ",
"statusTopBackground": " ",
"toolsBackground": "#ddd4",
"floorChangingStyle": " ",
"statusBarColor": [
255,

View File

@ -74,7 +74,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"grayPriest": {"name":"智慧法王","hp":3000,"atk":600,"def":250,"money":1,"exp":40,"point":0,"special":[13]},
"greenGateKeeper": {"name":"睿智雕像","hp":5000,"atk":1250,"def":900,"money":1,"exp":65,"point":0,"special":[1],"crit":1000},
"ghostSoldier": {"name":"山间骷髅","hp":750,"atk":180,"def":40,"money":0,"exp":18,"point":0,"special":[]},
"frostBat": {"name":"寒蝙蝠","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"frostBat": {"name":"寒蝙蝠","hp":20000,"atk":3200,"def":2000,"money":2,"exp":2000,"point":0,"special":[4,20],"ice":90},
"blackKing": {"name":"黑衣魔王","hp":1000,"atk":500,"def":0,"money":1000,"exp":1000,"point":0,"special":[],"notBomb":true},
"yellowKing": {"name":"黄衣魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"greenKing": {"name":"青衣武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
@ -159,7 +159,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"E608": {"name":"寒冰护卫","hp":25000,"atk":3500,"def":2250,"money":3,"exp":225,"point":0,"special":[]},
"E609": {"name":"具形雪人","hp":7500,"atk":2250,"def":1000,"money":2,"exp":90,"point":0,"special":[25],"melt":15},
"E610": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E611": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E611": {"name":"具形雪人法师","hp":12500,"atk":2750,"def":1750,"money":2,"exp":175,"point":0,"special":[13,25],"melt":30},
"E612": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E613": {"name":"寒冰核心","hp":20000,"atk":3000,"def":1500,"money":3,"exp":150,"point":0,"special":[26],"iceCore":20},
"E614": {"name":"火焰核心","hp":15000,"atk":2750,"def":1750,"money":3,"exp":140,"point":0,"special":[27],"fireCore":20},

View File

@ -44,7 +44,7 @@ main.floors.MT37=
[147,147,147,147,147,147,147,147,147,147,147,147,147,147,70072],
[147, 0,147, 34, 0,147, 29, 0,274, 0,147,147,147,147,70072],
[147, 0,600, 0, 34,603, 0, 32, 0, 0,376, 33,381, 0,70080],
[147,378,147, 27,484,376,617,390, 0,494,484,378,603,604,604],
[147,378,147, 27,484,376,617,390, 0,494,484,378,602,604,604],
[147,482,147,602,378,441,70007, 0,484,586,376,403, 0, 0, 94],
[147,381,492, 0,604,494,70015,613,586,586,586,614, 32, 0,604],
[147, 0,595, 0, 33, 0,609,482,609,376, 0, 33,595, 21,587],

View File

@ -63,8 +63,8 @@ main.floors.MT39=
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0,604,604, 91,604,604, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,472,604,487,604,472, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,613,466,608,467,614, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,472,604,609,604,472, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,613,420,608,430,614, 0, 0, 0, 0, 0],
[604, 21,390,403,482,584,584,584,584,584,600,403,396,482, 94],
[484,587, 34, 34,617, 0, 0, 0, 0, 0, 0,70022,70023,70022,70023],
[491,494, 34, 34, 33, 0, 0, 0, 0, 0, 33,376,482,600,604],
@ -73,7 +73,7 @@ main.floors.MT39=
[482,595, 33,274,482, 34,587, 27,70007,376,484,584,584,584,584],
[584,584,492,584,584, 28,587,403,70015,586,595, 0, 0,70126, 0],
[70007, 21, 0,586,586, 0,609, 33, 0,274, 27, 0, 0,543, 0],
[70015, 0,403,603, 0,274,604,587,70022,70023,609, 0, 32, 0, 94],
[70015, 0,403,595, 0,274,604,587,70022,70023,609, 0, 32, 0, 94],
[584,584,584,584,587,376,587, 0,590, 0, 0,584,584,584,584],
[ 0, 0, 0, 0,482,492, 0,381,604, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0,604,604,604,604,604, 93,604, 0, 0, 0, 0]

View File

@ -66,6 +66,20 @@ main.floors.MT40=
6,
4
]
},
"8,0": {
"floorId": "MT42",
"loc": [
8,
14
]
},
"5,0": {
"floorId": "MT42",
"loc": [
5,
14
]
}
},
"beforeBattle": {},
@ -83,7 +97,7 @@ main.floors.MT40=
[604,604, 0,492, 0,586, 0,492, 0,70179,603,70181, 27, 28, 94],
[604, 34,602, 0, 27,586, 0, 34,584,70187,381,70189,584,584,584],
[ 92,403,584,590,70022,70023,604, 0, 0,70187,376,70189, 0, 0, 0],
[604, 34,584,381, 34,603, 0, 34, 0,70187,378,70189, 0, 0, 0],
[604, 34,584,381, 34,592, 0, 34, 0,70187,378,70189, 0, 0, 0],
[584,584,584,592,584,584,584,584, 0,70187,484,70189, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,70195,600,70197,482,482,492],
[ 0, 0, 0,381, 0, 0, 0, 0,376,604, 0,584,584,584, 94],

View File

@ -17,18 +17,108 @@ main.floors.MT42=
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"changeFloor": {
"8,14": {
"floorId": "MT40",
"loc": [
8,
0
]
},
"5,14": {
"floorId": "MT40",
"loc": [
5,
0
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterBattle": {
"4,9": [
{
"type": "setValue",
"name": "flag:door_MT42_5_10",
"operator": "+=",
"value": "1"
}
],
"6,9": [
{
"type": "setValue",
"name": "flag:door_MT42_5_10",
"operator": "+=",
"value": "1"
}
]
},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"autoEvent": {
"5,10": {
"0": {
"condition": "flag:door_MT42_5_10==2",
"currentFloor": true,
"priority": 0,
"delayExecute": false,
"multiExecute": false,
"data": [
{
"type": "openDoor"
},
{
"type": "setValue",
"name": "flag:door_MT42_5_10",
"operator": "=",
"value": "null"
}
]
}
}
},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[604, 0,617,604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 92,611,604,604, 0, 0, 0, 0, 0,543, 0, 0, 0, 0, 94],
[604, 0, 0, 0, 0, 0, 0,604, 0, 0,588,588,588,614,584],
[584,584,584,584,584,595,604,604, 0, 0, 0,592, 0, 0,584],
[ 0, 0, 0, 0, 0, 0, 0,604,608,604,584,588, 0,584,584],
[ 0, 0, 0, 0, 0, 0, 0,274, 0, 0, 0,588, 0, 0, 0],
[ 92, 0, 0, 0,617, 0,587,587, 0, 0,586,588,617,586,586],
[584,584,617,70022,70023,611,70022,70023, 0,600,587, 0, 0, 0,586],
[584, 0, 0,584,608, 0,608,584, 0, 0,587,587,587,614,586],
[584, 0, 0,584,584, 85,584,584, 0,602, 0, 0, 0, 0,586],
[584,584,584,584,466,491,467,584,602, 0,604,604,604,277,586],
[584, 0, 0,584,584,468,585,585, 0, 0,604, 0,604, 0,586],
[ 0, 0, 0,584,584,497,585,585, 0, 0,600, 0,604, 0, 94],
[ 0, 0, 0,584,584, 93,585,585, 93,584,584,584,584,584,584]
],
"bgmap": [
[70073,70073,70073,70073,70073,70073,70073,70073,70073,70073,70073,70073,70073,70097,70073],
[70049,70049, 0,70049,70073,70073,70073,70097,70073,70073,70073,70073,70073,70073,70073],
[ 0, 0, 0, 0,70058,70105,70081,70081,70081,70081,70105,70049,70049,70049,70049],
[ 0, 0, 0, 0,70058, 0, 0, 0, 0, 0,70056, 0, 0, 0, 0],
[70065,70065,70065,70065,70066, 0, 0, 0, 0, 0,70056, 0, 0, 0, 0],
[70073,70073,70073,70073,70074, 0, 0, 0, 0, 0,70064,70083,70084,70065,70065],
[70081,70081,70081,70081,70082, 0, 0, 0, 0, 0,70080,70090,70091,70081,70081],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70098,70099, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0,70060,70116,70059, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0,70058,70124,70056, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0,70058,70132,70056, 0, 0, 0, 0, 0],
[70060,70065,70065,70059, 0, 0, 0,70058, 0,70056, 0, 0, 0, 0, 0],
[70066,70073,70073,70056, 0, 0, 0,70058, 0,70056, 0, 0, 0, 0, 0],
[70074,70073,70073,70056, 0, 0, 0,70058, 0,70056, 0, 0, 0, 0, 0],
[70074,70073,70073,70056, 0, 0, 0,70058, 0,70064,70065,70065,70065,70065,70065]
],
"fgmap": [
],
"bg2map": [
[ 0,70120,70121,70122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0,70128,70129,70130,70050, 0, 0, 0, 0,70126, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,70134,70048, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@ -41,15 +131,6 @@ main.floors.MT42=
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"bgmap": [
],
"fgmap": [
],
"bg2map": [
],
"fg2map": [

View File

@ -128,7 +128,7 @@ main.floors.snowTown=
"map": [
[ 0, 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0,70187, 91,70189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70187, 0,70189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[604,381,376, 33,609, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70195, 0,70197, 0, 0, 0,70160,70161,70162,70163, 0, 0, 0, 0, 0,80296,80297,80298,80299,80300, 0, 0, 0, 0, 0, 0, 0, 0],
[604,381,376, 33,611, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70195, 0,70197, 0, 0, 0,70160,70161,70162,70163, 0, 0, 0, 0, 0,80296,80297,80298,80299,80300, 0, 0, 0, 0, 0, 0, 0, 0],
[604,595,584,584,584,274,604,604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70019,70168,70169,70170,70171, 0, 0, 0, 0, 0,80304,80305,80306,80307,80308, 0, 0, 0, 0, 0, 0, 0, 0],
[ 92, 0,492,484,584, 33,378,381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,80312,80313,80314,80315,80316, 0, 0, 0, 0, 0, 0, 0, 0],
[584,584,584,584,584,584,584,584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,70019, 0, 0, 0, 0,80320,80321,80325,80326,80327, 0, 0, 0, 0, 0, 0, 0, 0],

View File

@ -625,13 +625,22 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"70080": {"cls":"tileset","id":"X70080","cannotOut":[],"cannotIn":["up","down","left","right"]},
"70081": {"cls":"tileset","id":"X70081","cannotIn":["up","down","left","right"]},
"70082": {"cls":"tileset","id":"X70082","cannotIn":["up","down","left","right"]},
"70083": {"cls":"tileset","id":"X70083","cannotIn":["left"],"cannotOut":["left"]},
"70084": {"cls":"tileset","id":"X70084","cannotIn":["right"],"cannotOut":["right"]},
"70090": {"cls":"tileset","id":"X70090","cannotOut":["left"],"cannotIn":["left"]},
"70091": {"cls":"tileset","id":"X70091","cannotIn":["right"],"cannotOut":["right"]},
"70098": {"cls":"tileset","id":"X70098","cannotIn":["left"],"cannotOut":["left"]},
"70099": {"cls":"tileset","id":"X70099","cannotIn":["right"],"cannotOut":["right"]},
"70112": {"cls":"tileset","id":"X70112","cannotIn":["down"],"cannotOut":["down"]},
"70114": {"cls":"tileset","id":"X70114","cannotIn":["down"],"cannotOut":["down"]},
"70116": {"cls":"tileset","id":"X70116","canPass":true},
"70116": {"cls":"tileset","id":"X70116","canPass":true,"cannotOut":["left","right"],"cannotIn":["left","right"]},
"70120": {"cls":"tileset","id":"X70120","cannotIn":["up","down","left","right"]},
"70122": {"cls":"tileset","id":"X70122","cannotIn":["up","down","left","right"]},
"70124": {"cls":"tileset","id":"X70124","cannotOut":["left","right"],"cannotIn":["left","right"]},
"70128": {"cls":"tileset","id":"X70128","cannotIn":[]},
"70130": {"cls":"tileset","id":"X70130","cannotIn":[]},
"70131": {"cls":"tileset","id":"X70131","cannotOut":["left","right"],"cannotIn":["left","right"]},
"70132": {"cls":"tileset","id":"X70132","cannotOut":["left","right"],"cannotIn":["left","right"]},
"70184": {"cls":"tileset","id":"X70184","canPass":true},
"70185": {"cls":"tileset","id":"X70185","canPass":true},
"70186": {"cls":"tileset","id":"X70186","canPass":true},

View File

@ -749,12 +749,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
}
this._updateDamage_damage(floorId, onMap);
this._updateDamage_extraDamage(floorId, onMap);
core.getItemDetail(floorId); // 宝石血瓶详细信息
core.getItemDetail(floorId, onMap); // 宝石血瓶详细信息
this.drawDamage(ctx);
};
// 获取宝石信息 并绘制
this.getItemDetail = function (floorId) {
this.getItemDetail = function (floorId, onMap) {
if (!core.getFlag('itemDetail')) return;
floorId ??= core.status.thisMap.floorId;
let diff = {};
@ -779,7 +779,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
const x = block.x,
y = block.y;
// v2优化只绘制范围内的部分
if (core.bigmap.v2) {
if (onMap && core.bigmap.v2) {
if (
x < core.bigmap.posX - core.bigmap.extend ||
x > core.bigmap.posX + core._PX_ + core.bigmap.extend ||

View File

@ -439,6 +439,10 @@ p#name {
image-rendering: pixelated;
}
/* .draw-canvas {
filter: contrast(120%) brightness(80%);
} */
#inputDiv {
display: none;
width: 100%;

View File

@ -163,3 +163,30 @@ export function nextFrame(cb: (time: number) => void) {
requestAnimationFrame(cb);
});
}
/**
*
* @param canvas
* @param name
*/
export function downloadCanvasImage(
canvas: HTMLCanvasElement,
name: string
): void {
const data = canvas.toDataURL('image/png');
download(data, name);
}
/**
*
* @param content
* @param name
*/
export function download(content: string, name: string) {
const a = document.createElement('a');
a.download = `${name}.png`;
a.href = content;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}

9
src/source/cls.d.ts vendored
View File

@ -624,13 +624,22 @@ interface IdToCls {
X70080: 'tileset';
X70081: 'tileset';
X70082: 'tileset';
X70083: 'tileset';
X70084: 'tileset';
X70090: 'tileset';
X70091: 'tileset';
X70098: 'tileset';
X70099: 'tileset';
X70112: 'tileset';
X70114: 'tileset';
X70116: 'tileset';
X70120: 'tileset';
X70122: 'tileset';
X70124: 'tileset';
X70128: 'tileset';
X70130: 'tileset';
X70131: 'tileset';
X70132: 'tileset';
X70184: 'tileset';
X70185: 'tileset';
X70186: 'tileset';

18
src/source/maps.d.ts vendored
View File

@ -624,13 +624,22 @@ interface IdToNumber {
X70080: 70080;
X70081: 70081;
X70082: 70082;
X70083: 70083;
X70084: 70084;
X70090: 70090;
X70091: 70091;
X70098: 70098;
X70099: 70099;
X70112: 70112;
X70114: 70114;
X70116: 70116;
X70120: 70120;
X70122: 70122;
X70124: 70124;
X70128: 70128;
X70130: 70130;
X70131: 70131;
X70132: 70132;
X70184: 70184;
X70185: 70185;
X70186: 70186;
@ -1267,13 +1276,22 @@ interface NumberToId {
70080: 'X70080';
70081: 'X70081';
70082: 'X70082';
70083: 'X70083';
70084: 'X70084';
70090: 'X70090';
70091: 'X70091';
70098: 'X70098';
70099: 'X70099';
70112: 'X70112';
70114: 'X70114';
70116: 'X70116';
70120: 'X70120';
70122: 'X70122';
70124: 'X70124';
70128: 'X70128';
70130: 'X70130';
70131: 'X70131';
70132: 'X70132';
70184: 'X70184';
70185: 'X70185';
70186: 'X70186';

View File

@ -24,6 +24,13 @@
un-checked-children="OFF"
></a-switch>
</div>
<span
v-if="!isMobile"
class="button-text"
id="fly-download"
@click="download"
>下载地图图片</span
>
</div>
<div id="fly-main">
<div id="fly-left">
@ -86,7 +93,7 @@ import {
DoubleRightOutlined
} from '@ant-design/icons-vue';
import { debounce } from 'lodash';
import { keycode, tip } from '../plugin/utils';
import { downloadCanvasImage, keycode, tip } from '../plugin/utils';
import { sleep } from 'mutate-animate';
import { KeyCode } from '../plugin/keyCodes';
@ -94,7 +101,7 @@ type Loc2 = [number, number, number, number];
const area = getArea();
const nowArea = ref(
Object.keys(area).find(v => area[v].includes(core.status.floorId))!
Object.keys(area).find(v => area[v].includes(core.status.floorId)) ?? ''
);
const nowFloor = ref(core.status.floorId);
const noBorder = ref(true);
@ -137,6 +144,7 @@ let map: HTMLCanvasElement;
let mapCtx: CanvasRenderingContext2D;
let thumb: HTMLCanvasElement;
let thumbCtx: CanvasRenderingContext2D;
let downloadMode = false;
function exit() {
core.plugin.flyOpened.value = false;
@ -279,7 +287,7 @@ function drawThumbnail(
y: number,
noCheck: boolean = false
) {
if (!noCheck && !checkThumbnail(floorId, x, y)) return;
if (!downloadMode && !noCheck && !checkThumbnail(floorId, x, y)) return;
const floor = core.status.maps[floorId];
drawedThumbnail[floorId] = true;
@ -295,6 +303,7 @@ function drawThumbnail(
ctx,
damage: scale > 7
});
if (!downloadMode) {
if (!core.hasVisitedFloor(floorId)) {
ctx.fillStyle = '#d0d6';
ctx.fillRect(
@ -315,6 +324,7 @@ function drawThumbnail(
);
ctx.fillStyle = '#000';
}
}
}
/**
@ -369,6 +379,22 @@ function draw() {
drawRight();
}
function download() {
if (nowArea.value === '') {
tip('error', '当前地图不再任意一个区域内!');
return;
}
downloadMode = true;
const before = scale;
scale = 32;
drawMap();
downloadCanvasImage(temp, nowArea.value);
scale = before;
downloadMode = false;
draw();
tip('success', '图片下载成功!');
}
function fly() {
if (core.flyTo(nowFloor.value)) exit();
else tip('error', `无法飞往${floor.value.title}`);