Updating GroupDescriptors on LockGroupMessage

This commit is contained in:
Hanusiak Piotr
2022-03-03 12:22:16 +01:00
parent a0205bf682
commit a0535ed4a8
9 changed files with 40 additions and 24 deletions
+2 -7
View File
@@ -17,7 +17,7 @@
import { embedScreenLayout } from "../Stores/EmbedScreensStore";
import { followRoleStore, followStateStore, followUsersStore } from "../Stores/FollowStore";
import { gameManager } from "../Phaser/Game/GameManager";
import { currentPlayerGroupIdStore, currentPlayerGroupLockStateStore } from "../Stores/CurrentPlayerGroupStore";
import { currentPlayerGroupLockStateStore } from "../Stores/CurrentPlayerGroupStore";
const gameScene = gameManager.getCurrentGameScene();
@@ -73,12 +73,7 @@
}
function lockClick() {
console.log($currentPlayerGroupIdStore);
console.log($currentPlayerGroupLockStateStore);
if ($currentPlayerGroupIdStore === undefined) {
return;
}
gameScene.connection?.emitLockGroup($currentPlayerGroupIdStore, !$currentPlayerGroupLockStateStore);
gameScene.connection?.emitLockGroup(!$currentPlayerGroupLockStateStore);
}
let isSilent: boolean;
+3 -4
View File
@@ -858,12 +858,11 @@ export class RoomConnection implements RoomConnection {
this.socket.send(bytes);
}
public emitLockGroup(groupId: number, lock: boolean = true): void {
public emitLockGroup(lock: boolean = true): void {
const bytes = ClientToServerMessageTsProto.encode({
message: {
$case: "lockGroupMessage",
lockGroupMessage: {
groupId,
$case: "lockGroupPromptMessage",
lockGroupPromptMessage: {
lock,
},
},