app

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: BSD-3-Clause Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectGameDir added in v0.3.1

func DetectGameDir() (string, error)

Returns error if steam path couldn't be found.

func NewConsolePrinter added in v0.5.17

func NewConsolePrinter(colorOutput bool, stdout io.Writer, stderr io.Writer) *printer

func ParseHashes added in v0.3.1

func ParseHashes(str string) []string

func VerifyGameDir added in v0.3.1

func VerifyGameDir(path string) error

Types

type App

type App struct {
	Hashes     map[stingray.Hash]string
	ThinHashes map[stingray.ThinHash]string
	ArmorSets  map[stingray.Hash]dlbin.ArmorSet
	DataDir    *stingray.DataDir
}

func OpenGameDir added in v0.3.1

func OpenGameDir(ctx context.Context, gameDir string, hashStrings []string, thinhashes []string, armorStrings stingray.Hash, onProgress func(curr, total int)) (*App, error)

Open game dir and read metadata.

func (*App) ExtractFile

func (a *App) ExtractFile(ctx context.Context, id stingray.FileID, outDir string, extrCfg appconfig.Config, runner *exec.Runner, gltfDoc *gltf.Document, triadIDs []stingray.Hash, printer Printer) ([]string, error)

Returns path to extracted file/directory.

func (*App) LookupHash added in v0.4.2

func (a *App) LookupHash(hash stingray.Hash) string

Prints hash if human-readable name is unknown.

func (*App) LookupThinHash added in v0.6.0

func (a *App) LookupThinHash(hash stingray.ThinHash) string

Prints hash if human-readable name is unknown.

func (*App) MatchingFiles

func (a *App) MatchingFiles(
	includeGlob string,
	excludeGlob string,
	includeOnlyTypes []string,
	includeTriadIDs []stingray.Hash,
) (
	map[stingray.FileID]*stingray.File,
	error,
)

type Printer

type Printer interface {
	Infof(f string, a ...any)
	Warnf(f string, a ...any)
	Errorf(f string, a ...any)
	Fatalf(f string, a ...any)
	Statusf(f string, a ...any)
	NoStatus()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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