transmit companion to remote players

This commit is contained in:
Johannes Berthel 2021-04-02 21:21:11 +02:00
parent 2ad712807b
commit c07079051a
19 changed files with 96 additions and 40 deletions

View file

@ -4,6 +4,7 @@ const playerNameKey = 'playerName';
const selectedPlayerKey = 'selectedPlayer';
const customCursorPositionKey = 'customCursorPosition';
const characterLayersKey = 'characterLayers';
const companionKey = 'companion';
const gameQualityKey = 'gameQuality';
const videoQualityKey = 'videoQuality';
const audioPlayerVolumeKey = 'audioVolume';
@ -47,6 +48,13 @@ class LocalUserStore {
return JSON.parse(localStorage.getItem(characterLayersKey) || "null");
}
setCompanion(companion: string): void {
localStorage.setItem(companionKey, companion);
}
getCompanion(): string|null {
return localStorage.getItem(companionKey);
}
setGameQualityValue(value: number): void {
localStorage.setItem(gameQualityKey, '' + value);
}