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
71 lines
2.1 KiB
C#
71 lines
2.1 KiB
C#
namespace TechbloxModdingAPI.Blocks
|
|
{
|
|
using RobocraftX.Common;
|
|
using Svelto.ECS;
|
|
|
|
|
|
public class Piston : SignalingBlock
|
|
{
|
|
|
|
/// <summary>
|
|
/// Constructs a(n) Piston object representing an existing block.
|
|
/// </summary>
|
|
public Piston(EGID egid) :
|
|
base(egid)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Constructs a(n) Piston object representing an existing block.
|
|
/// </summary>
|
|
public Piston(uint id) :
|
|
base(new EGID(id, CommonExclusiveGroups.PISTON_BLOCK_GROUP))
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Piston's MaximumForce property. Tweakable stat.
|
|
/// </summary>
|
|
public float MaximumForce
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).pistonVelocity;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).pistonVelocity = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Piston's MaxExtension property. Tweakable stat.
|
|
/// </summary>
|
|
public float MaxExtension
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).maxDeviation;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).maxDeviation = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Piston's InputIsExtension property. Tweakable stat.
|
|
/// </summary>
|
|
public bool InputIsExtension
|
|
{
|
|
get
|
|
{
|
|
return BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).hasProportionalInput;
|
|
}
|
|
set
|
|
{
|
|
BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).hasProportionalInput = value;
|
|
}
|
|
}
|
|
}
|
|
}
|