engine_config

package
v0.240209.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Name     string `hcl:"name,key"`
	Scenario string `hcl:"scenario"`

	Doer engine.Doer `hcl:"-"`
}

type Cfg added in v0.240209.0

type Cfg interface{}

type Config

type Config struct {
	Aliases        []Alias  `hcl:"alias"`
	OnBoot         []string `hcl:"on_boot"`
	FirstInit      []string `hcl:"first_init"`
	OnMenuError    []string `hcl:"on_menu_error"`
	OnServiceBegin []string `hcl:"on_service_begin"`
	OnServiceEnd   []string `hcl:"on_service_end"`
	OnFrontBegin   []string `hcl:"on_front_begin"`
	OnBroken       []string `hcl:"on_broken"`
	Inventory      Inventory
	Menu           struct {
		Items []*MenuItem `hcl:"item"`
	}
	Profile struct {
		Regexp    string `hcl:"regexp"`
		MinUs     int    `hcl:"min_us"`
		LogFormat string `hcl:"log_format"`
	}
}

type Inventory

type Inventory struct {
	Persist     bool    `hcl:"persist"`
	Stocks      []Stock `hcl:"stock"`
	TeleAddName bool    `hcl:"tele_add_name"` // send stock names to telemetry; false to save network usage
}
type MenuItem struct {
	Disabled  bool   `hcl:"disabled"`
	Code      string `hcl:"code,key"`
	Name      string `hcl:"name"`
	XXX_Price int    `hcl:"price"` // use scaled `Price`, this is for decoding config only
	Scenario  string `hcl:"scenario"`
	CreamMax  int    `hcl:"creamMax"`
	SugarMax  int    `hcl:"sugarMax"`

	Price currency.Amount `hcl:"-"`
	Doer  engine.Doer     `hcl:"-"`
}
func (s *MenuItem) Override(override *MenuItem)
func (mi *MenuItem) String() string

type Stock

type Stock struct {
	Name        string  `hcl:"name,key"`
	Code        int     `hcl:"code"`
	Check       bool    `hcl:"check"`
	Min         float32 `hcl:"min"`
	HwRate      float32 `hcl:"hw_rate"`
	SpendRate   float32 `hcl:"spend_rate"`
	RegisterAdd string  `hcl:"register_add"`
	Level       string  `hcl:"level"`
}

func (*Stock) Override added in v0.240209.0

func (s *Stock) Override(override *Stock)

func (*Stock) String

func (s *Stock) String() string

Jump to

Keyboard shortcuts

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