mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 06:52:15 -07:00
Turn Card, Deck_List, Protocol, RNG, Server, Settings and Utility into libraries and remove cockatrice_common.
Took 6 hours 3 minutes Took 31 seconds
This commit is contained in:
parent
3cff55b0bb
commit
1e4e5a4419
593 changed files with 1913 additions and 1601 deletions
|
|
@ -0,0 +1,32 @@
|
|||
#include "debug_settings.h"
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
DebugSettings::DebugSettings(const QString &settingPath, QObject *parent)
|
||||
: SettingsManager(settingPath + "debug.ini", parent)
|
||||
{
|
||||
// Create the default debug.ini if it doesn't exist yet
|
||||
if (!QFile(settingPath + "debug.ini").exists()) {
|
||||
QFile::copy(":/resources/config/debug.ini", settingPath + "debug.ini");
|
||||
}
|
||||
}
|
||||
|
||||
bool DebugSettings::getShowCardId()
|
||||
{
|
||||
return getValue("showCardId", "debug").toBool();
|
||||
}
|
||||
|
||||
bool DebugSettings::getLocalGameOnStartup()
|
||||
{
|
||||
return getValue("onStartup", "localgame").toBool();
|
||||
}
|
||||
|
||||
int DebugSettings::getLocalGamePlayerCount()
|
||||
{
|
||||
return getValue("playerCount", "localgame").toInt();
|
||||
}
|
||||
|
||||
QString DebugSettings::getDeckPathForPlayer(const QString &playerName)
|
||||
{
|
||||
return getValue(playerName, "localgame", "deck").toString();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue