更改警告事件,增加工具栏锁定

This commit is contained in:
草莓 2025-01-27 19:55:01 +08:00
parent 4625b787d8
commit 43fec5a6a1
4 changed files with 160 additions and 174 deletions

View File

@ -1968,16 +1968,17 @@ return code;
*/; */;
drawWarning_s drawWarning_s
: '警告坐标x' PosString 'y' PosString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline : '警告坐标x' PosString 'y' PosString '缩放倍率'EvalString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline
/* drawWarning_s /* drawWarning_s
tooltip : drawWarning: 绘制warning警告并拉进镜头,本事件为异步事件,下一事件将在3100ms后执行 tooltip : drawWarning: 绘制warning警告并拉进镜头,本事件为异步事件,下一事件将在3100ms后执行
helpUrl : /_docs/#/instruction helpUrl : /_docs/#/instruction
default : [0, 0,24,"这里是提示内容","绿色史莱姆",false] default : [0, 0,'2',24,"这里是提示内容","绿色史莱姆",false]
colour : this.soundColor colour : this.soundColor
selectPoint : ["PosString_0", "PosString_1"] selectPoint : ["PosString_0", "PosString_1"]
var code = '{"type": "drawWarning", "x": '+PosString_0+', "y": '+PosString_1+',"size":'+Int_0+',"text": "'+EvalString_0+'", "text2": "'+EvalString_1+'", "warning": '+Bool_0+'},\n'; if(!EvalString_1||!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_1))throw new Error("此项仅能填写小数或整数");
var code = '{"type": "drawWarning", "x": '+PosString_0+', "y": '+PosString_1+',"large":'+EvalString_0+',"size":'+Int_0+',"text": "'+EvalString_1+'", "text2": "'+EvalString_2+'", "warning": '+Bool_0+'},\n';
return code; return code;
*/; */;

View File

