mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Area-based Horizon lighting (#22511)
This adds unique lighting palettes to different areas of the SCCV Horizon. It does this by tying randomized_lighting variable for light fixtures to the department variable of the area they are in. This solution is intended to save a lot of time and effort, both now and later, which would otherwise be spent mapping down each colour of lighting into every department manually. Notable points: - This shifts the parent colour for light bulbs from LIGHT_COLOR_HALOGEN (#C0C0CA) to the new LIGHT_COLOR_OFFWHITE (#efe5bb), and shifts the randomized_colors variable to the according list. This shifts them from a slightly murky blue-tinted white to a slightly brighter yellow-tinted white. Slightly warm lighting will now be the default for every map. Warmer lighting communicates the age of a ship or station, the worsening economic prospects of the setting, and it's also a bit cosier. - Stark white lighting is retained for medical and the bridge. Research has been given purple-tinted lighting. - Command offices are also under blue lighting currently, to visually differentiate them from the rest of their departments. - To avoid too much player-facing bloat, only a box for pale purple has been added so janitors can replace the lighting in research. Otherwise, yellow can be used for engineering, white for public areas, and blue for high-security areas. - Offsites and offships shouldn't be hugely changed by the shift in default lighting - it's a slight change in hue. Screenshots below! <details> <img width="1077" height="1080" alt="image" src="https://github.com/user-attachments/assets/1987e29f-c34c-44ea-865f-5f81c0e5c47f" /> <img width="1080" height="1080" alt="image" src="https://github.com/user-attachments/assets/79279c6c-da56-4676-a0e9-7e5db43002cd" /> <img width="1083" height="1080" alt="image" src="https://github.com/user-attachments/assets/621589b5-ada6-4d80-9f8f-8cf13a47df39" /> <img width="1085" height="1080" alt="image" src="https://github.com/user-attachments/assets/09284700-8408-4a86-86c5-7575e7c94a27" /> <img width="1081" height="1080" alt="image" src="https://github.com/user-attachments/assets/8246585c-f437-437a-8d32-9997fae05298" /> <img width="1078" height="1080" alt="image" src="https://github.com/user-attachments/assets/a34841dd-3f49-4010-b2e0-d2e9a748e617" /> <img width="1084" height="1080" alt="image" src="https://github.com/user-attachments/assets/55e89703-8ac7-4fa7-9775-19818c10c119" /> <img width="1080" height="1080" alt="image" src="https://github.com/user-attachments/assets/684dea04-90c5-4877-b2bf-08a2146efb5e" /> <img width="1078" height="1080" alt="image" src="https://github.com/user-attachments/assets/6ce42ac1-0f4b-49eb-8f2c-c6fb1830877e" /> <img width="1083" height="1080" alt="image" src="https://github.com/user-attachments/assets/bc41a4f4-8d5c-4348-b9fe-a41d7950ce37" /> <img width="1081" height="1080" alt="image" src="https://github.com/user-attachments/assets/48c4b733-a375-482b-9f70-e2aa6d0b3e27" /> <img width="1083" height="1080" alt="image" src="https://github.com/user-attachments/assets/52e0041a-602d-4f4b-9d6c-7d0a0946f90b" /> </details>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
/// Cold, diluted blue. rgb(100, 150, 250)
|
||||
#define LIGHT_COLOR_BLUE "#6496FA"
|
||||
|
||||
/// Light blue. rgb(142, 180, 255)
|
||||
#define LIGHT_COLOR_LIGHT_BLUE "#8eb4ff"
|
||||
/// Cyan. rgb(125, 225, 225)
|
||||
#define LIGHT_COLOR_CYAN "#7DE1E1"
|
||||
/// Diluted cyan. rgb(202, 240, 255)
|
||||
@@ -50,16 +52,31 @@
|
||||
/// A softer emergency red, used for small bulbs. rgb(250, 130, 130)
|
||||
#define LIGHT_COLOR_EMERGENCY_SOFT "#FA8282"
|
||||
/// Clinical white light bulbs
|
||||
#define LIGHT_COLOUR_WHITE "#FEFEFE"
|
||||
#define LIGHT_COLOR_BULB_WHITE "#FEFEFE"
|
||||
/// Grimier, warmer off-white.
|
||||
#define LIGHT_COLOR_OFFWHITE "#efe5bb"
|
||||
/// Warm yellowish light bulbs
|
||||
#define LIGHT_COLOUR_WARM "#FFFEE0"
|
||||
#define LIGHT_COLOR_WARM "#e7e6af"
|
||||
/// Amberish decayed light bulbs
|
||||
#define LIGHT_COLOR_DECAYED "#fabd6d"
|
||||
/// Reddish decayed light bulbs
|
||||
#define LIGHT_COLOR_DYING "#fa826d"
|
||||
/// Pale green. Mostly for medical.
|
||||
#define LIGHT_COLOR_CLINICAL "#5bffaa"
|
||||
/// A very gentle purple-ish color!
|
||||
#define LIGHT_COLOR_LAVENDER "#d8bfd8"
|
||||
|
||||
/// List of standard light colors used for randomized lighting and selectable printed lights.
|
||||
#define LIGHT_STANDARD_COLORS list(LIGHT_COLOUR_WHITE, LIGHT_COLOUR_WARM, LIGHT_COLOR_HALOGEN)
|
||||
// This is the list of area-based light variations!
|
||||
/// Quite clean, cold, clinical lighting. For tightly monitored or very sterile areas.
|
||||
#define LIGHT_CLINICAL_COLORS list(LIGHT_COLOR_BULB_WHITE, LIGHT_COLOR_WARM, LIGHT_COLOR_HALOGEN)
|
||||
/// Generic warmer off-white lighting, for public areas.
|
||||
#define LIGHT_WARM_COLORS list(LIGHT_COLOR_WARM, LIGHT_COLOR_OFFWHITE)
|
||||
/// Everything is yellow in engineering! It's industrial!
|
||||
#define LIGHT_ENGINEERING_COLORS list(LIGHT_COLOR_WARM, LIGHT_COLOR_DECAYED)
|
||||
/// Purple. Funky. Probably tastes like blueberries. For research.
|
||||
#define LIGHT_RESEARCH_COLORS list(LIGHT_COLOR_LAVENDER, LIGHT_COLOR_PALE_PURPLE)
|
||||
/// Foreboding blue. Ominous. You are in a high security area.
|
||||
#define LIGHT_HIGHSEC_COLORS list(LIGHT_COLOR_BLUE, LIGHT_COLOR_LIGHT_BLUE)
|
||||
|
||||
#define LIGHT_MODE_RED "red"
|
||||
#define LIGHT_MODE_DELTA "delta"
|
||||
|
||||
@@ -95,6 +95,9 @@
|
||||
// 'amidships' belongs to location_ew
|
||||
var/location_ew = null
|
||||
var/location_ns = null
|
||||
/// What colors should the area's light fixtures emit, if any?
|
||||
/// Only applies to light fixtures which are set to use randomized lighting!
|
||||
var/list/area_lighting = LIGHT_WARM_COLORS
|
||||
|
||||
var/centcomm_area = FALSE
|
||||
|
||||
|
||||
@@ -873,7 +873,7 @@
|
||||
/obj/item/light/tube/colored/blue,
|
||||
/obj/item/light/tube/colored/magenta,
|
||||
/obj/item/light/tube/colored/yellow,
|
||||
/obj/item/light/tube/colored/cyan
|
||||
/obj/item/light/tube/colored/pale_purple
|
||||
)
|
||||
var/static/list/bulbs_colors = list(
|
||||
/obj/item/light/bulb/colored/red,
|
||||
@@ -881,7 +881,7 @@
|
||||
/obj/item/light/bulb/colored/blue,
|
||||
/obj/item/light/bulb/colored/magenta,
|
||||
/obj/item/light/bulb/colored/yellow,
|
||||
/obj/item/light/bulb/colored/cyan
|
||||
/obj/item/light/bulb/colored/pale_purple
|
||||
)
|
||||
for(var/i = 0, i < 14, i++)
|
||||
var/type = pick(tube_colors)
|
||||
@@ -920,6 +920,12 @@
|
||||
color = COLOR_YELLOW_GRAY
|
||||
starts_with = list(/obj/item/light/tube/colored/yellow = 14, /obj/item/light/bulb/colored/yellow = 7)
|
||||
|
||||
/obj/item/storage/box/lights/colored/pale_purple
|
||||
name = "box of pale purple lights"
|
||||
illustration = "lightmixed"
|
||||
color = COLOR_PURPLE_GRAY
|
||||
starts_with = list(/obj/item/light/tube/colored/pale_purple = 14, /obj/item/light/bulb/colored/pale_purple = 7)
|
||||
|
||||
/obj/item/storage/box/lights/colored/magenta
|
||||
name = "box of magenta lights"
|
||||
illustration = "lightmixed"
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
/obj/item/storage/box/lights/colored/cyan = 0.1,
|
||||
/obj/item/storage/box/lights/colored/green = 0.1,
|
||||
/obj/item/storage/box/lights/colored/magenta = 0.1,
|
||||
/obj/item/storage/box/lights/colored/pale_purple = 0.1,
|
||||
/obj/item/storage/box/lights/colored/red = 0.1,
|
||||
/obj/item/storage/box/lights/colored/yellow = 0.1,
|
||||
/obj/item/storage/box/lights/coloredmixed = 0.2,
|
||||
|
||||
@@ -103,10 +103,10 @@
|
||||
/obj/structure/machinery/light_switch/idris
|
||||
name = "idris smart switch"
|
||||
desc = "A smart lightswitch designed by Idris Incorporated for entertainment venues, this one has additional controls for adjusting the color and brightness of the compartment's lighting."
|
||||
var/current_light_color = LIGHT_COLOR_HALOGEN
|
||||
var/current_light_color = LIGHT_COLOR_OFFWHITE
|
||||
var/current_brightness = 1.0
|
||||
var/static/list/color_options = list(
|
||||
"Standard" = LIGHT_COLOR_HALOGEN,
|
||||
"Standard" = LIGHT_COLOR_OFFWHITE,
|
||||
"Red" = LIGHT_COLOR_RED,
|
||||
"Green" = LIGHT_COLOR_GREEN,
|
||||
"Blue" = LIGHT_COLOR_BLUE,
|
||||
|
||||
@@ -79,7 +79,8 @@ STOCK_ITEM_COMMON(light, 1.8)
|
||||
/obj/item/storage/box/lights/colored/blue, \
|
||||
/obj/item/storage/box/lights/colored/cyan, \
|
||||
/obj/item/storage/box/lights/colored/yellow, \
|
||||
/obj/item/storage/box/lights/colored/magenta \
|
||||
/obj/item/storage/box/lights/colored/magenta, \
|
||||
/obj/item/storage/box/lights/colored/pale_purple \
|
||||
)
|
||||
new type(L)
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
var/brightness_range = 2 //how much light it gives off
|
||||
var/brightness_power = 0.45
|
||||
var/brightness_color = LIGHT_COLOR_HALOGEN
|
||||
var/brightness_color = LIGHT_COLOR_OFFWHITE
|
||||
var/lighttype = null
|
||||
var/randomize_range = TRUE
|
||||
var/randomize_color = TRUE
|
||||
var/list/randomized_colors = LIGHT_STANDARD_COLORS
|
||||
var/list/randomized_colors = LIGHT_WARM_COLORS
|
||||
|
||||
/obj/item/light/antagonist_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
@@ -134,6 +134,10 @@
|
||||
name = "magenta light tube"
|
||||
brightness_color = LIGHT_COLOR_VIOLET
|
||||
|
||||
/obj/item/light/tube/colored/pale_purple
|
||||
name = "pale purple light tube"
|
||||
brightness_color = LIGHT_COLOR_PALE_PURPLE
|
||||
|
||||
/obj/item/light/tube/colored/yellow
|
||||
name = "yellow light tube"
|
||||
brightness_color = LIGHT_COLOR_YELLOW
|
||||
@@ -186,6 +190,10 @@
|
||||
name = "magenta light bulb"
|
||||
brightness_color = LIGHT_COLOR_VIOLET
|
||||
|
||||
/obj/item/light/bulb/colored/pale_purple
|
||||
name = "pale purple light tube"
|
||||
brightness_color = LIGHT_COLOR_PALE_PURPLE
|
||||
|
||||
/obj/item/light/bulb/colored/yellow
|
||||
name = "yellow light bulb"
|
||||
brightness_color = LIGHT_COLOR_YELLOW
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/night_brightness_power = 0.3
|
||||
var/supports_nightmode = TRUE
|
||||
var/nightmode = FALSE
|
||||
var/brightness_color = LIGHT_COLOR_HALOGEN
|
||||
var/brightness_color = LIGHT_COLOR_OFFWHITE
|
||||
/// Expected types defined in lightning.dm
|
||||
var/status = LIGHT_OK
|
||||
var/flickering = 0
|
||||
@@ -62,7 +62,10 @@
|
||||
var/previous_stat
|
||||
var/randomize_color = TRUE
|
||||
var/default_color
|
||||
var/static/list/randomized_colors = LIGHT_STANDARD_COLORS
|
||||
/// This is also defined at the area level! If you want to mess with
|
||||
/// light fixture colours without touching specific subtypes, you
|
||||
/// should probably be looking at the area's variables, not at this.
|
||||
var/static/list/randomized_colors = LIGHT_WARM_COLORS
|
||||
var/static/list/emergency_lights = list(
|
||||
LIGHT_MODE_RED = LIGHT_COLOR_EMERGENCY,
|
||||
LIGHT_MODE_DELTA = LIGHT_COLOR_ORANGE
|
||||
@@ -132,8 +135,14 @@
|
||||
if(prob(1) || (maybe_broken && prob(50)))
|
||||
broken(1)
|
||||
|
||||
// If we're randomizing the color of this fixture, we check if the area has a special palette.
|
||||
// This is intended to save mapping time by automating light variations in different areas.
|
||||
if(randomize_color)
|
||||
var/area/A = get_area(src)
|
||||
randomized_colors = A.area_lighting
|
||||
|
||||
brightness_color = pick(randomized_colors)
|
||||
|
||||
default_color = brightness_color // We need a different var so the new color doesn't get wiped away. Initial() wouldn't work since brightness_color is overridden.
|
||||
update(0)
|
||||
set_pixel_offsets()
|
||||
|
||||
Reference in New Issue
Block a user