Archived
0

Increase search speed, add minimum vendor rating parameter for skip low profitable vendors

This commit is contained in:
iMoHax
2016-10-14 15:57:14 +03:00
parent 77c12f6194
commit 374e1d6c62
9 changed files with 197 additions and 105 deletions

View File

@@ -36,6 +36,8 @@ public class SettingsController {
@FXML
private NumberField routesCount;
@FXML
private NumberField minVendorRating;
@FXML
private NumberField fuelPrice;
@FXML
private ComboBox<Profile.PATH_PRIORITY> pathPriority;
@@ -93,6 +95,7 @@ public class SettingsController {
jumps.setValue(profile.getJumps());
lands.setValue(profile.getLands());
routesCount.setValue(profile.getRoutesCount());
minVendorRating.setValue(profile.getMinVendorRating());
fuelPrice.setValue(profile.getFuelPrice());
pathPriority.setValue(profile.getPathPriority());
jumpTime.setValue(profile.getJumpTime());
@@ -134,6 +137,7 @@ public class SettingsController {
profile.setJumps(jumps.getValue().intValue());
profile.setLands(lands.getValue().intValue());
profile.setRoutesCount(routesCount.getValue().intValue());
profile.setMinVendorRating(minVendorRating.getValue().doubleValue());
profile.setFuelPrice(fuelPrice.getValue().intValue());
profile.setPathPriority(pathPriority.getValue());
profile.setJumpTime(jumpTime.getValue().intValue());

View File

@@ -184,13 +184,14 @@ settings.emdn.on=Active
settings.emdn.sub=Server SUB:
settings.emdn.updateOnly=Update price only:
settings.emdn.auto=Auto update (sec.):
settings.edce.on=Active
settings.edce.interval=Update interval, sec.
settings.performance=Performance
settings.performance.segmentSize=Segment size (0 - auto):
settings.performance.limit=Routes count:
settings.edce.on=Active
settings.edce.interval=Update interval, sec.
settings.performance.jumps=Jumps:
settings.performance.landings=Landings:
settings.performance.minVendorRating=Minimal station rating (0-10):
settings.search=Search options
settings.search.fuelPrice=1t fuel price:
settings.search.pathType=Path priority:

View File

@@ -183,13 +183,14 @@ settings.emdn.on=\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C
settings.emdn.sub=\u0421\u0435\u0440\u0432\u0435\u0440 SUB:
settings.emdn.updateOnly=\u0422\u043E\u043B\u044C\u043A\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u044F\u0442\u044C \u0446\u0435\u043D\u044B:
settings.emdn.auto=\u041E\u0431\u043D\u043E\u0432\u043B\u044F\u0442\u044C \u0430\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0447\u0435\u0440\u0435\u0437 (\u0441\u0435\u043A.):
settings.edce.on=\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C
settings.edce.interval=\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B, \u0441\u0435\u043A.
settings.performance=\u041F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C
settings.performance.segmentSize=\u041C\u0430\u0440\u0448\u0440\u0443\u0442\u043E\u0432 \u0432 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u0435 (0 - \u0430\u0432\u0442\u043E):
settings.performance.limit=\u041A\u043E\u043B-\u0432\u043E \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u043E\u0432 \u043D\u0430 \u0432\u044B\u0432\u043E\u0434:
settings.edce.on=\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C
settings.edce.interval=\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B, \u0441\u0435\u043A.
settings.performance.jumps=\u041F\u0440\u044B\u0436\u043A\u043E\u0432:
settings.performance.landings=\u041F\u043E\u0441\u0430\u0434\u043E\u043A:
settings.performance.minVendorRating=\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0435\u0439\u0442\u0438\u043D\u0433 \u0441\u0442\u0430\u043D\u0446\u0438\u0438 (0-10):
settings.search=\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u043E\u0438\u0441\u043A\u0430
settings.search.fuelPrice=\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C 1\u0442 \u0442\u043E\u043F\u043B\u0438\u0432\u0430:
settings.search.pathType=\u0422\u0438\u043F \u043C\u0430\u0440\u0448\u0440\u0443\u0442\u043E\u0432:

View File

@@ -2,8 +2,9 @@
<?import javafx.scene.layout.*?>
<?import ru.trader.view.support.*?>
<?import org.controlsfx.glyphfont.Glyph?>
<GridPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.trader.controllers.SettingsController"
styleClass="dialog" vgap="4" hgap="8">
<ScrollPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ru.trader.controllers.SettingsController"
styleClass="dialog">
<GridPane vgap="4" hgap="8">
<columnConstraints>
<ColumnConstraints />
<ColumnConstraints minWidth="260" maxWidth="260"/>
@@ -26,38 +27,40 @@
<NumberField fx:id="lands" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="5" />
<Label text="%settings.performance.limit" GridPane.rowIndex="6" />
<NumberField fx:id="routesCount" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="6" />
<Label text="%settings.search" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="7"/>
<Label text="%settings.search.fuelPrice" GridPane.rowIndex="8" />
<NumberField fx:id="fuelPrice" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="8" />
<Label text="%settings.search.pathType" GridPane.rowIndex="9" />
<ComboBox fx:id="pathPriority" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="9" />
<Label text="%settings.search.times.jump" GridPane.rowIndex="10" />
<NumberField fx:id="jumpTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="10" />
<Label text="%settings.search.times.landing" GridPane.rowIndex="11" />
<NumberField fx:id="landingTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="11" />
<Label text="%settings.search.times.orbital" GridPane.rowIndex="12" />
<NumberField fx:id="orbitalTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="12" />
<Label text="%settings.search.times.takeoff" GridPane.rowIndex="13" />
<NumberField fx:id="takeoffTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="13" />
<Label text="%settings.search.times.recharge" GridPane.rowIndex="14" />
<NumberField fx:id="rechargeTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="14" />
<Label text="%settings.hotkeys" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="15"/>
<Label text="%settings.hotkeys.complete" GridPane.rowIndex="16" />
<TextField fx:id="completeKeyText" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="16" />
<Label text="ED Log Watcher" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="17"/>
<Label text="%settings.edlog.on" GridPane.rowIndex="18"/>
<CheckBox fx:id="edLogActive" GridPane.columnIndex="1" GridPane.rowIndex="18"/>
<Label text="%settings.edlog.dir" GridPane.rowIndex="19" />
<HBox maxWidth="260" GridPane.columnIndex="1" GridPane.rowIndex="19">
<Label text="%settings.performance.minVendorRating" GridPane.rowIndex="7" />
<NumberField fx:id="minVendorRating" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="7" />
<Label text="%settings.search" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="8"/>
<Label text="%settings.search.fuelPrice" GridPane.rowIndex="9" />
<NumberField fx:id="fuelPrice" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="9" />
<Label text="%settings.search.pathType" GridPane.rowIndex="10" />
<ComboBox fx:id="pathPriority" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="10" />
<Label text="%settings.search.times.jump" GridPane.rowIndex="11" />
<NumberField fx:id="jumpTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="11" />
<Label text="%settings.search.times.landing" GridPane.rowIndex="12" />
<NumberField fx:id="landingTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="12" />
<Label text="%settings.search.times.orbital" GridPane.rowIndex="13" />
<NumberField fx:id="orbitalTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="13" />
<Label text="%settings.search.times.takeoff" GridPane.rowIndex="14" />
<NumberField fx:id="takeoffTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="14" />
<Label text="%settings.search.times.recharge" GridPane.rowIndex="15" />
<NumberField fx:id="rechargeTime" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="15" />
<Label text="%settings.hotkeys" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="16"/>
<Label text="%settings.hotkeys.complete" GridPane.rowIndex="17" />
<TextField fx:id="completeKeyText" maxWidth="100" GridPane.columnIndex="1" GridPane.rowIndex="17" />
<Label text="ED Log Watcher" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="18"/>
<Label text="%settings.edlog.on" GridPane.rowIndex="19"/>
<CheckBox fx:id="edLogActive" GridPane.columnIndex="1" GridPane.rowIndex="19"/>
<Label text="%settings.edlog.dir" GridPane.rowIndex="20" />
<HBox maxWidth="260" GridPane.columnIndex="1" GridPane.rowIndex="20">
<TextField fx:id="edLogDir" />
<Button minWidth="30" minHeight="25" onAction="#selectLogDir"><graphic><Glyph text="FontAwesome|FOLDER_OPEN"/></graphic></Button>
</HBox>
<Label text="%settings.emdn" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="20"/>
<Label text="%settings.emdn.on" GridPane.rowIndex="21"/>
<CheckBox fx:id="emdnOn" GridPane.columnIndex="1" GridPane.rowIndex="21"/>
<Label text="%settings.emdn.sub" GridPane.rowIndex="22" />
<TextField fx:id="emdnSubServ" GridPane.columnIndex="1" GridPane.rowIndex="22" />
<Label text="%settings.emdn" styleClass="settings-group" GridPane.halignment="CENTER" GridPane.columnSpan="2" GridPane.rowIndex="21"/>
<Label text="%settings.emdn.on" GridPane.rowIndex="22"/>
<CheckBox fx:id="emdnOn" GridPane.columnIndex="1" GridPane.rowIndex="22"/>
<Label text="%settings.emdn.sub" GridPane.rowIndex="23" />
<TextField fx:id="emdnSubServ" GridPane.columnIndex="1" GridPane.rowIndex="23" />
</GridPane>
</ScrollPane>