Add new block types and improve listing them
Now it prints them ordered and mostly suitable to be used in code (it only needs a couple replaces)
This commit is contained in:
parent
df6a2e84e1
commit
807470e289
2 changed files with 47 additions and 83 deletions
|
@ -19,8 +19,8 @@ namespace GamecraftModdingAPI.Blocks
|
||||||
NegativeQuarterPyramid,
|
NegativeQuarterPyramid,
|
||||||
NegativeTetrahedron,
|
NegativeTetrahedron,
|
||||||
RoundedNegativeQuarterPyramid,
|
RoundedNegativeQuarterPyramid,
|
||||||
RoundedNegativeTetrahedron, //10
|
RoundedNegativeTetrahedron,
|
||||||
PlateCube,
|
Plate,
|
||||||
PlateWedge,
|
PlateWedge,
|
||||||
PlateQuarterPyramid,
|
PlateQuarterPyramid,
|
||||||
PlateTetrahedron,
|
PlateTetrahedron,
|
||||||
|
@ -29,7 +29,7 @@ namespace GamecraftModdingAPI.Blocks
|
||||||
FrameS1,
|
FrameS1,
|
||||||
FrameS2,
|
FrameS2,
|
||||||
FrameS3,
|
FrameS3,
|
||||||
FrameS4, //20
|
FrameS4,
|
||||||
FrameS5,
|
FrameS5,
|
||||||
FrameWedge,
|
FrameWedge,
|
||||||
FrameWedgeS1,
|
FrameWedgeS1,
|
||||||
|
@ -39,7 +39,7 @@ namespace GamecraftModdingAPI.Blocks
|
||||||
SideS0S1,
|
SideS0S1,
|
||||||
SideS0S2,
|
SideS0S2,
|
||||||
SideS0S3,
|
SideS0S3,
|
||||||
SideS0S4, //30
|
SideS0S4,
|
||||||
SideS0S5,
|
SideS0S5,
|
||||||
SideS1S1,
|
SideS1S1,
|
||||||
SideS1S2,
|
SideS1S2,
|
||||||
|
@ -51,7 +51,7 @@ namespace GamecraftModdingAPI.Blocks
|
||||||
SideS2S3,
|
SideS2S3,
|
||||||
SideS2S4,
|
SideS2S4,
|
||||||
SideS2S5,
|
SideS2S5,
|
||||||
WindscreenS1, //42
|
WindscreenS1,
|
||||||
WindscreenS2,
|
WindscreenS2,
|
||||||
WindscreenS3,
|
WindscreenS3,
|
||||||
WindscreenS4,
|
WindscreenS4,
|
||||||
|
@ -59,94 +59,53 @@ namespace GamecraftModdingAPI.Blocks
|
||||||
CarWheelArch,
|
CarWheelArch,
|
||||||
CarArchSmallFlare,
|
CarArchSmallFlare,
|
||||||
CarArchFlare,
|
CarArchFlare,
|
||||||
CarArchExtrudedFlare, //50
|
CarArchExtrudedFlare,
|
||||||
Cube1X1,
|
Axle = 100,
|
||||||
Cube1X2,
|
|
||||||
Cube1X3,
|
|
||||||
Cube1X4,
|
|
||||||
Cube1X6,
|
|
||||||
Cube2X2,
|
|
||||||
Cube2X3,
|
|
||||||
Cube2X4,
|
|
||||||
Cube2X6,
|
|
||||||
Wedge1X1, //60
|
|
||||||
Wedge1X2,
|
|
||||||
Wedge1X3,
|
|
||||||
Wedge2X1,
|
|
||||||
Wedge2X2,
|
|
||||||
Wedge2X3,
|
|
||||||
RoundedWedge1X1,
|
|
||||||
RoundedWedge1X2,
|
|
||||||
RoundedWedge1X3,
|
|
||||||
RoundedWedge2X1,
|
|
||||||
RoundedWedge2X2, //70
|
|
||||||
RoundedWedge2X3,
|
|
||||||
Plate1X1,
|
|
||||||
Plate1X2,
|
|
||||||
Plate1X3,
|
|
||||||
Plate1X4,
|
|
||||||
Plate2X2,
|
|
||||||
Plate2X3,
|
|
||||||
Plate2X4,
|
|
||||||
Plate3X3,
|
|
||||||
Plate3X4, //80
|
|
||||||
Cube1X1S1,
|
|
||||||
Cube1X2S1,
|
|
||||||
Cube1X3S1,
|
|
||||||
Wedge1X1S1,
|
|
||||||
Wedge1X2S1,
|
|
||||||
Wedge1X3S1,
|
|
||||||
Wedge2X1S1,
|
|
||||||
Wedge2X2S1,
|
|
||||||
Wedge2X3S1,
|
|
||||||
Wedge3X1S1, //90
|
|
||||||
Wedge3X2S1,
|
|
||||||
Wedge3X3S1,
|
|
||||||
NegativeTetrahedron1X1S1,
|
|
||||||
NegativeTetrahedron1X2S1,
|
|
||||||
NegativeTetrahedron1X3S1,
|
|
||||||
NegativeTetrahedron2X1S1,
|
|
||||||
NegativeTetrahedron2X2S1,
|
|
||||||
NegativeTetrahedron2X3S1,
|
|
||||||
NegativeTetrahedron3X1S1,
|
|
||||||
Axle, //100
|
|
||||||
Hinge,
|
Hinge,
|
||||||
BallJoint,
|
BallJoint,
|
||||||
UniversalJoint,
|
UniversalJoint,
|
||||||
TelescopicJoint,
|
TelescopicJoint,
|
||||||
HingeSpring,
|
DampedHingeSpring,
|
||||||
AxleSpring,
|
DampedAxleSpring,
|
||||||
DampedSpring,
|
DampedSpring,
|
||||||
WheelRigNoSteering,
|
WheelRigNoSteering,
|
||||||
WheelRigWithSteering,
|
WheelRigWithSteering,
|
||||||
NegativeTetrahedron3X2S1, //110
|
PlateTriangle = 130,
|
||||||
NegativeTetrahedron3X3S1,
|
|
||||||
Tetrahedron1X1S1,
|
|
||||||
Tetrahedron1X2S1,
|
|
||||||
Tetrahedron1X3S1,
|
|
||||||
Tetrahedron2X1S1,
|
|
||||||
Tetrahedron2X2S1,
|
|
||||||
Tetrahedron2X3S1,
|
|
||||||
Tetrahedron3X1S1,
|
|
||||||
Tetrahedron3X2S1,
|
|
||||||
Tetrahedron3X3S1, //120
|
|
||||||
QuarterPyramid1X1S1,
|
|
||||||
QuarterPyramid1X2S1,
|
|
||||||
QuarterPyramid1X3S1,
|
|
||||||
QuarterPyramid2X1S1,
|
|
||||||
QuarterPyramid2X2S1,
|
|
||||||
QuarterPyramid2X3S1,
|
|
||||||
QuarterPyramid3X1S1,
|
|
||||||
QuarterPyramid3X2S1,
|
|
||||||
QuarterPyramid3X3S1,
|
|
||||||
PlateTriangle, //130
|
|
||||||
PlateCircle,
|
PlateCircle,
|
||||||
PlateQtrCircle,
|
PlateQuarterCircle,
|
||||||
PlateRWedge,
|
PlateRWedge,
|
||||||
PlateRTetrahedron,
|
PlateRTetrahedron,
|
||||||
DriverSeat = 150,
|
Cone,
|
||||||
|
ConeSegment,
|
||||||
|
DoubleSliced,
|
||||||
|
HalfDoubleSliced,
|
||||||
|
EighthPyramid,
|
||||||
|
Hemisphere,
|
||||||
|
WideCylinder,
|
||||||
|
WideCylinderBend,
|
||||||
|
WideCylinderT,
|
||||||
|
WideCylinderCross,
|
||||||
|
WideCylinderCorner,
|
||||||
|
NarrowCylinder,
|
||||||
|
NarrowCylinderBend,
|
||||||
|
NarrowCylinderT,
|
||||||
|
NarrowCylinderCross,
|
||||||
|
DriverSeat,
|
||||||
PassengerSeat,
|
PassengerSeat,
|
||||||
Engine,
|
Engine,
|
||||||
|
NarrowCylinderCorner,
|
||||||
|
PlateWideCylinder,
|
||||||
|
PlateNarrowCylinder,
|
||||||
|
PlateNegativeTetrahedron,
|
||||||
|
PlateNegativeQuarterPyramid,
|
||||||
|
PlateRoundedNegativeTetrahedron,
|
||||||
|
PlateRoundedNegativeQuarterPyramid,
|
||||||
|
HeadlampSquare,
|
||||||
|
HeadlampCircle,
|
||||||
|
HeadlampWedge,
|
||||||
|
WideCylinderDiagonal,
|
||||||
|
NarrowCylinderDiagonal,
|
||||||
|
HeadlampTetrahedron,
|
||||||
CarWheelWideProfile = 200,
|
CarWheelWideProfile = 200,
|
||||||
CarWheel,
|
CarWheel,
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
|
||||||
|
@ -148,10 +149,14 @@ namespace GamecraftModdingAPI.Blocks
|
||||||
foreach (var (id, action) in BlockChangeActions)
|
foreach (var (id, action) in BlockChangeActions)
|
||||||
action(dataDB.GetValue<CubeListData>(id));
|
action(dataDB.GetValue<CubeListData>(id));
|
||||||
|
|
||||||
/*foreach (var (key, value) in dataDB.GetValues<CubeListData>())
|
/*ushort lastKey = ushort.MaxValue;
|
||||||
|
foreach (var (key, value) in dataDB.GetValues<CubeListData>()
|
||||||
|
.OrderBy(kv=>ushort.Parse(kv.Key)))
|
||||||
{
|
{
|
||||||
var data = (CubeListData) value;
|
var data = (CubeListData) value;
|
||||||
Console.WriteLine($"ID: {key} - Name: {data.CubeNameKey}: {LocalizationService.Localize(data.CubeNameKey)}");
|
ushort currentKey = ushort.Parse(key);
|
||||||
|
Console.WriteLine($"{LocalizationService.Localize(data.CubeNameKey)}{(currentKey != lastKey + 1 ? $" = {key}" : "")},");
|
||||||
|
lastKey = currentKey;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
_canRegister = false;
|
_canRegister = false;
|
||||||
|
|
Loading…
Reference in a new issue