diff --git a/CodeGenerator/Program.cs b/CodeGenerator/Program.cs
index 0af44ab..0e9dea5 100644
--- a/CodeGenerator/Program.cs
+++ b/CodeGenerator/Program.cs
@@ -36,6 +36,7 @@ namespace CodeGenerator
{
{"pistonVelocity", "MaximumForce"}
}, typeof(PistonReadOnlyStruct));
+ bcg.Generate("Motor", null, null, typeof(MotorReadOnlyStruct));
}
}
}
\ No newline at end of file
diff --git a/TechbloxModdingAPI/Blocks/Motor.cs b/TechbloxModdingAPI/Blocks/Motor.cs
new file mode 100644
index 0000000..233d5f6
--- /dev/null
+++ b/TechbloxModdingAPI/Blocks/Motor.cs
@@ -0,0 +1,71 @@
+namespace TechbloxModdingAPI.Blocks
+{
+ using RobocraftX.Common;
+ using Svelto.ECS;
+
+
+ public class Motor : SignalingBlock
+ {
+
+ ///
+ /// Constructs a(n) Motor object representing an existing block.
+ ///
+ public Motor(EGID egid) :
+ base(egid)
+ {
+ }
+
+ ///
+ /// Constructs a(n) Motor object representing an existing block.
+ ///
+ public Motor(uint id) :
+ base(new EGID(id, CommonExclusiveGroups.MOTOR_BLOCK_GROUP))
+ {
+ }
+
+ ///
+ /// Gets or sets the Motor's TopSpeed property. Tweakable stat.
+ ///
+ public float TopSpeed
+ {
+ get
+ {
+ return BlockEngine.GetBlockInfo(this).maxVelocity;
+ }
+ set
+ {
+ BlockEngine.GetBlockInfo(this).maxVelocity = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Motor's Torque property. Tweakable stat.
+ ///
+ public float Torque
+ {
+ get
+ {
+ return BlockEngine.GetBlockInfo(this).maxForce;
+ }
+ set
+ {
+ BlockEngine.GetBlockInfo(this).maxForce = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the Motor's Reverse property. Tweakable stat.
+ ///
+ public bool Reverse
+ {
+ get
+ {
+ return BlockEngine.GetBlockInfo(this).reverse;
+ }
+ set
+ {
+ BlockEngine.GetBlockInfo(this).reverse = value;
+ }
+ }
+ }
+}