Restores "soft" darksight vision.

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.
This commit is contained in:
Leshana
2017-04-12 21:43:07 -04:00
parent 5f629e2aca
commit d00c2596e8
3 changed files with 4 additions and 3 deletions

View File

@@ -11,10 +11,11 @@
#define LIGHTING_LAYER 10 // drawing layer for lighting overlays
#define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects
#define LIGHTING_ICON_STATE_DARK "soft_dark" // Change between "soft_dark" and "dark" to swap soft darkvision
#define LIGHTING_ROUND_VALUE (1 / 64) //Value used to round lumcounts, values smaller than 1/69 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
#define LIGHTING_ROUND_VALUE (1 / 64) // Value used to round lumcounts, values smaller than 1/69 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays.
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays. This also should be the transparancy of the "soft_dark" icon state.
// If I were you I'd leave this alone.
#define LIGHTING_BASE_MATRIX \

View File

@@ -88,7 +88,7 @@
icon_state = "transparent"
color = null
else if(!set_luminosity)
icon_state = "dark"
icon_state = LIGHTING_ICON_STATE_DARK
color = null
else
icon_state = null