mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 01:57:26 +08:00
[chusan, ongeki] Improve game version override
This commit is contained in:
@@ -66,7 +66,7 @@ public class GetGameSettingHandler implements BaseHandler {
|
|||||||
String port = ALLNET_PORT.equals("") ? SERVER_PORT : ALLNET_PORT;
|
String port = ALLNET_PORT.equals("") ? SERVER_PORT : ALLNET_PORT;
|
||||||
|
|
||||||
GameSetting gameSetting = new GameSetting(
|
GameSetting gameSetting = new GameSetting(
|
||||||
"2.00.01",
|
GAME_VERSION,
|
||||||
GAME_VERSION, // Chusan checks server version and disables some game modes if it not same
|
GAME_VERSION, // Chusan checks server version and disables some game modes if it not same
|
||||||
false,
|
false,
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import icu.samnyan.aqua.sega.util.jackson.BasicMapper;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -26,10 +27,13 @@ public class GetGameSettingHandler implements BaseHandler {
|
|||||||
|
|
||||||
private final PropertyEntryRepository propertyEntryRepository;
|
private final PropertyEntryRepository propertyEntryRepository;
|
||||||
|
|
||||||
|
private final String GAME_VERSION;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public GetGameSettingHandler(BasicMapper mapper, PropertyEntryRepository propertyEntryRepository) {
|
public GetGameSettingHandler(BasicMapper mapper, PropertyEntryRepository propertyEntryRepository, @Value("${game.ongeki.version:1.05.00}") String GAME_VERSION) {
|
||||||
this.mapper = mapper;
|
this.mapper = mapper;
|
||||||
this.propertyEntryRepository = propertyEntryRepository;
|
this.propertyEntryRepository = propertyEntryRepository;
|
||||||
|
this.GAME_VERSION = GAME_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -42,8 +46,8 @@ public class GetGameSettingHandler implements BaseHandler {
|
|||||||
.orElseGet(() -> new PropertyEntry("reboot_end_time", "2020-01-01 23:59:00.0"));
|
.orElseGet(() -> new PropertyEntry("reboot_end_time", "2020-01-01 23:59:00.0"));
|
||||||
|
|
||||||
GameSetting gameSetting = new GameSetting(
|
GameSetting gameSetting = new GameSetting(
|
||||||
"1.05.00",
|
GAME_VERSION,
|
||||||
"", //TODO dynamic
|
GAME_VERSION,
|
||||||
false,
|
false,
|
||||||
10,
|
10,
|
||||||
start.getPropertyValue(),
|
start.getPropertyValue(),
|
||||||
|
|||||||
Reference in New Issue
Block a user