Fix setWeather Bug
This commit is contained in:
parent
1d7caccb32
commit
07590c7aa6
@ -2154,7 +2154,7 @@ ActionParser.prototype.parseAction = function() {
|
||||
break;
|
||||
case "setWeather": // 更改天气
|
||||
this.next = MotaActionBlocks['setWeather_s'].xmlText([
|
||||
data.name||'无',data.level||1,this.next]);
|
||||
data.name,data.level||1,this.next]);
|
||||
break;
|
||||
case "openDoor": // 开一个门, 包括暗墙
|
||||
data.loc=data.loc||['','']
|
||||
|
||||
@ -835,7 +835,7 @@ events.prototype.doAction = function() {
|
||||
break;
|
||||
case "setWeather": // 更改天气
|
||||
core.setWeather(data.name, data.level);
|
||||
if (core.isset(data.name))
|
||||
if (data.name=='rain' || data.name=='snow' || data.name=='fog')
|
||||
core.setFlag('__weather__', [data.name, data.level]);
|
||||
else core.removeFlag('__weather__');
|
||||
this.doAction();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user