material

package
v0.0.0-...-7279c54 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2013 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comma

func Comma(v *big.Int) string

Ported to math/big.Int from github.com/dustin/go-humanize

func WrapSpawnFunc

func WrapSpawnFunc(f func(*Material, string) world.Visible) func(string) world.Visible

Types

type Door

type Door struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Door) Actions

func (d *Door) Actions(player world.PlayerLike) []string

func (*Door) Blocking

func (d *Door) Blocking() bool

func (*Door) Colors

func (d *Door) Colors() []string

func (*Door) Interact

func (d *Door) Interact(player world.PlayerLike, action string)

func (*Door) Name

func (d *Door) Name() string

func (*Door) Sprite

func (d *Door) Sprite() string

func (*Door) SpritePos

func (d *Door) SpritePos() (uint, uint)

func (*Door) SpriteSize

func (d *Door) SpriteSize() (uint, uint)

type Floor

type Floor struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Floor) AnimationType

func (f *Floor) AnimationType() string

func (*Floor) Blocking

func (f *Floor) Blocking() bool

func (*Floor) Colors

func (f *Floor) Colors() []string

func (*Floor) Examine

func (f *Floor) Examine() (string, [][][2]string)

func (*Floor) Load

func (f *Floor) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Floor) Name

func (f *Floor) Name() string

func (*Floor) Save

func (f *Floor) Save() (uint, interface{}, []world.ObjectLike)

func (*Floor) Sprite

func (f *Floor) Sprite() string

func (*Floor) SpritePos

func (f *Floor) SpritePos() (uint, uint)

func (*Floor) SpriteSize

func (f *Floor) SpriteSize() (uint, uint)

type Forge

type Forge struct {
	world.VisibleObject
}

func (*Forge) Actions

func (f *Forge) Actions(player world.PlayerLike) []string

func (*Forge) Blocking

func (f *Forge) Blocking() bool

func (*Forge) Colors

func (f *Forge) Colors() []string

func (*Forge) Command

func (f *Forge) Command(player world.PlayerLike, data map[string]interface{})

func (*Forge) Examine

func (f *Forge) Examine() (string, [][][2]string)

func (*Forge) ExtraBlock

func (f *Forge) ExtraBlock() [][2]int8

func (*Forge) Interact

func (f *Forge) Interact(player world.PlayerLike, action string)

func (*Forge) Name

func (f *Forge) Name() string

func (*Forge) Scale

func (f *Forge) Scale() uint

func (*Forge) Sprite

func (f *Forge) Sprite() string

func (*Forge) SpriteSize

func (f *Forge) SpriteSize() (uint, uint)

type GatherSchedule

type GatherSchedule struct {
	world.Object

	Tool    world.StatLike
	Target_ NodeLike
	Item    func(uint64) world.Visible
	// contains filtered or unexported fields
}

func (*GatherSchedule) Act

func (s *GatherSchedule) Act(obj world.Living) (uint, bool)

func (*GatherSchedule) ShouldSave

func (s *GatherSchedule) ShouldSave() bool

func (*GatherSchedule) Target

func (s *GatherSchedule) Target() world.ObjectLike

type Ingot

type Ingot struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Ingot) AdminOnly

func (i *Ingot) AdminOnly() bool

func (*Ingot) Colors

func (i *Ingot) Colors() []string

func (*Ingot) Examine

func (i *Ingot) Examine() (string, [][][2]string)

func (*Ingot) Load

func (i *Ingot) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Ingot) Name

func (i *Ingot) Name() string

func (*Ingot) Quality

func (i *Ingot) Quality() *big.Int

func (*Ingot) Save

func (i *Ingot) Save() (uint, interface{}, []world.ObjectLike)

func (*Ingot) Sprite

func (i *Ingot) Sprite() string

func (*Ingot) Volume

func (i *Ingot) Volume() uint64

func (*Ingot) Weight

func (i *Ingot) Weight() uint64

type IsWall

type IsWall interface {
	// contains filtered or unexported methods
}

type Logs

