Skip to content

Commit

Permalink
feat: parse but skip 0x7a actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PBug90 committed Dec 5, 2019
1 parent ef22c0c commit 4c8584f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Binary file added replays/action0x7a.w3g
Binary file not shown.
3 changes: 2 additions & 1 deletion src/parsers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ const ActionBlock = new Parser()
0x6b: W3MMDAction,
0x6c: new Parser(),
0x6d: new Parser(),
0x75: UnknownAction75
0x75: UnknownAction75,
0x7a: new Parser().skip(20)
}
})

Expand Down
6 changes: 6 additions & 0 deletions test/replays.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,10 @@ describe('Replay parsing tests', () => {
]
})
})

it('parses a replay with action 0x7a successfully', () => {
const test = Parser.parse('./replays/action0x7a.w3g')
expect(test.version).toBe('1.31')
expect(test.players.length).toBe(1)
})
})

0 comments on commit 4c8584f

Please sign in to comment.