3dm support that doesn't actually work I just don't wanna fix it

This commit is contained in:
SpikeHD
2022-07-19 17:40:22 -07:00
parent 18a1b0e94c
commit e270c886db
4 changed files with 44 additions and 4 deletions

View File

@@ -54,6 +54,7 @@ export default class ServerLaunchSection extends React.Component<{}, IState> {
this.toggleGrasscutter = this.toggleGrasscutter.bind(this)
this.playGame = this.playGame.bind(this)
this.launchAkebi = this.launchAkebi.bind(this)
this.launch3dm = this.launch3dm.bind(this)
this.setIp = this.setIp.bind(this)
this.setPort = this.setPort.bind(this)
this.toggleHttps = this.toggleHttps.bind(this)
@@ -188,6 +189,18 @@ export default class ServerLaunchSection extends React.Component<{}, IState> {
await this.playGame(config.akebi_path, gameExec)
}
async launch3dm() {
const config = await getConfig()
// First launch 3dm
invoke('run_program', {
path: config.migoto_path
})
// Then play the game as normal
await this.playGame()
}
setIp(text: string) {
this.setState({
ip: text
@@ -240,9 +253,15 @@ export default class ServerLaunchSection extends React.Component<{}, IState> {
<BigButton onClick={this.playGame} id="officialPlay">{this.state.buttonLabel}</BigButton>
{
this.state.swag && (
<BigButton onClick={this.launchAkebi} id="akebiLaunch">
<img className="AkebiIcon" id="akebiIcon" src={Akebi} />
</BigButton>
<>
<BigButton onClick={this.launchAkebi} id="akebiLaunch">
<img className="AkebiIcon" id="akebiIcon" src={Akebi} />
</BigButton>
<BigButton onClick={this.launch3dm} id="serverLaunch">
3DM
</BigButton>
</>
)
}
<BigButton onClick={this.launchServer} id="serverLaunch">