enums

package
v0.0.0-...-ed41999 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: AGPL-3.0 Imports: 2 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

View Source
var ModStrings = map[Mods]string{
	ModNoSliderVelocities: "NSV",
	ModSpeed05X:           "0.5x",
	ModSpeed06X:           "0.6x",
	ModSpeed07X:           "0.7x",
	ModSpeed08X:           "0.8x",
	ModSpeed09X:           "0.9x",
	ModSpeed11X:           "1.1x",
	ModSpeed12X:           "1.2x",
	ModSpeed13X:           "1.3x",
	ModSpeed14X:           "1.4x",
	ModSpeed15X:           "1.5x",
	ModSpeed16X:           "1.6x",
	ModSpeed17X:           "1.7x",
	ModSpeed18X:           "1.8x",
	ModSpeed19X:           "1.9x",
	ModSpeed20X:           "2.0x",
	ModStrict:             "Strict",
	ModChill:              "Chill",
	ModNoPause:            "No Pause",
	ModAutoplay:           "Autoplay",
	ModPaused:             "Paused",
	ModNoFail:             "No Fail",
	ModNoLongNotes:        "No Long Notes",
	ModRandomize:          "Randomize",
	ModSpeed055X:          "0.55x",
	ModSpeed065X:          "0.65x",
	ModSpeed075X:          "0.75x",
	ModSpeed085X:          "0.85x",
	ModSpeed095X:          "0.95x",
	ModInverse:            "Inverse",
	ModFullLN:             "Full Long Notes",
	ModMirror:             "Mirror",
	ModCoop:               "Co-op",
	ModSpeed105X:          "1.05x",
	ModSpeed115X:          "1.15x",
	ModSpeed125X:          "1.25x",
	ModSpeed135X:          "1.35x",
	ModSpeed145X:          "1.45x",
	ModSpeed155X:          "1.55x",
	ModSpeed165X:          "1.65x",
	ModSpeed175X:          "1.75x",
	ModSpeed185X:          "1.85x",
	ModSpeed195X:          "1.95x",
	ModHealthAdjust:       "Health Adjustments",
	ModNoMiss:             "NM",
	ModEnumMaxValue:       "INVALID!",
}

Functions

func GetGameModeString

func GetGameModeString(mode GameMode) string

GetGameModeString Returns a game mode int in its stringified name

func GetModsString

func GetModsString(modCombo Mods) string

GetModsString Gets a stringified version of a mod combination

func GetShorthandGameModeString

func GetShorthandGameModeString(mode GameMode) string

GetShorthandGameModeString Gets a short-handed version of a game mode

func HasIncompatibleModifiers

func HasIncompatibleModifiers(modCombo Mods) bool

HasIncompatibleModifiers Checks if the combination of modifiers is incompatible

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

func IsModActivated

func IsModActivated(modCombo Mods, mod Mods) bool

IsModActivated Returns if a given mod is activated in a mod combo

func IsModComboRanked

func IsModComboRanked(modCombo Mods) bool

IsModComboRanked Returns if a combination of mods is ranked

func IsUnrankedModComboAllowed

func IsUnrankedModComboAllowed(modCombo Mods) bool

IsUnrankedModComboAllowed Returns if a combination of mods is allowed in score submission

Types

type GameMode

type GameMode int

func GetModeFromString

func GetModeFromString(str string) (GameMode, error)

type Mods

type Mods int64
const (
	ModNoSliderVelocities Mods = 1 << iota
	ModSpeed05X
	ModSpeed06X
	ModSpeed07X
	ModSpeed08X
	ModSpeed09X
	ModSpeed11X
	ModSpeed12X
	ModSpeed13X
	ModSpeed14X
	ModSpeed15X
	ModSpeed16X
	ModSpeed17X
	ModSpeed18X
	ModSpeed19X
	ModSpeed20X
	ModStrict
	ModChill
	ModNoPause
	ModAutoplay
	ModPaused
	ModNoFail
	ModNoLongNotes
	ModRandomize
	ModSpeed055X
	ModSpeed065X
	ModSpeed075X
	ModSpeed085X
	ModSpeed095X
	ModInverse
	ModFullLN
	ModMirror
	ModCoop
	ModSpeed105X
	ModSpeed115X
	ModSpeed125X
	ModSpeed135X
	ModSpeed145X
	ModSpeed155X
	ModSpeed165X
	ModSpeed175X
	ModSpeed185X
	ModSpeed195X
	ModHealthAdjust
	ModNoMiss
	ModEnumMaxValue // This is only in place for looping purposes (i < ModEnumMaxValue - 1; i++)
)

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