Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
drHyperion451 committed Nov 5, 2023
2 parents 825c552 + a393b41 commit 8ba3b44
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
14 changes: 14 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@ Inside `config.ini` file the info is organized inside keys. GUI settings are pla
- `iwad` = Relative path of DOOM2 iwad. Default is: `./doom2/DOOM2.WAD`
- `ml_path` = Relative path of all the wads. Default is `./master/wads`

### Adding more maps and the rejected levels:
You can easily add any other map you want or even add the [rejected levels](https://doomwiki.org/wiki/Master_Levels_for_Doom_II#Rejected_levels) to the list by editing the `_internal/src/ml_info.json` file and add your levels there:
```json
{
"WAD": "WADNAME.WAD",
"Name": "Title of the wad fil",
"Author": "It is obvious",
"PC": 1, #PC slot, where you need to warp to make the auto warp work
"PSX": null, # Irrelevant
"Xbox": 14, # Irrelevant
"PSN": 20 # PSN slot. Makes this in order.
}
```


### Building
Building is a mess right now because of some differences between OS and Textual not been detected by default on my system. A work is on the way to fix this.
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Rem Maybe you need to run this on PS: Set-ExecutionPolicy Unrestricted -Scope Process
Rem #pyright: reportUndefinedVariable=false at the top of any python file will ignore imports

pyinstaller src/main.py -y -D --add-data src/ml_info.json:src --add-data src/css/mlauncher.tcss:css -n MLauncher --paths=E:\Users\sbritorodr\Documentos\GitHub\mlauncher-cli\pyenv\Lib\site-packages
pyinstaller src/main.py -y -D --add-data src/ml_info.json:src --add-data src/css/mlauncher.tcss:css -n MLauncher --paths=E:\Users\drhyperion\Documentos\GitHub\mlauncher-cli\pyenv\Lib\site-packages

copy README.MD dist\MLauncher\README.MD
copy COPYING dist\MLauncher\COPYING
2 changes: 2 additions & 0 deletions src/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def SETTINGS_CREATE(settings_path):
'SOURCEPORT': './dsda-doom/dsda-doom.exe',
'IWAD': './doom2/DOOM2.WAD',
'ML_PATH': './master/wads',
'FILES': '',
'SELECTED_MAP': 'ATTACK.WAD',
'FILES': '',
'SKILL': 4,
Expand Down Expand Up @@ -104,6 +105,7 @@ class GlobalVars:
# For persistence when saving the game
SOURCEPORT = config.get('GAME', 'SOURCEPORT')
IWAD = config.get('GAME', 'IWAD')
FILES = config.get('GAME', 'FILES')
ML_PATH = config.get('GAME', 'ML_PATH')
FILES = config.get('GAME', 'FILES')
SELECTED_MAP = config.get('GAME', 'SELECTED_MAP')
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def on_button_pressed(self, event: Button.Pressed) -> None:
if event.button.id == 'launchButton':
if GlobalVars.SELECTED_MAP:
master_wad = f"{GlobalVars.ML_PATH}/{GlobalVars.SELECTED_MAP}"
g_launch.game(GlobalVars.SOURCEPORT, GlobalVars.IWAD, master_wad)
g_launch.game(GlobalVars.SOURCEPORT, GlobalVars.IWAD, f"{master_wad} {GlobalVars.FILES}")
config.set('GAME', 'SELECTED_MAP', GlobalVars.SELECTED_MAP)
config.set('GAME', 'SKILL', str(GlobalVars.SKILL))
#config.set('GAME', 'WARP', WARP)
Expand Down
10 changes: 8 additions & 2 deletions src/s_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ def compose(self) -> ComposeResult:
Input(value=GlobalVars.SOURCEPORT, id='source-port-input'),
Label('iWad selector: '),
Input(value=GlobalVars.IWAD, id='iwad-input'),
Label('Other files: '),
Input(value=GlobalVars.FILES, id='file-input'),
id='game-dialog-options',
classes='dialog-options'
),
Label("Paste the path here. You can edit them on the \
config.ini file too."),
config.ini file too. Add more than 1 file between commas ('') and \
separated by an space."),
id='game-dialog',
classes='dialogGrid'
)
Expand All @@ -39,5 +42,8 @@ def on_input_submitted(self, event: Input.Submitted) -> None:
case 'iwad-input':
GlobalVars.IWAD = event.input.value
config.set('GAME', 'IWAD', str(event.input.value))
case 'file-input':
GlobalVars.FILES = event.input.value
config.set('GAME', 'FILES', str(event.input.value))
with open(SETTINGS_PATH, 'w') as configfile:
config.write(configfile)
config.write(configfile)

0 comments on commit 8ba3b44

Please sign in to comment.