config

package
v0.0.0-...-31d85ab Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinVersionForTLS = "1.16.0"
)

Variables

View Source
var (
	// Accessed from the outside
	Hostname        = "127.0.0.1"
	Port     uint16 = 15000
	Version         = "1.16.0"
	TLS             = true
	Accounts        = AccountList{Guest("wl_bot_1"), Guest("wl_bot_2")}
	Era             = "default"
	Title           = "Game 1"
	Timer           = TimerConfig{false, 300, 300, 300, 0}
	Admins          = types.StringList{}
	BaseDir         = ""
	Games           = []GameConfig{}

	// Game distro related confs and timeouts (accessed from the outside)
	Wesnoth = "/usr/bin/wesnoth"
	Eras    = "/usr/share/wesnoth/data/multiplayer/eras.cfg"
	TmpDir  = os.TempDir() + "/fastbot"
	Units   = "/usr/share/wesnoth/data/core/units.cfg"
	Timeout = time.Second * 30
)

Default Bot's parameters

Functions

func LoadFromArgs

func LoadFromArgs()

Types

type Account

type Account struct {
	Username string
	Password string
}

func Guest

func Guest(username string) Account

type AccountList

type AccountList []Account

func ParseAccounts

func ParseAccounts(text string) AccountList

type GameConfig

type GameConfig struct {
	Title         string
	Players       []string
	PickingPlayer string
	Scenarios     []ScenarioConfig
}

type ScenarioConfig

type ScenarioConfig struct {
	Path    string
	Defines []string
}

type TimerConfig

type TimerConfig struct {
	Enabled       bool
	InitTime      int
	TurnBonus     int
	ReservoirTime int
	ActionBonus   int
}

Jump to

Keyboard shortcuts

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