For SPEEDYNESS
It probably works. I mean it's hard to sit there for 8 hours and test it. But it seems to work okay. At worst if it doesn't you'll have weather that doesn't make sense. ;v
* Upgrades Planetary Weather to vis_contents
Makes the weather on Sif use vis_contents instead of overlays, which should fix all weather-related icon issues, and may or may not be faster.
Weather updates instantly now.
Fixes indoor PoIs having outdoor weather.
* Tries to appease Travis
Setting lights on every single turf takes way too long. Instead of havingto create a light source for every single outdoor turf, we find the corners to light up and apply the sunlight to them directly.
We also make sure to avoid having planet sunlight being 4x too strong, which would happen if we naively looped over all corners of all outdoor turfs.
Note: This has the side effect of making the sun's light and color ACCURATELY reflected on turfs. Previous code doubled up on light and appeared brighter than it should.
Changes how lighting is applied to the Surface.
The current method works by making every tile glow in a specific color and intensity. The issue is that when it is time to change the color/intensity, it can take the light controller a considerable amount of time for it to update every tile (estimated to be around 14,000 tiles), which can take a minute or two for the lighting controller to finish.
New method is to have a special light source for the surface, with different properties to the 'regular' light source that most things use for making light. The special version doesn't care about line of sight or lighting falloff. This special light source is applied to a series of invisible 'sun' objects that get generated as the planetary controller gets created. When the lights need to change, the lighting controller has to change a much smaller group of objects instead of literally every outdoor tile.
Controller with deferrals and SCHECKs to be specific. Won't lag while updating the sun, weather, or temperature.
Also moved some vars around. Namely the planet walls are stored on the planet, not in the weather_holder.
Planets now have their own turfs, the controller 'gives' them to the planets each cycle if there are any unallocated turfs in the global lists, to avoid iterating over other planets' turfs if you have more than one, then cuts the lists if you were crazy and some turf added some invalid type. This saves us type-checking in the for() loops later to make them crunch faster. The former operation should only happen once at the start of the game (and maybe very rarely when turfs are added/removed from a map during the game).
With regards to the temperature updates, rebuilding the zone entirely is an intensive operation. Instead we can use this new cheaty proc to do it from over here. ZAS code outside ZAS oh noooo. Well, the option is to snowflake this case into ZAS which is maybe worse?
Only downside to all this is that if you manually set weather and time it might take between 1-60 seconds for the controller to get around to checking if you wanted to update it. That's not that big a deal. If you really want you can now debug that controller and call doWork on it.