moddb

package
v0.0.0-...-25a4f9c Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor interface {
	GetOutput(string) (float64, bool)
}

type ListCfg

type ListCfg struct {
	Flags        *mod.MFlag
	KeywordFlags *mod.KeywordFlag
	Source       *mod.Source
	SkillStats   map[string]float64
	SkillCond    map[string]bool
	SlotName     string

	SkillName          string
	SummonSkillName    string
	SkillGem           *poe.SkillGem
	SkillGrantedEffect any
	SkillPart          string
	SkillTypes         map[data.SkillType]bool
	SkillDist          float64
}

type ModDB

type ModDB struct {
	*ModStore

	Mods map[string][]mod.Mod
}

func NewModDB

func NewModDB() *ModDB

func (*ModDB) AddDB

func (m *ModDB) AddDB(db *ModDB)

func (*ModDB) AddList

func (m *ModDB) AddList(list *ModList)

func (*ModDB) AddMod

func (m *ModDB) AddMod(newMod mod.Mod)

func (*ModDB) Clone

func (m *ModDB) Clone() ModStoreFuncs

func (*ModDB) Combine

func (m *ModDB) Combine(modType mod.Type, cfg *ListCfg, modNames ...string) *mod.ModValueMulti

func (*ModDB) Flag

func (m *ModDB) Flag(cfg *ListCfg, names ...string) bool

func (*ModDB) List

func (m *ModDB) List(cfg *ListCfg, names ...string) []interface{}

func (*ModDB) Max

func (m *ModDB) Max(cfg *ListCfg, modNames ...string) float64

func (*ModDB) More

func (m *ModDB) More(cfg *ListCfg, names ...string) float64

func (*ModDB) Override

func (m *ModDB) Override(cfg *ListCfg, names ...string) *mod.ModValueMulti

func (*ModDB) Sum

func (m *ModDB) Sum(modType mod.Type, cfg *ListCfg, names ...string) float64

func (*ModDB) Tabulate

func (m *ModDB) Tabulate(modType mod.Type, cfg *ListCfg, modNames ...string) []ModResult

func (*ModDB) TabulateInternal

func (m *ModDB) TabulateInternal(context ModStoreFuncs, result *[]ModResult, modType mod.Type,
	cfg *ListCfg, flags mod.MFlag, keywordFlags mod.KeywordFlag, source mod.Source, modNames ...string)

type ModList

type ModList struct {
	*ModStore
	// contains filtered or unexported fields
}

func NewModList

func NewModList() *ModList

func (*ModList) AddDB

func (m *ModList) AddDB(db *ModList)

func (*ModList) AddMod

func (m *ModList) AddMod(newMod mod.Mod)

func (*ModList) Clone

func (m *ModList) Clone() ModStoreFuncs

func (*ModList) Combine

func (m *ModList) Combine(modType mod.Type, cfg *ListCfg, modNames ...string) *mod.ModValueMulti

func (*ModList) Flag

func (m *ModList) Flag(cfg *ListCfg, names ...string) bool

func (*ModList) List

func (m *ModList) List(cfg *ListCfg, names ...string) []interface{}

func (*ModList) Max

func (m *ModList) Max(cfg *ListCfg, modNames ...string) float64

func (*ModList) More

func (m *ModList) More(cfg *ListCfg, names ...string) float64

func (*ModList) Override

func (m *ModList) Override(cfg *ListCfg, names ...string) *mod.ModValueMulti

func (*ModList) Sum

func (m *ModList) Sum(modType mod.Type, cfg *ListCfg, names ...string) float64

func (*ModList) Tabulate

func (m *ModList) Tabulate(modType mod.Type, cfg *ListCfg, modNames ...string) []ModResult

func (*ModList) TabulateInternal

func (m *ModList) TabulateInternal(context ModStoreFuncs, result *[]ModResult, modType mod.Type,
	cfg *ListCfg, flags mod.MFlag, keywordFlags mod.KeywordFlag, source mod.Source, modNames ...string)

type ModResult

type ModResult struct {
	Value float64
	Mod   mod.Mod
}

type ModStore

type ModStore struct {
	Parent      ModStoreFuncs
	Child       ModStoreFuncs
	Actor       Actor
	Multipliers map[string]float64
	Conditions  map[string]bool
}

func NewModStore

func NewModStore(parent ModStoreFuncs) *ModStore

func (*ModStore) Clone

func (s *ModStore) Clone() *ModStore

func (*ModStore) GetCondition

func (s *ModStore) GetCondition(variable string, cfg *ListCfg, noMod bool) (bool, bool)

func (*ModStore) GetMultiplier

func (s *ModStore) GetMultiplier(variable string, cfg *ListCfg, noMod bool) float64

type ModStoreFuncs

type ModStoreFuncs interface {
	List(cfg *ListCfg, names ...string) []interface{}
	Sum(modType mod.Type, cfg *ListCfg, names ...string) float64
	More(cfg *ListCfg, names ...string) float64
	Flag(cfg *ListCfg, names ...string) bool
	Override(cfg *ListCfg, names ...string) *mod.ModValueMulti
	GetMultiplier(variable string, cfg *ListCfg, noMod bool) float64
	GetCondition(variable string, cfg *ListCfg, noMod bool) (bool, bool)
	Clone() ModStoreFuncs
	TabulateInternal(context ModStoreFuncs, result *[]ModResult, modType mod.Type,
		cfg *ListCfg, flags mod.MFlag, keywordFlags mod.KeywordFlag, source mod.Source, modNames ...string)
	Combine(modType mod.Type, cfg *ListCfg, modNames ...string) *mod.ModValueMulti
}

Jump to

Keyboard shortcuts

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