wip
This commit is contained in:
@@ -234,7 +234,7 @@ export interface MahjongRoomEventTypes {
|
||||
};
|
||||
ronned: {
|
||||
};
|
||||
hora: {
|
||||
tsumoHora: {
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
|
@@ -528,7 +528,7 @@ export class MahjongService implements OnApplicationShutdown, OnModuleInit {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async commit_hora(roomId: MiMahjongGame['id'], user: MiUser) {
|
||||
public async commit_tsumoHora(roomId: MiMahjongGame['id'], user: MiUser) {
|
||||
const room = await this.getRoom(roomId);
|
||||
if (room == null) return;
|
||||
if (room.gameState == null) return;
|
||||
@@ -538,13 +538,13 @@ export class MahjongService implements OnApplicationShutdown, OnModuleInit {
|
||||
|
||||
await this.clearTurnWaitingTimer(room.id);
|
||||
|
||||
const res = engine.commit_hora(myHouse);
|
||||
const res = engine.commit_tsumoHora(myHouse);
|
||||
|
||||
this.globalEventService.publishMahjongRoomStream(room.id, 'horad', { });
|
||||
this.globalEventService.publishMahjongRoomStream(room.id, 'tsumoHora', { });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async commit_ron(roomId: MiMahjongGame['id'], user: MiUser) {
|
||||
public async commit_ronHora(roomId: MiMahjongGame['id'], user: MiUser) {
|
||||
const room = await this.getRoom(roomId);
|
||||
if (room == null) return;
|
||||
if (room.gameState == null) return;
|
||||
|
@@ -53,8 +53,8 @@ class MahjongRoomChannel extends Channel {
|
||||
case 'addAi': this.addAi(); break;
|
||||
case 'confirmNextKyoku': this.confirmNextKyoku(); break;
|
||||
case 'dahai': this.dahai(body.tile, body.riichi); break;
|
||||
case 'hora': this.hora(); break;
|
||||
case 'ron': this.ron(); break;
|
||||
case 'tsumoHora': this.tsumoHora(); break;
|
||||
case 'ronHora': this.ronHora(); break;
|
||||
case 'pon': this.pon(); break;
|
||||
case 'nop': this.nop(); break;
|
||||
case 'claimTimeIsUp': this.claimTimeIsUp(); break;
|
||||
@@ -97,17 +97,17 @@ class MahjongRoomChannel extends Channel {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private async hora() {
|
||||
private async tsumoHora() {
|
||||
if (this.user == null) return;
|
||||
|
||||
this.mahjongService.commit_hora(this.roomId!, this.user);
|
||||
this.mahjongService.commit_tsumoHora(this.roomId!, this.user);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private async ron() {
|
||||
private async ronHora() {
|
||||
if (this.user == null) return;
|
||||
|
||||
this.mahjongService.commit_ron(this.roomId!, this.user);
|
||||
this.mahjongService.commit_ronHora(this.roomId!, this.user);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
|
Reference in New Issue
Block a user