Skip to content

Commit 8bf495f

Browse files
committed
added mickael9 to the ReadMe
1 parent 0886920 commit 8bf495f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ go build
177177

178178
* **Mitch Roote** - [roote.ca](https://roote.ca)
179179

180+
## Special Thanks
181+
- **mickael9** for reverseengineering the factorio-save-file: https://forums.factorio.com/viewtopic.php?f=5&t=8568#
182+
180183
## License
181184

182185
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

src/vendor/factorioSave/factorioSave.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ type singleMod struct {
5050

5151
var ErrorIncompatible = errors.New("incompatible save")
5252
var data Header
53-
var constraintGreaterThan0_16 *semver.Constraints
53+
var constraintGreaterThan016 *semver.Constraints
5454

5555
func ReadHeader(filePath string) (Header, error) {
5656
var err error
5757
data = Header{}
5858

59-
constraintGreaterThan0_16, _ = semver.NewConstraint(">= 0.16.0")
59+
constraintGreaterThan016, _ = semver.NewConstraint(">= 0.16.0")
6060

6161
datFile, err := openSave(filePath)
6262
if err != nil {
@@ -143,7 +143,7 @@ func ReadHeader(filePath string) (Header, error) {
143143
return data, err
144144
}
145145

146-
Used, err := data.FactorioVersion.CheckCompatibility(constraintGreaterThan0_16)
146+
Used, err := data.FactorioVersion.CheckCompatibility(constraintGreaterThan016)
147147
if err != nil {
148148
log.Printf("Error checking if used: %s", err)
149149
return data, err
@@ -174,7 +174,7 @@ func ReadHeader(filePath string) (Header, error) {
174174
return data, err
175175
}
176176

177-
New, err := data.FactorioVersion.CheckCompatibility(constraintGreaterThan0_16)
177+
New, err := data.FactorioVersion.CheckCompatibility(constraintGreaterThan016)
178178
if err != nil {
179179
log.Printf("error checking compatibility: %s", err)
180180
return data, err
@@ -208,7 +208,7 @@ func ReadHeader(filePath string) (Header, error) {
208208
func readUTF8String(file io.ReadCloser, forcedOptim bool) (string, error) {
209209
var err error
210210

211-
New, err := data.FactorioVersion.CheckCompatibility(constraintGreaterThan0_16)
211+
New, err := data.FactorioVersion.CheckCompatibility(constraintGreaterThan016)
212212
if err != nil {
213213
log.Printf("Couldn't checkCompatibility: %s", err)
214214
return "", err

0 commit comments

Comments
 (0)