mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-02-03 13:21:25 +02:00
removed old no longer needed advanced starting options
This commit is contained in:
parent
198b6719e4
commit
c7bad747f6
@ -6,31 +6,12 @@ class ServerCtl extends React.Component {
|
|||||||
this.startServer = this.startServer.bind(this);
|
this.startServer = this.startServer.bind(this);
|
||||||
this.stopServer = this.stopServer.bind(this);
|
this.stopServer = this.stopServer.bind(this);
|
||||||
|
|
||||||
this.incrementAutosave = this.incrementAutosave.bind(this);
|
|
||||||
this.decrementAutosave = this.decrementAutosave.bind(this);
|
|
||||||
|
|
||||||
this.incrementAutosaveSlots = this.incrementAutosaveSlots.bind(this);
|
|
||||||
this.decrementAutosaveSlots = this.decrementAutosaveSlots.bind(this);
|
|
||||||
|
|
||||||
this.incrementPort = this.incrementPort.bind(this);
|
this.incrementPort = this.incrementPort.bind(this);
|
||||||
this.decrementPort = this.decrementPort.bind(this);
|
this.decrementPort = this.decrementPort.bind(this);
|
||||||
|
|
||||||
this.incrementLatency = this.incrementLatency.bind(this);
|
|
||||||
this.decrementLatency = this.decrementLatency.bind(this);
|
|
||||||
|
|
||||||
this.toggleAllowCmd = this.toggleAllowCmd.bind(this);
|
|
||||||
this.toggleP2P = this.toggleP2P.bind(this);
|
|
||||||
this.toggleAutoPause = this.toggleAutoPause.bind(this);
|
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
savefile: "",
|
savefile: "",
|
||||||
latency: 100,
|
|
||||||
autosaveInterval: 5,
|
|
||||||
autosaveSlots: 10,
|
|
||||||
port: 34197,
|
port: 34197,
|
||||||
disallowCmd: false,
|
|
||||||
peer2peer: false,
|
|
||||||
autoPause: false,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,13 +19,7 @@ class ServerCtl extends React.Component {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let serverSettings = {
|
let serverSettings = {
|
||||||
savefile: this.refs.savefile.value,
|
savefile: this.refs.savefile.value,
|
||||||
latency: Number(this.refs.latency.value),
|
|
||||||
autosave_interval: Number(this.refs.autosaveInterval.value),
|
|
||||||
autosave_slots: Number(this.refs.autosaveSlots.value),
|
|
||||||
port: Number(this.refs.port.value),
|
port: Number(this.refs.port.value),
|
||||||
disallow_cmd: this.refs.allowCmd.checked,
|
|
||||||
peer2peer: this.refs.p2p.checked,
|
|
||||||
auto_pause: this.refs.autoPause.checked,
|
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -63,13 +38,7 @@ class ServerCtl extends React.Component {
|
|||||||
})
|
})
|
||||||
this.setState({
|
this.setState({
|
||||||
savefile: this.refs.savefile.value,
|
savefile: this.refs.savefile.value,
|
||||||
latency: Number(this.refs.latency.value),
|
|
||||||
autosaveInterval: Number(this.refs.autosaveInterval.value),
|
|
||||||
autosaveSlots: Number(this.refs.autosaveSlots.value),
|
|
||||||
port: Number(this.refs.port.value),
|
port: Number(this.refs.port.value),
|
||||||
disallowCmd: this.refs.allowCmd.checked,
|
|
||||||
peer2peer: this.refs.p2p.checked,
|
|
||||||
autoPause: this.refs.autoPause.checked,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,26 +57,6 @@ class ServerCtl extends React.Component {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
incrementAutosave() {
|
|
||||||
let saveInterval = this.state.autosaveInterval + 1;
|
|
||||||
this.setState({autosaveInterval: saveInterval})
|
|
||||||
}
|
|
||||||
|
|
||||||
decrementAutosave() {
|
|
||||||
let saveInterval = this.state.autosaveInterval - 1;
|
|
||||||
this.setState({autosaveInterval: saveInterval})
|
|
||||||
}
|
|
||||||
|
|
||||||
incrementAutosaveSlots() {
|
|
||||||
let saveSlots = this.state.autosaveSlots + 1;
|
|
||||||
this.setState({autosaveSlots: saveSlots})
|
|
||||||
}
|
|
||||||
|
|
||||||
decrementAutosaveSlots() {
|
|
||||||
let saveSlots = this.state.autosaveSlots - 1;
|
|
||||||
this.setState({autosaveSlots: saveSlots})
|
|
||||||
}
|
|
||||||
|
|
||||||
incrementPort() {
|
incrementPort() {
|
||||||
let port = this.state.port + 1;
|
let port = this.state.port + 1;
|
||||||
this.setState({port: port})
|
this.setState({port: port})
|
||||||
@ -118,31 +67,6 @@ class ServerCtl extends React.Component {
|
|||||||
this.setState({port: port})
|
this.setState({port: port})
|
||||||
}
|
}
|
||||||
|
|
||||||
incrementLatency() {
|
|
||||||
let latency = this.state.latency + 1;
|
|
||||||
this.setState({latency: latency})
|
|
||||||
}
|
|
||||||
|
|
||||||
decrementLatency() {
|
|
||||||
let latency= this.state.latency- 1;
|
|
||||||
this.setState({latency: latency})
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleAllowCmd() {
|
|
||||||
let cmd = !this.state.disallowCmd
|
|
||||||
this.setState({disallowCmd: cmd})
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleP2P() {
|
|
||||||
let p2p = !this.state.peer2peer;
|
|
||||||
this.setState({peer2peer: p2p})
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleAutoPause() {
|
|
||||||
let pause = !this.state.autoPause;
|
|
||||||
this.setState({autoPause: pause})
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return(
|
return(
|
||||||
<div className="box">
|
<div className="box">
|
||||||
@ -183,30 +107,6 @@ class ServerCtl extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<div className="box-body" style={{display: "none"}}>
|
<div className="box-body" style={{display: "none"}}>
|
||||||
<label for="latency">Server latency setting (ms)</label>
|
|
||||||
<div id="latency" className="input-group">
|
|
||||||
<input ref="latency" name="latency" id="latency" type="text" className="form-control" onchange={this.state.latency} value={this.state.latency} placeholder={this.state.latency} />
|
|
||||||
<div className="input-group-btn">
|
|
||||||
<button type="button" className="btn btn-primary" onClick={this.incrementLatency}><i className="fa fa-arrow-up"></i></button>
|
|
||||||
<button type="button" className="btn btn-primary" onClick={this.decrementLatency}><i className="fa fa-arrow-down"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<label for="autosaveInterval">Autosave Interval (mins)</label>
|
|
||||||
<div id="autosaveInterval" className="input-group">
|
|
||||||
<input ref="autosaveInterval" name="autosaveInterval" id="autosaveInterval" type="text" className="form-control" onchange={this.state.autosaveInterval} value={this.state.autosaveInterval} placeholder={this.state.autosaveInterval} />
|
|
||||||
<div className="input-group-btn">
|
|
||||||
<button type="button" className="btn btn-primary" onClick={this.incrementAutosave}><i className="fa fa-arrow-up"></i></button>
|
|
||||||
<button type="button" className="btn btn-primary" onClick={this.decrementAutosave}><i className="fa fa-arrow-down"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<label for="autosaveSlots">Autosave Slots</label>
|
|
||||||
<div id="autosaveSlots" className="input-group">
|
|
||||||
<input ref="autosaveSlots" name="autosaveSlots" id="autosaveSlots" type="text" className="form-control" onChange={this.state.autosaveSlots} value={this.state.autosaveSlots} placeholder={this.state.autosaveSlots} />
|
|
||||||
<div className="input-group-btn">
|
|
||||||
<button type="button" className="btn btn-primary" onClick={this.incrementAutosaveSlots}><i className="fa fa-arrow-up"></i></button>
|
|
||||||
<button type="button" className="btn btn-primary" onClick={this.decrementAutosaveSlots}><i className="fa fa-arrow-down"></i></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<label for="port">Factorio Server Port</label>
|
<label for="port">Factorio Server Port</label>
|
||||||
<div id="port" className="input-group">
|
<div id="port" className="input-group">
|
||||||
<input ref="port" name="port" id="port" type="text" className="form-control" onChange={this.state.port} value={this.state.port} placeholder={this.state.port} />
|
<input ref="port" name="port" id="port" type="text" className="form-control" onChange={this.state.port} value={this.state.port} placeholder={this.state.port} />
|
||||||
@ -215,24 +115,6 @@ class ServerCtl extends React.Component {
|
|||||||
<button type="button" className="btn btn-primary" onClick={this.decrementPort}><i className="fa fa-arrow-down"></i></button>
|
<button type="button" className="btn btn-primary" onClick={this.decrementPort}><i className="fa fa-arrow-down"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="checkbox">
|
|
||||||
<label for="autoPause">
|
|
||||||
<input id="autoPause" ref="autoPause" type="checkbox" onClick={this.toggleAutoPause} />
|
|
||||||
Disable auto pause when no players connected
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div className="checkbox">
|
|
||||||
<label for="p2p">
|
|
||||||
<input id="p2p" ref="p2p" type="checkbox" onClick={this.toggleP2P} />
|
|
||||||
Peer to peer connection method
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div className="checkbox">
|
|
||||||
<label for="allowCmd">
|
|
||||||
<input id="allowCmd" ref="allowCmd" type="checkbox" onClick={this.toggleAllowCmd} />
|
|
||||||
Disable commands on the server
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user