Code changes
This commit is contained in:
parent
992f2fb20c
commit
21a7ec98dd
2
pom.xml
2
pom.xml
@ -110,7 +110,7 @@
|
||||
<destinationFile>${dist}/steam_api.dll</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${project.basedir}/steam_api.dll</sourceFile>
|
||||
<sourceFile>${project.basedir}/steam_api64.dll</sourceFile>
|
||||
<destinationFile>${dist}/steam_api64.dll</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
|
@ -54,7 +54,7 @@ public class CreamApiConfig {
|
||||
config = CONFIGS.ini(path);
|
||||
config.setCommentLeadingCharsUsedInInput(";");
|
||||
} catch (ConfigurationException e) {
|
||||
logger.warn("No config file found in default location!");
|
||||
logger.warn("No config file found!");
|
||||
//e.printStackTrace();
|
||||
}
|
||||
|
||||
@ -109,6 +109,7 @@ public class CreamApiConfig {
|
||||
}
|
||||
|
||||
public void read() throws NullPointerException, NoSuchElementException {
|
||||
logger.info("Reading config file...");
|
||||
appId = config.getInt("steam.appid");
|
||||
language = config.getString("steam.language");
|
||||
if (language == null) {
|
||||
@ -119,9 +120,11 @@ public class CreamApiConfig {
|
||||
forceOffline = config.getBoolean("steam.forceoffline");
|
||||
final SubnodeConfiguration dlc_section = config.getSection("dlc");
|
||||
dlc_section.getKeys().forEachRemaining(k -> dlc.put(Integer.parseInt(k), dlc_section.getString(k)));
|
||||
logger.info("Successfully read config file!");
|
||||
}
|
||||
|
||||
public void sync() throws ConfigurationException {
|
||||
logger.info("Saving config file...");
|
||||
FileBasedConfigurationBuilder<INIConfiguration> builder = CONFIGS.iniBuilder(path);
|
||||
config = builder.getConfiguration();
|
||||
config.setCommentLeadingCharsUsedInInput(";");
|
||||
@ -142,6 +145,7 @@ public class CreamApiConfig {
|
||||
config.setProperty("steam_misc.disableuserinterface", false);
|
||||
|
||||
builder.save();
|
||||
logger.info("Saved successfully!");
|
||||
}
|
||||
|
||||
// DLC list parsing
|
||||
|
Loading…
Reference in New Issue
Block a user