mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-30 04:02:33 +00:00
* amogus
* Revert "amogus"
This reverts commit ebaa99c77b.
* Part 1
* rest of the airlocks
holy shit that took a long time
* part 2
* part 3
finale
* conflict resolution
* fixes warnings
* fixes paneloen airlock emissives
* adds back changes from #18145
* #18085 sprites
* SteelSlayer Review
readded process in status_display, idk why I removed it, it broke some functionality
* future proofing firedoors
Talked with the contributor who added emissive appearances to the codebase. As of now they wont block them unless they spawn as closed, but with future PR merges this code will work.
* solar panel PR conflict resolve
* pain
* small fix
* farie82 suggestions
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
* farie82 suggestions part 2
* farie82 suggestions part 3
* finalle
pog champ ers 2000
* farie82 suggestions the sequel
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
* SteelSlayer Suggestions
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
134 lines
6.9 KiB
Plaintext
134 lines
6.9 KiB
Plaintext
//Bay lighting engine shit, not in /code/modules/lighting because BYOND is being shit about it
|
|
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
|
|
|
|
#define MINIMUM_USEFUL_LIGHT_RANGE 1.4
|
|
|
|
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
|
|
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
|
|
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
|
#define LIGHTING_ROUND_VALUE (1 / 64) //Value used to round lumcounts, values smaller than 1/129 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_MINIMUM_POWER 0.1
|
|
|
|
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
|
|
|
|
// If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting objects.
|
|
// Set to zero to disable soft lighting. Luminosity changes then work if it's lit at all.
|
|
#define LIGHTING_SOFT_THRESHOLD 0
|
|
|
|
// If I were you I'd leave this alone.
|
|
#define LIGHTING_BASE_MATRIX \
|
|
list \
|
|
( \
|
|
1, 1, 1, 0, \
|
|
1, 1, 1, 0, \
|
|
1, 1, 1, 0, \
|
|
1, 1, 1, 0, \
|
|
0, 0, 0, 1 \
|
|
) \
|
|
|
|
|
|
//Some defines to generalise colours used in lighting.
|
|
//Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated
|
|
#define LIGHT_COLOR_WHITE "#FFFFFF"
|
|
#define LIGHT_COLOR_RED "#FA8282" //Warm but extremely diluted red. rgb(250, 130, 130)
|
|
#define LIGHT_COLOR_GREEN "#64C864" //Bright but quickly dissipating neon green. rgb(100, 200, 100)
|
|
#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250)
|
|
|
|
#define LIGHT_COLOR_BLUEGREEN "#7DE1AF" //Light blueish green. rgb(125, 225, 175)
|
|
#define LIGHT_COLOR_CYAN "#7DE1E1" //Diluted cyan. rgb(125, 225, 225)
|
|
#define LIGHT_COLOR_LIGHT_CYAN "#40CEFF" //More-saturated cyan. rgb(64, 206, 255)
|
|
#define LIGHT_COLOR_DARK_BLUE "#6496FA" //Saturated blue. rgb(51, 117, 248)
|
|
#define LIGHT_COLOR_PINK "#E17DE1" //Diluted, mid-warmth pink. rgb(225, 125, 225)
|
|
#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125)
|
|
#define LIGHT_COLOR_BROWN "#966432" //Clear brown, mostly dim. rgb(150, 100, 50)
|
|
#define LIGHT_COLOR_ORANGE "#FA9632" //Mostly pure orange. rgb(250, 150, 50)
|
|
#define LIGHT_COLOR_PURPLE "#952CF4" //Light Purple. rgb(149, 44, 244)
|
|
#define LIGHT_COLOR_LAVENDER "#9B51FF" //Less-saturated light purple. rgb(155, 81, 255)
|
|
|
|
#define LIGHT_COLOR_HOLY_MAGIC "#FFF743" //slightly desaturated bright yellow.
|
|
#define LIGHT_COLOR_BLOOD_MAGIC "#D00000" //deep crimson
|
|
|
|
#define LIGHT_COLOR_PURE_CYAN "#00FFFF"
|
|
#define LIGHT_COLOR_DARKRED "#A91515"
|
|
#define LIGHT_COLOR_PURE_RED "#FF0000"
|
|
#define LIGHT_COLOR_DARKGREEN "#50AB00"
|
|
#define LIGHT_COLOR_PURE_GREEN "#00FF00"
|
|
#define LIGHT_COLOR_LIGHTBLUE "#0099FF"
|
|
#define LIGHT_COLOR_DARKBLUE "#315AB4"
|
|
#define LIGHT_COLOR_PURE_BLUE "#0000FF"
|
|
#define LIGHT_COLOR_FADEDPURPLE "#A97FAA"
|
|
|
|
//These ones aren't a direct colour like the ones above, because nothing would fit
|
|
#define LIGHT_COLOR_FIRE "#FAA019" //Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
|
|
#define LIGHT_COLOR_LAVA "#C48A18" //Very warm yellow, leaning slightly towards orange. rgb(196, 138, 24)
|
|
#define LIGHT_COLOR_FLARE "#FA644B" //Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
|
|
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B" //Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
|
|
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
|
|
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
|
|
|
|
#define LIGHT_RANGE_FIRE 3 //How many tiles standard fires glow.
|
|
|
|
#define LIGHTING_PLANE_ALPHA_VISIBLE 255
|
|
#define LIGHTING_PLANE_ALPHA_NV_TRAIT 245
|
|
#define LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE 192
|
|
#define LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE 128 //For lighting alpha, small amounts lead to big changes. even at 128 its hard to figure out what is dark and what is light, at 64 you almost can't even tell.
|
|
#define LIGHTING_PLANE_ALPHA_INVISIBLE 0
|
|
|
|
//lighting area defines
|
|
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
|
|
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
|
|
#define DYNAMIC_LIGHTING_FORCED 2 //dynamic lighting enabled even if the area doesn't require power
|
|
#define DYNAMIC_LIGHTING_IFSTARLIGHT 3 //dynamic lighting enabled only if starlight is.
|
|
#define IS_DYNAMIC_LIGHTING(A) A.dynamic_lighting
|
|
|
|
|
|
//code assumes higher numbers override lower numbers.
|
|
#define LIGHTING_NO_UPDATE 0
|
|
#define LIGHTING_VIS_UPDATE 1
|
|
#define LIGHTING_CHECK_UPDATE 2
|
|
#define LIGHTING_FORCE_UPDATE 3
|
|
|
|
#define FLASH_LIGHT_DURATION 2
|
|
#define FLASH_LIGHT_POWER 3
|
|
#define FLASH_LIGHT_RANGE 3.8
|
|
|
|
#define EMISSIVE_BLOCK_GENERIC 1
|
|
/// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
|
|
#define EMISSIVE_BLOCK_UNIQUE 2
|
|
|
|
/// The color applied to all emissive overlays.
|
|
#define EMISSIVE_COLOR "#FFFFFF"
|
|
/// The color applied to all emissive blockers. Is meant to be the exact opposite of the EMMISIVE_COLOR
|
|
#define EM_BLOCK_COLOR "#000000"
|
|
/// A set of appearance flags applied to all emissive and emissive blocker overlays.
|
|
#define EMISSIVE_APPEARANCE_FLAGS (KEEP_APART|KEEP_TOGETHER|RESET_COLOR|RESET_TRANSFORM)
|
|
/// The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of [EMISSIVE_COLOR], and be independant of the RGB value of [EM_BLOCK_COLOR].
|
|
#define EM_MASK_MATRIX list(0,0,0,1/3, 0,0,0,1/3, 0,0,0,1/3, 0,0,0,0, 1,1,1,0)
|
|
/// A globaly cached version of [EM_MASK_MATRIX] for quick access.
|
|
GLOBAL_LIST_INIT(em_mask_matrix, EM_MASK_MATRIX)
|
|
|
|
/// Returns the red part of a #RRGGBB hex sequence as number
|
|
#define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4))
|
|
|
|
/// Returns the green part of a #RRGGBB hex sequence as number
|
|
#define GETGREENPART(hexa) hex2num(copytext(hexa, 4, 6))
|
|
|
|
/// Returns the blue part of a #RRGGBB hex sequence as number
|
|
#define GETBLUEPART(hexa) hex2num(copytext(hexa, 6, 8))
|
|
|
|
/// Parse the hexadecimal color into lumcounts of each perspective.
|
|
#define PARSE_LIGHT_COLOR(source) \
|
|
do { \
|
|
if (source.light_color) { \
|
|
var/__light_color = source.light_color; \
|
|
source.lum_r = GETREDPART(__light_color) / 255; \
|
|
source.lum_g = GETGREENPART(__light_color) / 255; \
|
|
source.lum_b = GETBLUEPART(__light_color) / 255; \
|
|
} else { \
|
|
source.lum_r = 1; \
|
|
source.lum_g = 1; \
|
|
source.lum_b = 1; \
|
|
}; \
|
|
} while (FALSE)
|