-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Startslide Scripts #30
Conversation
With linter errors fixed and updated startslides.
98d0729
to
4057e1c
Compare
scripts/Startslide_Left.py
Outdated
if vehicle in flame_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"flame_left.csv") | ||
|
||
elif vehicle in spear_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"spear_left.csv") | ||
|
||
elif vehicle in star_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"star_left.csv") | ||
|
||
return path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of updating path in each of these if-statements, you could just return os.path.join(path ...)
scripts/Startslide_Left.py
Outdated
path = utils.get_script_dir() | ||
|
||
if vehicle in flame_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"flame_left.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these raw strings necessary anymore, since you got rid of the slashes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure, this was just what @Gaberboo recommended to me.
|
||
flame_slide_bikes = ("Flame Runner", "Mach Bike", "Sugarscoot", "Zip Zip") | ||
spear_slide_bikes = ("Jet Bubble", "Phantom", "Spear", "Sneakster", "Wario Bike") | ||
star_slide_bikes = ("Bit Bike", "Bullet Bike", "Dolphin Dasher", "Magikruiser", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just curious, is there any performance different using a tuple here instead of a list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt the performance is significantly different whether a tuple was used or not, I thought I might as well use one here in case it did.
scripts/Startslide_Right.py
Outdated
if vehicle in flame_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"flame_right.csv") | ||
|
||
elif vehicle in spear_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"spear_right.csv") | ||
|
||
elif vehicle in star_slide_bikes: | ||
path = os.path.join(path, r"MKW_Inputs", r"Startslides", r"star_right.csv") | ||
|
||
return path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
- Fixed module import with integration of TASLabz/dolphin@61f6735 - Removed unnecessary memory checks - Updated TTK call to reflect new version - Removed unnecessary `global playerInputs` call - Fixed linter errors - Use `os.path.join()` to retrieve path - More linter error fixes - Removed path separators - Final fixes after review
Adds startslide functionality using
.csv
files.