You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
754 B
35 lines
754 B
//go:build !js || !wasm
|
|
// +build !js !wasm
|
|
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
|
|
"code.rocketnine.space/tslocum/gas-station-sim/world"
|
|
)
|
|
|
|
func parseFlags() {
|
|
var (
|
|
skipIntro bool
|
|
skipName bool
|
|
skipTutorial bool
|
|
)
|
|
flag.BoolVar(&world.Fullscreen, "fullscreen", true, "run in fullscreen mode")
|
|
flag.BoolVar(&skipIntro, "skip-intro", false, "skip intro screen")
|
|
flag.BoolVar(&skipName, "skip-name", false, "skip name input screen")
|
|
flag.BoolVar(&skipTutorial, "skip-tutorial", false, "skip tutorial")
|
|
flag.Parse()
|
|
|
|
if skipIntro || skipName || skipTutorial {
|
|
world.StartGame()
|
|
if skipName || skipTutorial {
|
|
world.Name = world.NameInput
|
|
world.NameInput = ""
|
|
if skipTutorial {
|
|
world.TutorialIntroFinished = true
|
|
}
|
|
}
|
|
}
|
|
}
|