add fields to profile
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user