type Logs struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Logs) AdminOnly

func (l *Logs) AdminOnly() bool

func (*Logs) Colors

func (l *Logs) Colors() []string

func (*Logs) Examine

func (l *Logs) Examine() (string, [][][2]string)

func (*Logs) Load

func (l *Logs) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Logs) Material

func (l *Logs) Material() *Material

func (*Logs) Name

func (l *Logs) Name() string

func (*Logs) Save

func (l *Logs) Save() (uint, interface{}, []world.ObjectLike)

func (*Logs) Sprite

func (l *Logs) Sprite() string

func (*Logs) Volume

func (l *Logs) Volume() uint64

func (*Logs) Weight

func (l *Logs) Weight() uint64

type Material

type Material struct {
	world.Object
	// contains filtered or unexported fields
}

func (*Material) Copy

func (m *Material) Copy(volume uint64) *Material

func (*Material) CopyMetal

func (m *Material) CopyMetal(volume uint64) *Material

func (*Material) CopyStone

func (m *Material) CopyStone(volume uint64) *Material

func (*Material) CopyWood

func (m *Material) CopyWood(volume uint64) *Material

func (*Material) Get

func (m *Material) Get() (wood []WoodType, stone []StoneType, metal []MetalType)

func (*Material) Info

func (m *Material) Info() [][][2]string

func (*Material) LeafColor

func (m *Material) LeafColor() string

func (*Material) Load

func (m *Material) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Material) MetalColor

func (m *Material) MetalColor() string

func (*Material) Name

func (m *Material) Name() string

func (*Material) OreColor

func (m *Material) OreColor() string

func (*Material) Quality

func (m *Material) Quality() *big.Int

func (*Material) Save

func (m *Material) Save() (uint, interface{}, []world.ObjectLike)

func (*Material) Stat

func (m *Material) Stat(stat world.Stat) *big.Int

func (*Material) StoneColor

func (m *Material) StoneColor() string

func (*Material) Volume

func (m *Material) Volume() uint64

func (*Material) Weight

func (m *Material) Weight() uint64

func (*Material) WoodColor

func (m *Material) WoodColor() string

type MaterialData

type MaterialData struct {
	// contains filtered or unexported fields
}

func (*MaterialData) Color

func (m *MaterialData) Color() color.Color

func (*MaterialData) Density

func (m *MaterialData) Density() uint64

Density in centigrams per cubic centimeter.

func (*MaterialData) Durability

func (m *MaterialData) Durability() *big.Int

Durability increases the amount of wear an item can take before degrading.

func (*MaterialData) ExtraColor

func (m *MaterialData) ExtraColor() color.Color

func (*MaterialData) Name

func (m *MaterialData) Name() string

func (*MaterialData) Skin

func (m *MaterialData) Skin() uint8

func (*MaterialData) Stat

func (m *MaterialData) Stat(s world.Stat) *big.Int

type MetalType

type MetalType uint64

func (MetalType) Data

func (t MetalType) Data() *MaterialData

type Node

type Node struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Node) Blocking

func (n *Node) Blocking() bool

func (*Node) Examine

func (n *Node) Examine() (string, [][][2]string)

func (*Node) Gather

func (n *Node) Gather(i world.InventoryLike, maxToolScore *big.Int, item func(uint64) world.Visible) (bool, bool)

func (*Node) Load

func (n *Node) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Node) Quality

func (n *Node) Quality() *big.Int

func (*Node) Save

func (n *Node) Save() (uint, interface{}, []world.ObjectLike)

func (*Node) Size

func (n *Node) Size() uint64

type NodeLike

type NodeLike interface {
	world.Visible

	Gather(world.InventoryLike, *big.Int, func(uint64) world.Visible) (bool, bool)
	Quality() *big.Int
	Size() uint64
}

type Ore

type Ore struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Ore) AdminOnly

func (o *Ore) AdminOnly() bool

func (*Ore) Colors

func (o *Ore) Colors() []string

func (*Ore) Examine

func (o *Ore) Examine() (string, [][][2]string)

