Documentation
¶
Index ¶
- type ArenaConfig
- type BabelConfig
- type BoundaryDamage
- type CTFConfig
- type Config
- type GamemodeConfig
- type GamemodeID
- type IntelConfig
- type LabyConfig
- type MapConfig
- type MapExtensions
- type MapInfo
- type MasterHost
- type PasswordsConfig
- type RateLimitConfig
- type ServerConfig
- type SpawnArea
- type SpawnPointsConfig
- type TCConfig
- type TDMConfig
- type TeamInfo
- type TeamsConfig
- type TentArea
- type TentsConfig
- type VotingConfig
- type WaterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArenaConfig ¶
type BabelConfig ¶
type BoundaryDamage ¶
type Config ¶
type Config struct {
Server ServerConfig
Teams TeamsConfig
Passwords PasswordsConfig
RateLimit RateLimitConfig
Voting VotingConfig
Gamemode GamemodeConfig `toml:"gamemode"`
}
func LoadConfig ¶
type GamemodeConfig ¶
type GamemodeConfig struct {
CTF *CTFConfig `toml:"ctf"`
TC *TCConfig `toml:"tc"`
TDM *TDMConfig `toml:"tdm"`
Babel *BabelConfig `toml:"babel"`
Arena *ArenaConfig `toml:"arena"`
Laby *LabyConfig `toml:"laby"`
}
type GamemodeID ¶
type GamemodeID int
const ( GamemodeCTF GamemodeID = 0 GamemodeTC GamemodeID = 1 GamemodeBabel GamemodeID = 2 GamemodeTDM GamemodeID = 3 GamemodeArena GamemodeID = 4 GamemodeLaby GamemodeID = 5 )
func ParseGamemode ¶
func ParseGamemode(id int) (GamemodeID, error)
func (GamemodeID) String ¶
func (g GamemodeID) String() string
type IntelConfig ¶
type LabyConfig ¶ added in v0.2.0
type MapConfig ¶
type MapConfig struct {
Map MapInfo `toml:"map"`
SpawnPoints SpawnPointsConfig `toml:"spawnpoints"`
Water WaterConfig `toml:"water"`
Intel IntelConfig `toml:"intel"`
Tents TentsConfig `toml:"tents"`
Extensions MapExtensions `toml:"extensions,omitempty"`
Protected []string `toml:"protected,omitempty"`
Area []float64 `toml:"area,omitempty"`
Ball []float64 `toml:"ball,omitempty"`
BlueGoal []float64 `toml:"blue_goal,omitempty"`
GreenGoal []float64 `toml:"green_goal,omitempty"`
PenaltyAreas [][]float64 `toml:"penalty_areas,omitempty"`
}
func DefaultMapConfig ¶
func DefaultMapConfig() *MapConfig
returns a fresh map configuration populated with default values
func LoadMapConfig ¶
func LoadMapConfigToml ¶
type MapExtensions ¶
type MapExtensions struct {
WaterDamage *int
BoundaryDamage *BoundaryDamage
TimeLimit *int
CapLimit *int
DisabledCommands []string
Babel *bool
Push *bool
Arena *bool
TDM *bool
TC *bool
Infiltration *bool
Murderball *bool
Boss *bool
PushSpawnRange *int
PushBlueSpawn []float64
PushBlueCP []float64
PushGreenSpawn []float64
PushGreenCP []float64
Extras map[string]any
}
func (*MapExtensions) UnmarshalTOML ¶
func (m *MapExtensions) UnmarshalTOML(data interface{}) error
type MasterHost ¶
type PasswordsConfig ¶
type RateLimitConfig ¶
type RateLimitConfig struct {
Enabled bool `toml:"enabled"`
PacketsPerSecond int `toml:"packets_per_second"`
BurstSize int `toml:"burst_size"`
PositionPacketsPerSec int `toml:"position_packets_per_sec"`
OrientPacketsPerSec int `toml:"orient_packets_per_sec"`
BlockPacketsPerSec int `toml:"block_packets_per_sec"`
}
type ServerConfig ¶
type ServerConfig struct {
Name string `toml:"name"`
Port int `toml:"port"`
Gamemode int `toml:"gamemode"`
CaptureLimit int `toml:"capture_limit"`
Master bool `toml:"master"`
MasterHosts []MasterHost `toml:"master_hosts"`
Maps []string `toml:"maps"`
WelcomeMessages []string `toml:"welcome_messages"`
PeriodicMessages []string `toml:"periodic_messages"`
MaxPlayers int `toml:"max_players"`
RespawnTime int `toml:"respawn_time"`
// logging configuration
LogToFile bool `toml:"log_to_file"`
// ctf specific
CaptureTimeBonus float64 `toml:"capture_time_bonus"`
FlagReturnTime float64 `toml:"flag_return_time"`
// tdm specific
KillLimit int `toml:"kill_limit"`
IntelPoints int `toml:"intel_points"`
RemoveIntel bool `toml:"remove_intel"`
HeadshotMultiplier float64 `toml:"headshot_multiplier"`
EnableKillstreaks bool `toml:"enable_killstreaks"`
// babel specific
BabelReverse bool `toml:"babel_reverse"`
BabelCaptureLimit int `toml:"babel_capture_limit"`
RegenerateTower bool `toml:"regenerate_tower"`
RegenerationRate float64 `toml:"regeneration_rate"`
// arena specific
ArenaScoreLimit int `toml:"arena_score_limit"`
ArenaTimeoutIsDraw bool `toml:"timeout_is_draw"`
ArenaSuddenDeath bool `toml:"sudden_death_enabled"`
// tc specific
TCMaxScore int `toml:"tc_max_score"`
TCCaptureDistance float64 `toml:"tc_capture_distance"`
TCCaptureRate float64 `toml:"tc_capture_rate"`
// laby specific
LabyCapLimit int `toml:"laby_cap_limit"`
LabyHogTimeout int `toml:"laby_hog_timeout"`
LabyRegenRate float64 `toml:"laby_regen_rate"`
// vxlgen tower metadata which is set dynamically after generation
TowerPosX int `toml:"-"`
TowerPosY int `toml:"-"`
TowerCellsX int `toml:"-"`
TowerCellsY int `toml:"-"`
TowerCellsZ int `toml:"-"`
}
type SpawnPointsConfig ¶
type TeamsConfig ¶
type TentsConfig ¶
type VotingConfig ¶
type VotingConfig struct {
VotekickEnabled bool `toml:"votekick_enabled"`
VotekickPercentage int `toml:"votekick_percentage"`
VotekickBanDuration int `toml:"votekick_ban_duration"`
VoteCooldown int `toml:"vote_cooldown"`
VoteTimeout int `toml:"vote_timeout"`
VotemapEnabled bool `toml:"votemap_enabled"`
VotemapPercentage int `toml:"votemap_percentage"`
VotemapChoices int `toml:"votemap_choices"`
VotemapAllowExtend bool `toml:"votemap_allow_extend"`
}
type WaterConfig ¶
Click to show internal directories.
Click to hide internal directories.