-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5.2 Show version update. And cleaned up runtime arguments
Removed what felt like unneeded argument alternatives, no more -f or -fast or -fastmode, just -fast, and same goes for the rest. New -version argument, shows game version (also date). New __date__ dunder. Shows version (and date) in start banner now. Moved new show_version and show_sysargs (was show_help) func to output.py
- Loading branch information
Showing
2 changed files
with
34 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,40 @@ | ||
import pathlib, sys, os | ||
from game_files.functions import show_start_banner, game_load, get_any, ask_on_off, update_rimuru_output | ||
from game_files.functions import show_start_banner, game_load, ask_on_off, update_rimuru_output, show_sysargs, show_version | ||
from chapters.tensei_0 import ch0 | ||
|
||
__version__ = "5.1 Alpha" | ||
__version__ = "5.2 Alpha" | ||
__date__ = '5/11/2021' | ||
__author__ = "D Thomas" | ||
__email__ = "[email protected]" | ||
__license__ = "GPL 3" | ||
__status__ = "Development" | ||
|
||
def help_page(): | ||
print(""" | ||
-h -- This help page. | ||
-f -- Fast mode, goes through storyline actions as quick as possible. Also disables text crawl and ascii art. | ||
-t -- Disable text crawl effect. | ||
-a -- Hides ASCII art. | ||
-hud -- Hide game HUD. | ||
-hard -- Enable Hardcore mode. | ||
-hints -- Hide game hints. | ||
-slime -- Enables: hud, hints | Disables: textcrawl, art, hardcore | ||
""") | ||
exit(0) | ||
|
||
if __name__ == '__main__': | ||
if '-h' in sys.argv: help_page() | ||
if '-help' in sys.argv: show_sysargs() | ||
if '-version' in sys.argv: show_version(__version__, __date__) | ||
|
||
save_path = os.path.dirname(os.path.abspath(__file__)) + '/game.save' | ||
|
||
# Loads game save and updates rimuru object from game_functions. | ||
rimuru = game_load(save_path) | ||
rimuru.source_folder_path = str(pathlib.Path(__file__).parent.absolute()) | ||
update_rimuru_output(rimuru) # Updates rimuru object for ouput.py file... idk, idk. | ||
update_rimuru_output(rimuru) # Updates rimuru object for ouput.py file... idk, idk, you just have to... | ||
|
||
if get_any(sys.argv, ['-f', '-fast', '-fastmode']): rimuru.fast_mode = True | ||
if get_any(sys.argv, ['-t', '-text', '-textcrawl']): rimuru.textcrawl = False | ||
if get_any(sys.argv, ['-a', '-art', '-hideart']): rimuru.show_art = False | ||
if get_any(sys.argv, ['-hud', '-hidehud']): rimuru.show_actions = True | ||
if '-textcrawl' in sys.argv: rimuru.textcrawl = False | ||
if '-hideart' in sys.argv: rimuru.show_art = False | ||
if '-hidehud' in sys.argv: rimuru.show_actions = True | ||
if '-hard' in sys.argv: rimuru.hardcore = True | ||
if '-hints' in sys.argv: rimuru.show_hints = False | ||
if '-slime' in sys.argv: # For debug. | ||
# For debugging. | ||
if '-fast' in sys.argv: rimuru.fast_mode = True | ||
if '-slime' in sys.argv: | ||
rimuru.textcrawl = rimuru.show_art = rimuru.hardcore = False | ||
rimuru.show_actions = rimuru.show_hints = True | ||
|
||
# Only asks player if variables are not already set. | ||
if rimuru.textcrawl is None: | ||
rimuru.textcrawl = ask_on_off('textcrawl', 'Enable textcrawl effect (Recommended for easier reading)') | ||
if rimuru.show_actions is None: | ||
rimuru.show_actions = ask_on_off('Show Actions', "Show playable actions? (Recommended for first timers)") | ||
if rimuru.textcrawl is None: rimuru.textcrawl = ask_on_off('textcrawl', 'Enable textcrawl effect (Recommended for easier reading)') | ||
if rimuru.show_actions is None: rimuru.show_actions = ask_on_off('Show Actions', "Show playable actions? (Recommended for first timers)") | ||
|
||
show_start_banner() | ||
show_start_banner(__version__, __date__) | ||
ch0(rimuru) # Can be used for debugging. | ||
rimuru.current_location_object(rimuru) |