Files
CHOMPStation2/code/__defines/planets.dm
Arokha Sieyes d00c5941ca Controllerized Planets
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.
2017-04-18 20:08:22 -04:00

15 lines
517 B
Plaintext

#define WEATHER_CLEAR "clear"
#define WEATHER_OVERCAST "overcast"
#define WEATHER_LIGHT_SNOW "light snow"
#define WEATHER_SNOW "snow"
#define WEATHER_BLIZZARD "blizzard"
#define WEATHER_RAIN "rain"
#define WEATHER_STORM "storm"
#define WEATHER_HAIL "hail"
#define WEATHER_WINDY "windy"
#define WEATHER_HOT "hot"
#define WEATHER_BLOOD_MOON "blood moon" // For admin fun or cult later on.
#define PLANET_PROCESS_WEATHER 0x1
#define PLANET_PROCESS_SUN 0x2
#define PLANET_PROCESS_TEMP 0x4