一些细节的修复
This commit is contained in:
parent
60d5e2cc08
commit
f865914139
@ -1258,7 +1258,6 @@ tooltip : showFloorImg: 显示一个贴图,xy为左上角坐标,可用逗号
|
|||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=showFloorImg%ef%bc%9a%e6%98%be%e7%a4%ba%e8%b4%b4%e5%9b%be
|
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=showFloorImg%ef%bc%9a%e6%98%be%e7%a4%ba%e8%b4%b4%e5%9b%be
|
||||||
default : ["","",""]
|
default : ["","",""]
|
||||||
allFloorIds : ['IdString_0']
|
allFloorIds : ['IdString_0']
|
||||||
selectPoint : ["EvalString_0", "EvalString_1", "IdString_0"]
|
|
||||||
colour : this.mapColor
|
colour : this.mapColor
|
||||||
var floorstr = '';
|
var floorstr = '';
|
||||||
if (EvalString_0 && EvalString_1) {
|
if (EvalString_0 && EvalString_1) {
|
||||||
@ -1292,7 +1291,6 @@ helpUrl : https://h5mota.com/games/template/_docs/#/event?id=hideFloorImg%ef%bc%
|
|||||||
default : ["","",""]
|
default : ["","",""]
|
||||||
allFloorIds : ['IdString_0']
|
allFloorIds : ['IdString_0']
|
||||||
colour : this.mapColor
|
colour : this.mapColor
|
||||||
selectPoint : ["EvalString_0", "EvalString_1", "IdString_0"]
|
|
||||||
var floorstr = '';
|
var floorstr = '';
|
||||||
if (EvalString_0 && EvalString_1) {
|
if (EvalString_0 && EvalString_1) {
|
||||||
var pattern1 = MotaActionFunctions.pattern.id;
|
var pattern1 = MotaActionFunctions.pattern.id;
|
||||||
@ -2445,7 +2443,7 @@ break_s
|
|||||||
: '跳出当前循环或公共事件' Newline
|
: '跳出当前循环或公共事件' Newline
|
||||||
|
|
||||||
/* break_s
|
/* break_s
|
||||||
tooltip : break:跳出循环, 如果break事件不在任何循环中被执行,则和exit等价,即会立刻结束当前事件!
|
tooltip : break:跳出循环或公共事件!
|
||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=break%EF%BC%9A%E8%B7%B3%E5%87%BA%E5%BE%AA%E7%8E%AF
|
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=break%EF%BC%9A%E8%B7%B3%E5%87%BA%E5%BE%AA%E7%8E%AF
|
||||||
colour : this.eventColor
|
colour : this.eventColor
|
||||||
var code = '{"type": "break"},\n';
|
var code = '{"type": "break"},\n';
|
||||||
@ -2453,10 +2451,10 @@ return code;
|
|||||||
*/;
|
*/;
|
||||||
|
|
||||||
continue_s
|
continue_s
|
||||||
: '继续当前循环' Newline
|
: '提前结束本轮循环或跳出公共事件' Newline
|
||||||
|
|
||||||
/* continue_s
|
/* continue_s
|
||||||
tooltip : continue:继续执行当前循环的下一轮, 如果continue事件不在任何循环中被执行,则和exit等价,即会立刻结束当前事件!
|
tooltip : continue:继续执行当前循环的下一轮,或跳出公共事件!
|
||||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=continue%EF%BC%9A%E7%BB%A7%E7%BB%AD%E6%89%A7%E8%A1%8C%E5%BD%93%E5%89%8D%E5%BE%AA%E7%8E%AF
|
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=continue%EF%BC%9A%E7%BB%A7%E7%BB%AD%E6%89%A7%E8%A1%8C%E5%BD%93%E5%89%8D%E5%BE%AA%E7%8E%AF
|
||||||
colour : this.eventColor
|
colour : this.eventColor
|
||||||
var code = '{"type": "continue"},\n';
|
var code = '{"type": "continue"},\n';
|
||||||
|
|||||||
@ -1201,6 +1201,8 @@ MotaActionFunctions.IdString_pre = function(IdString){
|
|||||||
MotaActionFunctions.PosString_pre = function(PosString){
|
MotaActionFunctions.PosString_pre = function(PosString){
|
||||||
if (!PosString || /^-?\d+$/.test(PosString)) return PosString;
|
if (!PosString || /^-?\d+$/.test(PosString)) return PosString;
|
||||||
//if (!(MotaActionFunctions.pattern.id.test(PosString)))throw new Error(PosString+'中包含了0-9 a-z A-Z _ 和中文之外的字符,或者是没有以flag: 开头');
|
//if (!(MotaActionFunctions.pattern.id.test(PosString)))throw new Error(PosString+'中包含了0-9 a-z A-Z _ 和中文之外的字符,或者是没有以flag: 开头');
|
||||||
|
var comma = PosString.indexOf(',');
|
||||||
|
if (comma >= 0 && PosString.substring(0, comma).indexOf('(') < 0) throw '此处不可写多点坐标';
|
||||||
return '"'+MotaActionFunctions.replaceFromName(PosString)+'"';
|
return '"'+MotaActionFunctions.replaceFromName(PosString)+'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -509,7 +509,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
|||||||
"ratio": {
|
"ratio": {
|
||||||
"_leaf": true,
|
"_leaf": true,
|
||||||
"_type": "textarea",
|
"_type": "textarea",
|
||||||
"_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null",
|
"_range": "thiseval==~~thiseval && thiseval>=0",
|
||||||
"_docs": "宝石血瓶效果",
|
"_docs": "宝石血瓶效果",
|
||||||
"_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。"
|
"_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
<link href="_server/CodeMirror/codemirror.css" rel="stylesheet">
|
<link href="_server/CodeMirror/codemirror.css" rel="stylesheet">
|
||||||
<link href="_server/thirdparty/awesomplete.css" rel="stylesheet">
|
<link href="_server/thirdparty/awesomplete.css" rel="stylesheet">
|
||||||
<link href="_server/css/editor_mode_mobile.css" rel="stylesheet">
|
<link href="_server/css/editor_mode_mobile.css" rel="stylesheet">
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
<link href="_server/CodeMirror/codemirror.css" rel="stylesheet">
|
<link href="_server/CodeMirror/codemirror.css" rel="stylesheet">
|
||||||
<link href="_server/thirdparty/awesomplete.css" rel="stylesheet">
|
<link href="_server/thirdparty/awesomplete.css" rel="stylesheet">
|
||||||
<link href="_server/css/editor_mode.css" rel="stylesheet">
|
<link href="_server/css/editor_mode.css" rel="stylesheet">
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -1815,7 +1815,7 @@ events.prototype._action_switch = function (data, x, y, prefix) {
|
|||||||
var list = [];
|
var list = [];
|
||||||
for (var i = 0; i < data.caseList.length; i++) {
|
for (var i = 0; i < data.caseList.length; i++) {
|
||||||
var condition = data.caseList[i]["case"];
|
var condition = data.caseList[i]["case"];
|
||||||
if (condition == "default" || core.calValue(condition, prefix) == key) {
|
if (condition == "default" || core.calValue(condition, prefix) === key) {
|
||||||
core.push(list, data.caseList[i].action);
|
core.push(list, data.caseList[i].action);
|
||||||
if (!data.caseList[i].nobreak)
|
if (!data.caseList[i].nobreak)
|
||||||
break;
|
break;
|
||||||
@ -1927,10 +1927,18 @@ events.prototype._action_for = function (data, x, y, prefix) {
|
|||||||
return core.doAction();
|
return core.doAction();
|
||||||
}
|
}
|
||||||
var from = core.calValue(data.from);
|
var from = core.calValue(data.from);
|
||||||
if (typeof from != 'number') {
|
var to = core.calValue(data.to);
|
||||||
core.insertAction('循环遍历事件要求【起始点】仅能是数字!');
|
var step = core.calValue(data.step);
|
||||||
|
if (typeof from != 'number' || typeof to !='number' || typeof step != 'number') {
|
||||||
|
core.insertAction('循环遍历事件要求【起始点】【终止点】【每步】仅能是数字!');
|
||||||
return core.doAction();
|
return core.doAction();
|
||||||
}
|
}
|
||||||
|
// 首次判定
|
||||||
|
if ((step > 0 && from > to) || (step < 0 && from < to)) {
|
||||||
|
core.doAction();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var letter = data.name.substring(5);
|
var letter = data.name.substring(5);
|
||||||
core.setFlag('@temp@' + letter, from);
|
core.setFlag('@temp@' + letter, from);
|
||||||
var toName = '@temp@for-to@' + letter;
|
var toName = '@temp@for-to@' + letter;
|
||||||
@ -2016,17 +2024,20 @@ events.prototype._precompile_dowhile = function (data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
events.prototype._action_break = function (data, x, y, prefix) {
|
events.prototype._action_break = function (data, x, y, prefix) {
|
||||||
|
if (core.status.event.data.list.length > 1)
|
||||||
core.status.event.data.list.shift();
|
core.status.event.data.list.shift();
|
||||||
core.doAction();
|
core.doAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
events.prototype._action_continue = function (data, x, y, prefix) {
|
events.prototype._action_continue = function (data, x, y, prefix) {
|
||||||
|
if (core.status.event.data.list.length > 1) {
|
||||||
if (core.calValue(core.status.event.data.list[0].condition, prefix)) {
|
if (core.calValue(core.status.event.data.list[0].condition, prefix)) {
|
||||||
core.status.event.data.list[0].todo = core.clone(core.status.event.data.list[0].total);
|
core.status.event.data.list[0].todo = core.clone(core.status.event.data.list[0].total);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.status.event.data.list.shift();
|
core.status.event.data.list.shift();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
core.doAction();
|
core.doAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user