mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 06:50:07 +00:00
[lua] Limit the possibility to create a tileset with origin != 0,0 (fix #4118)
This commit is contained in:
parent
26523156da
commit
43079b226d
@ -651,6 +651,14 @@ int Sprite_newTileset(lua_State* L)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This a limitation in our code and doesn't make too much sense
|
||||
// to specify a different origin by default (because the origin is
|
||||
// specified on the tilemap cel).
|
||||
if (grid.origin() != gfx::Point(0, 0)) {
|
||||
return luaL_error(L, "a tileset with origin different than 0,0 cannot be created");
|
||||
}
|
||||
|
||||
tileset = new Tileset(sprite, grid, ntiles);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user