Advertisement
Guest User

Untitled

a guest
May 15th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. /* V0.0.1
  2.  
  3. Welcome to THYA's Backup Generator Script
  4.  
  5. ------------------------------------------------------------------------------------------------------------------------
  6. Setup Instructions:
  7.  
  8. 1. Choose a backup generator (reactor) by naming it the same as the quoted string below.
  9. */
  10. const string reactorname = "Backup Generator";
  11. /*
  12.  
  13. 2. Choose a battery to for tracking % by naming it the same as the quoted string below.
  14. */
  15. const string batteryname = "Backup Battery";
  16. /*
  17.  
  18. 3. Set reactor power on at battery % here.
  19. */
  20. const int batterylow = 1;
  21. /*
  22.  
  23. 4. Set reactor power off at battery % here.
  24. */
  25. const int batteryhigh = 2;
  26. /*
  27. ------------------------------------------------------------------------------------------------------------------------
  28. */
  29. public Program()
  30. {
  31. Runtime.UpdateFrequency = UpdateFrequency.Update10 | UpdateFrequency.Update100;
  32. }
  33.  
  34. batterycap += (float)b.CurrentStoredPower;
  35.  
  36.  
  37. bool Setup()
  38. {
  39. if (block is IMyReactor && block.CustomName.Contains(reactorname))
  40. reactorlist.Add(block as IMyReactor);
  41. else if (block is IMyBatteryBlock && block.CustomName.Contains(batteryname))
  42. soundBlocks.Add(block as IMyBatteryBlock);
  43. }
  44.  
  45. if(IMyBatteryBlock HasCapacityRemaining < batterylow )
  46. {
  47. const string IMyReactor = OnOff_On
  48. }
  49.  
  50. if(IMyBatteryBlock HasCapacityRemaining < batteryhigh )
  51. {
  52. const string IMyReactor = OnOff_Off
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement