diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm index 37203792f76..7357c5f441e 100644 --- a/code/__DEFINES/lighting.dm +++ b/code/__DEFINES/lighting.dm @@ -47,6 +47,16 @@ #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) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 106c1900a82..eae4478d0a1 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -114,33 +114,6 @@ #define CHRISTMAS "Christmas" #define FRIDAY_13TH "Friday the 13th" -//Light color defs, for light-emitting things -//Some defs may be pure color- this is for neatness, and configurability. Changing #define COLOR_ is a bad idea. -#define LIGHT_COLOR_CYAN "#7BF9FF" -#define LIGHT_COLOR_PURE_CYAN "#00FFFF" - -#define LIGHT_COLOR_RED "#B40000" -#define LIGHT_COLOR_ORANGE "#FF9933" -#define LIGHT_COLOR_DARKRED "#A91515" -#define LIGHT_COLOR_PURE_RED "#FF0000" - -#define LIGHT_COLOR_GREEN "#00CC00" -#define LIGHT_COLOR_DARKGREEN "#50AB00" -#define LIGHT_COLOR_PURE_GREEN "#00FF00" - -#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250) -#define LIGHT_COLOR_LIGHTBLUE "#0099FF" -#define LIGHT_COLOR_DARKBLUE "#315AB4" -#define LIGHT_COLOR_PURE_BLUE "#0000FF" - -#define LIGHT_COLOR_FADEDPURPLE "#A97FAA" -#define LIGHT_COLOR_PURPLE "#CD00CD" -#define LIGHT_COLOR_PINK "#FF33CC" - -#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125) - -#define LIGHT_COLOR_WHITE "#FFFFFF" - #define RESIZE_DEFAULT_SIZE 1 //transfer_ai() defines. Main proc in ai_core.dm diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 3fa1c169521..ca444b4abdc 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -13,73 +13,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station */ - - -/area - var/fire = null - var/atmosalm = ATMOS_ALARM_NONE - var/poweralm = TRUE - var/party = null - var/report_alerts = TRUE // Should atmos alerts notify the AI/computers - level = null - name = "Space" - icon = 'icons/turf/areas.dmi' - icon_state = "unknown" - layer = AREA_LAYER - plane = BLACKNESS_PLANE //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE. - luminosity = 0 - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - invisibility = INVISIBILITY_LIGHTING - var/valid_territory = TRUE //used for cult summoning areas on station zlevel - var/map_name // Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints. - var/lightswitch = TRUE - - var/eject = null - - var/debug = 0 - var/requires_power = TRUE - var/always_unpowered = 0 //this gets overriden to 1 for space in area/New() - - var/power_equip = TRUE - var/power_light = TRUE - var/power_environ = TRUE - var/music = null - var/used_equip = FALSE - var/used_light = FALSE - var/used_environ = FALSE - var/static_equip - var/static_light = FALSE - var/static_environ - - var/has_gravity = TRUE - var/list/apc = list() - var/no_air = null - - var/air_doors_activated = FALSE - - var/tele_proof = FALSE - var/no_teleportlocs = FALSE - - var/outdoors = FALSE //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room) - var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default? - var/nad_allowed = FALSE //is the station NAD allowed on this area? - - // This var is used with the maploader (modules/awaymissions/maploader/reader.dm) - // if this is 1, when used in a map snippet, this will instantiate a unique - // area from any other instances already present (meaning you can have - // separate APCs, and so on) - var/there_can_be_many = FALSE - - var/global/global_uid = 0 - var/uid - - var/list/ambientsounds = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\ - 'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\ - 'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\ - 'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\ - 'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\ - 'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg') - /*Adding a wizard area teleport list because motherfucking lag -- Urist*/ /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ var/list/teleportlocs = list() @@ -137,14 +70,18 @@ var/list/ghostteleportlocs = list() /area/space icon_state = "space" - requires_power = 1 - always_unpowered = 1 - power_light = 0 - power_equip = 0 - power_environ = 0 + requires_power = TRUE + always_unpowered = TRUE + dynamic_lighting = DYNAMIC_LIGHTING_DISABLED + power_light = FALSE + power_equip = FALSE + power_environ = FALSE valid_territory = FALSE outdoors = 1 ambientsounds = list('sound/ambience/ambispace.ogg','sound/music/title2.ogg','sound/music/space.ogg','sound/music/traitor.ogg') + +/area/space/nearstation + icon_state = "space_near" dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT /area/space/atmosalert() @@ -167,8 +104,9 @@ var/list/ghostteleportlocs = list() //All shuttles show now be under shuttle since we have smooth-wall code. /area/shuttle - no_teleportlocs = 1 - requires_power = 0 + no_teleportlocs = TRUE + requires_power = FALSE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED valid_territory = FALSE /area/shuttle/arrival @@ -504,7 +442,7 @@ var/list/ghostteleportlocs = list() icon_state = "start" requires_power = 0 luminosity = 1 - dynamic_lighting = 0 + dynamic_lighting = DYNAMIC_LIGHTING_DISABLED has_gravity = 1 // === end remove @@ -519,8 +457,8 @@ var/list/ghostteleportlocs = list() /area/centcom name = "\improper Centcom" icon_state = "centcom" - requires_power = 0 - dynamic_lighting = 0 + requires_power = FALSE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED nad_allowed = TRUE /area/centcom/control @@ -573,6 +511,7 @@ var/list/ghostteleportlocs = list() /area/syndicate_mothership/control name = "\improper Syndicate Control Room" icon_state = "syndie-control" + dynamic_lighting = DYNAMIC_LIGHTING_FORCED /area/syndicate_mothership/elite_squad name = "\improper Syndicate Elite Squad" @@ -587,14 +526,14 @@ var/list/ghostteleportlocs = list() /area/asteroid // -- TLE name = "\improper Asteroid" icon_state = "asteroid" - requires_power = 0 + requires_power = FALSE valid_territory = FALSE /area/asteroid/cave // -- TLE name = "\improper Asteroid - Underground" icon_state = "cave" - requires_power = 0 - outdoors = 1 + requires_power = FALSE + outdoors = TRUE /area/asteroid/artifactroom name = "\improper Asteroid - Artifact" @@ -603,17 +542,19 @@ var/list/ghostteleportlocs = list() /area/tdome name = "\improper Thunderdome" icon_state = "thunder" - requires_power = 0 - dynamic_lighting = 0 + requires_power = FALSE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED /area/tdome/arena_source name = "\improper Thunderdome Arena Template" icon_state = "thunder" + dynamic_lighting = DYNAMIC_LIGHTING_DISABLED /area/tdome/arena name = "\improper Thunderdome Arena" icon_state = "thunder" + dynamic_lighting = DYNAMIC_LIGHTING_DISABLED /area/tdome/tdome1 name = "\improper Thunderdome (Team 1)" @@ -687,20 +628,21 @@ var/list/ghostteleportlocs = list() /area/abductor_ship name = "\improper Abductor Ship" icon_state = "yellow" - requires_power = 0 - has_gravity = 1 - dynamic_lighting = 0 + requires_power = FALSE + has_gravity = TRUE + dynamic_lighting = FALSE /area/wizard_station name = "\improper Wizard's Den" icon_state = "yellow" - requires_power = 0 + requires_power = FALSE + dynamic_lighting = DYNAMIC_LIGHTING_FORCED /area/ninja name = "\improper Ninja Area Parent" icon_state = "ninjabase" - requires_power = 0 - no_teleportlocs = 1 + requires_power = FALSE + no_teleportlocs = TRUE /area/ninja/outpost name = "\improper SpiderClan Outpost" @@ -711,9 +653,9 @@ var/list/ghostteleportlocs = list() /area/vox_station name = "\improper Vox Base" icon_state = "yellow" - requires_power = 0 - dynamic_lighting = 0 - no_teleportlocs = 1 + requires_power = FALSE + dynamic_lighting = FALSE + no_teleportlocs = TRUE /area/vox_station/transit name = "\improper Hyperspace" @@ -2554,9 +2496,9 @@ var/list/ghostteleportlocs = list() /area/awaymission/beach name = "Beach" icon_state = "beach" - luminosity = 1 - dynamic_lighting = 0 - requires_power = 0 + luminosity = TRUE + dynamic_lighting = DYNAMIC_LIGHTING_DISABLED + requires_power = FALSE ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg') /area/awaymission/undersea @@ -2668,7 +2610,7 @@ var/list/ghostteleportlocs = list() /area/vr name = "VR" requires_power = 0 - dynamic_lighting = 0 + dynamic_lighting = DYNAMIC_LIGHTING_DISABLED no_teleportlocs = 1 diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index eb1ef3c1458..672c3a0f18c 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -1,9 +1,70 @@ -/area/New() - ..() +/area + var/fire = null + var/atmosalm = ATMOS_ALARM_NONE + var/poweralm = TRUE + var/party = null + var/report_alerts = TRUE // Should atmos alerts notify the AI/computers + level = null + name = "Space" + icon = 'icons/turf/areas.dmi' + icon_state = "unknown" + layer = AREA_LAYER + plane = BLACKNESS_PLANE //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE. + luminosity = 0 + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + invisibility = INVISIBILITY_LIGHTING + var/valid_territory = TRUE //used for cult summoning areas on station zlevel + var/map_name // Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints. + var/lightswitch = TRUE - GLOB.all_areas += src + var/eject = null + + var/debug = 0 + var/requires_power = TRUE + var/always_unpowered = 0 //this gets overriden to 1 for space in area/New() + + var/power_equip = TRUE + var/power_light = TRUE + var/power_environ = TRUE + var/music = null + var/used_equip = FALSE + var/used_light = FALSE + var/used_environ = FALSE + var/static_equip + var/static_light = FALSE + var/static_environ + + var/has_gravity = TRUE + var/list/apc = list() + var/no_air = null + + var/air_doors_activated = FALSE + + var/tele_proof = FALSE + var/no_teleportlocs = FALSE + + var/outdoors = FALSE //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room) + var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default? + var/nad_allowed = FALSE //is the station NAD allowed on this area? + + // This var is used with the maploader (modules/awaymissions/maploader/reader.dm) + // if this is 1, when used in a map snippet, this will instantiate a unique + // area from any other instances already present (meaning you can have + // separate APCs, and so on) + var/there_can_be_many = FALSE + + var/global/global_uid = 0 + var/uid + + var/list/ambientsounds = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\ + 'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\ + 'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\ + 'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\ + 'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\ + 'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg') /area/Initialize(mapload) + GLOB.all_areas += src icon_state = "" layer = AREA_LAYER uid = ++global_uid diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 86f94ee37d2..f9f19d4d4c4 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -201,9 +201,6 @@ W.blueprint_data = old_blueprint_data - for(var/turf/space/S in range(W,1)) - S.update_starlight() - recalc_atom_opacity() if(SSlighting.initialized) diff --git a/code/modules/events/aurora_caelus.dm b/code/modules/events/aurora_caelus.dm index 58302950b5e..62de79a19cb 100644 --- a/code/modules/events/aurora_caelus.dm +++ b/code/modules/events/aurora_caelus.dm @@ -17,10 +17,11 @@ We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/ M.playsound_local(null, 'sound/ambience/aurora_caelus.ogg', 20, FALSE, pressure_affected = FALSE) /datum/event/aurora_caelus/start() - for(var/s in GLOB.station_level_space_turfs) - var/turf/space/S = s - S.set_light(S.light_range * 3, S.light_power * 0.5, aurora_colors[1]) - CHECK_TICK + for(var/area in GLOB.all_areas) + var/area/A = area + if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT) + for(var/turf/space/S in A) + S.set_light(S.light_range * 3, S.light_power * 0.5) /datum/event/aurora_caelus/tick() if(aurora_progress >= aurora_colors.len) @@ -28,15 +29,18 @@ We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/ if(activeFor % 5 == 0) aurora_progress++ var/aurora_color = aurora_colors[aurora_progress] - for(var/s in GLOB.station_level_space_turfs) - var/turf/space/S = s - S.set_light(l_color = aurora_color) - CHECK_TICK + for(var/area in GLOB.all_areas) + var/area/A = area + if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT) + for(var/turf/space/S in A) + S.set_light(l_color = aurora_color) /datum/event/aurora_caelus/end() - for(var/s in GLOB.station_level_space_turfs) - var/turf/space/S = s - fade_to_black(S) + for(var/area in GLOB.all_areas) + var/area/A = area + if(initial(A.dynamic_lighting) == DYNAMIC_LIGHTING_IFSTARLIGHT) + for(var/turf/space/S in A) + fade_to_black(S) event_announcement.Announce("The Aurora Caelus event is now ending. Starlight conditions will slowly return to normal. \ When this has concluded, please return to your workplace and continue work as normal. \ Have a pleasant shift, [station_name()], and thank you for watching with us.", diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index 6083c7af7f1..586668ec139 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -7,7 +7,7 @@ icon_state = "transparent" color = LIGHTING_BASE_MATRIX plane = LIGHTING_PLANE - mouse_opacity = MOUSE_OPACITY_TRANSPARENT + mouse_opacity = MOUSE_OPACITY_TRANSPARENT layer = LIGHTING_LAYER invisibility = INVISIBILITY_LIGHTING diff --git a/code/modules/lighting/lighting_setup.dm b/code/modules/lighting/lighting_setup.dm index 6c1dab13ec6..68119ba3921 100644 --- a/code/modules/lighting/lighting_setup.dm +++ b/code/modules/lighting/lighting_setup.dm @@ -4,7 +4,6 @@ continue for(var/turf/T in A) - if(!IS_DYNAMIC_LIGHTING(T)) continue