diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-08 15:20:09 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-06-08 15:20:09 +0200 |
commit | f173e4c5755d35fcbdb549d735a939dd342e6e47 (patch) | |
tree | f9c40439b0294c901f9c68628f8dd9b96c4b5b94 | |
parent | 2164bf233091312e04ae3631ed7d042d968f8a2e (diff) |
update to new NodeDef format
-rw-r--r-- | nodedef.go | 4 | ||||
-rw-r--r-- | param2type_string.go | 5 | ||||
-rw-r--r-- | serialize.go | 653 |
3 files changed, 660 insertions, 2 deletions
@@ -26,6 +26,7 @@ const ( P2ColorFaceDir P2ColorMounted P2GlassLikeLevel + P2ColorRotation ) //go:generate stringer -trimprefix P2 -type Param2Type @@ -156,6 +157,9 @@ type NodeDef struct { AlphaUse + MoveResistance uint8 + LiquidMovePhysics bool + //mt:end } diff --git a/param2type_string.go b/param2type_string.go index d3f1428..6c26621 100644 --- a/param2type_string.go +++ b/param2type_string.go @@ -20,11 +20,12 @@ func _() { _ = x[P2ColorFaceDir-9] _ = x[P2ColorMounted-10] _ = x[P2GlassLikeLevel-11] + _ = x[P2ColorRotation-12] } -const _Param2Type_name = "NibbleByteFlowingFaceDirMountedLeveledRotationMeshColorColorFaceDirColorMountedGlassLikeLevel" +const _Param2Type_name = "NibbleByteFlowingFaceDirMountedLeveledRotationMeshColorColorFaceDirColorMountedGlassLikeLevelColorRotation" -var _Param2Type_index = [...]uint8{0, 6, 10, 17, 24, 31, 38, 46, 50, 55, 67, 79, 93} +var _Param2Type_index = [...]uint8{0, 6, 10, 17, 24, 31, 38, 46, 50, 55, 67, 79, 93, 106} func (i Param2Type) String() string { if i >= Param2Type(len(_Param2Type_index)-1) { diff --git a/serialize.go b/serialize.go index e377271..8411be1 100644 --- a/serialize.go +++ b/serialize.go @@ -13887,6 +13887,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Param0).serialize(w) }); err != nil { if err == io.EOF { @@ -13966,6 +13969,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Name))) > math.MaxUint16 { chk(ErrTooLong) } @@ -14032,6 +14038,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Name)))) write16(w, uint16(x)) } @@ -14098,6 +14107,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Name))[:]) chk(err) } @@ -14163,6 +14175,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups)) > math.MaxUint16 { chk(ErrTooLong) } @@ -14229,6 +14244,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups))) write16(w, uint16(x)) } @@ -14294,6 +14312,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups { if err := pcall(func() { (((*(*(struct { @@ -14358,6 +14379,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups)[local243]).serialize(w) }); err != nil { if err == io.EOF { @@ -14429,6 +14453,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).P1Type).serialize(w) }); err != nil { if err == io.EOF { @@ -14499,6 +14526,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).P2Type).serialize(w) }); err != nil { if err == io.EOF { @@ -14569,6 +14599,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DrawType).serialize(w) }); err != nil { if err == io.EOF { @@ -14638,6 +14671,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Mesh))) > math.MaxUint16 { chk(ErrTooLong) } @@ -14704,6 +14740,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Mesh)))) write16(w, uint16(x)) } @@ -14770,6 +14809,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Mesh))[:]) chk(err) } @@ -14836,6 +14878,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Scale write32(w, math.Float32bits(x)) } @@ -14908,6 +14953,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Tiles { if err := pcall(func() { (((*(*(struct { @@ -14972,6 +15020,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Tiles)[local245]).serialize(w) }); err != nil { if err == io.EOF { @@ -15042,6 +15093,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).OverlayTiles { if err := pcall(func() { (((*(*(struct { @@ -15106,6 +15160,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).OverlayTiles)[local246]).serialize(w) }); err != nil { if err == io.EOF { @@ -15183,6 +15240,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SpecialTiles { if err := pcall(func() { (((*(*(struct { @@ -15247,6 +15307,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SpecialTiles)[local248]).serialize(w) }); err != nil { if err == io.EOF { @@ -15318,6 +15381,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Color w.Write([]byte{x.A, x.R, x.G, x.B}) } @@ -15384,6 +15450,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Palette).serialize(w) }); err != nil { if err == io.EOF { @@ -15454,6 +15523,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Waving).serialize(w) }); err != nil { if err == io.EOF { @@ -15524,6 +15596,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectSides write8(w, uint8(x)) } @@ -15589,6 +15664,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo)) > math.MaxUint16 { chk(ErrTooLong) } @@ -15655,6 +15733,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo))) write16(w, uint16(x)) } @@ -15720,6 +15801,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo { if err := pcall(func() { (((*(*(struct { @@ -15784,6 +15868,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo)[local249]).serialize(w) }); err != nil { if err == io.EOF { @@ -15855,6 +15942,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).InsideTint w.Write([]byte{x.A, x.R, x.G, x.B}) } @@ -15921,6 +16011,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Level write8(w, uint8(x)) } @@ -15987,6 +16080,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Translucent if x { write8(w, 1) @@ -16057,6 +16153,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Transparent if x { write8(w, 1) @@ -16127,6 +16226,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LightSrc write8(w, uint8(x)) } @@ -16193,6 +16295,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).GndContent if x { write8(w, 1) @@ -16263,6 +16368,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Collides if x { write8(w, 1) @@ -16333,6 +16441,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Pointable if x { write8(w, 1) @@ -16403,6 +16514,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Diggable if x { write8(w, 1) @@ -16473,6 +16587,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Climbable if x { write8(w, 1) @@ -16543,6 +16660,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Replaceable if x { write8(w, 1) @@ -16613,6 +16733,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).OnRightClick if x { write8(w, 1) @@ -16683,6 +16806,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DmgPerSec write32(w, uint32(x)) } @@ -16749,6 +16875,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LiquidType).serialize(w) }); err != nil { if err == io.EOF { @@ -16818,6 +16947,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FlowingAlt))) > math.MaxUint16 { chk(ErrTooLong) } @@ -16884,6 +17016,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FlowingAlt)))) write16(w, uint16(x)) } @@ -16950,6 +17085,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FlowingAlt))[:]) chk(err) } @@ -17015,6 +17153,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SrcAlt))) > math.MaxUint16 { chk(ErrTooLong) } @@ -17081,6 +17222,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SrcAlt)))) write16(w, uint16(x)) } @@ -17147,6 +17291,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SrcAlt))[:]) chk(err) } @@ -17213,6 +17360,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Viscosity write8(w, uint8(x)) } @@ -17279,6 +17429,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LiqRenewable if x { write8(w, 1) @@ -17349,6 +17502,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FlowRange write8(w, uint8(x)) } @@ -17415,6 +17571,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DrownDmg write8(w, uint8(x)) } @@ -17481,6 +17640,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Floodable if x { write8(w, 1) @@ -17551,6 +17713,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DrawBox).serialize(w) }); err != nil { if err == io.EOF { @@ -17621,6 +17786,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ColBox).serialize(w) }); err != nil { if err == io.EOF { @@ -17691,6 +17859,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SelBox).serialize(w) }); err != nil { if err == io.EOF { @@ -17761,6 +17932,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FootstepSnd).serialize(w) }); err != nil { if err == io.EOF { @@ -17831,6 +18005,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DiggingSnd).serialize(w) }); err != nil { if err == io.EOF { @@ -17901,6 +18078,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DugSnd).serialize(w) }); err != nil { if err == io.EOF { @@ -17971,6 +18151,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LegacyFaceDir if x { write8(w, 1) @@ -18041,6 +18224,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LegacyMounted if x { write8(w, 1) @@ -18110,6 +18296,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DigPredict))) > math.MaxUint16 { chk(ErrTooLong) } @@ -18176,6 +18365,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DigPredict)))) write16(w, uint16(x)) } @@ -18242,6 +18434,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DigPredict))[:]) chk(err) } @@ -18308,6 +18503,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).MaxLvl write8(w, uint8(x)) } @@ -18374,6 +18572,9 @@ func (obj *NodeDef) serialize(w io.Writer) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).AlphaUse).serialize(w) }); err != nil { if err == io.EOF { @@ -18382,6 +18583,148 @@ func (obj *NodeDef) serialize(w io.Writer) { chk(fmt.Errorf("%s: %w", "github.com/HimbeerserverDE/mt.AlphaUse", err)) } { + x := (*(*(struct { + Param0 Content + + Name string + Groups []Group + + P1Type Param1Type + P2Type Param2Type + DrawType DrawType + + Mesh string + Scale float32 + //mt:const uint8(6) + Tiles [6]TileDef + OverlayTiles [6]TileDef + //mt:const uint8(6) + SpecialTiles [6]TileDef + + Color color.NRGBA + Palette Texture + + Waving WaveType + ConnectSides uint8 + ConnectTo []Content + InsideTint color.NRGBA + Level uint8 // Must be < 128. + + Translucent bool // Sunlight is scattered and becomes normal light. + Transparent bool // Sunlight isn't scattered. + LightSrc uint8 + + GndContent bool + Collides bool + Pointable bool + Diggable bool + Climbable bool + Replaceable bool + OnRightClick bool + + DmgPerSec int32 + + LiquidType LiquidType + FlowingAlt string + SrcAlt string + Viscosity uint8 // 0-7 + LiqRenewable bool + FlowRange uint8 + DrownDmg uint8 + Floodable bool + + DrawBox, ColBox, SelBox NodeBox + + FootstepSnd, DiggingSnd, DugSnd SoundDef + + LegacyFaceDir bool + LegacyMounted bool + + DigPredict string + + MaxLvl uint8 + + AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool + }))(obj)).MoveResistance + write8(w, uint8(x)) + } + { + x := (*(*(struct { + Param0 Content + + Name string + Groups []Group + + P1Type Param1Type + P2Type Param2Type + DrawType DrawType + + Mesh string + Scale float32 + //mt:const uint8(6) + Tiles [6]TileDef + OverlayTiles [6]TileDef + //mt:const uint8(6) + SpecialTiles [6]TileDef + + Color color.NRGBA + Palette Texture + + Waving WaveType + ConnectSides uint8 + ConnectTo []Content + InsideTint color.NRGBA + Level uint8 // Must be < 128. + + Translucent bool // Sunlight is scattered and becomes normal light. + Transparent bool // Sunlight isn't scattered. + LightSrc uint8 + + GndContent bool + Collides bool + Pointable bool + Diggable bool + Climbable bool + Replaceable bool + OnRightClick bool + + DmgPerSec int32 + + LiquidType LiquidType + FlowingAlt string + SrcAlt string + Viscosity uint8 // 0-7 + LiqRenewable bool + FlowRange uint8 + DrownDmg uint8 + Floodable bool + + DrawBox, ColBox, SelBox NodeBox + + FootstepSnd, DiggingSnd, DugSnd SoundDef + + LegacyFaceDir bool + LegacyMounted bool + + DigPredict string + + MaxLvl uint8 + + AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool + }))(obj)).LiquidMovePhysics + if x { + write8(w, 1) + } else { + write8(w, 0) + } + } + { buf := w w := ow if len((buf.Bytes())) > math.MaxUint16 { @@ -18463,6 +18806,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Param0).deserialize(r) }); err != nil { if err == io.EOF { @@ -18561,6 +18907,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Name) = string(local252) var local254 uint16 { @@ -18629,6 +18978,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups) = make([]Group, local254) for local255 := range (*(*(struct { Param0 Content @@ -18692,6 +19044,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups { if err := pcall(func() { (((*(*(struct { @@ -18756,6 +19111,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Groups)[local255]).deserialize(r) }); err != nil { if err == io.EOF { @@ -18827,6 +19185,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).P1Type).deserialize(r) }); err != nil { if err == io.EOF { @@ -18897,6 +19258,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).P2Type).deserialize(r) }); err != nil { if err == io.EOF { @@ -18967,6 +19331,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DrawType).deserialize(r) }); err != nil { if err == io.EOF { @@ -19047,6 +19414,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Mesh) = string(local256) { p := &(*(*(struct { @@ -19111,6 +19481,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Scale *p = math.Float32frombits(read32(r)) } @@ -19187,6 +19560,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Tiles { if err := pcall(func() { (((*(*(struct { @@ -19251,6 +19627,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Tiles)[local260]).deserialize(r) }); err != nil { if err == io.EOF { @@ -19321,6 +19700,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).OverlayTiles { if err := pcall(func() { (((*(*(struct { @@ -19385,6 +19767,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).OverlayTiles)[local261]).deserialize(r) }); err != nil { if err == io.EOF { @@ -19466,6 +19851,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SpecialTiles { if err := pcall(func() { (((*(*(struct { @@ -19530,6 +19918,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SpecialTiles)[local264]).deserialize(r) }); err != nil { if err == io.EOF { @@ -19601,6 +19992,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Color *p = color.NRGBA{A: read8(r), R: read8(r), G: read8(r), B: read8(r)} } @@ -19667,6 +20061,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Palette).deserialize(r) }); err != nil { if err == io.EOF { @@ -19737,6 +20134,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Waving).deserialize(r) }); err != nil { if err == io.EOF { @@ -19807,6 +20207,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectSides *p = read8(r) } @@ -19877,6 +20280,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo) = make([]Content, local265) for local266 := range (*(*(struct { Param0 Content @@ -19940,6 +20346,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo { if err := pcall(func() { (((*(*(struct { @@ -20004,6 +20413,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ConnectTo)[local266]).deserialize(r) }); err != nil { if err == io.EOF { @@ -20075,6 +20487,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).InsideTint *p = color.NRGBA{A: read8(r), R: read8(r), G: read8(r), B: read8(r)} } @@ -20141,6 +20556,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Level *p = read8(r) } @@ -20207,6 +20625,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Translucent switch n := read8(r); n { case 0: @@ -20280,6 +20701,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Transparent switch n := read8(r); n { case 0: @@ -20353,6 +20777,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LightSrc *p = read8(r) } @@ -20419,6 +20846,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).GndContent switch n := read8(r); n { case 0: @@ -20492,6 +20922,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Collides switch n := read8(r); n { case 0: @@ -20565,6 +20998,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Pointable switch n := read8(r); n { case 0: @@ -20638,6 +21074,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Diggable switch n := read8(r); n { case 0: @@ -20711,6 +21150,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Climbable switch n := read8(r); n { case 0: @@ -20784,6 +21226,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Replaceable switch n := read8(r); n { case 0: @@ -20857,6 +21302,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).OnRightClick switch n := read8(r); n { case 0: @@ -20930,6 +21378,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DmgPerSec *p = int32(read32(r)) } @@ -20996,6 +21447,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LiquidType).deserialize(r) }); err != nil { if err == io.EOF { @@ -21076,6 +21530,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FlowingAlt) = string(local267) var local269 []uint8 var local270 uint16 @@ -21150,6 +21607,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SrcAlt) = string(local269) { p := &(*(*(struct { @@ -21214,6 +21674,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Viscosity *p = read8(r) } @@ -21280,6 +21743,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LiqRenewable switch n := read8(r); n { case 0: @@ -21353,6 +21819,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FlowRange *p = read8(r) } @@ -21419,6 +21888,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DrownDmg *p = read8(r) } @@ -21485,6 +21957,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).Floodable switch n := read8(r); n { case 0: @@ -21558,6 +22033,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DrawBox).deserialize(r) }); err != nil { if err == io.EOF { @@ -21628,6 +22106,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).ColBox).deserialize(r) }); err != nil { if err == io.EOF { @@ -21698,6 +22179,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).SelBox).deserialize(r) }); err != nil { if err == io.EOF { @@ -21768,6 +22252,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).FootstepSnd).deserialize(r) }); err != nil { if err == io.EOF { @@ -21838,6 +22325,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DiggingSnd).deserialize(r) }); err != nil { if err == io.EOF { @@ -21908,6 +22398,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DugSnd).deserialize(r) }); err != nil { if err == io.EOF { @@ -21978,6 +22471,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LegacyFaceDir switch n := read8(r); n { case 0: @@ -22051,6 +22547,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).LegacyMounted switch n := read8(r); n { case 0: @@ -22134,6 +22633,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).DigPredict) = string(local271) { p := &(*(*(struct { @@ -22198,6 +22700,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).MaxLvl *p = read8(r) } @@ -22264,6 +22769,9 @@ func (obj *NodeDef) deserialize(r io.Reader) { MaxLvl uint8 AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool }))(obj)).AlphaUse).deserialize(r) }); err != nil { if err == io.EOF { @@ -22271,6 +22779,151 @@ func (obj *NodeDef) deserialize(r io.Reader) { } chk(fmt.Errorf("%s: %w", "github.com/HimbeerserverDE/mt.AlphaUse", err)) } + { + p := &(*(*(struct { + Param0 Content + + Name string + Groups []Group + + P1Type Param1Type + P2Type Param2Type + DrawType DrawType + + Mesh string + Scale float32 + //mt:const uint8(6) + Tiles [6]TileDef + OverlayTiles [6]TileDef + //mt:const uint8(6) + SpecialTiles [6]TileDef + + Color color.NRGBA + Palette Texture + + Waving WaveType + ConnectSides uint8 + ConnectTo []Content + InsideTint color.NRGBA + Level uint8 // Must be < 128. + + Translucent bool // Sunlight is scattered and becomes normal light. + Transparent bool // Sunlight isn't scattered. + LightSrc uint8 + + GndContent bool + Collides bool + Pointable bool + Diggable bool + Climbable bool + Replaceable bool + OnRightClick bool + + DmgPerSec int32 + + LiquidType LiquidType + FlowingAlt string + SrcAlt string + Viscosity uint8 // 0-7 + LiqRenewable bool + FlowRange uint8 + DrownDmg uint8 + Floodable bool + + DrawBox, ColBox, SelBox NodeBox + + FootstepSnd, DiggingSnd, DugSnd SoundDef + + LegacyFaceDir bool + LegacyMounted bool + + DigPredict string + + MaxLvl uint8 + + AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool + }))(obj)).MoveResistance + *p = read8(r) + } + { + p := &(*(*(struct { + Param0 Content + + Name string + Groups []Group + + P1Type Param1Type + P2Type Param2Type + DrawType DrawType + + Mesh string + Scale float32 + //mt:const uint8(6) + Tiles [6]TileDef + OverlayTiles [6]TileDef + //mt:const uint8(6) + SpecialTiles [6]TileDef + + Color color.NRGBA + Palette Texture + + Waving WaveType + ConnectSides uint8 + ConnectTo []Content + InsideTint color.NRGBA + Level uint8 // Must be < 128. + + Translucent bool // Sunlight is scattered and becomes normal light. + Transparent bool // Sunlight isn't scattered. + LightSrc uint8 + + GndContent bool + Collides bool + Pointable bool + Diggable bool + Climbable bool + Replaceable bool + OnRightClick bool + + DmgPerSec int32 + + LiquidType LiquidType + FlowingAlt string + SrcAlt string + Viscosity uint8 // 0-7 + LiqRenewable bool + FlowRange uint8 + DrownDmg uint8 + Floodable bool + + DrawBox, ColBox, SelBox NodeBox + + FootstepSnd, DiggingSnd, DugSnd SoundDef + + LegacyFaceDir bool + LegacyMounted bool + + DigPredict string + + MaxLvl uint8 + + AlphaUse + + MoveResistance uint8 + LiquidMovePhysics bool + }))(obj)).LiquidMovePhysics + switch n := read8(r); n { + case 0: + *p = false + case 1: + *p = true + default: + chk(fmt.Errorf("invalid bool: %d", n)) + } + } if r.N > 0 { chk(fmt.Errorf("%d bytes of trailing data", r.N)) } |