Browse Source

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)
tags/v2.0.0
NorbiPeti 3 years ago
parent
commit
807470e289
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
2 changed files with 47 additions and 83 deletions
  1. +40
    -81
      GamecraftModdingAPI/Blocks/BlockIDs.cs
  2. +7
    -2
      GamecraftModdingAPI/Blocks/CustomBlock.cs

+ 40
- 81
GamecraftModdingAPI/Blocks/BlockIDs.cs View File

@@ -19,8 +19,8 @@ namespace GamecraftModdingAPI.Blocks
NegativeQuarterPyramid,
NegativeTetrahedron,
RoundedNegativeQuarterPyramid,
RoundedNegativeTetrahedron, //10
PlateCube,
RoundedNegativeTetrahedron,
Plate,
PlateWedge,
PlateQuarterPyramid,
PlateTetrahedron,
@@ -29,7 +29,7 @@ namespace GamecraftModdingAPI.Blocks
FrameS1,
FrameS2,
FrameS3,
FrameS4, //20
FrameS4,
FrameS5,
FrameWedge,
FrameWedgeS1,
@@ -39,7 +39,7 @@ namespace GamecraftModdingAPI.Blocks
SideS0S1,
SideS0S2,
SideS0S3,
SideS0S4, //30
SideS0S4,
SideS0S5,
SideS1S1,
SideS1S2,
@@ -51,7 +51,7 @@ namespace GamecraftModdingAPI.Blocks
SideS2S3,
SideS2S4,
SideS2S5,
WindscreenS1, //42
WindscreenS1,
WindscreenS2,
WindscreenS3,
WindscreenS4,
@@ -59,94 +59,53 @@ namespace GamecraftModdingAPI.Blocks
CarWheelArch,
CarArchSmallFlare,
CarArchFlare,
CarArchExtrudedFlare, //50
Cube1X1,
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
CarArchExtrudedFlare,
Axle = 100,
Hinge,
BallJoint,
UniversalJoint,
TelescopicJoint,
HingeSpring,
AxleSpring,
DampedHingeSpring,
DampedAxleSpring,
DampedSpring,
WheelRigNoSteering,
WheelRigWithSteering,
NegativeTetrahedron3X2S1, //110
NegativeTetrahedron3X3S1,
Tetrahedron1X1S1,
Tetrahedron1X2S1,
Tetrahedron1X3S1,
Tetrahedron2X1S1,
Tetrahedron2X2S1,
Tetrahedron2X3S1,
Tetrahedron3X1S1,
Tetrahedron3X2S1,
Tetrahedron3X3S1, //120
QuarterPyramid1X1S1,
QuarterPyramid1X2S1,
QuarterPyramid1X3S1,
QuarterPyramid2X1S1,
QuarterPyramid2X2S1,
QuarterPyramid2X3S1,
QuarterPyramid3X1S1,
QuarterPyramid3X2S1,
QuarterPyramid3X3S1,
PlateTriangle, //130
PlateTriangle = 130,
PlateCircle,
PlateQtrCircle,
PlateQuarterCircle,
PlateRWedge,
PlateRTetrahedron,
DriverSeat = 150,
Cone,
ConeSegment,
DoubleSliced,
HalfDoubleSliced,
EighthPyramid,
Hemisphere,
WideCylinder,
WideCylinderBend,
WideCylinderT,
WideCylinderCross,
WideCylinderCorner,
NarrowCylinder,
NarrowCylinderBend,
NarrowCylinderT,
NarrowCylinderCross,
DriverSeat,
PassengerSeat,
Engine,
NarrowCylinderCorner,
PlateWideCylinder,
PlateNarrowCylinder,
PlateNegativeTetrahedron,
PlateNegativeQuarterPyramid,
PlateRoundedNegativeTetrahedron,
PlateRoundedNegativeQuarterPyramid,
HeadlampSquare,
HeadlampCircle,
HeadlampWedge,
WideCylinderDiagonal,
NarrowCylinderDiagonal,
HeadlampTetrahedron,
CarWheelWideProfile = 200,
CarWheel,
}

+ 7
- 2
GamecraftModdingAPI/Blocks/CustomBlock.cs View File

@@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using HarmonyLib;

@@ -148,10 +149,14 @@ namespace GamecraftModdingAPI.Blocks
foreach (var (id, action) in BlockChangeActions)
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;
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;


Loading…
Cancel
Save