encumbrance

package
v5.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Levels = []Level{
	No,
	Light,
	Medium,
	Heavy,
	ExtraHeavy,
}

Levels holds all possible values.

Functions

This section is empty.

Types

type Level

type Level byte

Level holds the encumbrance level.

const (
	No Level = iota
	Light
	Medium
	Heavy
	ExtraHeavy
)

Possible values.

const LastLevel Level = ExtraHeavy

LastLevel is the last valid value.

func ExtractLevel

func ExtractLevel(str string) Level

ExtractLevel extracts the value from a string.

func (Level) EnsureValid

func (enum Level) EnsureValid() Level

EnsureValid ensures this is of a known value.

func (Level) Key

func (enum Level) Key() string

Key returns the key used in serialization.

func (Level) MarshalText

func (enum Level) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (Level) Penalty

func (enum Level) Penalty() fxp.Int

Penalty returns the penalty associated with the encumbrance level.

func (Level) String

func (enum Level) String() string

String implements fmt.Stringer.

func (*Level) UnmarshalText

func (enum *Level) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (Level) WeightMultiplier

func (enum Level) WeightMultiplier() fxp.Int

WeightMultiplier returns the weight multiplier associated with the encumbrance level.

Jump to

Keyboard shortcuts

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