mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
move the default debug.ini to a resource
This commit is contained in:
parent
98b28a0c21
commit
97c0b5a9ec
3 changed files with 14 additions and 7 deletions
|
|
@ -41,6 +41,7 @@
|
||||||
<file>resources/config/deckeditor.svg</file>
|
<file>resources/config/deckeditor.svg</file>
|
||||||
<file>resources/config/shorcuts.svg</file>
|
<file>resources/config/shorcuts.svg</file>
|
||||||
<file>resources/config/sound.svg</file>
|
<file>resources/config/sound.svg</file>
|
||||||
|
<file>resources/config/debug.ini</file>
|
||||||
|
|
||||||
<file>resources/counters/w.svg</file>
|
<file>resources/counters/w.svg</file>
|
||||||
<file>resources/counters/w_highlight.svg</file>
|
<file>resources/counters/w_highlight.svg</file>
|
||||||
|
|
|
||||||
11
cockatrice/resources/config/debug.ini
Normal file
11
cockatrice/resources/config/debug.ini
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
[debug]
|
||||||
|
showCardId=false
|
||||||
|
|
||||||
|
[localgame]
|
||||||
|
onStartup=false
|
||||||
|
playerCount=1
|
||||||
|
;deck\Player 1=path/to/deck
|
||||||
|
;deck\Player 2=path/to/deck
|
||||||
|
|
||||||
|
; Fun Fact: You can assign a deck to your username and it will auto load and ready when you join a server game
|
||||||
|
;deck\Your Username Here=path/to/deck
|
||||||
|
|
@ -5,14 +5,9 @@
|
||||||
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
|
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
|
||||||
: SettingsManager(settingPath + "debug.ini", parent)
|
: SettingsManager(settingPath + "debug.ini", parent)
|
||||||
{
|
{
|
||||||
// force debug.ini to be created if it doesn't exist yet
|
// Create the default debug.ini if it doesn't exist yet
|
||||||
if (!QFile(settingPath + "debug.ini").exists()) {
|
if (!QFile(settingPath + "debug.ini").exists()) {
|
||||||
setValue(false, "showCardId", "debug");
|
QFile::copy(":/resources/config/debug.ini", settingPath + "debug.ini");
|
||||||
|
|
||||||
setValue(false, "onStartup", "localgame");
|
|
||||||
setValue(1, "playerCount", "localgame");
|
|
||||||
setValue("path/to/deck", "Player 1", "localgame", "deck");
|
|
||||||
setValue("path/to/deck", "Player 2", "localgame", "deck");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue