完善循环式地图

This commit is contained in:
unanmed 2023-01-04 16:42:29 +08:00
parent ae3d62211e
commit b9fa8561d6
2 changed files with 3 additions and 2 deletions

View File

@ -203,6 +203,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
if (weather) core.setWeather(weather[0], weather[1]); if (weather) core.setWeather(weather[0], weather[1]);
else core.setWeather(); else core.setWeather();
core.checkLoopMap();
// ...可以新增一些其他内容,比如创建个画布在右上角显示什么内容等等 // ...可以新增一些其他内容,比如创建个画布在右上角显示什么内容等等
}, },
afterChangeFloor: function (floorId) { afterChangeFloor: function (floorId) {

View File

@ -4119,7 +4119,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
let tx = data.loc[0] + flags[`loop_${data.floorId}`]; let tx = data.loc[0] + flags[`loop_${data.floorId}`];
tx %= floor.width; tx %= floor.width;
if (tx < 0) tx += floor.width; if (tx < 0) tx += floor.width;
console.log(data.loc[0], tx);
heroLoc = { heroLoc = {
x: tx, x: tx,
y: data.loc[1] y: data.loc[1]
@ -4173,7 +4172,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
let block = core.getBlock(x, y); let block = core.getBlock(x, y);
const id = core.status.floorId; const id = core.status.floorId;
const loop = isLoopMap(id); const loop = isLoopMap(id);
if (loop) { if (loop && flags[`loop_${id}`] !== 0) {
if (block && block.event.trigger === 'changeFloor') { if (block && block.event.trigger === 'changeFloor') {
delete block.event.trigger; delete block.event.trigger;
core.maps._addInfo(block); core.maps._addInfo(block);