1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-21 08:21:16 +00:00
sii/cmd/save-clean/cleaner.go
Knut Ahlers 1753d98556
Implement save-game cleaner
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-01-05 13:56:10 +01:00

22 lines
501 B
Go

package main
import (
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/Luzifer/sii"
)
func cleanSaveGame(baseGameUnit, saveGame *sii.Unit) error {
log.Info("Cleaning companies...")
if err := cleanCompanies(baseGameUnit, saveGame); err != nil {
return errors.Wrap(err, "Unable to cleanup companies")
}
log.Info("Cleaning garages...")
if err := cleanGarages(baseGameUnit, saveGame); err != nil {
return errors.Wrap(err, "Unable to cleanup garages")
}
return nil
}