Default engines in user-packages.json override everything
JoshuaFern opened this issue · comments
Linux Distribution
NixOS/Flatpak
Luxtorpeda Version
45
Bug description
When overriding the default engines using user-packages.json
and running a game with non-default game engine/s assigned, the engine selection window displays with only the default engines available to select.
Steps To Reproduce
Use the following user-packages.json:
{
"default": {
"game_name": "Default",
"download": [
{
"name": "scummvm",
"url": "https://github.com/luxtorpeda-dev/packages/releases/download/scummvm-8/",
"file": "scummvm-common-8.tar.xz",
"cache_by_name": true
},
{
"name": "dosbox-staging",
"url": "https://github.com/luxtorpeda-dev/packages/releases/download/dosbox-staging-10/",
"file": "dosbox-staging-common-10.tar.xz",
"cache_by_name": true
},
{
"name": "easyrpg-player",
"url": "https://github.com/luxtorpeda-dev/packages/releases/download/easyrpg-player-3/",
"file": "easyrpg-player-common-3.tar.xz",
"cache_by_name": true
}
],
"download_config": {
"scummvm": {
"extract_location": "./scum"
},
"dosbox-staging": {
"extract_location": "./dosbox-staging"
}
},
"choices": [
{
"name": "scummvm",
"command": "./scum/run-scummvm.sh",
"download": [
"scummvm"
]
},
{
"name": "dosbox-staging",
"command": "./dosbox-staging/run-dosbox-staging.sh",
"use_original_command_directory": true,
"download": [
"dosbox-staging"
]
},
{
"name": "easyrpg-player",
"command": "./run-easyrpg-player.sh",
"download": [
"easyrpg-player"
]
}
]
}
}
Now, try to run any program that has an engine assigned.
Expected Behavior
The assigned engine/s should be displayed and used over the default engines.
Additional Context
This bug actually has made my job of testing dosbox-staging game compatibility easier as I'm able to quickly test all DOS games even ones with engines like XCom, System Shock.
Relevant log output
No response
This is fixed in this PR: #117. Please download the artifact from here and let me know if that fixes it.
I also added a override_all_with_user_default flag that you can put into the user-packages.json file, where if true, it'll use the original behavior, where all games will use the default instead. Can look like this:
{
"override_all_with_user_default": true,
"default": {
"game_name": "Default",
"download": [
{
"name": "scummvm",
"url": "https://github.com/luxtorpeda-dev/packages/releases/download/scummvm-8/",
"file": "scummvm-common-8.tar.xz",
"cache_by_name": true
},
{
"name": "dosbox-staging",
"url": "https://github.com/luxtorpeda-dev/packages/releases/download/dosbox-staging-10/",
"file": "dosbox-staging-common-10.tar.xz",
"cache_by_name": true
},
{
"name": "easyrpg-player",
"url": "https://github.com/luxtorpeda-dev/packages/releases/download/easyrpg-player-3/",
"file": "easyrpg-player-common-3.tar.xz",
"cache_by_name": true
}
],
"download_config": {
"scummvm": {
"extract_location": "./scum"
},
"dosbox-staging": {
"extract_location": "./dosbox-staging"
}
},
"choices": [
{
"name": "scummvm",
"command": "./scum/run-scummvm.sh",
"download": [
"scummvm"
]
},
{
"name": "dosbox-staging",
"command": "./dosbox-staging/run-dosbox-staging.sh",
"use_original_command_directory": true,
"download": [
"dosbox-staging"
]
},
{
"name": "easyrpg-player",
"command": "./run-easyrpg-player.sh",
"download": [
"easyrpg-player"
]
}
]
}
}
Thanks, I've tested the build artifact and it seems to fix the problem. "override_all_with_user_default": true,
is working as well.