config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RespawnTypeAll  = "all"
	RespawnTypeDead = "dead"
	RespawnTypeNone = "none"
)

Variables

View Source
var DEFAULT []byte

Functions

This section is empty.

Types

type ClientSettings

type ClientSettings struct {
	Assets      []string `json:"assets"`
	Servers     []string `json:"servers"`
	Proxy       string   `json:"proxy"`
	MenuOptions string   `json:"menuOptions"`
}

type Config

type Config struct {
	Server ServerSettings
	Client ClientSettings
}

func Process

func Process(configPaths []string) (*Config, error)

Process reads the provided configuration files in order, compiles them, and unifies them with the configuration file schema. If no configuration files are provided, the default configuration is used.

type DuelType

type DuelType struct {
	Name            string
	Preset          string
	ForceRespawn    RespawnType
	WarmupSeconds   uint
	GameSeconds     uint
	WinThreshold    uint
	OvertimeSeconds uint
	PauseOnDeath    bool
	Default         bool
}

type ENetIngress

type ENetIngress struct {
	Port       int
	Target     string
	ServerInfo ENetServerInfo
}

type ENetServerInfo

type ENetServerInfo struct {
	Enabled bool
	Master  bool
	Server  bool
}

type MatchmakingSettings

type MatchmakingSettings struct {
	Duel []DuelType
}

type Preset

type Preset struct {
	Name    string
	Virtual bool
	Default bool
	Config  gameserver.Config
}

type PresetSpace

type PresetSpace struct {
	Preset          string
	VotingCreates   bool
	ExploreMode     bool
	ExploreModeSkip string
	Config          SpaceConfig
}

type RespawnType

type RespawnType string

type ServerIngress

type ServerIngress struct {
	Desktop []ENetIngress
	Web     struct {
		Address string
		Port    int
	}
}

type ServerServerInfo

type ServerServerInfo struct {
	Map         string
	Description string
	TimeLeft    int
	GameSpeed   int
}

type ServerSettings

type ServerSettings struct {
	LogSessions       bool
	DBPath            string
	LogDirectory      string
	CacheDirectory    string
	ServerInfo        ServerServerInfo
	Assets            []string
	Presets           []Preset
	Spaces            []PresetSpace
	Matchmaking       MatchmakingSettings
	ServerDescription string
	Ingress           ServerIngress
}

type SpaceConfig

type SpaceConfig struct {
	Alias       string
	Description string
	Links       []SpaceLink
}
type SpaceLink struct {
	Teleport    uint8
	Teledest    uint8
	Destination string
}

Jump to

Keyboard shortcuts

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