volleyballsimtypes 0.0.410 → 0.0.413

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.
@@ -117,6 +117,7 @@ export type Team = Omit<DataProps<_Team>, 'roster' | '_rating' | 'rating' | 'tac
117
117
  name: string;
118
118
  };
119
119
  };
120
+ nationalCountryName?: string;
120
121
  };
121
122
  export type Standing = DataProps<_Standing> & {
122
123
  position: number;
@@ -139,14 +140,18 @@ export type League = Omit<DataProps<_League>, 'divisions'> & {
139
140
  export type TournamentMatch = Omit<DataProps<_TournamentMatch>, 'match'> & {
140
141
  match: Match;
141
142
  };
142
- export type Tournament = Omit<DataProps<_Tournament>, 'matches'> & {
143
+ export type Tournament = Omit<DataProps<_Tournament>, 'matches' | 'teams' | 'champion'> & {
143
144
  matches: TournamentMatch[];
145
+ teams: Team[];
146
+ champion?: Team;
144
147
  };
145
148
  export type QualifierMatch = Omit<DataProps<_QualifierMatch>, 'match'> & {
146
149
  match: Match;
147
150
  };
148
- export type Qualifier = Omit<DataProps<_Qualifier>, 'matches'> & {
151
+ export type Qualifier = Omit<DataProps<_Qualifier>, 'matches' | 'teams' | 'champion'> & {
149
152
  matches: QualifierMatch[];
153
+ teams: Team[];
154
+ champion?: Team;
150
155
  };
151
156
  export type NationalMatch = Omit<DataProps<_NationalMatch>, 'match'> & {
152
157
  match: Match;
@@ -10,7 +10,7 @@ export declare class TeamGenerator {
10
10
  private static getFormation;
11
11
  private static comparePlayers;
12
12
  static createRoster(country: Country): Player[];
13
- static createTeams(divisionId: string, country: Country): Team[];
13
+ static createTeams(divisionId: string, country: Country, count?: number): Team[];
14
14
  static readonly BOT_SUB_BANDS: EnergyBand[];
15
15
  static createTactics(roster: Player[]): Tactics;
16
16
  private static createLineup;
@@ -39,8 +39,10 @@ class TeamGenerator {
39
39
  static createRoster(country) {
40
40
  return TeamGenerator.RARITIES.map((rarity, i) => player_1.PlayerGenerator.generatePlayer(country, rarity, this.ROLES[i % TeamGenerator.ROLES.length]));
41
41
  }
42
- static createTeams(divisionId, country) {
43
- const names = (0, utils_1.generateGenericTeamNames)(country.locales, TeamGenerator.TEAM_PER_DIVISION);
42
+ static createTeams(divisionId, country, count = TeamGenerator.TEAM_PER_DIVISION) {
43
+ if (count <= 0)
44
+ return [];
45
+ const names = (0, utils_1.generateGenericTeamNames)(country.locales, count);
44
46
  logger_1.default.info(`Creating teams for division: ${divisionId}`);
45
47
  return names.map((name) => {
46
48
  logger_1.default.info(`Creating players for team: ${name}`);
@@ -117,6 +117,7 @@ export type Team = Omit<DataProps<_Team>, 'roster' | '_rating' | 'rating' | 'tac
117
117
  name: string;
118
118
  };
119
119
  };
120
+ nationalCountryName?: string;
120
121
  };
121
122
  export type Standing = DataProps<_Standing> & {
122
123
  position: number;
@@ -139,14 +140,18 @@ export type League = Omit<DataProps<_League>, 'divisions'> & {
139
140
  export type TournamentMatch = Omit<DataProps<_TournamentMatch>, 'match'> & {
140
141
  match: Match;
141
142
  };
142
- export type Tournament = Omit<DataProps<_Tournament>, 'matches'> & {
143
+ export type Tournament = Omit<DataProps<_Tournament>, 'matches' | 'teams' | 'champion'> & {
143
144
  matches: TournamentMatch[];
145
+ teams: Team[];
146
+ champion?: Team;
144
147
  };
145
148
  export type QualifierMatch = Omit<DataProps<_QualifierMatch>, 'match'> & {
146
149
  match: Match;
147
150
  };
148
- export type Qualifier = Omit<DataProps<_Qualifier>, 'matches'> & {
151
+ export type Qualifier = Omit<DataProps<_Qualifier>, 'matches' | 'teams' | 'champion'> & {
149
152
  matches: QualifierMatch[];
153
+ teams: Team[];
154
+ champion?: Team;
150
155
  };
151
156
  export type NationalMatch = Omit<DataProps<_NationalMatch>, 'match'> & {
152
157
  match: Match;
@@ -10,7 +10,7 @@ export declare class TeamGenerator {
10
10
  private static getFormation;
11
11
  private static comparePlayers;
12
12
  static createRoster(country: Country): Player[];
13
- static createTeams(divisionId: string, country: Country): Team[];
13
+ static createTeams(divisionId: string, country: Country, count?: number): Team[];
14
14
  static readonly BOT_SUB_BANDS: EnergyBand[];
15
15
  static createTactics(roster: Player[]): Tactics;
16
16
  private static createLineup;
@@ -33,8 +33,10 @@ export class TeamGenerator {
33
33
  static createRoster(country) {
34
34
  return TeamGenerator.RARITIES.map((rarity, i) => PlayerGenerator.generatePlayer(country, rarity, this.ROLES[i % TeamGenerator.ROLES.length]));
35
35
  }
36
- static createTeams(divisionId, country) {
37
- const names = generateGenericTeamNames(country.locales, TeamGenerator.TEAM_PER_DIVISION);
36
+ static createTeams(divisionId, country, count = TeamGenerator.TEAM_PER_DIVISION) {
37
+ if (count <= 0)
38
+ return [];
39
+ const names = generateGenericTeamNames(country.locales, count);
38
40
  logger.info(`Creating teams for division: ${divisionId}`);
39
41
  return names.map((name) => {
40
42
  logger.info(`Creating players for team: ${name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.410",
3
+ "version": "0.0.413",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",