nip

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Properties
	PropertyType    = "type"
	PropertyName    = "name"
	PropertyClass   = "class"
	PropertyQuality = "quality"
	PropertyFlag    = "flag"
	PropertyLevel   = "level"
	PropertyPrefix  = "prefix"
	PropertySuffix  = "suffix"

	// Types
	TypeNormal      = "normal"
	TypeExceptional = "exceptional"
	TypeElite       = "elite"

	// Quality
	QualityLowQuality = "lowquality"
	QualityNormal     = "normal"
	QualitySuperior   = "superior"
	QualityMagic      = "magic"
	QualitySet        = "set"
	QualityRare       = "rare"
	QualityUnique     = "unique"
	QualityCrafted    = "crafted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparable

type Comparable struct {
	Keyword     string
	Comparison  Operand
	ValueInt    int
	ValueString string
	Operand
}

type Group

type Group struct {
	Comparable []Comparable
	Operand
}

type Keyword

type Keyword string

type Operand

type Operand string
const (
	OperandEqual             Operand = "=="
	OperandGreaterThan       Operand = ">"
	OperandGreaterOrEqualTo  Operand = ">="
	OperandLessThan          Operand = "<"
	OperandLessThanOrEqualTo Operand = "<="
	OperandNotEqualTo        Operand = "!="
	OperandAnd               Operand = "&&"
	OperandOr                Operand = "||"
	OperandNone              Operand = ""
)

type Rule

type Rule struct {
	Properties  []Group
	Stats       []Group
	MaxQuantity []Group
}

func ParseLine

func ParseLine(line string) (Rule, error)

func ParseNIPFile

func ParseNIPFile(filePath string) ([]Rule, error)

func ReadDir

func ReadDir(path string) ([]Rule, error)

Jump to

Keyboard shortcuts

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