2021-08-11 21:44:26 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using RobocraftX.Blocks;
|
|
|
|
|
using RobocraftX.PilotSeat;
|
|
|
|
|
using Techblox.EngineBlock;
|
|
|
|
|
using Techblox.WheelRigBlock;
|
2021-07-28 22:08:57 +00:00
|
|
|
|
|
|
|
|
|
namespace CodeGenerator
|
|
|
|
|
{
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
var bcg = new BlockClassGenerator();
|
2021-08-11 21:44:26 +00:00
|
|
|
|
bcg.Generate("Engine", null, new Dictionary<string, string>
|
|
|
|
|
{
|
|
|
|
|
{ "engineOn", "On" }
|
|
|
|
|
}, typeof(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(ServoReadOnlyStruct), 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));
|
2021-08-11 22:44:23 +00:00
|
|
|
|
bcg.Generate("Motor", null, null, typeof(MotorReadOnlyStruct));
|
2021-07-28 22:08:57 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|