Archived
0

add fields to profile

This commit is contained in:
iMoHax
2015-08-03 17:24:18 +03:00
parent 51b69df1e8
commit 424304d9a8
3 changed files with 69 additions and 13 deletions

View File

@@ -28,7 +28,7 @@ public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
SETTINGS = new Settings(new File("profile.properties"));
SETTINGS.load();
SETTINGS.load(World.getMarket());
Locale locale = SETTINGS.getLocale();
if (locale != null){
Localization.setLocale(locale);

View File

@@ -26,7 +26,7 @@ public class Settings {
profile = new Profile(new Ship());
}
public void load() {
public void load(Market market) {
try (InputStream is = new FileInputStream(file)) {
values.load(is);
} catch (FileNotFoundException e) {
@@ -34,7 +34,7 @@ public class Settings {
} catch (IOException e) {
LOG.error("Error on load settings", e);
}
profile = Profile.readFrom(values);
profile = Profile.readFrom(values, market);
}
public void save(){