enums

package
v0.0.0-...-69ed63b Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None GameMode = iota
	GameModeKeys4
	GameModeKeys7

	// GameModeKeys1 New game modes so they start counting from 3
	GameModeKeys1 = 3
	GameModeKeys2 = iota
	GameModeKeys3
	GameModeKeys5
	GameModeKeys6
	GameModeKeys8
	GameModeKeys9
	GameModeKeys10
	GameModeEnumMaxValue
)
View Source
const (
	RankedStatusNotSubmitted = iota
	RankedStatusUnranked
	RankedStatusRanked
)
View Source
const (
	UserGroupNormal = 1 << iota
	UserGroupAdmin
	UserGroupBot
	UserGroupDeveloper
	UserGroupModerator
	UserGroupRankingSupervisor
	UserGroupSwan
	UserGroupContributor
	UserGroupDonator
)

Variables

This section is empty.

Functions

func GetGameModeString

func GetGameModeString(mode GameMode) string

GetGameModeString Returns a game mode int in its stringified name

func GetShorthandGameModeString

func GetShorthandGameModeString(mode GameMode) string

GetShorthandGameModeString Gets a short-handed version of a game mode

func HasPrivilege

func HasPrivilege(privilegesCombo Privileges, privilege Privileges) bool

HasPrivilege Returns if a combination of user groups contains a single group

func HasUserGroup

func HasUserGroup(groupsCombo UserGroups, group UserGroups) bool

HasUserGroup Returns if a combination of user groups contains a single group

Types

type GameMode

type GameMode int

func GetModeFromString

func GetModeFromString(str string) GameMode

type Privileges

type Privileges int64
const (
	PrivilegeNormal Privileges = 1 << iota
	PrivilegeKickUsers
	PrivilegeBanUsers
	PrivilegeNotifyUsers
	PrivilegeMuteUsers
	PrivilegeRankMapsets
	PrivilegeViewAdminLogs
	PrivilegeEditUsers
	PrivilegeManageBuilds
	PrivilegeManageAlphaKeys
	PrivilegeManageMapsets
	PrivilegeEnableTournamentMode
	PrivilegeWipeUsers
	PrivilegeEditUsername
	PrivilegeEditFlag
	PrivilegeEditPrivileges
	PrivilegeEditGroups
	PrivilegeEditNotes
	PrivilegeEditAvatar
	PrivilegeViewCrashes
	PrivilegeEditDonate
)

type RankedStatus

type RankedStatus int8

type UserGroups

type UserGroups int64

Jump to

Keyboard shortcuts

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