Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - /* V0.0.1
 - Welcome to THYA's Backup Generator Script
 - ------------------------------------------------------------------------------------------------------------------------
 - Setup Instructions:
 - 1. Choose a backup generator (reactor) by naming it the same as the quoted string below.
 - */
 - const string reactorname = "Backup Generator";
 - /*
 - 2. Choose a battery to for tracking % by naming it the same as the quoted string below.
 - */
 - const string batteryname = "Backup Battery";
 - /*
 - 3. Set reactor power on at battery % here.
 - */
 - const int batterylow = 1;
 - /*
 - 4. Set reactor power off at battery % here.
 - */
 - const int batteryhigh = 2;
 - /*
 - ------------------------------------------------------------------------------------------------------------------------
 - */
 - public Program()
 - {
 - Runtime.UpdateFrequency = UpdateFrequency.Update10 | UpdateFrequency.Update100;
 - }
 - batterycap += (float)b.CurrentStoredPower;
 - bool Setup()
 - {
 - if (block is IMyReactor && block.CustomName.Contains(reactorname))
 - reactorlist.Add(block as IMyReactor);
 - else if (block is IMyBatteryBlock && block.CustomName.Contains(batteryname))
 - soundBlocks.Add(block as IMyBatteryBlock);
 - }
 - if(IMyBatteryBlock HasCapacityRemaining < batterylow )
 - {
 - const string IMyReactor = OnOff_On
 - }
 - if(IMyBatteryBlock HasCapacityRemaining < batteryhigh )
 - {
 - const string IMyReactor = OnOff_Off
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment