blueprints

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(db *sql.DB, r io.Reader) error

func InsertActivityMaterialsStmt

func InsertActivityMaterialsStmt(tx *sql.Tx) (*sql.Stmt, error)

func InsertActivityProbabilitiesStmt

func InsertActivityProbabilitiesStmt(tx *sql.Tx) (*sql.Stmt, error)

func InsertActivityProductsStmt

func InsertActivityProductsStmt(tx *sql.Tx) (*sql.Stmt, error)

func InsertActivitySkillsStmt

func InsertActivitySkillsStmt(tx *sql.Tx) (*sql.Stmt, error)

func InsertIndustryActivitiesStmt

func InsertIndustryActivitiesStmt(tx *sql.Tx) (*sql.Stmt, error)

func InsertIndustryBlueprintsStmt

func InsertIndustryBlueprintsStmt(tx *sql.Tx) (*sql.Stmt, error)

Types

type Activities

type Activities struct {
	Copying          *Copying
	Invention        *Invention
	Manufacturing    *Manufacturing
	Reaction         *Reaction
	ResearchMaterial *ResearchMaterial `yaml:"research_material"`
	ResearchTime     *ResearchTime     `yaml:"research_time"`
}

type Activity

type Activity interface {
	GetTime() int64
	ActivityID() ActivityID
}

type ActivityID

type ActivityID int
const (
	ManufacturingID    ActivityID = 1
	ResearchTimeID     ActivityID = 3
	ResearchMaterialID ActivityID = 4
	CopyingID          ActivityID = 5
	InventionID        ActivityID = 8
	ReactionID         ActivityID = 11
)

type Blueprint

type Blueprint struct {
	Activities         Activities
	TypeID             int64 `yaml:"blueprintTypeID"`
	MaxProductionLimit int64 `yaml:"maxProductionLimit"`
}

type Copying

type Copying struct {
	Time int64
}

func (*Copying) ActivityID

func (c *Copying) ActivityID() ActivityID

func (*Copying) GetTime

func (c *Copying) GetTime() int64

type Invention

type Invention struct {
	Materials []Material
	Products  []Material
	Skills    []Skill
	Time      int64
}

func (*Invention) ActivityID

func (i *Invention) ActivityID() ActivityID

func (*Invention) GetMaterials

func (i *Invention) GetMaterials() []Material

func (*Invention) GetProducts

func (i *Invention) GetProducts() []Material

func (*Invention) GetSkills

func (i *Invention) GetSkills() []Skill

func (*Invention) GetTime

func (i *Invention) GetTime() int64

type Manufacturing

type Manufacturing struct {
	Materials []Material
	Products  []Material
	Skills    []Skill
	Time      int64
}

func (*Manufacturing) ActivityID

func (m *Manufacturing) ActivityID() ActivityID

func (*Manufacturing) GetMaterials

func (m *Manufacturing) GetMaterials() []Material

func (*Manufacturing) GetProducts

func (m *Manufacturing) GetProducts() []Material

func (*Manufacturing) GetSkills

func (m *Manufacturing) GetSkills() []Skill

func (*Manufacturing) GetTime

func (m *Manufacturing) GetTime() int64

type Material

type Material struct {
	Probability *float64
	Quantity    int64
	TypeID      int64 `yaml:"typeID"`
}

type ProductionActivity

type ProductionActivity interface {
	Activity
	GetMaterials() []Material
	GetProducts() []Material
	GetSkills() []Skill
}

type Reaction

type Reaction struct {
	Materials []Material
	Products  []Material
	Skills    []Skill
	Time      int64
}

func (*Reaction) ActivityID

func (r *Reaction) ActivityID() ActivityID

func (*Reaction) GetMaterials

func (r *Reaction) GetMaterials() []Material

func (*Reaction) GetProducts

func (r *Reaction) GetProducts() []Material

func (*Reaction) GetSkills

func (r *Reaction) GetSkills() []Skill

func (*Reaction) GetTime

func (r *Reaction) GetTime() int64

type ResearchMaterial

type ResearchMaterial struct {
	Time int64
}

func (*ResearchMaterial) ActivityID

func (r *ResearchMaterial) ActivityID() ActivityID

func (*ResearchMaterial) GetTime

func (r *ResearchMaterial) GetTime() int64

type ResearchTime

type ResearchTime struct {
	Time int64
}

func (*ResearchTime) ActivityID

func (r *ResearchTime) ActivityID() ActivityID

func (*ResearchTime) GetTime

func (r *ResearchTime) GetTime() int64

type Skill

type Skill struct {
	Level  int64
	TypeID int64 `yaml:"typeID"`
}

Jump to

Keyboard shortcuts

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