Open Entar11262 opened 6 years ago
I'm assuming that when you say "remove" you mean "turn off". This might be an energy issue, where the script turns off oil wells so there will be energy for the calciners. Try turning off energy control, or getting excessive surplus energy. If that fails, you can just never let the script see the bonfire tab by leaving it on a different tab and not autobuilding anything there.
Well, when i said removed, I meant it. They would no longer exist, but the sell button would be there, and i would be able to click it to "sell" the ones that I used to have, but i would then have rebuild them. I have found no other way to get my oil production back, than sell and rebuild. But I have not yet tested your other suggestions, so I will update with how that turns out. UPDATE: Having advanced far enough again, I don't see any sort of energy requirement for oil wells, so there should be no interaction with energy mechanics at all, and there is no "off" they are entirely passive from what I can see, unless there is something in the coding that is not displayed, and there are hidden requirements.
I've been having this same issue. I had built at least two Oilwells, but when I came back the next day:
Note that all this happened before I researched the Pumpjack upgrade, which means the Oilwells did not yet cost any energy.
What I think happened is that Energy Control noticed I had negative energy, and 'turned off' the Oilwells. Only, since I didn't yet have Pumpjacks: a) the Oilwells weren't using any energy anyway, and b) the on-off buttons wern't there, so I had no way of turning them back on.
You need to add code in Energy Control function so that it will only try to turn buildings on or off if those buildings are actually using power. If I'm right, this would also apply to Biolabs, which only draw power after you research the Biofuel Processing upgrade.
I tested this and confirmed that:
As a workaround, just don't turn Energy Control on until after you've researched both those upgrades. (Though, of course, if you're using autobuild, that can mean you end up with an energy deficit.)
When i run the script, it removes any of my oil wells when i have a calciner running. The strange part, is that despite not having any oil income, i can still sell the ones that i had and get resources back as if they were still there. I have tried using them without the script, and it works fine, so it must be either a bug, or i am doing something wrong on my end.