mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +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:
@@ -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