mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 23:54:48 +01:00
Starting work on brand new patcher (Wooo)
Oh god my sanity is fading again. Please help. oh god. oh god. oh god. Please help me.
This commit is contained in:
@@ -4,6 +4,7 @@ import BigButton from './common/BigButton'
|
||||
import TextInput from './common/TextInput'
|
||||
import HelpButton from './common/HelpButton'
|
||||
import { getConfig, saveConfig, setConfigOption } from '../../utils/configuration'
|
||||
import { patchMetadata } from '../../utils/patcher'
|
||||
import { translate } from '../../utils/language'
|
||||
import { invoke } from '@tauri-apps/api/tauri'
|
||||
|
||||
@@ -85,6 +86,10 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
||||
await saveConfig(config)
|
||||
}
|
||||
|
||||
async patchMetadata() {
|
||||
await patchMetadata()
|
||||
}
|
||||
|
||||
async playGame() {
|
||||
const config = await getConfig()
|
||||
|
||||
@@ -196,7 +201,7 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
||||
{
|
||||
this.state.grasscutterEnabled && (
|
||||
<div>
|
||||
<div className="ServerConfig" id="serverConfigContainer">
|
||||
<div className="ServerConfig" id="serverConfigContainer">Compiled with problems:
|
||||
<TextInput id="ip" key="ip" placeholder={this.state.ipPlaceholder} onChange={this.setIp} initalValue={this.state.ip} />
|
||||
<TextInput style={{
|
||||
width: '10%',
|
||||
@@ -211,7 +216,7 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
|
||||
|
||||
|
||||
<div className="ServerLaunchButtons" id="serverLaunchContainer">
|
||||
<BigButton onClick={this.playGame} id="officialPlay">{this.state.buttonLabel}</BigButton>
|
||||
<BigButton onClick={this.patchMetadata} id="officialPlay">Patch Metadata</BigButton>
|
||||
<BigButton onClick={this.launchServer} id="serverLaunch">
|
||||
<img className="ServerIcon" id="serverLaunchIcon" src={Server} />
|
||||
</BigButton>
|
||||
|
||||
Reference in New Issue
Block a user