@ -2105,6 +2105,7 @@ MotaActionParser = function () {
this.next = MotaActionBlocks["drawWarning_s"].xmlText([ this.next = MotaActionBlocks["drawWarning_s"].xmlText([
data.x, data.x,
data.y, data.y,
data.large,
data.size, data.size,
data?.text, data?.text,
data?.text2, data?.text2,

View File

@ -1,90 +1,82 @@
main.floors.street01 = { main.floors.street01=
floorId: "street01", {
title: "街道", "floorId": "street01",
name: "1", "title": "街道",
width: 13, "name": "1",
height: 13, "width": 13,
canFlyTo: true, "height": 13,
canFlyFrom: true, "canFlyTo": true,
canUseQuickShop: true, "canFlyFrom": true,
images: [], "canUseQuickShop": true,
ratio: 1, "images": [],
defaultGround: "X90001", "ratio": 1,
firstArrive: [], "defaultGround": "X90001",
eachArrive: [], "firstArrive": [],
parallelDo: "", "eachArrive": [],
events: { "parallelDo": "",
"events": {
"5,7": [ "5,7": [
{ {
type: "changeFloor", "type": "changeFloor",
floorId: "jiuguan", "floorId": "jiuguan",
loc: [5, 12], "loc": [
direction: "up", 5,
}, 12
], ],
"direction": "up"
}
]
}, },
changeFloor: { "changeFloor": {
"0,8": { "0,8": {
floorId: "changguan2", "floorId": "changguan2",
loc: [12, 8], "loc": [
12,
8
]
}, },
"12,9": { "12,9": {
floorId: "zhujuejia", "floorId": "zhujuejia",
loc: [0, 9], "loc": [
0,
9
]
}
}, },
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {
"10,6": [
"left",
"right"
]
}, },
beforeBattle: {}, "cannotMoveIn": {
afterBattle: {}, "10,6": [
afterGetItem: {}, "left",
afterOpenDoor: {}, "right"
autoEvent: {}, ]
cannotMove: {
"10,6": ["left", "right"],
}, },
cannotMoveIn: { "map": [
"10,6": ["left", "right"], [110121,110122,200040,200225,200138,200227,200228,200225,200250,200227,200228,200046,130090],
}, [110124, 0,200048,200233,200146,200235,200236,200233,200250,200235,200228,200054,130098],
map: [ [110124, 0,200056,200153,200154,200155,200244,200272,200154,200276,200228,200054,130060],
[ [110124, 0,200272,200161,200162,200163,200276,200168,200171,200172, 0,70327,130068],
110121, 110122, 200040, 200225, 200138, 200227, 200228, 200225, 200250, [110124, 0,200168,200169,200170,200171,200172,200080,200081,200086, 0,70335,110114],
200227, 200228, 200046, 130090, [110124, 0,200176,200177,200178,200179,71786,90064,90064,90064, 0,90064,110125],
], [110124, 0,200088,200089,200004,200005,200006,71795, 0, 0, 0, 0,110125],
[
110124, 0, 200048, 200233, 200146, 200235, 200236, 200233, 200250, 200235,
200228, 200054, 130098,
],
[
110124, 0, 200056, 200153, 200154, 200155, 200244, 200272, 200154, 200276,
200228, 200054, 130060,
],
[
110124, 0, 200272, 200161, 200162, 200163, 200276, 200168, 200171, 200172,
0, 70327, 130068,
],
[
110124, 0, 200168, 200169, 200170, 200171, 200172, 200080, 200081, 200086,
0, 70335, 110114,
],
[
110124, 0, 200176, 200177, 200178, 200179, 71786, 90064, 90064, 90064, 0,
90064, 110125,
],
[
110124, 0, 200088, 200089, 200004, 200005, 200006, 71795, 0, 0, 0, 0,
110125,
],
[110118,110118,200096,110116,110020, 0,200014, 0, 0, 0, 0, 0,110125], [110118,110118,200096,110116,110020, 0,200014, 0, 0, 0, 0, 0,110125],
[ 92, 0, 0,110124, 0,201, 0, 0,110125,110122,110122,110122,110122], [ 92, 0, 0,110124, 0,201, 0, 0,110125,110122,110122,110122,110122],
[ 0, 0, 0,110118,110118,202,110118,110118,110122, 0, 0, 0, 94], [ 0, 0, 0,110118,110118,202,110118,110118,110122, 0, 0, 0, 94],
[130170, 0, 0, 0, 71, 35, 0, 0, 0, 0, 0, 0, 0], [130170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[130178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130168,130169], [130178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130168,130169],
[ [130225,130169,130169,130169,130169,130170,110122,110122,130168,130169,130169,130224,130177]
130225, 130169, 130169, 130169, 130169, 130170, 110122, 110122, 130168,
130169, 130169, 130224, 130177,
], ],
], "areas": "牢狱",
areas: "牢狱", "bgmap": [
bgmap: [
[90001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001], [90001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001],
[90001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001], [90001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001],
[90001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001], [90001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001],
@ -94,21 +86,12 @@ main.floors.street01 = {
[90001, 0, 0, 0, 0, 0, 0, 0, 0,90001,90001,90001, 0], [90001, 0, 0, 0, 0, 0, 0, 0, 0,90001,90001,90001, 0],
[90001,90001,90001, 0, 0, 0, 0, 0,90001, 0, 0, 0, 0], [90001,90001,90001, 0, 0, 0, 0, 0,90001, 0, 0, 0, 0],
[70032,70032,70025, 0, 0,90244,90001,90001,90001, 0, 0, 0, 0], [70032,70032,70025, 0, 0,90244,90001,90001,90001, 0, 0, 0, 0],
[ [70025,70025,70025,90001,90001,90244,90001,90001,90001,70025,70025,70025,70025],
70025, 70025, 70025, 90001, 90001, 90244, 90001, 90001, 90001, 70025, [ 0,70025,70025,70025,70025,70025,70025,70025,70025,70025,70025,70025,70025],
70025, 70025, 70025, [ 0,70025,70025,70025,70025,70025,70025,70025,70025,70025,70025, 0, 0],
[ 0, 0, 0, 0, 0, 0,90001,90001, 0, 0, 0, 0, 0]
], ],
[ "fgmap": [
0, 70025, 70025, 70025, 70025, 70025, 70025, 70025, 70025, 70025, 70025,
70025, 70025,
],
[
0, 70025, 70025, 70025, 70025, 70025, 70025, 70025, 70025, 70025, 70025,
0, 0,
],
[0, 0, 0, 0, 0, 0, 90001, 90001, 0, 0, 0, 0, 0],
],
fgmap: [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130076], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130076],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130084], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130084],
[ 0, 0,200110,200111, 0,200108,200109, 0, 0, 0, 0, 0, 0], [ 0, 0,200110,200111, 0,200108,200109, 0, 0, 0, 0, 0, 0],
@ -121,30 +104,24 @@ main.floors.street01 = {
[ 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, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,110114,110114, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 0,110114,110114, 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]
], ],
bg2map: [ "bg2map": [
[ 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,90650,90651, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0,90650,90651, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0,90658,90659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0,90658,90659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0,70163,70325,70325,70326, 0,200162, 0], [ 0, 0, 0, 0, 0, 0,70163,70325,70325,70326, 0,200162, 0],
[ 0, 0, 0, 0, 0, 0,70171,70333,70333,70334,70553,200162, 0], [ 0, 0, 0, 0, 0, 0,70171,70333,70333,70334,70553,200162, 0],
[ 0,71834,71835, 0, 0, 0,90064, 0, 0, 0,70561, 0,110122], [ 0,71834,71835, 0, 0, 0,90064, 0, 0, 0,70561, 0,110122],
[ [ 0,71842,71843,200089,200004,200005,71794, 0,90617,70568,70569,70570, 0],
0, 71842, 71843, 200089, 200004, 200005, 71794, 0, 90617, 70568, 70569,
70570, 0,
],
[ 0, 0, 0,200097,200012,200013,110012, 0, 0, 0, 0, 0, 0], [ 0, 0, 0,200097,200012,200013,110012, 0, 0, 0, 0, 0, 0],
[ [ 0, 0, 0, 0,110028,90244, 0,120108,120108,110134,110134,110134,110134],
0, 0, 0, 0, 110028, 90244, 0, 120108, 120108, 110134, 110134, 110134,
110134,
],
[ 0, 0, 0, 0,120103,90244,120103,120103, 0, 0, 0, 0, 0], [ 0, 0, 0, 0,120103,90244,120103,120103, 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, 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]
], ],
fg2map: [ "fg2map": [
[ 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, 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],
@ -157,6 +134,6 @@ main.floors.street01 = {
[ 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, 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, 0, 0, 0, 0, 0, 0]
], ]
}; }

View File

@ -52,14 +52,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (!main.replayChecking && !core.isReplaying()) { if (!main.replayChecking && !core.isReplaying()) {
data.text = core.replaceText(data.text); data.text = core.replaceText(data.text);
data.text2 = core.replaceText(data.text2); data.text2 = core.replaceText(data.text2);
core.drawWarning( core.drawWarning(data.x, data.y, data?.text, data?.text2, data?.warning, data.large, data.size)
data.x,
data.y,
data.size,
data?.text,
data?.text2,
data?.warning
);
setTimeout(() => core.doAction(), 3100); setTimeout(() => core.doAction(), 3100);
} else { } else {
core.doAction(); core.doAction();
@ -3620,6 +3614,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
31 * 3, 31 * 3,
31 * 3, 31 * 3,
]); ]);
if (
core.status.lockControl ||
core.isMoving()
)
return;
if (core.isReplaying()) { if (core.isReplaying()) {
this.replayAction[col][row].call(core); this.replayAction[col][row].call(core);
} else if (core.isPlaying()) { } else if (core.isPlaying()) {
@ -3644,7 +3643,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.isMoving() core.isMoving()
) )
return; return;
core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); core.useItem('fly');
return; return;
} }
/*const equipBox = makeBox([EQUIP_BLOCK_LEFT_VERTICAL, EQUIP_BLOCK_TOP_VERTICAL], [90 * 3, 130 * 3]) /*const equipBox = makeBox([EQUIP_BLOCK_LEFT_VERTICAL, EQUIP_BLOCK_TOP_VERTICAL], [90 * 3, 130 * 3])
@ -3662,7 +3661,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.isMoving() core.isMoving()
) )
return; return;
core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); core.useItem('fly');
return; return;
} }
/* /*
@ -3706,6 +3705,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
31 * 3, 31 * 3,
31 * 3, 31 * 3,
]); ]);
if (
core.status.lockControl ||
core.isMoving()
) return
if (core.isReplaying()) { if (core.isReplaying()) {
this.replayAction[col][row].call(core); this.replayAction[col][row].call(core);
} else if (core.isPlaying()) { } else if (core.isPlaying()) {
@ -14988,7 +14991,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
cishu2++; cishu2++;
if (cishu2 == 30) { if (cishu2 == 30) {
core.unregisterAnimationFrame("small") core.unregisterAnimationFrame("small")
elements.forEach(function (v) {
if (v instanceof HTMLCanvasElement) {
v.style.transform = "none";
}
});
} }
} }
}); });