diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index fd95279..3937e68 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -1968,16 +1968,17 @@ return code; */; drawWarning_s - : '警告坐标x' PosString 'y' PosString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline + : '警告坐标x' PosString 'y' PosString '缩放倍率'EvalString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline /* drawWarning_s tooltip : drawWarning: 绘制warning警告并拉进镜头,本事件为异步事件,下一事件将在3100ms后执行 helpUrl : /_docs/#/instruction -default : [0, 0,24,"这里是提示内容","绿色史莱姆",false] +default : [0, 0,'2',24,"这里是提示内容","绿色史莱姆",false] colour : this.soundColor 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; */; diff --git a/_server/MotaActionParser.js b/_server/MotaActionParser.js index 18f7066..85647da 100644 --- a/_server/MotaActionParser.js +++ b/_server/MotaActionParser.js @@ -2105,6 +2105,7 @@ MotaActionParser = function () { this.next = MotaActionBlocks["drawWarning_s"].xmlText([ data.x, data.y, + data.large, data.size, data?.text, data?.text2, diff --git a/project/floors/street01.js b/project/floors/street01.js index a4ef87e..939b8da 100644 --- a/project/floors/street01.js +++ b/project/floors/street01.js @@ -1,162 +1,139 @@ -main.floors.street01 = { - floorId: "street01", - title: "街道", - name: "1", - width: 13, - height: 13, - canFlyTo: true, - canFlyFrom: true, - canUseQuickShop: true, - images: [], - ratio: 1, - defaultGround: "X90001", - firstArrive: [], - eachArrive: [], - parallelDo: "", - events: { - "5,7": [ - { - type: "changeFloor", - floorId: "jiuguan", - loc: [5, 12], - direction: "up", - }, - ], - }, - changeFloor: { - "0,8": { - floorId: "changguan2", - loc: [12, 8], +main.floors.street01= +{ + "floorId": "street01", + "title": "街道", + "name": "1", + "width": 13, + "height": 13, + "canFlyTo": true, + "canFlyFrom": true, + "canUseQuickShop": true, + "images": [], + "ratio": 1, + "defaultGround": "X90001", + "firstArrive": [], + "eachArrive": [], + "parallelDo": "", + "events": { + "5,7": [ + { + "type": "changeFloor", + "floorId": "jiuguan", + "loc": [ + 5, + 12 + ], + "direction": "up" + } + ] }, - "12,9": { - floorId: "zhujuejia", - loc: [0, 9], + "changeFloor": { + "0,8": { + "floorId": "changguan2", + "loc": [ + 12, + 8 + ] + }, + "12,9": { + "floorId": "zhujuejia", + "loc": [ + 0, + 9 + ] + } }, - }, - beforeBattle: {}, - afterBattle: {}, - afterGetItem: {}, - afterOpenDoor: {}, - autoEvent: {}, - cannotMove: { - "10,6": ["left", "right"], - }, - cannotMoveIn: { - "10,6": ["left", "right"], - }, - map: [ - [ - 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, - ], - [ - 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], - [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], - [130170, 0, 0, 0, 71, 35, 0, 0, 0, 0, 0, 0, 0], - [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, - ], - ], - areas: "牢狱", - 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, 71818, 71819, 0, 0, 0, 0, 0, 0, 0, 10036, 0, 90001], - [90001, 71826, 71827, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90001], - [90001, 0, 0, 0, 0, 0, 71786, 0, 60135, 60135, 60135, 60135, 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], - [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, - ], - [ - 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, 130084], - [0, 0, 200110, 200111, 0, 200108, 200109, 0, 0, 0, 0, 0, 0], - [0, 0, 200118, 200119, 0, 200116, 200117, 0, 0, 0, 0, 0, 0], - [0, 20241, 0, 0, 0, 0, 0, 0, 0, 70552, 0, 70554, 0], - [0, 0, 0, 0, 0, 93, 200180, 71787, 0, 70560, 0, 70562, 0], - [110114, 110114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 110143, 110114, 110114, 110114, 110114], - [0, 0, 0, 110114, 120095, 0, 120095, 120095, 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, 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], - ], - bg2map: [ - [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, 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, 70171, 70333, 70333, 70334, 70553, 200162, 0], - [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, 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, 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], - ], - 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, 393, 394, 395, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 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, 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], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - ], -}; + "beforeBattle": {}, + "afterBattle": {}, + "afterGetItem": {}, + "afterOpenDoor": {}, + "autoEvent": {}, + "cannotMove": { + "10,6": [ + "left", + "right" + ] + }, + "cannotMoveIn": { + "10,6": [ + "left", + "right" + ] + }, + "map": [ + [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], + [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], + [ 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], + [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], + [130225,130169,130169,130169,130169,130170,110122,110122,130168,130169,130169,130224,130177] +], + "areas": "牢狱", + "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,71818,71819, 0, 0, 0, 0, 0, 0, 0,10036, 0,90001], + [90001,71826,71827, 0, 0, 0, 0, 0, 0, 0, 0, 0,90001], + [90001, 0, 0, 0, 0, 0,71786, 0,60135,60135,60135,60135, 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], + [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], + [ 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,130084], + [ 0, 0,200110,200111, 0,200108,200109, 0, 0, 0, 0, 0, 0], + [ 0, 0,200118,200119, 0,200116,200117, 0, 0, 0, 0, 0, 0], + [ 0,20241, 0, 0, 0, 0, 0, 0, 0,70552, 0,70554, 0], + [ 0, 0, 0, 0, 0, 93,200180,71787, 0,70560, 0,70562, 0], + [110114,110114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0,110143,110114,110114,110114,110114], + [ 0, 0, 0,110114,120095, 0,120095,120095,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, 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] +], + "bg2map": [ + [ 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,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,70171,70333,70333,70334,70553,200162, 0], + [ 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, 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,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] +], + "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,393,394,395, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 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, 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], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +] +} \ No newline at end of file diff --git a/project/plugins.js b/project/plugins.js index 533cd69..4ed7b66 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -52,14 +52,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = if (!main.replayChecking && !core.isReplaying()) { data.text = core.replaceText(data.text); data.text2 = core.replaceText(data.text2); - core.drawWarning( - data.x, - data.y, - data.size, - data?.text, - data?.text2, - data?.warning - ); + core.drawWarning(data.x, data.y, data?.text, data?.text2, data?.warning, data.large, data.size) + setTimeout(() => core.doAction(), 3100); } else { core.doAction(); @@ -3620,6 +3614,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = 31 * 3, 31 * 3, ]); + if ( + core.status.lockControl || + core.isMoving() + ) + return; if (core.isReplaying()) { this.replayAction[col][row].call(core); } else if (core.isPlaying()) { @@ -3644,7 +3643,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.isMoving() ) return; - core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); + core.useItem('fly'); return; } /*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() ) return; - core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); + core.useItem('fly'); return; } /* @@ -3706,6 +3705,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = 31 * 3, 31 * 3, ]); + if ( + core.status.lockControl || + core.isMoving() + ) return if (core.isReplaying()) { this.replayAction[col][row].call(core); } else if (core.isPlaying()) { @@ -14988,7 +14991,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = cishu2++; if (cishu2 == 30) { core.unregisterAnimationFrame("small") - + elements.forEach(function (v) { + if (v instanceof HTMLCanvasElement) { + v.style.transform = "none"; + } + }); } } });