-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(insim): Derive
InSimPacketEvents
type from packetTypeToClass
…
…object The `InSimPacketEvents` mapping of packet types to event handlers is now derived from the `packetTypeToClass` mapping, which is the only source of truth for every InSim packet now. As a side-effect of this, the `IS_NONE` packet class definition was moved into its own file and is exported from `node-insim/packets`.
- Loading branch information
Showing
4 changed files
with
22 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Packet } from './base'; | ||
import { PacketType } from './enums'; | ||
|
||
export class IS_NONE extends Packet { | ||
readonly Size = 4; | ||
readonly Type = PacketType.ISP_NONE; | ||
readonly ReqI = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters