Add the Lexy tileset and make it the default, finally!

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-24 19:20:29 -06:00
parent 19fd4273f1
commit c231e7fc53
19 changed files with 13 additions and 10 deletions

View File

@ -1879,34 +1879,37 @@ class Conductor {
async function main() { async function main() {
let local = !! location.host.match(/localhost/);
let query = new URLSearchParams(location.search); let query = new URLSearchParams(location.search);
// Pick a tileset // Pick a tileset
// These alternative ones only exist locally for me at the moment, since // These alternative ones only work locally for me for testing purposes, since they're part of
// they're part of the commercial games! // the commercial games!
let tilesheet = new Image(); let tilesheet = new Image();
let tilesize; let tilesize;
let tilelayout; let tilelayout;
if (query.get('tileset') === 'ms') { if (local && query.get('tileset') === 'ms') {
tilesheet.src = 'tileset-ms.png'; tilesheet.src = 'tileset-ms.png';
tilesize = 32; tilesize = 32;
tilelayout = CC2_TILESET_LAYOUT; tilelayout = CC2_TILESET_LAYOUT;
} }
else if (query.get('tileset') === 'steam') { else if (local && query.get('tileset') === 'steam') {
tilesheet.src = 'tileset-steam.png'; tilesheet.src = 'tileset-steam.png';
tilesize = 32; tilesize = 32;
tilelayout = CC2_TILESET_LAYOUT; tilelayout = CC2_TILESET_LAYOUT;
} }
else if (query.get('tileset') === 'lexy') { else if (query.get('tileset') === 'tworld') {
tilesheet.src = 'tileset-lexy.png';
tilesize = 32;
tilelayout = LL_TILESET_LAYOUT;
}
else {
tilesheet.src = 'tileset-tworld.png'; tilesheet.src = 'tileset-tworld.png';
tilesize = 48; tilesize = 48;
tilelayout = TILE_WORLD_TILESET_LAYOUT; tilelayout = TILE_WORLD_TILESET_LAYOUT;
} }
else {
// Default to Lexy's Labyrinth tileset
tilesheet.src = 'tileset-lexy.png';
tilesize = 32;
tilelayout = LL_TILESET_LAYOUT;
}
// TODO would be fabulous to not wait on this before creating conductor
await tilesheet.decode(); await tilesheet.decode();
let tileset = new Tileset(tilesheet, tilelayout, tilesize, tilesize); let tileset = new Tileset(tilesheet, tilelayout, tilesize, tilesize);

BIN
tileset-lexy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.