@mtgame/core 2.0.24 → 2.0.26

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.
@@ -750,6 +750,7 @@ Tournament = __decorate([
750
750
  regulationFile: nestedModel(File),
751
751
  settings: nestedModel(TournamentSettings),
752
752
  date: dateTimeField,
753
+ dateEnd: dateTimeField,
753
754
  league: nestedModel(League),
754
755
  status: enumField(TournamentStatuses),
755
756
  teamWinner: nestedModel(TournamentTeamWinner),
@@ -828,7 +829,20 @@ let HockeyGameConfig = class HockeyGameConfig extends GameConfigBase {
828
829
  return this.periodsCount + 2;
829
830
  }
830
831
  get playoffBullitsPeriod() {
831
- return this.periodsCount + 3;
832
+ if (this.playoffSeriesOvertimeType === OvertimeTypes.to_first_goal_and_bullitts) {
833
+ return this.periodsCount + 4;
834
+ }
835
+ else {
836
+ return this.periodsCount + 3;
837
+ }
838
+ }
839
+ get playoffOvertimePeriod() {
840
+ if (this.playoffSeriesOvertimeType === OvertimeTypes.to_first_goal_and_bullitts) {
841
+ return this.periodsCount + 3;
842
+ }
843
+ else {
844
+ return null;
845
+ }
832
846
  }
833
847
  };
834
848
  HockeyGameConfig = __decorate([
@@ -836,6 +850,8 @@ HockeyGameConfig = __decorate([
836
850
  relation: {
837
851
  overtimeType: enumField(OvertimeTypes),
838
852
  gameTimeType: enumField(GameTimeTypes),
853
+ playoffSeriesOvertimeType: enumField(OvertimeTypes),
854
+ timerType: enumField(TimerTypes),
839
855
  }
840
856
  })
841
857
  ], HockeyGameConfig);
@@ -2344,13 +2360,16 @@ let HockeyGameLog = class HockeyGameLog extends GameLogBase {
2344
2360
  this._penalizedGameUserId = value;
2345
2361
  }
2346
2362
  compare(model) {
2347
- if (this.time === model.time && this.period === model.period) {
2348
- return this.datetime.getTime() < model.datetime.getTime() ? 1 : -1;
2349
- }
2350
- if (this.period === model.period) {
2351
- return this.time < model.time ? 1 : -1;
2363
+ const orderFields = ['period', 'time', 'datetime', 'id'];
2364
+ for (const field of orderFields) {
2365
+ if (this[field] < model[field]) {
2366
+ return 1;
2367
+ }
2368
+ if (this[field] > model[field]) {
2369
+ return -1;
2370
+ }
2352
2371
  }
2353
- return this.period < model.period ? 1 : -1;
2372
+ return 0;
2354
2373
  }
2355
2374
  get timeFormatted() {
2356
2375
  const minutes = Math.floor(this.time / 60);