FIX: the game now uses the url hash to choose the start layer

This commit is contained in:
kharhamel 2020-11-19 14:32:18 +01:00
parent 09d6d22a5d
commit 8d8b879ed6
4 changed files with 19 additions and 27 deletions

View file

@ -6,10 +6,8 @@ export class Room {
public readonly isPublic: boolean;
private mapUrl: string|undefined;
private instance: string|undefined;
public readonly hash: string;
constructor(id: string) {
this.hash = '';
if (id.startsWith('/')) {
id = id.substr(1);
}
@ -24,9 +22,7 @@ export class Room {
const indexOfHash = this.id.indexOf('#');
if (indexOfHash !== -1) {
const idWithHash = this.id;
this.id = this.id.substr(0, indexOfHash);
this.hash = idWithHash.substr(indexOfHash + 1);
}
}