Documentation ¶
Index ¶
- Variables
- type ModifierCostType
- func (enum ModifierCostType) AltString() string
- func (enum ModifierCostType) DetermineModifierCostValueTypeFromString(s string) ModifierCostValueType
- func (enum ModifierCostType) EnsureValid() ModifierCostType
- func (enum ModifierCostType) ExtractValue(s string) fxp.Int
- func (enum ModifierCostType) Format(s string) string
- func (enum ModifierCostType) Key() string
- func (enum ModifierCostType) MarshalText() (text []byte, err error)
- func (enum ModifierCostType) Permitted() []ModifierCostValueType
- func (enum ModifierCostType) String() string
- func (enum ModifierCostType) StringWithExample() string
- func (enum *ModifierCostType) UnmarshalText(text []byte) error
- type ModifierCostValueType
- func (enum ModifierCostValueType) EnsureValid() ModifierCostValueType
- func (enum ModifierCostValueType) ExtractValue(s string) fxp.Int
- func (enum ModifierCostValueType) Format(value fxp.Int) string
- func (enum ModifierCostValueType) Key() string
- func (enum ModifierCostValueType) MarshalText() (text []byte, err error)
- func (enum ModifierCostValueType) String() string
- func (enum *ModifierCostValueType) UnmarshalText(text []byte) error
- type ModifierWeightType
- func (enum ModifierWeightType) AltString() string
- func (enum ModifierWeightType) DetermineModifierWeightValueTypeFromString(s string) ModifierWeightValueType
- func (enum ModifierWeightType) EnsureValid() ModifierWeightType
- func (enum ModifierWeightType) ExtractFraction(s string) fxp.Fraction
- func (enum ModifierWeightType) Format(s string, defUnits measure.WeightUnits) string
- func (enum ModifierWeightType) Key() string
- func (enum ModifierWeightType) MarshalText() (text []byte, err error)
- func (enum ModifierWeightType) Permitted() []ModifierWeightValueType
- func (enum ModifierWeightType) String() string
- func (enum ModifierWeightType) StringWithExample() string
- func (enum *ModifierWeightType) UnmarshalText(text []byte) error
- type ModifierWeightValueType
- func (enum ModifierWeightValueType) EnsureValid() ModifierWeightValueType
- func (enum ModifierWeightValueType) ExtractFraction(s string) fxp.Fraction
- func (enum ModifierWeightValueType) Format(fraction fxp.Fraction) string
- func (enum ModifierWeightValueType) Key() string
- func (enum ModifierWeightValueType) MarshalText() (text []byte, err error)
- func (enum ModifierWeightValueType) String() string
- func (enum *ModifierWeightValueType) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( // AllModifierCostType holds all possible values. AllModifierCostType = []ModifierCostType{ OriginalCost, BaseCost, FinalBaseCost, FinalCost, } )
var ( // AllModifierCostValueType holds all possible values. AllModifierCostValueType = []ModifierCostValueType{ Addition, Percentage, Multiplier, CostFactor, } )
var ( // AllModifierWeightType holds all possible values. AllModifierWeightType = []ModifierWeightType{ OriginalWeight, BaseWeight, FinalBaseWeight, FinalWeight, } )
var ( // AllModifierWeightValueType holds all possible values. AllModifierWeightValueType = []ModifierWeightValueType{ WeightAddition, WeightPercentageAdder, WeightPercentageMultiplier, WeightMultiplier, } )
Functions ¶
This section is empty.
Types ¶
type ModifierCostType ¶
type ModifierCostType byte
ModifierCostType describes how an EquipmentModifier's cost is applied.
const ( OriginalCost ModifierCostType = iota BaseCost FinalBaseCost FinalCost LastModifierCostType = FinalCost )
Possible values.
func ExtractModifierCostType ¶
func ExtractModifierCostType(str string) ModifierCostType
ExtractModifierCostType extracts the value from a string.
func (ModifierCostType) AltString ¶
func (enum ModifierCostType) AltString() string
AltString returns the alternate string.
func (ModifierCostType) DetermineModifierCostValueTypeFromString ¶
func (enum ModifierCostType) DetermineModifierCostValueTypeFromString(s string) ModifierCostValueType
DetermineModifierCostValueTypeFromString examines a string to determine what type it is, but restricts the result to those allowed for this ModifierCostType.
func (ModifierCostType) EnsureValid ¶
func (enum ModifierCostType) EnsureValid() ModifierCostType
EnsureValid ensures this is of a known value.
func (ModifierCostType) ExtractValue ¶
func (enum ModifierCostType) ExtractValue(s string) fxp.Int
ExtractValue from the string.
func (ModifierCostType) Format ¶
func (enum ModifierCostType) Format(s string) string
Format returns a formatted version of the value.
func (ModifierCostType) Key ¶
func (enum ModifierCostType) Key() string
Key returns the key used in serialization.
func (ModifierCostType) MarshalText ¶
func (enum ModifierCostType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ModifierCostType) Permitted ¶
func (enum ModifierCostType) Permitted() []ModifierCostValueType
Permitted returns the permitted ModifierCostValueType values.
func (ModifierCostType) String ¶
func (enum ModifierCostType) String() string
String implements fmt.Stringer.
func (ModifierCostType) StringWithExample ¶
func (enum ModifierCostType) StringWithExample() string
StringWithExample returns an example along with the normal String() content.
func (*ModifierCostType) UnmarshalText ¶
func (enum *ModifierCostType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ModifierCostValueType ¶
type ModifierCostValueType byte
ModifierCostValueType describes how an EquipmentModifier's cost is applied.
const ( Addition ModifierCostValueType = iota Percentage Multiplier CostFactor LastModifierCostValueType = CostFactor )
Possible values.
func DetermineModifierCostValueTypeFromString ¶
func DetermineModifierCostValueTypeFromString(s string) ModifierCostValueType
DetermineModifierCostValueTypeFromString examines a string to determine what type it is.
func ExtractModifierCostValueType ¶
func ExtractModifierCostValueType(str string) ModifierCostValueType
ExtractModifierCostValueType extracts the value from a string.
func (ModifierCostValueType) EnsureValid ¶
func (enum ModifierCostValueType) EnsureValid() ModifierCostValueType
EnsureValid ensures this is of a known value.
func (ModifierCostValueType) ExtractValue ¶
func (enum ModifierCostValueType) ExtractValue(s string) fxp.Int
ExtractValue from the string.
func (ModifierCostValueType) Format ¶
func (enum ModifierCostValueType) Format(value fxp.Int) string
Format returns a formatted version of the value.
func (ModifierCostValueType) Key ¶
func (enum ModifierCostValueType) Key() string
Key returns the key used in serialization.
func (ModifierCostValueType) MarshalText ¶
func (enum ModifierCostValueType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ModifierCostValueType) String ¶
func (enum ModifierCostValueType) String() string
String implements fmt.Stringer.
func (*ModifierCostValueType) UnmarshalText ¶
func (enum *ModifierCostValueType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ModifierWeightType ¶
type ModifierWeightType byte
ModifierWeightType describes how an EquipmentModifier's weight is applied.
const ( OriginalWeight ModifierWeightType = iota BaseWeight FinalBaseWeight FinalWeight LastModifierWeightType = FinalWeight )
Possible values.
func ExtractModifierWeightType ¶
func ExtractModifierWeightType(str string) ModifierWeightType
ExtractModifierWeightType extracts the value from a string.
func (ModifierWeightType) AltString ¶
func (enum ModifierWeightType) AltString() string
AltString returns the alternate string.
func (ModifierWeightType) DetermineModifierWeightValueTypeFromString ¶
func (enum ModifierWeightType) DetermineModifierWeightValueTypeFromString(s string) ModifierWeightValueType
DetermineModifierWeightValueTypeFromString examines a string to determine what type it is, but restricts the result to those allowed for this ModifierWeightType.
func (ModifierWeightType) EnsureValid ¶
func (enum ModifierWeightType) EnsureValid() ModifierWeightType
EnsureValid ensures this is of a known value.
func (ModifierWeightType) ExtractFraction ¶
func (enum ModifierWeightType) ExtractFraction(s string) fxp.Fraction
ExtractFraction from the string.
func (ModifierWeightType) Format ¶
func (enum ModifierWeightType) Format(s string, defUnits measure.WeightUnits) string
Format returns a formatted version of the value.
func (ModifierWeightType) Key ¶
func (enum ModifierWeightType) Key() string
Key returns the key used in serialization.
func (ModifierWeightType) MarshalText ¶
func (enum ModifierWeightType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ModifierWeightType) Permitted ¶
func (enum ModifierWeightType) Permitted() []ModifierWeightValueType
Permitted returns the permitted ModifierCostValueType values.
func (ModifierWeightType) String ¶
func (enum ModifierWeightType) String() string
String implements fmt.Stringer.
func (ModifierWeightType) StringWithExample ¶
func (enum ModifierWeightType) StringWithExample() string
StringWithExample returns an example along with the normal String() content.
func (*ModifierWeightType) UnmarshalText ¶
func (enum *ModifierWeightType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
type ModifierWeightValueType ¶
type ModifierWeightValueType byte
ModifierWeightValueType describes how an EquipmentModifier's weight is applied.
const ( WeightAddition ModifierWeightValueType = iota WeightPercentageAdder WeightPercentageMultiplier WeightMultiplier LastModifierWeightValueType = WeightMultiplier )
Possible values.
func DetermineModifierWeightValueTypeFromString ¶
func DetermineModifierWeightValueTypeFromString(s string) ModifierWeightValueType
DetermineModifierWeightValueTypeFromString examines a string to determine what type it is.
func ExtractModifierWeightValueType ¶
func ExtractModifierWeightValueType(str string) ModifierWeightValueType
ExtractModifierWeightValueType extracts the value from a string.
func (ModifierWeightValueType) EnsureValid ¶
func (enum ModifierWeightValueType) EnsureValid() ModifierWeightValueType
EnsureValid ensures this is of a known value.
func (ModifierWeightValueType) ExtractFraction ¶
func (enum ModifierWeightValueType) ExtractFraction(s string) fxp.Fraction
ExtractFraction from the string.
func (ModifierWeightValueType) Format ¶
func (enum ModifierWeightValueType) Format(fraction fxp.Fraction) string
Format returns a formatted version of the value.
func (ModifierWeightValueType) Key ¶
func (enum ModifierWeightValueType) Key() string
Key returns the key used in serialization.
func (ModifierWeightValueType) MarshalText ¶
func (enum ModifierWeightValueType) MarshalText() (text []byte, err error)
MarshalText implements the encoding.TextMarshaler interface.
func (ModifierWeightValueType) String ¶
func (enum ModifierWeightValueType) String() string
String implements fmt.Stringer.
func (*ModifierWeightValueType) UnmarshalText ¶
func (enum *ModifierWeightValueType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.