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.

383 lines
12KB

  1. namespace TechbloxModdingAPI.Blocks
  2. {
  3. using RobocraftX.Common;
  4. using Svelto.ECS;
  5. public class Engine : SignalingBlock
  6. {
  7. /// <summary>
  8. /// Constructs a(n) Engine object representing an existing block.
  9. /// </summary>
  10. public Engine(EGID egid) :
  11. base(egid)
  12. {
  13. }
  14. /// <summary>
  15. /// Constructs a(n) Engine object representing an existing block.
  16. /// </summary>
  17. public Engine(uint id) :
  18. base(new EGID(id, CommonExclusiveGroups.ENGINE_BLOCK_BUILD_GROUP))
  19. {
  20. }
  21. /*/// <summary> - TODO: Internal struct access
  22. /// Gets or sets the Engine's On property. May not be saved.
  23. /// </summary>
  24. public bool On
  25. {
  26. get
  27. {
  28. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).engineOn;
  29. }
  30. set
  31. {
  32. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).engineOn = value;
  33. }
  34. }
  35. /// <summary>
  36. /// Gets or sets the Engine's CurrentGear property. May not be saved.
  37. /// </summary>
  38. public int CurrentGear
  39. {
  40. get
  41. {
  42. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentGear;
  43. }
  44. set
  45. {
  46. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentGear = value;
  47. }
  48. }
  49. /// <summary>
  50. /// Gets or sets the Engine's GearChangeCountdown property. May not be saved.
  51. /// </summary>
  52. public float GearChangeCountdown
  53. {
  54. get
  55. {
  56. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).gearChangeCountdown;
  57. }
  58. set
  59. {
  60. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).gearChangeCountdown = value;
  61. }
  62. }
  63. /// <summary>
  64. /// Gets or sets the Engine's CurrentRpmAV property. May not be saved.
  65. /// </summary>
  66. public float CurrentRpmAV
  67. {
  68. get
  69. {
  70. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentRpmAV;
  71. }
  72. set
  73. {
  74. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentRpmAV = value;
  75. }
  76. }
  77. /// <summary>
  78. /// Gets or sets the Engine's CurrentRpmLV property. May not be saved.
  79. /// </summary>
  80. public float CurrentRpmLV
  81. {
  82. get
  83. {
  84. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentRpmLV;
  85. }
  86. set
  87. {
  88. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentRpmLV = value;
  89. }
  90. }
  91. /// <summary>
  92. /// Gets or sets the Engine's TargetRpmAV property. May not be saved.
  93. /// </summary>
  94. public float TargetRpmAV
  95. {
  96. get
  97. {
  98. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).targetRpmAV;
  99. }
  100. set
  101. {
  102. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).targetRpmAV = value;
  103. }
  104. }
  105. /// <summary>
  106. /// Gets or sets the Engine's TargetRpmLV property. May not be saved.
  107. /// </summary>
  108. public float TargetRpmLV
  109. {
  110. get
  111. {
  112. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).targetRpmLV;
  113. }
  114. set
  115. {
  116. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).targetRpmLV = value;
  117. }
  118. }
  119. /// <summary>
  120. /// Gets or sets the Engine's CurrentTorque property. May not be saved.
  121. /// </summary>
  122. public float CurrentTorque
  123. {
  124. get
  125. {
  126. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentTorque;
  127. }
  128. set
  129. {
  130. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).currentTorque = value;
  131. }
  132. }
  133. /// <summary>
  134. /// Gets or sets the Engine's TotalWheelVelocityAV property. May not be saved.
  135. /// </summary>
  136. public float TotalWheelVelocityAV
  137. {
  138. get
  139. {
  140. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).totalWheelVelocityAV;
  141. }
  142. set
  143. {
  144. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).totalWheelVelocityAV = value;
  145. }
  146. }
  147. /// <summary>
  148. /// Gets or sets the Engine's TotalWheelVelocityLV property. May not be saved.
  149. /// </summary>
  150. public float TotalWheelVelocityLV
  151. {
  152. get
  153. {
  154. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).totalWheelVelocityLV;
  155. }
  156. set
  157. {
  158. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).totalWheelVelocityLV = value;
  159. }
  160. }
  161. /// <summary>
  162. /// Gets or sets the Engine's TotalWheelCount property. May not be saved.
  163. /// </summary>
  164. public int TotalWheelCount
  165. {
  166. get
  167. {
  168. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).totalWheelCount;
  169. }
  170. set
  171. {
  172. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).totalWheelCount = value;
  173. }
  174. }
  175. /// <summary>
  176. /// Gets or sets the Engine's LastGearUpInput property. May not be saved.
  177. /// </summary>
  178. public bool LastGearUpInput
  179. {
  180. get
  181. {
  182. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).lastGearUpInput;
  183. }
  184. set
  185. {
  186. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).lastGearUpInput = value;
  187. }
  188. }
  189. /// <summary>
  190. /// Gets or sets the Engine's LastGearDownInput property. May not be saved.
  191. /// </summary>
  192. public bool LastGearDownInput
  193. {
  194. get
  195. {
  196. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).lastGearDownInput;
  197. }
  198. set
  199. {
  200. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).lastGearDownInput = value;
  201. }
  202. }
  203. /// <summary>
  204. /// Gets or sets the Engine's ManualToAutoGearCoolOffCounter property. May not be saved.
  205. /// </summary>
  206. public float ManualToAutoGearCoolOffCounter
  207. {
  208. get
  209. {
  210. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).manualToAutoGearCoolOffCounter;
  211. }
  212. set
  213. {
  214. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).manualToAutoGearCoolOffCounter = value;
  215. }
  216. }
  217. /// <summary>
  218. /// Gets or sets the Engine's Load property. May not be saved.
  219. /// </summary>
  220. public float Load
  221. {
  222. get
  223. {
  224. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).load;
  225. }
  226. set
  227. {
  228. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockComponent>(this).load = value;
  229. }
  230. }
  231. /// <summary>
  232. /// Gets or sets the Engine's Power property. Tweakable stat.
  233. /// </summary>
  234. public float Power
  235. {
  236. get
  237. {
  238. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockTweakableComponent>(this).power;
  239. }
  240. set
  241. {
  242. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockTweakableComponent>(this).power = value;
  243. }
  244. }
  245. /// <summary>
  246. /// Gets or sets the Engine's AutomaticGears property. Tweakable stat.
  247. /// </summary>
  248. public bool AutomaticGears
  249. {
  250. get
  251. {
  252. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockTweakableComponent>(this).automaticGears;
  253. }
  254. set
  255. {
  256. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockTweakableComponent>(this).automaticGears = value;
  257. }
  258. }
  259. /// <summary>
  260. /// Gets or sets the Engine's GearChangeTime property. May not be saved.
  261. /// </summary>
  262. public float GearChangeTime
  263. {
  264. get
  265. {
  266. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).gearChangeTime;
  267. }
  268. set
  269. {
  270. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).gearChangeTime = value;
  271. }
  272. }
  273. /// <summary>
  274. /// Gets or sets the Engine's MinRpm property. May not be saved.
  275. /// </summary>
  276. public float MinRpm
  277. {
  278. get
  279. {
  280. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).minRpm;
  281. }
  282. set
  283. {
  284. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).minRpm = value;
  285. }
  286. }
  287. /// <summary>
  288. /// Gets or sets the Engine's MaxRpm property. May not be saved.
  289. /// </summary>
  290. public float MaxRpm
  291. {
  292. get
  293. {
  294. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).maxRpm;
  295. }
  296. set
  297. {
  298. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).maxRpm = value;
  299. }
  300. }
  301. /// <summary>
  302. /// Gets the Engine's GearDownRpms property. May not be saved.
  303. /// </summary>
  304. public float[] GearDownRpms
  305. {
  306. get
  307. {
  308. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).gearDownRpms.ToManagedArray<float>();
  309. }
  310. }
  311. /// <summary>
  312. /// Gets or sets the Engine's GearUpRpm property. May not be saved.
  313. /// </summary>
  314. public float GearUpRpm
  315. {
  316. get
  317. {
  318. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).gearUpRpm;
  319. }
  320. set
  321. {
  322. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).gearUpRpm = value;
  323. }
  324. }
  325. /// <summary>
  326. /// Gets or sets the Engine's MaxRpmChange property. May not be saved.
  327. /// </summary>
  328. public float MaxRpmChange
  329. {
  330. get
  331. {
  332. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).maxRpmChange;
  333. }
  334. set
  335. {
  336. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).maxRpmChange = value;
  337. }
  338. }
  339. /// <summary>
  340. /// Gets or sets the Engine's ManualToAutoGearCoolOffTime property. May not be saved.
  341. /// </summary>
  342. public float ManualToAutoGearCoolOffTime
  343. {
  344. get
  345. {
  346. return BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).manualToAutoGearCoolOffTime;
  347. }
  348. set
  349. {
  350. BlockEngine.GetBlockInfo<Techblox.EngineBlock.EngineBlockReadonlyComponent>(this).manualToAutoGearCoolOffTime = value;
  351. }
  352. }*/
  353. }
  354. }