Skip to content

Commit

Permalink
Update u8 -> u16 front
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth26 committed Nov 20, 2024
1 parent 8434104 commit 0f79644
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions client/src/dojo/contractModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export function defineContractComponents(world: World) {
combo_counter_in_tournament: RecsType.Number,
max_combo_in_tournament: RecsType.Number,
tournament_id: RecsType.Number,
// patch u8 -> u16
combo_counter_2: RecsType.Number,
combo_counter_in_tournament_2: RecsType.Number,
},
{
metadata: {
Expand Down Expand Up @@ -59,6 +62,8 @@ export function defineContractComponents(world: World) {
"u8",
"u8",
"u64",
"u16",
"u16",
],
customTypes: [],
},
Expand Down
7 changes: 5 additions & 2 deletions client/src/dojo/game/models/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class Game {
this.hammer_used = game.hammer_used;
this.wave_used = game.wave_used;
this.totem_used = game.totem_used;
this.combo = game.combo_counter;
this.combo = Math.max(game.combo_counter, game.combo_counter_2);
this.max_combo = game.max_combo;
this.score = game.score;
this.buyIn = 100; // Set default buy-in of $100
Expand All @@ -75,7 +75,10 @@ export class Game {
this.seed = game.seed;
this.start_time = new Date(game.start_time * 1000);
this.score_in_tournament = game.score_in_tournament;
this.combo_counter_in_tournament = game.combo_counter_in_tournament;
this.combo_counter_in_tournament = Math.max(
game.combo_counter_in_tournament,
game.combo_counter_in_tournament_2,
);
this.max_combo_in_tournament = game.max_combo_in_tournament;
this.tournament_id = game.tournament_id;

Expand Down

0 comments on commit 0f79644

Please sign in to comment.