Opacity refactor (#52881)

Moves all opacity var manipulation to a proc which sends a signal.
    light_blocker element for movable opaque atoms made, which tracks its movement and updates the affected turfs for proper lighting updates.
    has_opaque_atom boolean replaced by the opacity_sources lazylist to keep track of the sources, and a directional_opacity which serves a similar function but also allows for future expansion with on-border opaque objects (not yet implemented).
    Some opacity-related sight procs optimized as a result of this.
    Some variables moved to the object's definition.
    A define or two added into the mix for clarity.
    Some code cleaning, like turning booleans into their defines.
    One file renamed for clarity.

Changelog

cl
balance: Mechs no longer block sight. It's a non-trivial cost for the lighting system with little to no gain.
/cl
This commit is contained in:
Rohesie
2020-08-19 13:24:20 +12:00
committed by GitHub
parent deb043ccec
commit 25f670f8de
63 changed files with 220 additions and 160 deletions
+1 -1
View File
@@ -224,7 +224,7 @@
for(T in view(CEILING(light_range, 1), source_turf))
if((!IS_DYNAMIC_LIGHTING(T) && !T.light_sources))
continue
if(!T.has_opaque_atom)
if(!IS_OPAQUE_TURF(T))
if (!T.lighting_corners_initialised)
T.generate_missing_corners()
for (thing in T.corners)