Made the generated members public and final Removed the comment from the start of the files Generating the files directly into the project folder Added comments describing the generated constructors and properties Using SignalingBlock as a base class Added support for renaming properties Added support for getting the name from the tweakable stat name Added/updated functional block classes
146 lines
4.5 KiB
C#
146 lines
4.5 KiB
C#
namespace TechbloxModdingAPI.Blocks
|
|
{
|
|
using RobocraftX.Common;
|
|
using Svelto.ECS;
|
|
|
|
|
|
public class Servo : SignalingBlock
|
|
{
|
|
|
|
/// <summary>
|
|
/// Constructs a(n) Servo object representing an existing block.
|
|
/// </summary>
|
|
public Servo(EGID egid) :
|
|
base(egid)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Constructs a(n) Servo object representing an existing block.
|
|
/// </summary>
|
|
public Servo(uint id) :
|
|
base(new EGID(id, CommonExclusiveGroups.SERVO_BLOCK_GROUP))
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's MaximumForce property. Tweakable stat.
|
|
/// </summary>
|
|
public float MaximumForce
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).servoVelocity;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).servoVelocity = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's MinimumAngle property. Tweakable stat.
|
|
/// </summary>
|
|
public float MinimumAngle
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).minDeviation;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).minDeviation = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's MaximumAngle property. Tweakable stat.
|
|
/// </summary>
|
|
public float MaximumAngle
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).maxDeviation;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).maxDeviation = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's Reverse property. Tweakable stat.
|
|
/// </summary>
|
|
public bool Reverse
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).reverse;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).reverse = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's InputIsAngle property. Tweakable stat.
|
|
/// </summary>
|
|
public bool InputIsAngle
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).hasProportionalInput;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).hasProportionalInput = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's DirectionVector property. May not be saved.
|
|
/// </summary>
|
|
public Unity.Mathematics.float3 DirectionVector
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).directionVector;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).directionVector = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's RotationAxis property. May not be saved.
|
|
/// </summary>
|
|
public Unity.Mathematics.float3 RotationAxis
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).rotationAxis;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).rotationAxis = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Servo's ForceAxis property. May not be saved.
|
|
/// </summary>
|
|
public Unity.Mathematics.float3 ForceAxis
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).forceAxis;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.ServoReadOnlyStruct>(this).forceAxis = value;
|
|
}
|
|
}
|
|
}
|
|
}
|