[chusan] Add override config for rom version

pull/1/head
Dom Eori 2022-03-13 03:10:24 +09:00
parent f8f92ff59e
commit 4e422ed0c3
3 changed files with 10 additions and 5 deletions

View File

@ -24,10 +24,13 @@ server.port=80
game.chunithm.team-name=
## Chusan
## The version of your client. If this doesn't match with your game, you will not be able to play some game modes.
## The version of your client data. If this doesn't match with your game, you will not be able to play some game modes.
## Match this with data.conf file in latest option.
## For example, if data.conf says "VerMajor = 2, VerMinor = 5, VerRelease = 4" then this need to be 2.05.04
game.chusan.version=2.00.00
## The version of your client rom. Same applies as above.
## Match this with version in "Game system information" of test menu.
game.chusan.rom-version=2.00.01
## This enables team function if you set team name here. Leave this blank to disable it.
game.chusan.team-name=

View File

@ -30,7 +30,7 @@ Only JP variant is supported.
* Profile migration from Chunithm
### Additional notes
* Match `game.chusan.version` key in `application.properties` same as your client version. If not, class mode is disabled due to version mismatch.
* Match `game.chusan.version` and `game.chusan.rom-version` key in `application.properties` same as your client. If not, class mode is disabled due to version mismatch.
* Team function can be enabled by changing `game.chusan.team-name` value. Leave this blank to disable team function.
* Chusan and Chunithm uses different endpoints and tables. Your progress from Chunithm won't carry over to Chusan.
* User box customization requires Web UI, which is not added yet. The only option to do now is editing database.

View File

@ -30,15 +30,17 @@ public class GetGameSettingHandler implements BaseHandler {
private final String ALLNET_HOST;
private final String ALLNET_PORT;
private final String SERVER_PORT;
private final String ROM_VERSION;
private final String GAME_VERSION;
@Autowired
public GetGameSettingHandler(StringMapper mapper, @Value("${allnet.server.host:}") String ALLNET_HOST, @Value("${allnet.server.port:}") String ALLNET_PORT, @Value("${server.port:}") String SERVER_PORT, @Value("${game.chusan.version:2.00.00}") String GAME_VERSION) {
public GetGameSettingHandler(StringMapper mapper, @Value("${allnet.server.host:}") String ALLNET_HOST, @Value("${allnet.server.port:}") String ALLNET_PORT, @Value("${server.port:}") String SERVER_PORT, @Value("${game.chusan.version:2.00.00}") String GAME_VERSION, @Value("${game.chusan.rom-version:2.00.01}") String ROM_VERSION) {
this.mapper = mapper;
this.ALLNET_HOST = ALLNET_HOST;
this.ALLNET_PORT = ALLNET_PORT;
this.SERVER_PORT = SERVER_PORT;
this.GAME_VERSION = GAME_VERSION;
this.ROM_VERSION = ROM_VERSION;
}
@ -66,8 +68,8 @@ public class GetGameSettingHandler implements BaseHandler {
String port = ALLNET_PORT.equals("") ? SERVER_PORT : ALLNET_PORT;
GameSetting gameSetting = new GameSetting(
GAME_VERSION,
GAME_VERSION, // Chusan checks server version and disables some game modes if it not same
ROM_VERSION, // Chusan checks these two versions to determine if it can enable game modes
GAME_VERSION,
false,
0,
rebootStartTime.format(formatter),