This commit is contained in:
syuilo
2024-01-28 17:31:32 +09:00
parent 606c88aa6b
commit db7bd0e94e
9 changed files with 127 additions and 18 deletions

View File

@@ -39,6 +39,7 @@ class MahjongRoomChannel extends Channel {
case 'updateSettings': this.updateSettings(body.key, body.value); break;
case 'addAi': this.addAi(); break;
case 'dahai': this.dahai(body.tile); break;
case 'ron': this.ron(); break;
case 'pon': this.pon(); break;
case 'nop': this.nop(); break;
case 'claimTimeIsUp': this.claimTimeIsUp(); break;
@@ -73,6 +74,13 @@ class MahjongRoomChannel extends Channel {
this.mahjongService.op_dahai(this.roomId!, this.user, tile);
}
@bindThis
private async ron() {
if (this.user == null) return;
this.mahjongService.op_ron(this.roomId!, this.user);
}
@bindThis
private async pon() {
if (this.user == null) return;