factorio

package
v0.0.0-...-0c5ecab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package factorio contains helpers for interacting with factorio.com and the Factorio game.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadVersion

func DownloadVersion(ctx context.Context, version, sha256sum, destDir string) error

DownloadVersion downloads a Factorio version to the specified directory. The downloaded version is validated against the SHA256 sum on the remote, and extracted to the specified directory.

func GenerateDefaultSave

func GenerateDefaultSave(cfg *config.Config, execPath string) error

func GenerateSave

func GenerateSave(cfg *config.Config, execPath, saveName string) error

generateSave generates a new Factorio save.

func GetSHA256

func GetSHA256(version string) (string, error)

GetSHA256 gets the SHA256 hash of a Factorio version. This will only return the hash of the headless version.

Types

type Releases

type Releases struct {
	Stable       string
	Experimental string
}

Releases contains the latest releases of Factorio based on channels.

func GetLatestReleases

func GetLatestReleases() (*Releases, error)

GetLatestReleases gets the latest releases of Factorio.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL