I've been writing an all-purpose farming program and wanted to account for all three possible power sources: the coal generator, solar panel, and just using charger blocks. The generator has an API, so a simple if statement with the component library can check for it; however there is no function to detect certain upgrades such as the solar panel.
Is there a way to tell if one is installed, even at night?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I've been writing an all-purpose farming program and wanted to account for all three possible power sources: the coal generator, solar panel, and just using charger blocks. The generator has an API, so a simple if statement with the component library can check for it; however there is no function to detect certain upgrades such as the solar panel.
Is there a way to tell if one is installed, even at night?
Link to post
Share on other sites