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:
hazelrat
2026-05-27 15:37:50 +00:00
committed by GitHub
parent c41f0789fe
commit e9f1bb5709
18 changed files with 143 additions and 20 deletions
+21 -4
View File
@@ -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"
+3
View File
@@ -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"
+1
View File
@@ -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,
+2 -1
View File
@@ -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)
+10 -2
View File
@@ -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
+11 -2
View File
@@ -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()
+58
View File
@@ -0,0 +1,58 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: hazelmouse
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Lighting aboard the SCCV Horizon now varies per area, and is now slightly warmer in almost all areas of the game world, including off-sites."
@@ -11,6 +11,7 @@
name = "AI Area (PARENT AREA - DON'T USE)"
icon_state = "ai_chamber"
ambience = AMBIENCE_AI
area_lighting = LIGHT_HIGHSEC_COLORS
horizon_deck = 3
department = LOC_AI
area_flags = AREA_FLAG_RAD_SHIELDED | AREA_FLAG_HIDE_FROM_HOLOMAP
@@ -15,6 +15,7 @@
/// Head of Staff offices
/area/horizon/command/heads
name = "Head of Staff's Office (PARENT AREA - DON'T USE)"
area_lighting = LIGHT_HIGHSEC_COLORS
area_flags = AREA_FLAG_RAD_SHIELDED
sound_environment = SOUND_AREA_SMALL_ENCLOSED
lightswitch = FALSE
@@ -67,6 +68,8 @@
/area/horizon/command/bridge
name = "Bridge"
icon_state = "bridge"
area_lighting = LIGHT_CLINICAL_COLORS
department = LOC_COMMAND
no_light_control = 1
area_blurb = "The sound here seems to carry more than others, every click of a shoe or clearing of a throat amplified. \
The smell of ink, written and printed, wafts notably through the air."
@@ -91,6 +94,7 @@
/area/horizon/command/bridge/aibunker
name = "Command Bunker"
icon_state = "ai_foyer"
area_lighting = LIGHT_HIGHSEC_COLORS
area_flags = AREA_FLAG_RAD_SHIELDED | AREA_FLAG_HIDE_FROM_HOLOMAP
area_blurb = "Heavily armored and internal, the Combat Information Center is the secondary nerve center of the ship; the responsibility of the place weighs heavily."
@@ -105,6 +109,7 @@
/area/horizon/command/bridge/cciaroom
name = "Human Resources Meeting Room"
icon_state = "hr"
area_lighting = LIGHT_HIGHSEC_COLORS
sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
area_blurb = "You might feel dread when you enter this meeting room."
area_flags = AREA_FLAG_RAD_SHIELDED
@@ -119,6 +124,7 @@
/area/horizon/command/bridge/selfdestruct
name = "Authentication Terminal Safe"
icon_state = "bridge"
area_lighting = LIGHT_HIGHSEC_COLORS
area_flags = AREA_FLAG_RAD_SHIELDED | AREA_FLAG_HIDE_FROM_HOLOMAP
area_blurb = "The air veritably throbs with doom."
@@ -130,6 +136,7 @@
//Teleporter
/area/horizon/command/teleporter
name = "Teleporter"
area_lighting = LIGHT_HIGHSEC_COLORS
icon_state = "teleporter"
horizon_deck = 1
area_blurb = "The air in here always feels charged with the subdued crackle of electricity, tasting faintly of ozone."
@@ -201,6 +201,7 @@
/area/horizon/repoffice
name = "Representative Office (PARENT AREA - DON'T USE)"
icon_state = "law"
area_lighting = LIGHT_HIGHSEC_COLORS
sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
holomap_color = HOLOMAP_AREACOLOR_CIVILIAN
horizon_deck = 3
@@ -1,6 +1,7 @@
/// ENGINEERING_AREAS
/area/horizon/engineering
name = "Engineering (PARENT AREA - DON'T USE)"
area_lighting = LIGHT_ENGINEERING_COLORS
icon_state = "engineering"
ambience = AMBIENCE_ENGINEERING
holomap_color = HOLOMAP_AREACOLOR_ENGINEERING
@@ -229,13 +230,14 @@
/// TCOMMS_AREAS
/area/horizon/tcommsat
ambience = AMBIENCE_ENGINEERING
area_lighting = LIGHT_HIGHSEC_COLORS
no_light_control = 1
station_area = TRUE
holomap_color = HOLOMAP_AREACOLOR_ENGINEERING
horizon_deck = 3
area_blurb = "Countless machines sit within these compartments, an unfathomably complex network that runs every radio and computer connection. \
The air lacks any notable scent, having been filtered of dust and pollutants for the sake of all the sensitive machinery."
department = LOC_ENGINEERING
department = LOC_COMMAND
subdepartment = SUBLOC_TELECOMMS
/area/horizon/tcommsat/entrance
@@ -2,6 +2,7 @@
/area/horizon/maintenance
name = "Horizon - Maintenance (PARENT AREA - DON'T USE)"
icon_state = "maintenance"
area_lighting = LIGHT_ENGINEERING_COLORS
area_flags = AREA_FLAG_RAD_SHIELDED | AREA_FLAG_HIDE_FROM_HOLOMAP | AREA_FLAG_PREVENT_PERSISTENT_TRASH
sound_environment = SOUND_AREA_TUNNEL_ENCLOSED
turf_initializer = new /datum/turf_initializer/maintenance()
@@ -1,6 +1,7 @@
/// MEDICAL_AREAS
/area/horizon/medical
station_area = TRUE
area_lighting = LIGHT_CLINICAL_COLORS
holomap_color = HOLOMAP_AREACOLOR_MEDICAL
area_blurb = "Various smells waft through the sick bay: disinfectants, various medicines, sterile gloves, and gauze. It's not a pleasant smell, but one you could grow to ignore."
department = LOC_MEDICAL
@@ -2,6 +2,7 @@
/area/horizon/operations
name = "Ops (PARENT AREA - DON'T USE)"
icon_state = "dark"
area_lighting = LIGHT_ENGINEERING_COLORS
ambience = AMBIENCE_ENGINEERING
holomap_color = HOLOMAP_AREACOLOR_OPERATIONS
department = LOC_OPERATIONS
@@ -75,6 +76,7 @@
/area/horizon/hangar
name = "Hangar (PARENT AREA - DON'T USE)"
icon_state = "bluenew"
area_lighting = LIGHT_ENGINEERING_COLORS
ambience = AMBIENCE_HANGAR
sound_environment = SOUND_ENVIRONMENT_HANGAR
holomap_color = HOLOMAP_AREACOLOR_HANGAR
@@ -140,12 +142,15 @@
horizon_deck = 1
/// WEAPONS_AREAS
/area/horizon/weapons/longbow
name = "Longbow Weapon System"
icon_state = "bridge_weapon"
/area/horizon/weapons
area_lighting = LIGHT_ENGINEERING_COLORS
sound_environment = SOUND_AREA_LARGE_ENCLOSED
ambience = AMBIENCE_HIGHSEC
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
/area/horizon/weapons/longbow
name = "Longbow Weapon System"
icon_state = "bridge_weapon"
horizon_deck = 3
area_blurb = "One of the SCCV Horizon's daunting weapons bays."
department = LOC_COMMAND
@@ -154,9 +159,6 @@
/area/horizon/weapons/grauwolf
name = "Grauwolf Weapon System"
icon_state = "bridge_weapon"
sound_environment = SOUND_AREA_LARGE_ENCLOSED
ambience = AMBIENCE_HIGHSEC
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
horizon_deck = 2
area_blurb = "One of the SCCV Horizon's daunting weapons bays."
department = LOC_COMMAND
@@ -165,6 +167,7 @@
/// STORAGE_AREAS
/area/horizon/storage
name = "Storage (PARENT AREA - DON'T USE)"
area_lighting = LIGHT_ENGINEERING_COLORS
department = LOC_CREW
lightswitch = FALSE
@@ -192,6 +195,7 @@
/area/horizon/storage/secure/ops_vault
name = "Secure Operational Storage"
icon_state = "storage"
area_lighting = LIGHT_HIGHSEC_COLORS
horizon_deck = 2
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
department = LOC_COMMAND
@@ -201,6 +205,7 @@
/area/horizon/storage/secure/tech_vault
name = "Secure Technical Storage"
icon_state = "storage"
area_lighting = LIGHT_HIGHSEC_COLORS
horizon_deck = 3
area_flags = AREA_FLAG_HIDE_FROM_HOLOMAP
department = LOC_COMMAND
@@ -1,5 +1,6 @@
/// SCIENCE_AREAS
/area/horizon/rnd
area_lighting = LIGHT_RESEARCH_COLORS
holomap_color = HOLOMAP_AREACOLOR_SCIENCE
department = LOC_SCIENCE
horizon_deck = 2
@@ -1,6 +1,7 @@
/// SECURITY_AREAS
/area/horizon/security
name = "Security (PARENT AREA - DON'T USE)"
area_lighting = LIGHT_WARM_COLORS
holomap_color = HOLOMAP_AREACOLOR_SECURITY
department = LOC_SECURITY
area_blurb = "Every sound seems to echo just a little louder and more threateningly in the Security sectors of the SCCV Horizon."