]> git.lizzy.rs Git - mt.git/blob - itemdef.go
Add WaitGroup to SerializePkt
[mt.git] / itemdef.go
1 package mt
2
3 import "image/color"
4
5 type ItemType uint8
6
7 const (
8         _ ItemType = iota
9         NodeItem
10         CraftItem
11         ToolItem
12 )
13
14 //go:generate stringer -type ItemType
15
16 // An ItemDef defines the properties of an item.
17 type ItemDef struct {
18         //mt:lenhdr 16
19
20         // Version.
21         //mt:const uint8(6)
22
23         Type ItemType
24
25         Name, Desc string
26
27         InvImg, WieldImg Texture
28         WieldScale       [3]float32
29
30         StackMax uint16
31
32         Usable          bool
33         CanPointLiquids bool
34
35         ToolCaps ToolCaps
36
37         Groups []Group
38
39         PlacePredict string
40
41         PlaceSnd, PlaceFailSnd SoundDef
42
43         PointRange float32
44
45         // Set index in Palette with "palette_index" item meta field,
46         // this overrides Color.
47         Palette Texture
48         Color   color.NRGBA
49
50         // Texture overlays.
51         InvOverlay, WieldOverlay Texture
52
53         ShortDesc string
54
55         PlaceParam2 uint8
56
57         //mt:end
58 }