Skip to content

Commit

Permalink
fix: adds groupHotkeys to player json serialization (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMente authored Dec 9, 2020
1 parent 0c19859 commit 9b3988f
Show file tree
Hide file tree
Showing 3 changed files with 883 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ class Player {
toJSON(): Partial<Player> {
return {
actions: this.actions,
groupHotkeys: this.groupHotkeys,
buildings: this.buildings,
items: this.items,
units: this.units,
Expand Down
42 changes: 42 additions & 0 deletions test/replays/130/__snapshots__/replays.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,48 @@ Object {
},
},
"color": "#ff0303",
"groupHotkeys": Object {
"0": Object {
"assigned": 1,
"used": 128,
},
"1": Object {
"assigned": 47,
"used": 283,
},
"2": Object {
"assigned": 7,
"used": 45,
},
"3": Object {
"assigned": 0,
"used": 0,
},
"4": Object {
"assigned": 1,
"used": 211,
},
"5": Object {
"assigned": 0,
"used": 0,
},
"6": Object {
"assigned": 0,
"used": 0,
},
"7": Object {
"assigned": 0,
"used": 0,
},
"8": Object {
"assigned": 2,
"used": 2,
},
"9": Object {
"assigned": 2,
"used": 83,
},
},
"heroes": Array [
Object {
"abilities": Object {
Expand Down
Loading

0 comments on commit 9b3988f

Please sign in to comment.