Community Forum

SolarCollectorPlaceable keep collecting income at night

Forum Overview >> Scripting

CategoryScripting
Created23.02.2019 23:17


Derek Squire (dezza069) 23.02.2019 23:17
Hello,


Noticed that solar panel placeables collect income when the sun is down - unfortunately my physical solar panels do not seem to do this, so I subclassed a placeable to provide a solution for myself.

Would like to suggest to the devs to please do similar in your released code for all solar panels (if possible), so solar panels only collect income when the sun is up.

Also during my experimentation; the panels I've created are fixed (like the panels on my roof) so they do not rotate or follow the sun, something which initially broke my version of the subclass until I realised what was happening.

Wondering, if I did make a similar mod publicly available, would having such a custom script limit its ability to be released for consoles??

Thanks very much.

D

PinchTheFarmer 05.03.2019 02:37
Mmmh in fact you can do that i think, you put a Listener on the Environment, then onHourChanged, you check hours , for 20 to 6 > put the income of the item @ 0 , then in the last hour > put it back :), take the mod HorseHelper, it do that, onHourChanged , he put horse walk to 100% at the 23 hour of the day, you take the script > change to look in placeable (and find all solar panel) > then set the income .

Derek Squire (dezza069) 07.03.2019 21:58
Thanks!

I’ve done all that (took 5 minutes and there’s a sunlight variable which can be used) for myself and a whole lot more.

You’d consider in a Simulator the base game would also not collect sun on a solar panel at night, it’s the little things - and the tyres flex in this edition...

Besides if your mod has a script it won’t get released to console.

Happy Farming!!


Note: Log in to post. Create a new account here.