Updating GroupDescriptors on LockGroupMessage
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user