I have a replay that has a direction of 0 (supposed to be -1 or 1) for pre/post frame update. I think it's a quirk when a warp star item is used (action state 305). This causes a parse error.
Given 0 is a valid/possible value for direction. The real question is how should we change the direction type in the Pre and Post structs? Do we make it an Option<Direction> like it is for the Item struct? Maybe it makes more sense to change the Direction enum to include a variant for 'neither' or 'none'.
pub enum Direction { // how this enum exists in peppi currently
Left,
Right,
}
let direction: Option<Direction> = None;
versus
pub enum Direction {
Left,
Right,
Neither,
}
let direction: Direction = Direction::Neither;
Maybe this is splitting hairs, but we generally use a top-level Option to indicate a value that may or may not exist (eg. only exists in later replay versions). Either way this is a simple change, so I can make the PR once we reach a good decision (I lean toward the latter). ~Let me know if I should post the replay.~
I have a replay that has a direction of 0 (supposed to be -1 or 1) for pre/post frame update. I think it's a quirk when a warp star item is used (action state 305). This causes a parse error.
Given 0 is a valid/possible value for direction. The real question is how should we change the
direction
type in thePre
andPost
structs? Do we make it anOption<Direction>
like it is for theItem
struct? Maybe it makes more sense to change theDirection
enum to include a variant for 'neither' or 'none'.versus
Maybe this is splitting hairs, but we generally use a top-level
Option
to indicate a value that may or may not exist (eg. only exists in later replay versions). Either way this is a simple change, so I can make the PR once we reach a good decision (I lean toward the latter). ~Let me know if I should post the replay.~