func (*Ore) Load

func (o *Ore) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Ore) Material

func (o *Ore) Material() *Material

func (*Ore) Name

func (o *Ore) Name() string

func (*Ore) Save

func (o *Ore) Save() (uint, interface{}, []world.ObjectLike)

func (*Ore) Sprite

func (o *Ore) Sprite() string

func (*Ore) Volume

func (o *Ore) Volume() uint64

func (*Ore) Weight

func (o *Ore) Weight() uint64

type Rock

type Rock struct {
	Node
	// contains filtered or unexported fields
}

func (*Rock) Actions

func (r *Rock) Actions(player world.PlayerLike) []string

func (*Rock) Colors

func (r *Rock) Colors() []string

func (*Rock) Examine

func (r *Rock) Examine() (string, [][][2]string)

func (*Rock) Interact

func (r *Rock) Interact(player world.PlayerLike, action string)

func (*Rock) Load

func (r *Rock) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Rock) Name

func (r *Rock) Name() string

func (*Rock) Quality

func (r *Rock) Quality() *big.Int

func (*Rock) Save

func (r *Rock) Save() (uint, interface{}, []world.ObjectLike)

func (*Rock) Sprite

func (r *Rock) Sprite() string

func (*Rock) SpriteSize

func (r *Rock) SpriteSize() (uint, uint)

type Stone

type Stone struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Stone) AdminOnly

func (s *Stone) AdminOnly() bool

func (*Stone) Colors

func (s *Stone) Colors() []string

func (*Stone) Examine

func (s *Stone) Examine() (string, [][][2]string)

func (*Stone) Load

func (s *Stone) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Stone) Material

func (s *Stone) Material() *Material

func (*Stone) Name

func (s *Stone) Name() string

func (*Stone) Save

func (s *Stone) Save() (uint, interface{}, []world.ObjectLike)

func (*Stone) Sprite

func (s *Stone) Sprite() string

func (*Stone) Volume

func (s *Stone) Volume() uint64

func (*Stone) Weight

func (s *Stone) Weight() uint64

type StoneType

type StoneType uint64

func (StoneType) Data

func (t StoneType) Data() *MaterialData

type Tree

type Tree struct {
	Node
	// contains filtered or unexported fields
}

func (*Tree) Actions

func (t *Tree) Actions(player world.PlayerLike) []string

func (*Tree) Colors

func (t *Tree) Colors() []string

func (*Tree) Examine

func (t *Tree) Examine() (string, [][][2]string)

func (*Tree) Interact

func (t *Tree) Interact(player world.PlayerLike, action string)

func (*Tree) Load

func (t *Tree) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Tree) Name

func (t *Tree) Name() string

func (*Tree) Quality

func (t *Tree) Quality() *big.Int

func (*Tree) Save

func (t *Tree) Save() (uint, interface{}, []world.ObjectLike)

func (*Tree) Sprite

func (t *Tree) Sprite() string

func (*Tree) SpriteSize

func (t *Tree) SpriteSize() (uint, uint)

type Wall

type Wall struct {
	world.VisibleObject
	// contains filtered or unexported fields
}

func (*Wall) Blocking

func (w *Wall) Blocking() bool

func (*Wall) Colors

func (w *Wall) Colors() []string

func (*Wall) Examine

func (w *Wall) Examine() (string, [][][2]string)

func (*Wall) Load

func (w *Wall) Load(version uint, data interface{}, attached []world.ObjectLike)

func (*Wall) Name

func (w *Wall) Name() string

func (*Wall) Save

func (w *Wall) Save() (uint, interface{}, []world.ObjectLike)

func (*Wall) Sprite

func (w *Wall) Sprite() string

func (*Wall) SpritePos

func (w *Wall) SpritePos() (uint, uint)

func (*Wall) SpriteSize

func (w *Wall) SpriteSize() (uint, uint)

type WoodType

type WoodType uint64

func (WoodType) Data

func (t WoodType) Data() *MaterialData

Jump to

Keyboard shortcuts

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