launch private server through button

This commit is contained in:
SpikeHD 2022-04-19 20:02:04 -07:00
parent d3bca30adc
commit 9f672703fe
3 changed files with 6 additions and 4 deletions

View File

@ -1 +1 @@
{"accessToken":"CATm56pIp1rqIMWoVVw5y3RwLFjY48mCo01m0eRjbbUsOcF8","port":54022}
{"accessToken":"koqlczs0mi0QuA4uZtkaZmPT9H3xQO-MaifZIUVW_kkp8HBD","port":62332}

View File

@ -11,7 +11,7 @@
<button class="playBtn" onclick="launchOfficial()">Play Official</button>
</div>
<div id="secondHalf">
<button class="playBtn">Play Private</button>
<button class="playBtn" onclick="launchPrivate()">Play Private</button>
</div>
</div>

View File

@ -75,9 +75,11 @@ async function launchOfficial() {
}
async function launchPrivate() {
const ip = ''
const ip = 'localhost'
const port = ''
const config = await getCfg()
// Pass IP and game folder to the private server launcher
Neutralino.os.execCommand(`${NL_CWD}/private_server_launch.cmd ${ip} "${config.genshinImpactFolder}"`).catch(e => console.log(e))
}