A stable modding interface between Techblox and mods https://mod.exmods.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1KB

  1. namespace TechbloxModdingAPI.Blocks
  2. {
  3. using RobocraftX.Common;
  4. using Svelto.ECS;
  5. public class Piston : SignalingBlock
  6. {
  7. /// <summary>
  8. /// Constructs a(n) Piston object representing an existing block.
  9. /// </summary>
  10. public Piston(EGID egid) :
  11. base(egid)
  12. {
  13. }
  14. /// <summary>
  15. /// Constructs a(n) Piston object representing an existing block.
  16. /// </summary>
  17. public Piston(uint id) :
  18. base(new EGID(id, CommonExclusiveGroups.PISTON_BLOCK_GROUP))
  19. {
  20. }
  21. /// <summary>
  22. /// Gets or sets the Piston's MaximumForce property. Tweakable stat.
  23. /// </summary>
  24. public float MaximumForce
  25. {
  26. get
  27. {
  28. return BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).pistonVelocity;
  29. }
  30. set
  31. {
  32. BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).pistonVelocity = value;
  33. }
  34. }
  35. /// <summary>
  36. /// Gets or sets the Piston's MaxExtension property. Tweakable stat.
  37. /// </summary>
  38. public float MaxExtension
  39. {
  40. get
  41. {
  42. return BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).maxDeviation;
  43. }
  44. set
  45. {
  46. BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).maxDeviation = value;
  47. }
  48. }
  49. /// <summary>
  50. /// Gets or sets the Piston's InputIsExtension property. Tweakable stat.
  51. /// </summary>
  52. public bool InputIsExtension
  53. {
  54. get
  55. {
  56. return BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).hasProportionalInput;
  57. }
  58. set
  59. {
  60. BlockEngine.GetBlockInfo<RobocraftX.Blocks.PistonReadOnlyStruct>(this).hasProportionalInput = value;
  61. }
  62. }
  63. }
  64. }