hohav / peppi

Rust parser for Slippi SSBM replay files
MIT License
37 stars 9 forks source link

Add info module #13

Closed NickCondron closed 1 year ago

NickCondron commented 2 years ago

I took your suggestion and put relevant info (display names, useful constants, and matching) inside a single module/struct. I finished characters and stages, I might add modules for items, attacks, and actions.

Using regex requires the regex and lazy_static crates. I disabled unicode features in regex to make it a little lighter and lazy_static is already pretty light. Let me know if you have concerns with bloat or anything. It would be possible to hide the info modules behind a feature.

~For now the only data constant is traction, but~ I assume we would want things like gravity, weight, etc. Finding reliable and universal data for some of these is tricky. I'd like to avoid making the type of these constants optional. Maybe best is to remove the unplayable characters.

~Also, display names make more sense to be associated with External characters whereas constants like traction probably make more sense to belong with Internal characters. Do you think it makes sense to have a parallel Internal Info struct? Really, Ice Climbers are the annoying edge case here.~ Edit: I decided to make internal and external info structs separate.

NickCondron commented 1 year ago

Closing because I agree this type of game info should live outside of peppi