]> git.lizzy.rs Git - mt.git/commitdiff
Add String methods to some types using stringer and fix some minor defects
authoranon5 <anon5clam@protonmail.com>
Tue, 22 Jun 2021 16:30:50 +0000 (16:30 +0000)
committeranon5 <anon5clam@protonmail.com>
Tue, 22 Jun 2021 16:30:50 +0000 (16:30 +0000)
47 files changed:
aligntype_string.go [new file with mode: 0644]
alphause_string.go [new file with mode: 0644]
animtype_string.go [new file with mode: 0644]
ao.go
aocmds_cmdno.go
auth.go
authmethods_string.go [new file with mode: 0644]
chatmsgtype_string.go [new file with mode: 0644]
cmd.go
cmd.sh
cmdno.sh
dir.go
dir_string.go [new file with mode: 0644]
drawtype_string.go [new file with mode: 0644]
hotbarparam_string.go [new file with mode: 0644]
hudfield_string.go [new file with mode: 0644]
hudtype_string.go [new file with mode: 0644]
interaction_string.go [new file with mode: 0644]
itemdef.go
itemtype_string.go [new file with mode: 0644]
light.go
lightbank_string.go [new file with mode: 0644]
liquidtype_string.go [new file with mode: 0644]
minimap.go
minimaptype_string.go [new file with mode: 0644]
mkpktinfos.sh
mkserialize.sh
modchansig_string.go [new file with mode: 0644]
nodebox.go
nodeboxtype_string.go [new file with mode: 0644]
nodedef.go
param1type_string.go [new file with mode: 0644]
param2type_string.go [new file with mode: 0644]
pktinfos.go
playerlistupdatetype_string.go [new file with mode: 0644]
serialize.fmt
serialize.go
sound.go
soundsrctype_string.go [new file with mode: 0644]
tileanim.go
tiledef.go
tileflags_string.go [new file with mode: 0644]
tocltcmds.go
tocltcmds_cmdno.go
tosrvcmds.go
tosrvcmds_cmdno.go
wavetype_string.go [new file with mode: 0644]

