Closed Ziusudra closed 4 years ago
It doesn't work on windows either. I don't know what the idea behind -q is, but I see the command only sets the 'single level' property. I think instead of fixing it, I will break the -level command line option, so it's not single level at all. Then you'd combine it with -q for the current effect if you'd want.
-q
is just a shortcut for -level 1
-q Works like '-level 1'.
https://github.com/dkfans/keeperfx/wiki/Command-Line-Options
It's really only useful for testing.
So, looking at the code it looks like first_singleplayer_level()
is returning SINGLEPLAYER_NOTSTARTED
even when a campaign has been started. But I lose the thread there. I can guess why it would return that if a campaign wasn't started but not when one has.
I know, I wrote most of the wiki there and here. That still does not explain the reasoning behind -q, why is it an option there, just for lazy people not wanting to type out '-level 1'.
Don't you like my proposed change?
keeperfx.exe -level 5
goes to level 5, once complete, goes to level 6
> keeperfx.exe -level 5 -q
goes to level 5, once complete, goes to desktop
I looked at it, but that change seems to be pretty complex. So I just kept the old behavior, but fixed the -q command line option.
Well, I found one minor thing.
Running
keeperfx.exe -q
gives a level with a map of nothing but impenetrable stone and the voice immediately saying "You have been defeated". I get the same result with-level 0
. Using-level 1
works as expected. This is in Wine 5.6 on Arch Linux with the 2084 alpha patch. Found while testing config settings. (If it works as expected in Windows, I wouldn't worry about it.)