trucoshi 0.3.52 → 0.3.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,9 @@ function PlayInstance(hand, prevHand, teams) {
18
18
  },
19
19
  say(command, player) {
20
20
  try {
21
+ if (player.disabled) {
22
+ return null;
23
+ }
21
24
  const fn = hand.say[command];
22
25
  if (fn) {
23
26
  if (!player.commands.includes(command)) {
@@ -23,6 +23,7 @@ export interface IPlayer {
23
23
  setEnvidoTurn(turn: boolean): void;
24
24
  getPublicPlayer(): IPublicPlayer;
25
25
  setSession(session: string): void;
26
+ setIsOwner(isOwner: boolean): void;
26
27
  enable(): void;
27
28
  disable(): void;
28
29
  setReady(ready: boolean): void;
@@ -27,6 +27,9 @@ function Player(key, id, teamIdx, isOwner = false) {
27
27
  setTurn(turn) {
28
28
  player.isTurn = turn;
29
29
  },
30
+ setIsOwner(isOwner) {
31
+ player.isOwner = isOwner;
32
+ },
30
33
  setEnvidoTurn(turn) {
31
34
  player.isTurn = turn;
32
35
  player.isEnvidoTurn = turn;
package/dist/types.d.ts CHANGED
@@ -154,7 +154,7 @@ export interface ClientToServerEvents {
154
154
  [EClientEvent.CREATE_MATCH]: (callback: IEventCallback<{
155
155
  match?: IPublicMatch;
156
156
  }>) => void;
157
- [EClientEvent.START_MATCH]: (callback: IEventCallback<{
157
+ [EClientEvent.START_MATCH]: (matchId: string, callback: IEventCallback<{
158
158
  matchSessionId?: string;
159
159
  }>) => void;
160
160
  [EClientEvent.FETCH_MATCH]: (session: string | null, matchId: string, callback: IEventCallback) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "0.3.52",
3
+ "version": "0.3.53",
4
4
  "main": "dist/index.js",
5
5
  "license": "GPL-3.0",
6
6
  "scripts": {