mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-24 05:17:24 +02:00
added error screen, if no mods are in the save
This commit is contained in:
parent
597d7b3b23
commit
0886920356
2
src/vendor/factorioSave/factorioSave.go
vendored
2
src/vendor/factorioSave/factorioSave.go
vendored
@ -54,6 +54,7 @@ var constraintGreaterThan0_16 *semver.Constraints
|
|||||||
|
|
||||||
func ReadHeader(filePath string) (Header, error) {
|
func ReadHeader(filePath string) (Header, error) {
|
||||||
var err error
|
var err error
|
||||||
|
data = Header{}
|
||||||
|
|
||||||
constraintGreaterThan0_16, _ = semver.NewConstraint(">= 0.16.0")
|
constraintGreaterThan0_16, _ = semver.NewConstraint(">= 0.16.0")
|
||||||
|
|
||||||
@ -201,7 +202,6 @@ func ReadHeader(filePath string) (Header, error) {
|
|||||||
data.Mods = append(data.Mods, SingleMod)
|
data.Mods = append(data.Mods, SingleMod)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println(data)
|
|
||||||
return data, nil
|
return data, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,14 @@ class ModLoadSave extends React.Component {
|
|||||||
checkboxes.push(singleCheckbox);
|
checkboxes.push(singleCheckbox);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(checkboxes.length == 0) {
|
||||||
|
swal({
|
||||||
|
title: "No mods in this save!",
|
||||||
|
type: "error"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let table = <div>
|
let table = <div>
|
||||||
All Mods will be installed
|
All Mods will be installed
|
||||||
<div style={{display: "flex", width: "100%", justifyContent: "center"}}>
|
<div style={{display: "flex", width: "100%", justifyContent: "center"}}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user