[allnet] Add config for custom shop name

pull/1/head
Dom Eori 2022-12-12 00:37:35 +09:00
parent cc7b679dd3
commit 5549ad9a0c
2 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,9 @@ billing.server.port=8443
## Please notice most games won't work with localhost or 127.0.0.1
#allnet.server.host=localhost
#allnet.server.port=80
## This is for some games that use shop name for in-game functions.
## Specify the place name here if you need it. By default it is empty.
#allnet.server.place-name=
## Http Server Port
## Only change this if you have a reverse proxy running.

View File

@ -36,14 +36,17 @@ public class AllNetController {
private final ObjectMapper mapper = new ObjectMapper();
private final String HOST_OVERRIDE;
private final String PORT_OVERRIDE;
private final String PLACE_NAME;
private final boolean MAIMAI2_NO_HTTP;
public AllNetController(@Value("${allnet.server.host:}") String HOST,
@Value("${allnet.server.port:}") String PORT,
@Value("${allnet.server.place-name:}") String PLACE_NAME,
@Value("${game.maimai2.splash-old-patch:false}") boolean MAIMAI2_NO_HTTP) {
this.HOST_OVERRIDE = HOST;
this.PORT_OVERRIDE = PORT;
this.MAIMAI2_NO_HTTP = MAIMAI2_NO_HTTP;
this.PLACE_NAME = PLACE_NAME;
}
@GetMapping("/")
@ -104,7 +107,7 @@ public class AllNetController {
switchHost(localAddr, localPort, gameId),
"123",
"",
"",
PLACE_NAME,
"1",
"W",
"X",
@ -128,7 +131,7 @@ public class AllNetController {
switchHost(localAddr, localPort, gameId),
"123",
"",
"",
PLACE_NAME,
"1",
"W",
"X",