- It breaks the game atm, not sure why exactly but it's probably not a good thing
53 lines
No EOL
2.3 KiB
C#
53 lines
No EOL
2.3 KiB
C#
using System.Collections.Generic;
|
|
using HarmonyLib;
|
|
using RobocraftX.Blocks;
|
|
using RobocraftX.Common;
|
|
using RobocraftX.GroupTags;
|
|
using RobocraftX.PilotSeat;
|
|
using Svelto.ECS;
|
|
using Techblox.EngineBlock;
|
|
using Techblox.ServoBlocksServer;
|
|
using Techblox.WheelRigBlock;
|
|
|
|
namespace CodeGenerator
|
|
{
|
|
internal class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
GenerateBlockClasses();
|
|
}
|
|
|
|
private static void GenerateBlockClasses()
|
|
{
|
|
var bcg = new BlockClassGenerator();
|
|
bcg.Generate("Engine", null, new Dictionary<string, string>
|
|
{
|
|
{ "engineOn", "On" }
|
|
}, AccessTools.TypeByName("Techblox.EngineBlock.EngineBlockComponent"), // Simulation time properties
|
|
typeof(EngineBlockTweakableComponent), typeof(EngineBlockReadonlyComponent));
|
|
bcg.Generate("DampedSpring", "DAMPEDSPRING_BLOCK_GROUP", new Dictionary<string, string>
|
|
{
|
|
{"maxExtent", "MaxExtension"}
|
|
},
|
|
typeof(TweakableJointDampingComponent), typeof(DampedSpringReadOnlyStruct));
|
|
bcg.Generate("LogicGate", "LOGIC_BLOCK_GROUP");
|
|
bcg.Generate("Servo", types: typeof(ServoReadOnlyTweakableComponent), renames: new Dictionary<string, string>
|
|
{
|
|
{"minDeviation", "MinimumAngle"},
|
|
{"maxDeviation", "MaximumAngle"},
|
|
{"servoVelocity", "MaximumForce"}
|
|
});
|
|
bcg.Generate("WheelRig", "WHEELRIG_BLOCK_BUILD_GROUP", null,
|
|
typeof(WheelRigTweakableStruct), typeof(WheelRigReadOnlyStruct),
|
|
typeof(WheelRigSteerableTweakableStruct), typeof(WheelRigSteerableReadOnlyStruct));
|
|
bcg.Generate("Seat", "RobocraftX.PilotSeat.SeatGroups.PILOTSEAT_BLOCK_BUILD_GROUP", null, typeof(SeatFollowCamComponent), typeof(SeatReadOnlySettingsComponent));
|
|
bcg.Generate("Piston", null, new Dictionary<string, string>
|
|
{
|
|
{"pistonVelocity", "MaximumForce"}
|
|
}, typeof(PistonReadOnlyStruct));
|
|
bcg.Generate("Motor", null, null, typeof(MotorReadOnlyStruct));
|
|
//bcg.Generate("ObjectID", "ObjectIDBlockExclusiveGroups.OBJECT_ID_BLOCK_GROUP", null, typeof(ObjectIDTweakableComponent));
|
|
}
|
|
}
|
|
} |