Removes a very large amount of world loops.
Adds a macro to painlessly generate a global list, and the needed code to modify the list when an object is made or deleted automatically.
Cleans up some commented out code.
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.
* Moves proc/initialize() from being on /atom/movable, /are and /turf/simulated to being on /atom - Now turfs can initialize too
* Added the SSatoms subsystem which controls initialization of atoms at roundstart and during normal conditions.
* Disabled the old auto_init = 0 behavior, ALL atoms should get initialized() called on them now.
* Refactored the way initialize() is called during /New() to utilize SSatoms instead of SScreation
* Removed SScreation, as it was only a stop-gap until SSatoms could be ported.
* Updated the maploader to inform SSatoms when it is loading maps instead of SScreation.
* Updated the template map loader to use SSatoms to perform initTemplateBounds
* Renamed 'initialized' var in seed_storage to deconflict.
* Removed usage of auto_init = 0, replaced with a no-op initialize() proc for atoms that don't need initialization.
* Moves proc/initialize() from being on /atom/movable, /are and /turf/simulated to being on /atom - Now turfs can initialize too
* Added the SSatoms subsystem which controls initialization of atoms at roundstart and during normal conditions.
* Disabled the old auto_init = 0 behavior, ALL atoms should get initialized() called on them now.
* Refactored the way initialize() is called during /New() to utilize SSatoms instead of SScreation
* Removed SScreation, as it was only a stop-gap until SSatoms could be ported.
* Updated the maploader to inform SSatoms when it is loading maps instead of SScreation.
* Updated the template map loader to use SSatoms to perform initTemplateBounds
* Renamed 'initialized' var in seed_storage to deconflict.
* Removed usage of auto_init = 0, replaced with a no-op initialize() proc for atoms that don't need initialization.
* POLARIS: Lighting runtime for accessing a list that might not exist
* POLARIS: Lazily clear these lists
* POLARIS: Just return the normal hint in Destroy on plane holders
* Polaris initial plane upstream merge
* POLARIS: Fix RIG visors with new plane system, and material scanner VIS_FULLBRIGHT
* POLARIS: Fix GetFlatIcon so that cameras and id pictures don't show the HUD overlays.
* POLARIS: Adds a 'alter values' proc for plane master ease of tweaking
Setting stuff like colorblindness variety and things.
* Remove NIF reference, fix lighting layer define
* Handle effects above lighting plane
* Moved all layer defines to planes+layers.dm
* Fixed overlays that are supposed to be above lighting to use the PLANE_LIGHTING_ABOVE
* Merge: 3000% human/update_icons() speed improvement
* Merge: Avoid ghosts pointing at things
New lighting system is needed to handle updating literally 14k+ tiles whenever the sun moves. The straight port seems to have had no adverse effects from what I could see. Don't know if it's more performant but it doesn't seem to be less.
I didn't expect the latter would be needed for the former.
* No changes to lighting logic at all, it still processes sources, corners, and overlays in that order.
* Also optimized the initial creation of lighting overlays, and made it include CHECK_TICKs
* Removed the statistics gathering, at least for now.
* lighting_overlay objects belong to a turf. Turfs never move. Neither should the lighting_overlay, even of an overzealous shuttle controller thinks they should.
* lighting_overlay objects belong to a turf. Turfs never move. Neither should the lighting_overlay, even of an overzealous shuttle controller thinks they should.
The previous client-side optimization made lighting overlays go fully
opaque when it was dark, making it so species darksight didn't let you see
anything. This fixes that by making a dark_soft icon state that has
opacity matching the LIGHTING_SOFT_THRESHOLD.
Light sources no longer track applied lumcounts in an assocative list,
using shared-indices with the applied turf list instead.
Signed-off-by: Mloc <colmohici@gmail.com>
Removes lighting transitions- they don't work with the new system.
Greyscale overlays now use BLEND_OVERLAY instead of BLEND_MULTIPLY for
better client performance.
Light overlays in total darkness are now made invisible.
Signed-off-by: Mloc <colmohici@gmail.com>