diff --git a/aligntype_string.go b/aligntype_string.go
new file mode 100644 (file)
index 0000000..6771a9b
--- /dev/null
@@ -0,0 +1,25 @@
+// Code generated by "stringer -type AlignType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NoAlign-0]
+       _ = x[WorldAlign-1]
+       _ = x[UserAlign-2]
+}
+
+const _AlignType_name = "NoAlignWorldAlignUserAlign"
+
+var _AlignType_index = [...]uint8{0, 7, 17, 26}
+
+func (i AlignType) String() string {
+       if i >= AlignType(len(_AlignType_index)-1) {
+               return "AlignType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _AlignType_name[_AlignType_index[i]:_AlignType_index[i+1]]
+}
diff --git a/alphause_string.go b/alphause_string.go
new file mode 100644 (file)
index 0000000..6e5959b
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by "stringer -type AlphaUse"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[Blend-0]
+       _ = x[Mask-1]
+       _ = x[Opaque-2]
+       _ = x[Legacy-3]
+}
+
+const _AlphaUse_name = "BlendMaskOpaqueLegacy"
+
+var _AlphaUse_index = [...]uint8{0, 5, 9, 15, 21}
+
+func (i AlphaUse) String() string {
+       if i >= AlphaUse(len(_AlphaUse_index)-1) {
+               return "AlphaUse(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _AlphaUse_name[_AlphaUse_index[i]:_AlphaUse_index[i+1]]
+}
diff --git a/animtype_string.go b/animtype_string.go
new file mode 100644 (file)
index 0000000..3c78525
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by "stringer -linecomment -type AnimType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NoAnim-0]
+       _ = x[VerticalFrameAnim-1]
+       _ = x[SpriteSheetAnim-2]
+       _ = x[maxAnim-3]
+}
+
+const _AnimType_name = "nonevertical framesprite sheetmaxAnim"
+
+var _AnimType_index = [...]uint8{0, 4, 18, 30, 37}
+
+func (i AnimType) String() string {
+       if i >= AnimType(len(_AnimType_index)-1) {
+               return "AnimType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _AnimType_name[_AnimType_index[i]:_AnimType_index[i+1]]
+}
diff --git a/ao.go b/ao.go
index 40b9983e30c7397372eb0bbddc11991737cc10bb..436cb62af498c7b0bae6103bd058d854e05bb357 100644 (file)
--- a/ao.go
+++ b/ao.go
@@ -43,7 +43,7 @@ type AOProps struct {
        Visual           string
        VisualSize       [3]float32
        Textures         []Texture
-       SpritesheetSize  [2]int16 // in sprites.
+       SpriteSheetSize  [2]int16 // in sprites.
        SpritePos        [2]int16 // in sprite sheet.
        Visible          bool
        MakeFootstepSnds bool
@@ -167,12 +167,12 @@ type AOCmdAnimSpeed struct {
        Speed float32
 }
 
-//go:generate ./cmdno.sh aocmds AOCmd ao uint8 AOMsg newAOMsg
-
 type AOMsg interface {
        aoCmdNo() uint8
 }
 
+//go:generate ./cmdno.sh aocmds AOCmd ao uint8 AOMsg newAOMsg
+
 func writeAOMsg(w io.Writer, msg AOMsg) error {
        if _, err := w.Write([]byte{msg.aoCmdNo()}); err != nil {
                return err
index 6d051b5fd3d4ede7efe9809f494c7786c2a7ccc4..e41d5334618133e0bad3d0b65196d851bf24676b 100644 (file)
@@ -1,4 +1,4 @@
-// Code generated by cmdno.sh. DO NOT EDIT.
+// Code generated by cmdno.sh; DO NOT EDIT.
 
 package mt
 
diff --git a/auth.go b/auth.go
index 5c2df1498021ec81f1693effabf5ec76e108e52e..cb7df1f77c30074201d7b62e70e49943c495a41a 100644 (file)
--- a/auth.go
+++ b/auth.go
@@ -7,3 +7,5 @@ const (
        SRP
        FirstSRP
 )
+
+//go:generate stringer -type AuthMethods
diff --git a/authmethods_string.go b/authmethods_string.go
new file mode 100644 (file)
index 0000000..a235e62
--- /dev/null
@@ -0,0 +1,35 @@
+// Code generated by "stringer -type AuthMethods"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[LegacyPasswd-1]
+       _ = x[SRP-2]
+       _ = x[FirstSRP-4]
+}
+
+const (
+       _AuthMethods_name_0 = "LegacyPasswdSRP"
+       _AuthMethods_name_1 = "FirstSRP"
+)
+
+var (
+       _AuthMethods_index_0 = [...]uint8{0, 12, 15}
+)
+
+func (i AuthMethods) String() string {
+       switch {
+       case 1 <= i && i <= 2:
+               i -= 1
+               return _AuthMethods_name_0[_AuthMethods_index_0[i]:_AuthMethods_index_0[i+1]]
+       case i == 4:
+               return _AuthMethods_name_1
+       default:
+               return "AuthMethods(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+}
diff --git a/chatmsgtype_string.go b/chatmsgtype_string.go
new file mode 100644 (file)
index 0000000..cc21329
--- /dev/null
@@ -0,0 +1,27 @@
+// Code generated by "stringer -linecomment -type ChatMsgType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[RawMsg-0]
+       _ = x[NormalMsg-1]
+       _ = x[AnnounceMsg-2]
+       _ = x[SysMsg-3]
+       _ = x[maxMsg-4]
+}
+
+const _ChatMsgType_name = "rawnormalannouncesysmaxMsg"
+
+var _ChatMsgType_index = [...]uint8{0, 3, 9, 17, 20, 26}
+
+func (i ChatMsgType) String() string {
+       if i >= ChatMsgType(len(_ChatMsgType_index)-1) {
+               return "ChatMsgType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _ChatMsgType_name[_ChatMsgType_index[i]:_ChatMsgType_index[i+1]]
+}
diff --git a/cmd.go b/cmd.go
index db6b91273aa92d658a027bd68fcf1c9d4022f36e..19c250e21df02f38f48029bcb2021cfa70ef974f 100644 (file)
--- a/cmd.go
+++ b/cmd.go
@@ -1,4 +1,4 @@
-// Code generated by cmd.sh. DO NOT EDIT.
+// Code generated by cmd.sh; DO NOT EDIT.
 
 package mt
 
diff --git a/cmd.sh b/cmd.sh
index ed887f3541e11e7c6f060cfe54b7412f1fb277ff..71a541fe3e71812b400b57054b6ed55eca346705 100755 (executable)
--- a/cmd.sh
+++ b/cmd.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 (
-       echo // Code generated by cmd.sh. DO NOT EDIT.
+       echo '// Code generated by cmd.sh; DO NOT EDIT.'
        echo
        echo package mt
        echo
index 186df7b2b5679f6c2a8d89cdb5ad9d01bbdf464f..e9e16d069a797e63b97e7a9a70826a8473d1d850 100755 (executable)
--- a/cmdno.sh
+++ b/cmdno.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 (
-       echo // Code generated by cmdno.sh. DO NOT EDIT.
+       echo '// Code generated by cmdno.sh; DO NOT EDIT.'
        echo
        echo package mt
        echo
diff --git a/dir.go b/dir.go
index 693db987b2e1be65e46a2406184309c51076260e..e7bb47a5086ab6b19f46c8eaed5fae0fdb87ae02 100644 (file)
--- a/dir.go
+++ b/dir.go
@@ -13,6 +13,8 @@ const (
        NoDir
 )
 
+//go:generate stringer -type Dir
+
 // Opposite returns the Dir's opposite.
 // NoDir is its own opposite.
 func (d Dir) Opposite() Dir {
diff --git a/dir_string.go b/dir_string.go
new file mode 100644 (file)
index 0000000..cd48e1b
--- /dev/null
@@ -0,0 +1,29 @@
+// Code generated by "stringer -type Dir"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[East-0]
+       _ = x[Above-1]
+       _ = x[North-2]
+       _ = x[South-3]
+       _ = x[Below-4]
+       _ = x[West-5]
+       _ = x[NoDir-6]
+}
+
+const _Dir_name = "EastAboveNorthSouthBelowWestNoDir"
+
+var _Dir_index = [...]uint8{0, 4, 9, 14, 19, 24, 28, 33}
+
+func (i Dir) String() string {
+       if i >= Dir(len(_Dir_index)-1) {
+               return "Dir(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _Dir_name[_Dir_index[i]:_Dir_index[i+1]]
+}
diff --git a/drawtype_string.go b/drawtype_string.go
new file mode 100644 (file)
index 0000000..4bc1593
--- /dev/null
@@ -0,0 +1,40 @@
+// Code generated by "stringer -trimprefix Draw -type DrawType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[DrawCube-0]
+       _ = x[DrawNothing-1]
+       _ = x[DrawLiquid-2]
+       _ = x[DrawFlowing-3]
+       _ = x[DrawLikeGlass-4]
+       _ = x[DrawAllFaces-5]
+       _ = x[DrawAllFacesOpt-6]
+       _ = x[DrawTorch-7]
+       _ = x[DrawSign-8]
+       _ = x[DrawPlant-9]
+       _ = x[DrawFence-10]
+       _ = x[DrawRail-11]
+       _ = x[DrawNodeBox-12]
+       _ = x[DrawGlassFrame-13]
+       _ = x[DrawFire-14]
+       _ = x[DrawGlassFrameOpt-15]
+       _ = x[DrawMesh-16]
+       _ = x[DrawRootedPlant-17]
+}
+
+const _DrawType_name = "CubeNothingLiquidFlowingLikeGlassAllFacesAllFacesOptTorchSignPlantFenceRailNodeBoxGlassFrameFireGlassFrameOptMeshRootedPlant"
+
+var _DrawType_index = [...]uint8{0, 4, 11, 17, 24, 33, 41, 52, 57, 61, 66, 71, 75, 82, 92, 96, 109, 113, 124}
+
+func (i DrawType) String() string {
+       if i >= DrawType(len(_DrawType_index)-1) {
+               return "DrawType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _DrawType_name[_DrawType_index[i]:_DrawType_index[i+1]]
+}
diff --git a/hotbarparam_string.go b/hotbarparam_string.go
new file mode 100644 (file)
index 0000000..e8552b6
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by "stringer -trimprefix Hotbar -type HotbarParam"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[HotbarSize-1]
+       _ = x[HotbarImg-2]
+       _ = x[HotbarSelImg-3]
+}
+
+const _HotbarParam_name = "SizeImgSelImg"
+
+var _HotbarParam_index = [...]uint8{0, 4, 7, 13}
+
+func (i HotbarParam) String() string {
+       i -= 1
+       if i >= HotbarParam(len(_HotbarParam_index)-1) {
+               return "HotbarParam(" + strconv.FormatInt(int64(i+1), 10) + ")"
+       }
+       return _HotbarParam_name[_HotbarParam_index[i]:_HotbarParam_index[i+1]]
+}
diff --git a/hudfield_string.go b/hudfield_string.go
new file mode 100644 (file)
index 0000000..4190d19
--- /dev/null
@@ -0,0 +1,36 @@
+// Code generated by "stringer -trimprefix HUD -type HUDField"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[HUDPos-0]
+       _ = x[HUDName-1]
+       _ = x[HUDScale-2]
+       _ = x[HUDText-3]
+       _ = x[HUDNumber-4]
+       _ = x[HUDItem-5]
+       _ = x[HUDDir-6]
+       _ = x[HUDAlign-7]
+       _ = x[HUDOffset-8]
+       _ = x[HUDWorldPos-9]
+       _ = x[HUDSize-10]
+       _ = x[HUDZIndex-11]
+       _ = x[HUDText2-12]
+       _ = x[hudMax-13]
+}
+
+const _HUDField_name = "PosNameScaleTextNumberItemDirAlignOffsetWorldPosSizeZIndexText2hudMax"
+
+var _HUDField_index = [...]uint8{0, 3, 7, 12, 16, 22, 26, 29, 34, 40, 48, 52, 58, 63, 69}
+
+func (i HUDField) String() string {
+       if i >= HUDField(len(_HUDField_index)-1) {
+               return "HUDField(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _HUDField_name[_HUDField_index[i]:_HUDField_index[i+1]]
+}
diff --git a/hudtype_string.go b/hudtype_string.go
new file mode 100644 (file)
index 0000000..e0c1b2b
--- /dev/null
@@ -0,0 +1,28 @@
+// Code generated by "stringer -type HUDType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[ImgHUD-0]
+       _ = x[TextHUD-1]
+       _ = x[StatbarHUD-2]
+       _ = x[InvHUD-3]
+       _ = x[WaypointHUD-4]
+       _ = x[ImgWaypointHUD-5]
+}
+
+const _HUDType_name = "ImgHUDTextHUDStatbarHUDInvHUDWaypointHUDImgWaypointHUD"
+
+var _HUDType_index = [...]uint8{0, 6, 13, 23, 29, 40, 54}
+
+func (i HUDType) String() string {
+       if i >= HUDType(len(_HUDType_index)-1) {
+               return "HUDType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _HUDType_name[_HUDType_index[i]:_HUDType_index[i+1]]
+}
diff --git a/interaction_string.go b/interaction_string.go
new file mode 100644 (file)
index 0000000..5bd4103
--- /dev/null
@@ -0,0 +1,28 @@
+// Code generated by "stringer -type Interaction"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[Dig-0]
+       _ = x[StopDigging-1]
+       _ = x[Dug-2]
+       _ = x[Place-3]
+       _ = x[Use-4]
+       _ = x[Activate-5]
+}
+
+const _Interaction_name = "DigStopDiggingDugPlaceUseActivate"
+
+var _Interaction_index = [...]uint8{0, 3, 14, 17, 22, 25, 33}
+
+func (i Interaction) String() string {
+       if i >= Interaction(len(_Interaction_index)-1) {
+               return "Interaction(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _Interaction_name[_Interaction_index[i]:_Interaction_index[i+1]]
+}
index a761b659e7dcf6c7bd3bca5492a9319e9b635333..12651fa73b395a52659cb862554fc4c461b21be8 100644 (file)
@@ -11,6 +11,8 @@ const (
        ToolItem
 )
 
+//go:generate stringer -type ItemType
+
 // An ItemDef defines the properties of an item.
 type ItemDef struct {
        //mt:lenhdr 16
diff --git a/itemtype_string.go b/itemtype_string.go
new file mode 100644 (file)
index 0000000..ccae2f6
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by "stringer -type ItemType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NodeItem-1]
+       _ = x[CraftItem-2]
+       _ = x[ToolItem-3]
+}
+
+const _ItemType_name = "NodeItemCraftItemToolItem"
+
+var _ItemType_index = [...]uint8{0, 8, 17, 25}
+
+func (i ItemType) String() string {
+       i -= 1
+       if i >= ItemType(len(_ItemType_index)-1) {
+               return "ItemType(" + strconv.FormatInt(int64(i+1), 10) + ")"
+       }
+       return _ItemType_name[_ItemType_index[i]:_ItemType_index[i+1]]
+}
index b086591e8e32233f78c1ca12797db214fef33b16..30d2a5833351268cb436695f9694719e3b8412f1 100644 (file)
--- a/light.go
+++ b/light.go
@@ -11,3 +11,5 @@ const (
        Day LightBank = iota
        Night
 )
+
+//go:generate stringer -type LightBank
diff --git a/lightbank_string.go b/lightbank_string.go
new file mode 100644 (file)
index 0000000..ef37758
--- /dev/null
@@ -0,0 +1,24 @@
+// Code generated by "stringer -type LightBank"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[Day-0]
+       _ = x[Night-1]
+}
+
+const _LightBank_name = "DayNight"
+
+var _LightBank_index = [...]uint8{0, 3, 8}
+
+func (i LightBank) String() string {
+       if i >= LightBank(len(_LightBank_index)-1) {
+               return "LightBank(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _LightBank_name[_LightBank_index[i]:_LightBank_index[i+1]]
+}
diff --git a/liquidtype_string.go b/liquidtype_string.go
new file mode 100644 (file)
index 0000000..3fb9eee
--- /dev/null
@@ -0,0 +1,25 @@
+// Code generated by "stringer -type LiquidType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NotALiquid-0]
+       _ = x[FlowingLiquid-1]
+       _ = x[LiquidSrc-2]
+}
+
+const _LiquidType_name = "NotALiquidFlowingLiquidLiquidSrc"
+
+var _LiquidType_index = [...]uint8{0, 10, 23, 32}
+
+func (i LiquidType) String() string {
+       if i >= LiquidType(len(_LiquidType_index)-1) {
+               return "LiquidType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _LiquidType_name[_LiquidType_index[i]:_LiquidType_index[i+1]]
+}
index f0817f738fffb2f85099176e5883b1ef82681d1d..221a16ba31c4f76de025c4ea67772575a5ccc6e0 100644 (file)
@@ -3,12 +3,14 @@ package mt
 type MinimapType uint16
 
 const (
-       NoMinimap MinimapType = iota
-       SurfaceMinimap
-       RadarMinimap
-       TextureMinimap
+       NoMinimap MinimapType = iota // none
+       SurfaceMinimap               // surface
+       RadarMinimap                 // radar
+       TextureMinimap               // texture
 )
 
+//go:generate stringer -linecomment -type MinimapType
+
 type MinimapMode struct {
        Type  MinimapType
        Label string
diff --git a/minimaptype_string.go b/minimaptype_string.go
new file mode 100644 (file)
index 0000000..3dfc0d8
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by "stringer -linecomment -type MinimapType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NoMinimap-0]
+       _ = x[SurfaceMinimap-1]
+       _ = x[RadarMinimap-2]
+       _ = x[TextureMinimap-3]
+}
+
+const _MinimapType_name = "nonesurfaceradartexture"
+
+var _MinimapType_index = [...]uint8{0, 4, 11, 16, 23}
+
+func (i MinimapType) String() string {
+       if i >= MinimapType(len(_MinimapType_index)-1) {
+               return "MinimapType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _MinimapType_name[_MinimapType_index[i]:_MinimapType_index[i+1]]
+}
index 3d5d5e7b6f832194ad8eedac70f9f432f56a5d94..f913495f3329af9728870d5479fabfab97f05b74 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 (
-       echo // Code generated by mkpktinfos.sh. DO NOT EDIT.
+       echo '// Code generated by mkpktinfos.sh; DO NOT EDIT.'
        echo
        echo package mt
        echo
index c758a85b24fa214608f47352df62a2047ac507a0..f5f03501b61744c0eec71e264221f748cdbb1786 100755 (executable)
@@ -3,7 +3,7 @@
 rm -f serialize.go
 
 (
-       echo // Code generated by mkserialize.sh. DO NOT EDIT.
+       echo '// Code generated by mkserialize.sh; DO NOT EDIT.'
        echo
        internal/mkserialize/mkserialize | goimports
 ) >>serialize.go.tmp &&
diff --git a/modchansig_string.go b/modchansig_string.go
new file mode 100644 (file)
index 0000000..b422d6c
--- /dev/null
@@ -0,0 +1,28 @@
+// Code generated by "stringer -type ModChanSig"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[JoinOK-0]
+       _ = x[JoinFail-1]
+       _ = x[LeaveOK-2]
+       _ = x[LeaveFail-3]
+       _ = x[NotRegistered-4]
+       _ = x[SetState-5]
+}
+
+const _ModChanSig_name = "JoinOKJoinFailLeaveOKLeaveFailNotRegisteredSetState"
+
+var _ModChanSig_index = [...]uint8{0, 6, 14, 21, 30, 43, 51}
+
+func (i ModChanSig) String() string {
+       if i >= ModChanSig(len(_ModChanSig_index)-1) {
+               return "ModChanSig(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _ModChanSig_name[_ModChanSig_index[i]:_ModChanSig_index[i+1]]
+}
index 46d704c85bed53e506a4e14f5b98df19728a15fe..166961ef6086b87616e025e9650e883d70365cc0 100644 (file)
@@ -5,14 +5,16 @@ type Box [2]Vec
 type NodeBoxType uint8
 
 const (
-       CubeBox NodeBoxType = iota
-       FixedBox
-       MountedBox
-       LeveledBox
-       ConnectedBox
+       CubeBox NodeBoxType = iota // Cube
+       FixedBox                   // Fixed
+       MountedBox                 // Mounted
+       LeveledBox                 // Leveled
+       ConnectedBox               // Connected
        maxBox
 )
 
+//go:generate stringer -linecomment -type NodeBoxType
+
 type DirBoxes struct {
        Top, Bot                 []Box
        Front, Left, Back, Right []Box
diff --git a/nodeboxtype_string.go b/nodeboxtype_string.go
new file mode 100644 (file)
index 0000000..4f2c337
--- /dev/null
@@ -0,0 +1,28 @@
+// Code generated by "stringer -linecomment -type NodeBoxType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[CubeBox-0]
+       _ = x[FixedBox-1]
+       _ = x[MountedBox-2]
+       _ = x[LeveledBox-3]
+       _ = x[ConnectedBox-4]
+       _ = x[maxBox-5]
+}
+
+const _NodeBoxType_name = "CubeFixedMountedLeveledConnectedmaxBox"
+
+var _NodeBoxType_index = [...]uint8{0, 4, 9, 16, 23, 32, 38}
+
+func (i NodeBoxType) String() string {
+       if i >= NodeBoxType(len(_NodeBoxType_index)-1) {
+               return "NodeBoxType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _NodeBoxType_name[_NodeBoxType_index[i]:_NodeBoxType_index[i+1]]
+}
index 5606452935eea78057396ed3c0013719d0f0abb8..91b82351a13fffbc7341011127a8b87eff84a395 100644 (file)
@@ -9,6 +9,8 @@ const (
        P1Light
 )
 
+//go:generate stringer -trimprefix P1 -type Param1Type
+
 type Param2Type uint8
 
 const (
@@ -26,6 +28,8 @@ const (
        P2GlassLikeLevel
 )
 
+//go:generate stringer -trimprefix P2 -type Param2Type
+
 // A DrawType specifies how a node is drawn.
 type DrawType uint8
 
@@ -50,6 +54,8 @@ const (
        DrawRootedPlant
 )
 
+//go:generate stringer -trimprefix Draw -type DrawType
+
 type WaveType uint8
 
 const (
@@ -59,6 +65,8 @@ const (
        LiquidWaving          // Wave up and down.
 )
 
+//go:generate stringer -type WaveType
+
 type LiquidType uint8
 
 const (
@@ -67,6 +75,8 @@ const (
        LiquidSrc
 )
 
+//go:generate stringer -type LiquidType
+
 // AlphaUse specifies how the alpha channel of a texture is used.
 type AlphaUse uint8
 
@@ -77,6 +87,8 @@ const (
        Legacy
 )
 
+//go:generate stringer -type AlphaUse
+
 type NodeDef struct {
        Param0 Content
 
diff --git a/param1type_string.go b/param1type_string.go
new file mode 100644 (file)
index 0000000..66e79d5
--- /dev/null
@@ -0,0 +1,24 @@
+// Code generated by "stringer -trimprefix P1 -type Param1Type"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[P1Nothing-0]
+       _ = x[P1Light-1]
+}
+
+const _Param1Type_name = "NothingLight"
+
+var _Param1Type_index = [...]uint8{0, 7, 12}
+
+func (i Param1Type) String() string {
+       if i >= Param1Type(len(_Param1Type_index)-1) {
+               return "Param1Type(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _Param1Type_name[_Param1Type_index[i]:_Param1Type_index[i+1]]
+}
diff --git a/param2type_string.go b/param2type_string.go
new file mode 100644 (file)
index 0000000..d3f1428
--- /dev/null
@@ -0,0 +1,34 @@
+// Code generated by "stringer -trimprefix P2 -type Param2Type"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[P2Nibble-0]
+       _ = x[P2Byte-1]
+       _ = x[P2Flowing-2]
+       _ = x[P2FaceDir-3]
+       _ = x[P2Mounted-4]
+       _ = x[P2Leveled-5]
+       _ = x[P2Rotation-6]
+       _ = x[P2Mesh-7]
+       _ = x[P2Color-8]
+       _ = x[P2ColorFaceDir-9]
+       _ = x[P2ColorMounted-10]
+       _ = x[P2GlassLikeLevel-11]
+}
+
+const _Param2Type_name = "NibbleByteFlowingFaceDirMountedLeveledRotationMeshColorColorFaceDirColorMountedGlassLikeLevel"
+
+var _Param2Type_index = [...]uint8{0, 6, 10, 17, 24, 31, 38, 46, 50, 55, 67, 79, 93}
+
+func (i Param2Type) String() string {
+       if i >= Param2Type(len(_Param2Type_index)-1) {
+               return "Param2Type(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _Param2Type_name[_Param2Type_index[i]:_Param2Type_index[i+1]]
+}
index 4b725da6e0c74a2e1469b6570404da305c596b45..47b7783f6d840e7fab34160c9a763c38e2bde0ab 100644 (file)
@@ -1,4 +1,4 @@
-// Code generated by mkpktinfos.sh. DO NOT EDIT.
+// Code generated by mkpktinfos.sh; DO NOT EDIT.
 
 package mt
 
diff --git a/playerlistupdatetype_string.go b/playerlistupdatetype_string.go
new file mode 100644 (file)
index 0000000..d8fd486
--- /dev/null
@@ -0,0 +1,25 @@
+// Code generated by "stringer -linecomment -type PlayerListUpdateType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[InitPlayers-0]
+       _ = x[AddPlayers-1]
+       _ = x[RemovePlayers-2]
+}
+
+const _PlayerListUpdateType_name = "initaddremove"
+
+var _PlayerListUpdateType_index = [...]uint8{0, 4, 7, 13}
+
+func (i PlayerListUpdateType) String() string {
+       if i >= PlayerListUpdateType(len(_PlayerListUpdateType_index)-1) {
+               return "PlayerListUpdateType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _PlayerListUpdateType_name[_PlayerListUpdateType_index[i]:_PlayerListUpdateType_index[i+1]]
+}
index c157001988588834ea2ccaa5abc41fc3e5cc6a61..991c22b87d3cddaf9512a7d5bd0291838f9aeb12 100644 (file)
@@ -128,7 +128,7 @@ map[[3]int16]*NodeMeta      {
 
 PointedThing   chk(writePointedThing(w, x))
 
-[]AOMsg        { // For AOInitData.Msgs
+[]AOMsg        { // For AOInitData.Msgs.
                if len(x) > math.MaxUint8 {
                        chk(ErrTooLong)
                }
@@ -145,7 +145,7 @@ PointedThing        chk(writePointedThing(w, x))
                }
        }
 
-[]NodeDef      { // For ToCltNodeDefs.Defs
+[]NodeDef      { // For ToCltNodeDefs.Defs.
                if len(x) > math.MaxUint16 {
                        chk(ErrTooLong)
                }
index 892e9f34510afb156a9047959e164af6a25618c8..6f27a984ab002c63b66cbb3e03f996705c9a2777 100644 (file)
@@ -1,4 +1,4 @@
-// Code generated by mkserialize.sh. DO NOT EDIT.
+// Code generated by mkserialize.sh; DO NOT EDIT.
 
 package mt
 
@@ -3651,7 +3651,7 @@ func (obj *ToCltNodeDefs) serialize(w io.Writer) {
                                        // See (de)serialize.fmt.
                                        Defs []NodeDef
                                }))(obj)).Defs
-                               { // For ToCltNodeDefs.Defs
+                               { // For ToCltNodeDefs.Defs.
                                        if len(x) > math.MaxUint16 {
                                                chk(ErrTooLong)
                                        }
@@ -24566,7 +24566,7 @@ func (obj *AOInitData) serialize(w io.Writer) {
                        // See (de)serialize.fmt.
                        Msgs []AOMsg
                }))(obj)).Msgs
-               { // For AOInitData.Msgs
+               { // For AOInitData.Msgs.
                        if len(x) > math.MaxUint8 {
                                chk(ErrTooLong)
                        }
@@ -27223,7 +27223,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
                ((*(*(struct {
                        Type AnimType
 
-                       //mt:if %s.Type == SpritesheetAnim
+                       //mt:if %s.Type == SpriteSheetAnim
                        AspectRatio [2]uint8
 
                        //mt:if %s.Type == VerticalFrameAnim
@@ -27242,7 +27242,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
        if !((*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27257,7 +27257,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
        if (*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27266,12 +27266,12 @@ func (obj *TileAnim) serialize(w io.Writer) {
                //mt:if %s.Type != NoAnim
                Duration float32 // in seconds
 
-       }))(obj)).Type == SpritesheetAnim {
+       }))(obj)).Type == SpriteSheetAnim {
                {
                        _, err := w.Write(((*(*(struct {
                                Type AnimType
 
-                               //mt:if %s.Type == SpritesheetAnim
+                               //mt:if %s.Type == SpriteSheetAnim
                                AspectRatio [2]uint8
 
                                //mt:if %s.Type == VerticalFrameAnim
@@ -27287,7 +27287,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
        if (*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27300,7 +27300,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
                for local319 := range (*(*(struct {
                        Type AnimType
 
-                       //mt:if %s.Type == SpritesheetAnim
+                       //mt:if %s.Type == SpriteSheetAnim
                        AspectRatio [2]uint8
 
                        //mt:if %s.Type == VerticalFrameAnim
@@ -27314,7 +27314,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
                                x := ((*(*(struct {
                                        Type AnimType
 
-                                       //mt:if %s.Type == SpritesheetAnim
+                                       //mt:if %s.Type == SpriteSheetAnim
                                        AspectRatio [2]uint8
 
                                        //mt:if %s.Type == VerticalFrameAnim
@@ -27331,7 +27331,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
        if (*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27345,7 +27345,7 @@ func (obj *TileAnim) serialize(w io.Writer) {
                        x := (*(*(struct {
                                Type AnimType
 
-                               //mt:if %s.Type == SpritesheetAnim
+                               //mt:if %s.Type == SpriteSheetAnim
                                AspectRatio [2]uint8
 
                                //mt:if %s.Type == VerticalFrameAnim
@@ -27365,7 +27365,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
                ((*(*(struct {
                        Type AnimType
 
-                       //mt:if %s.Type == SpritesheetAnim
+                       //mt:if %s.Type == SpriteSheetAnim
                        AspectRatio [2]uint8
 
                        //mt:if %s.Type == VerticalFrameAnim
@@ -27384,7 +27384,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
        if !((*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27399,7 +27399,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
        if (*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27408,12 +27408,12 @@ func (obj *TileAnim) deserialize(r io.Reader) {
                //mt:if %s.Type != NoAnim
                Duration float32 // in seconds
 
-       }))(obj)).Type == SpritesheetAnim {
+       }))(obj)).Type == SpriteSheetAnim {
                {
                        _, err := io.ReadFull(r, ((*(*(struct {
                                Type AnimType
 
-                               //mt:if %s.Type == SpritesheetAnim
+                               //mt:if %s.Type == SpriteSheetAnim
                                AspectRatio [2]uint8
 
                                //mt:if %s.Type == VerticalFrameAnim
@@ -27429,7 +27429,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
        if (*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27442,7 +27442,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
                for local320 := range (*(*(struct {
                        Type AnimType
 
-                       //mt:if %s.Type == SpritesheetAnim
+                       //mt:if %s.Type == SpriteSheetAnim
                        AspectRatio [2]uint8
 
                        //mt:if %s.Type == VerticalFrameAnim
@@ -27456,7 +27456,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
                                p := &((*(*(struct {
                                        Type AnimType
 
-                                       //mt:if %s.Type == SpritesheetAnim
+                                       //mt:if %s.Type == SpriteSheetAnim
                                        AspectRatio [2]uint8
 
                                        //mt:if %s.Type == VerticalFrameAnim
@@ -27473,7 +27473,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
        if (*(*(struct {
                Type AnimType
 
-               //mt:if %s.Type == SpritesheetAnim
+               //mt:if %s.Type == SpriteSheetAnim
                AspectRatio [2]uint8
 
                //mt:if %s.Type == VerticalFrameAnim
@@ -27487,7 +27487,7 @@ func (obj *TileAnim) deserialize(r io.Reader) {
                        p := &(*(*(struct {
                                Type AnimType
 
-                               //mt:if %s.Type == SpritesheetAnim
+                               //mt:if %s.Type == SpriteSheetAnim
                                AspectRatio [2]uint8
 
                                //mt:if %s.Type == VerticalFrameAnim
@@ -27675,7 +27675,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -27714,7 +27714,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -27757,7 +27757,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -27796,7 +27796,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -27839,7 +27839,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -27882,7 +27882,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -27924,7 +27924,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -27963,7 +27963,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28002,7 +28002,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28040,7 +28040,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28077,7 +28077,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -28116,7 +28116,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28155,7 +28155,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28193,7 +28193,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28230,7 +28230,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -28273,7 +28273,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28299,7 +28299,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Shaded           bool
                ShowOnMinimap    bool
                NametagBG        color.NRGBA
-       }))(obj)).SpritesheetSize {
+       }))(obj)).SpriteSheetSize {
                {
                        x := ((*(*(struct {
                                MaxHP            uint16 // Player only.
@@ -28310,7 +28310,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -28336,7 +28336,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                                Shaded           bool
                                ShowOnMinimap    bool
                                NametagBG        color.NRGBA
-                       }))(obj)).SpritesheetSize)[local326]
+                       }))(obj)).SpriteSheetSize)[local326]
                        write16(w, uint16(x))
                }
        }
@@ -28349,7 +28349,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28386,7 +28386,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -28426,7 +28426,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28469,7 +28469,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28512,7 +28512,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28550,7 +28550,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28589,7 +28589,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28628,7 +28628,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28666,7 +28666,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28705,7 +28705,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28743,7 +28743,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -28780,7 +28780,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -28820,7 +28820,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28863,7 +28863,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28902,7 +28902,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28945,7 +28945,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -28984,7 +28984,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29026,7 +29026,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -29065,7 +29065,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29104,7 +29104,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29143,7 +29143,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29182,7 +29182,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29220,7 +29220,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -29259,7 +29259,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29298,7 +29298,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29336,7 +29336,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -29375,7 +29375,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29414,7 +29414,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29453,7 +29453,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29492,7 +29492,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29531,7 +29531,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29570,7 +29570,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29609,7 +29609,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29652,7 +29652,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29695,7 +29695,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29738,7 +29738,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29781,7 +29781,7 @@ func (obj *AOProps) serialize(w io.Writer) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29833,7 +29833,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29872,7 +29872,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29918,7 +29918,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -29957,7 +29957,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30000,7 +30000,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30043,7 +30043,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30099,7 +30099,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30135,7 +30135,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30172,7 +30172,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -30216,7 +30216,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30252,7 +30252,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30289,7 +30289,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -30332,7 +30332,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30358,7 +30358,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Shaded           bool
                ShowOnMinimap    bool
                NametagBG        color.NRGBA
-       }))(obj)).SpritesheetSize {
+       }))(obj)).SpriteSheetSize {
                {
                        p := &((*(*(struct {
                                MaxHP            uint16 // Player only.
@@ -30369,7 +30369,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -30395,7 +30395,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                                Shaded           bool
                                ShowOnMinimap    bool
                                NametagBG        color.NRGBA
-                       }))(obj)).SpritesheetSize)[local335]
+                       }))(obj)).SpriteSheetSize)[local335]
                        *p = int16(read16(r))
                }
        }
@@ -30408,7 +30408,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30445,7 +30445,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -30485,7 +30485,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30531,7 +30531,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30577,7 +30577,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30626,7 +30626,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30667,7 +30667,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30703,7 +30703,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -30740,7 +30740,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                                Visual           string
                                VisualSize       [3]float32
                                Textures         []Texture
-                               SpritesheetSize  [2]int16 // in sprites.
+                               SpriteSheetSize  [2]int16 // in sprites.
                                SpritePos        [2]int16 // in sprite sheet.
                                Visible          bool
                                MakeFootstepSnds bool
@@ -30780,7 +30780,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30826,7 +30826,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30865,7 +30865,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30911,7 +30911,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -30950,7 +30950,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31006,7 +31006,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -31043,7 +31043,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31082,7 +31082,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31131,7 +31131,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -31178,7 +31178,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                Visual           string
                VisualSize       [3]float32
                Textures         []Texture
-               SpritesheetSize  [2]int16 // in sprites.
+               SpriteSheetSize  [2]int16 // in sprites.
                SpritePos        [2]int16 // in sprite sheet.
                Visible          bool
                MakeFootstepSnds bool
@@ -31215,7 +31215,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31254,7 +31254,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31293,7 +31293,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31332,7 +31332,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31371,7 +31371,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31417,7 +31417,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31460,7 +31460,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31506,7 +31506,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
@@ -31552,7 +31552,7 @@ func (obj *AOProps) deserialize(r io.Reader) {
                        Visual           string
                        VisualSize       [3]float32
                        Textures         []Texture
-                       SpritesheetSize  [2]int16 // in sprites.
+                       SpriteSheetSize  [2]int16 // in sprites.
                        SpritePos        [2]int16 // in sprite sheet.
                        Visible          bool
                        MakeFootstepSnds bool
index 953677cc168ec9d52d3252571e83b448def46d59..c6629680c286275973f079df174a0a83cd77f9a0 100644 (file)
--- a/sound.go
+++ b/sound.go
@@ -5,11 +5,13 @@ type SoundID int32
 type SoundSrcType uint8
 
 const (
-       NoSrc SoundSrcType = iota
-       PosSrc
-       AOSrc
+       NoSrc SoundSrcType = iota // nowhere
+       PosSrc                    // pos
+       AOSrc                     // ao
 )
 
+//go:generate stringer -linecomment -type SoundSrcType
+
 type SoundDef struct {
        Name              string
        Gain, Pitch, Fade float32
diff --git a/soundsrctype_string.go b/soundsrctype_string.go
new file mode 100644 (file)
index 0000000..ccf307d
--- /dev/null
@@ -0,0 +1,25 @@
+// Code generated by "stringer -linecomment -type SoundSrcType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NoSrc-0]
+       _ = x[PosSrc-1]
+       _ = x[AOSrc-2]
+}
+
+const _SoundSrcType_name = "nowhereposao"
+
+var _SoundSrcType_index = [...]uint8{0, 7, 10, 12}
+
+func (i SoundSrcType) String() string {
+       if i >= SoundSrcType(len(_SoundSrcType_index)-1) {
+               return "SoundSrcType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _SoundSrcType_name[_SoundSrcType_index[i]:_SoundSrcType_index[i+1]]
+}
index bc6d6ddb02e5292b471684ab1efcf71231fff9de..8d664df8b1124ea975af44c9b90ad0396a4d0ecd 100644 (file)
@@ -3,17 +3,19 @@ package mt
 type AnimType uint8
 
 const (
-       NoAnim AnimType = iota
-       VerticalFrameAnim
-       SpritesheetAnim
+       NoAnim AnimType = iota // none
+       VerticalFrameAnim      // vertical frame
+       SpriteSheetAnim        // sprite sheet
        maxAnim
 )
 
+//go:generate stringer -linecomment -type AnimType
+
 type TileAnim struct {
        Type AnimType
        //mt:assert %s.Type < maxAnim
 
-       //mt:if %s.Type == SpritesheetAnim
+       //mt:if %s.Type == SpriteSheetAnim
        AspectRatio [2]uint8
        //mt:end
 
index 9a5714df3222ef977345cd18dfc1c56bda305f34..da6ab3963f1b849f291cc1999e52a795b4a04714 100644 (file)
@@ -8,6 +8,8 @@ const (
        UserAlign
 )
 
+//go:generate stringer -type AlignType
+
 type TileFlags uint16
 
 const (
@@ -19,6 +21,8 @@ const (
        TileAlign
 )
 
+//go:generate stringer -type TileFlags
+
 type TileDef struct {
        //mt:const uint8(6)
 
diff --git a/tileflags_string.go b/tileflags_string.go
new file mode 100644 (file)
index 0000000..f442303
--- /dev/null
@@ -0,0 +1,47 @@
+// Code generated by "stringer -type TileFlags"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[TileBackfaceCull-1]
+       _ = x[TileAbleH-2]
+       _ = x[TileAbleV-4]
+       _ = x[TileColor-8]
+       _ = x[TileScale-16]
+       _ = x[TileAlign-32]
+}
+
+const (
+       _TileFlags_name_0 = "TileBackfaceCullTileAbleH"
+       _TileFlags_name_1 = "TileAbleV"
+       _TileFlags_name_2 = "TileColor"
+       _TileFlags_name_3 = "TileScale"
+       _TileFlags_name_4 = "TileAlign"
+)
+
+var (
+       _TileFlags_index_0 = [...]uint8{0, 16, 25}
+)
+
+func (i TileFlags) String() string {
+       switch {
+       case 1 <= i && i <= 2:
+               i -= 1
+               return _TileFlags_name_0[_TileFlags_index_0[i]:_TileFlags_index_0[i+1]]
+       case i == 4:
+               return _TileFlags_name_1
+       case i == 8:
+               return _TileFlags_name_2
+       case i == 16:
+               return _TileFlags_name_3
+       case i == 32:
+               return _TileFlags_name_4
+       default:
+               return "TileFlags(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+}
index 6af4f09b4c4003f0581299c9b51cc7153f82e391..5fbe18b8044d8c2106ec0101a0a004807c5a25c1 100644 (file)
@@ -1,5 +1,3 @@
-//go:generate ./cmdno.sh tocltcmds ToClt toClt uint16 Cmd newToCltCmd
-
 package mt
 
 import (
@@ -15,6 +13,8 @@ type ToCltCmd interface {
        toCltCmdNo() uint16
 }
 
+//go:generate ./cmdno.sh tocltcmds ToClt toClt uint16 Cmd newToCltCmd
+
 // ToCltHello is sent as a response to ToSrvInit.
 // The client responds to ToCltHello by authenticating.
 type ToCltHello struct {
@@ -196,25 +196,14 @@ type ToCltChatMsg struct {
 type ChatMsgType uint8
 
 const (
-       RawMsg ChatMsgType = iota
-       NormalMsg
-       AnnounceMsg
-       SysMsg
+       RawMsg ChatMsgType = iota // raw
+       NormalMsg                 // normal
+       AnnounceMsg               // announce
+       SysMsg                    // sys
        maxMsg
 )
 
-func (t ChatMsgType) String() string {
-       if t >= maxMsg {
-               return fmt.Sprintf("ChatMsgType(%d)", t)
-       }
-
-       return [...]string{
-               "raw",
-               "normal",
-               "announce",
-               "sys",
-       }[t]
-}
+//go:generate stringer -linecomment -type ChatMsgType
 
 // ToCltAORmAdd tells the client that AOs have been removed from and/or added to
 // the AOs that it can see.
@@ -454,6 +443,8 @@ const (
        ImgWaypointHUD
 )
 
+//go:generate stringer -type HUDType
+
 // ToCltRmHUD tells the client to remove a HUD.
 type ToCltRmHUD struct {
        ID HUDID
@@ -539,6 +530,8 @@ const (
        hudMax
 )
 
+//go:generate stringer -trimprefix HUD -type HUDField
+
 // ToCltHUDFlags tells the client to update its HUD flags.
 type ToCltHUDFlags struct {
        // &^= Mask
@@ -580,6 +573,8 @@ const (
        HotbarSelImg
 )
 
+//go:generate stringer -trimprefix Hotbar -type HotbarParam
+
 // ToCltBreath tells the client how much breath it has.
 type ToCltBreath struct {
        Breath uint16
@@ -655,11 +650,13 @@ type ToCltUpdatePlayerList struct {
 type PlayerListUpdateType uint8
 
 const (
-       InitPlayers PlayerListUpdateType = iota
-       AddPlayers
-       RemovePlayers
+       InitPlayers PlayerListUpdateType = iota // init
+       AddPlayers                              // add
+       RemovePlayers                           // remove
 )
 
+//go:generate stringer -linecomment -type PlayerListUpdateType
+
 // ToCltModChanMsg tells the client it has been sent a message on a mod channel.
 type ToCltModChanMsg struct {
        Channel string
@@ -684,6 +681,8 @@ const (
        SetState
 )
 
+//go:generate stringer -type ModChanSig
+
 // ToCltModChanMsg is sent when node metadata near the client changes.
 type ToCltNodeMetasChanged struct {
        //mt:lenhdr 32
index 899971762e9436f3482f06634b9503f2f0fc4d1e..0dbe4e402babb7d442e2343e3cfdd25605030e5e 100644 (file)
@@ -1,4 +1,4 @@
-// Code generated by cmdno.sh. DO NOT EDIT.
+// Code generated by cmdno.sh; DO NOT EDIT.
 
 package mt
 
index 4f606009dee9898df89684a88022d437451ada33..491520480a9d3de7144c33932653fe0ca3274675 100644 (file)
@@ -1,5 +1,3 @@
-//go:generate ./cmdno.sh tosrvcmds ToSrv toSrv uint16 Cmd newToSrvCmd
-
 package mt
 
 type ToSrvCmd interface {
@@ -7,6 +5,8 @@ type ToSrvCmd interface {
        toSrvCmdNo() uint16
 }
 
+//go:generate ./cmdno.sh tosrvcmds ToSrv toSrv uint16 Cmd newToSrvCmd
+
 // ToSrvNil is the first packet sent in a connection.
 type ToSrvNil struct{}
 
@@ -109,6 +109,8 @@ const (
        Activate // Right click air.
 )
 
+//go:generate stringer -type Interaction
+
 // ToSrvRemovedSounds tells the server that the client has finished playing
 // the sounds with the given IDs.
 type ToSrvRemovedSounds struct {
index 04e65303f1a1b505c174bb7cc99911e6476bdbc0..6da3e818fa217dba6fdb38ff1e58fc1a6a993184 100644 (file)
@@ -1,4 +1,4 @@
-// Code generated by cmdno.sh. DO NOT EDIT.
+// Code generated by cmdno.sh; DO NOT EDIT.
 
 package mt
 
diff --git a/wavetype_string.go b/wavetype_string.go
new file mode 100644 (file)
index 0000000..5b4604c
--- /dev/null
@@ -0,0 +1,26 @@
+// Code generated by "stringer -type WaveType"; DO NOT EDIT.
+
+package mt
+
+import "strconv"
+
+func _() {
+       // An "invalid array index" compiler error signifies that the constant values have changed.
+       // Re-run the stringer command to generate them again.
+       var x [1]struct{}
+       _ = x[NotWaving-0]
+       _ = x[PlantWaving-1]
+       _ = x[LeafWaving-2]
+       _ = x[LiquidWaving-3]
+}
+
+const _WaveType_name = "NotWavingPlantWavingLeafWavingLiquidWaving"
+
+var _WaveType_index = [...]uint8{0, 9, 20, 30, 42}
+
+func (i WaveType) String() string {
+       if i >= WaveType(len(_WaveType_index)-1) {
+               return "WaveType(" + strconv.FormatInt(int64(i), 10) + ")"
+       }
+       return _WaveType_name[_WaveType_index[i]:_WaveType_index[i+1]]
+}