From 90b6691c8f0eb00884b5c9f25f780b2b41d517b9 Mon Sep 17 00:00:00 2001 From: Lohikar Date: Wed, 31 May 2017 03:43:18 -0500 Subject: [PATCH] Sunlight (#2542) Implements a configurable sun for a sunlight effect using the lighting engine. Abuses Z-lights to illuminate Zs in a semi-realistic way. Kinda slow at setting state, but state changes shouldn't lag & are rare. Also adds the ability to create lights that ignore visibility when calculating range, causing them to shine through objects/walls. --- baystation12.dme | 3 + code/__defines/subsystem-priority.dm | 3 +- code/controllers/configuration.dm | 9 ++ code/controllers/subsystems/lighting.dm | 6 +- code/controllers/subsystems/sunlight.dm | 93 +++++++++++ code/game/area/Space Station 13 areas.dm | 15 -- code/game/area/asteroid_areas.dm | 3 +- code/modules/admin/admin_verbs.dm | 18 ++- code/modules/lighting/_lighting_defs.dm | 39 +++++ code/modules/lighting/lighting_atom.dm | 3 + code/modules/lighting/lighting_source.dm | 48 +----- .../modules/lighting/lighting_source_novis.dm | 146 ++++++++++++++++++ code/modules/lighting/~lighting_undefs.dm | 6 + config/example/game_options.txt | 10 ++ 14 files changed, 336 insertions(+), 66 deletions(-) create mode 100644 code/controllers/subsystems/sunlight.dm create mode 100644 code/modules/lighting/_lighting_defs.dm create mode 100644 code/modules/lighting/lighting_source_novis.dm diff --git a/baystation12.dme b/baystation12.dme index 3f2da2488e3..9a0b26fa5c6 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -172,6 +172,7 @@ #include "code\controllers\subsystems\radio.dm" #include "code\controllers\subsystems\statistics.dm" #include "code\controllers\subsystems\sun.dm" +#include "code\controllers\subsystems\sunlight.dm" #include "code\controllers\subsystems\supply.dm" #include "code\controllers\subsystems\ticker.dm" #include "code\controllers\subsystems\timer.dm" @@ -1326,12 +1327,14 @@ #include "code\modules\library\lib_items.dm" #include "code\modules\library\lib_machines.dm" #include "code\modules\library\lib_readme.dm" +#include "code\modules\lighting\_lighting_defs.dm" #include "code\modules\lighting\lighting_area.dm" #include "code\modules\lighting\lighting_atom.dm" #include "code\modules\lighting\lighting_corner.dm" #include "code\modules\lighting\lighting_overlay.dm" #include "code\modules\lighting\lighting_profiler.dm" #include "code\modules\lighting\lighting_source.dm" +#include "code\modules\lighting\lighting_source_novis.dm" #include "code\modules\lighting\lighting_turf.dm" #include "code\modules\lighting\lighting_verbs.dm" #include "code\modules\lighting\~lighting_undefs.dm" diff --git a/code/__defines/subsystem-priority.dm b/code/__defines/subsystem-priority.dm index cae951feb0b..21c086136f8 100644 --- a/code/__defines/subsystem-priority.dm +++ b/code/__defines/subsystem-priority.dm @@ -18,7 +18,8 @@ #define SS_INIT_MISC 3 // Subsystems without an explicitly set initialization order start here. #define SS_INIT_LIGHTING 2 // Generation of lighting overlays and pre-bake. #define SS_INIT_OPENTURF 1 // Openturf flush. Should run after SSoverlay & SSicon_smooth so it copies the smoothed sprites. Causes lighting updates if starlight is enabled. -#define SS_INIT_LOBBY 0 // Lobby timer starts here. +#define SS_INIT_SUNLIGHT 0 // Sunlight setup. Creates lots of lighting & SSopenturf updates, but done after SSlighting inits so it doesn't delay boot. +#define SS_INIT_LOBBY -1 // Lobby timer starts here. // Something to remember when setting priorities: SS_TICKER runs before Normal, which runs before SS_BACKGROUND. // Each group has its own priority bracket. diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index c2f330f11b8..868250db649 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -276,6 +276,9 @@ var/list/gamemode_cache = list() var/access_deny_vms = 0 var/access_warn_vms = 0 + var/sun_accuracy = 8 + var/sun_target_z = 7 + /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode for (var/T in L) @@ -920,6 +923,12 @@ var/list/gamemode_cache = list() if("use_loyalty_implants") config.use_loyalty_implants = 1 + if ("sunlight_accuracy") + config.sun_accuracy = value + + if ("sunlight_z") + config.sun_target_z = value + else log_misc("Unknown setting in configuration: '[name]'") diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm index 66aceef22f2..48b3b57760c 100644 --- a/code/controllers/subsystems/lighting.dm +++ b/code/controllers/subsystems/lighting.dm @@ -5,6 +5,7 @@ var/datum/controller/subsystem/lighting/SSlighting /datum/controller/subsystem/lighting name = "Lighting" wait = LIGHTING_INTERVAL + flags = SS_FIRE_IN_LOBBY priority = SS_PRIORITY_LIGHTING init_order = SS_INIT_LIGHTING @@ -31,7 +32,10 @@ var/datum/controller/subsystem/lighting/SSlighting LAZYINITLIST(lighting_overlays) /datum/controller/subsystem/lighting/stat_entry() - ..("O:[lighting_overlays.len] C:[lighting_corners.len] ITL:[round(instant_tick_limit, 0.1)]%\n\tP:{L:[light_queue.len]|C:[corner_queue.len]|O:[overlay_queue.len]}\n\tL:{L:[processed_lights]|C:[processed_corners]|O:[processed_overlays]}") + var/out = "O:[lighting_overlays.len] C:[lighting_corners.len] ITL:[round(instant_tick_limit, 0.1)]%\n" + out += "\tP:{L:[light_queue.len]|C:[corner_queue.len]|O:[overlay_queue.len]}\n" + out += "\tL:{L:[processed_lights]|C:[processed_corners]|O:[processed_overlays]}\n" + ..(out) /datum/controller/subsystem/lighting/ExplosionStart() force_queued = TRUE diff --git a/code/controllers/subsystems/sunlight.dm b/code/controllers/subsystems/sunlight.dm new file mode 100644 index 00000000000..ce678f64fbf --- /dev/null +++ b/code/controllers/subsystems/sunlight.dm @@ -0,0 +1,93 @@ +/var/datum/controller/subsystem/sunlight/SSsunlight + +/datum/controller/subsystem/sunlight + name = "Sunlight" + flags = SS_NO_FIRE + init_order = SS_INIT_SUNLIGHT + + var/list/light_points = list() + var/config.sun_target_z = 7 + + var/list/presets + +/datum/controller/subsystem/sunlight/New() + NEW_SS_GLOBAL(SSsunlight) + +/datum/controller/subsystem/sunlight/stat_entry() + ..("A:[config.sun_accuracy] LP:[light_points.len] Z:[config.sun_target_z]") + +/datum/controller/subsystem/sunlight/Initialize() + presets = list() + for (var/thing in subtypesof(/datum/sun_state)) + presets += new thing + + var/thing + var/turf/T + for (thing in block(locate(1, 1, config.sun_target_z), locate(world.maxx, world.maxy, config.sun_target_z))) + T = thing + if (!(T.x % config.sun_accuracy) && !(T.y % config.sun_accuracy)) + light_points += new /atom/movable/sunobj(thing) + + CHECK_TICK + + log_debug("sunlight: [light_points.len] sun emitters.") + ..() + +/datum/controller/subsystem/sunlight/proc/set_overall_light(...) + . = 0 + SSlighting.force_queued = TRUE + for (var/thing in light_points) + var/atom/movable/AM = thing + AM.set_light(arglist(args)) + .++ + CHECK_TICK + + if (!SSlighting.force_override) + SSlighting.force_queued = FALSE + +/datum/controller/subsystem/sunlight/proc/apply_sun_state(datum/sun_state/S) + log_debug("sunlight: Applying preset [S].") + set_overall_light(config.sun_accuracy * 1.2, 1, S.color) + +/atom/movable/sunobj + name = "sunlight emitter" + desc = "Weren't you told to never look directly at the sun? (but seriously, you shouldn't see this)" + light_novis = TRUE + light_range = 16 + simulated = FALSE + mouse_opacity = FALSE + +/atom/movable/sunobj/Destroy(force = FALSE) + if (!force) + crash_with("Something attempted to delete a sunobj!") + return QDEL_HINT_LETMELIVE + + SSsunlight.light_points -= src + return ..() + +/atom/movable/sunobj/Initialize() + light_range = Ceiling(config.sun_accuracy * 1.2) + return ..() + +/datum/sun_state + var/color = "#FFFFFF" + var/name = "INVALID" + +/datum/sun_state/default + name = "Default" + +/datum/sun_state/sensual + name = "Sensual" + color = LIGHT_COLOR_PINK + +/datum/sun_state/red + name = "Nar-Sie" + color = "#FF0000" + +/datum/sun_state/less_red + name = "Red" + color = LIGHT_COLOR_RED + +/datum/sun_state/blue + name = "Blue" + color = LIGHT_COLOR_BLUE diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 565a04d4346..6de42043f89 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -161,7 +161,6 @@ area/space/atmosalert() icon_state = "shuttle" base_turf = /turf/simulated/floor/asteroid station_area = 1 - dynamic_lighting = 0 /area/shuttle/escape name = "\improper Emergency Shuttle" @@ -172,7 +171,6 @@ area/space/atmosalert() icon_state = "shuttle2" base_turf = /turf/simulated/floor/asteroid station_area = 1 - dynamic_lighting = 0 /area/shuttle/escape/centcom name = "\improper Emergency Shuttle Centcom" @@ -279,7 +277,6 @@ area/space/atmosalert() name = "\improper Transport Shuttle" base_turf = /turf/simulated/floor/asteroid station_area = 1 - dynamic_lighting = 0 /area/shuttle/specops/centcom name = "\improper Special Ops Shuttle" @@ -292,7 +289,6 @@ area/space/atmosalert() icon_state = "shuttlered2" base_turf = /turf/simulated/floor/asteroid station_area = 1 - dynamic_lighting = 0 /area/shuttle/syndicate_elite name = "\improper Merc Elite Shuttle" @@ -306,7 +302,6 @@ area/space/atmosalert() icon_state = "shuttlered2" base_turf = /turf/simulated/floor/asteroid station_area = 1 - dynamic_lighting = 0 /area/shuttle/administration flags = RAD_SHIELDED @@ -322,7 +317,6 @@ area/space/atmosalert() icon_state = "shuttlered2" base_turf = /turf/simulated/floor/asteroid station_area = 1 - dynamic_lighting = 0 /area/shuttle/research name = "\improper Research Shuttle" @@ -497,13 +491,11 @@ area/space/atmosalert() icon_state = "southwest" station_area = 1 base_turf = /turf/simulated/floor/asteroid - dynamic_lighting = 0 /area/syndicate_station/above name = "\improper Above the Station" icon_state = "northwest" station_area = 1 - dynamic_lighting = 0 /area/syndicate_station/under name = "\improper Under the Station" @@ -557,13 +549,11 @@ area/space/atmosalert() icon_state = "southwest" station_area = 1 base_turf = /turf/simulated/floor/asteroid - dynamic_lighting = 0 /area/skipjack_station/above name = "\improper Above the Station" icon_state = "northwest" station_area = 1 - dynamic_lighting = 0 /area/skipjack_station/under name = "\improper Under the Station" @@ -1208,7 +1198,6 @@ area/space/atmosalert() /area/solar requires_power = 1 always_unpowered = 1 - dynamic_lighting = 0 base_turf = /turf/space station_area = 1 @@ -1992,25 +1981,21 @@ area/space/atmosalert() name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 - dynamic_lighting = 0 /area/turret_protected/AIsatextFS name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 - dynamic_lighting = 0 /area/turret_protected/AIsatextAS name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 - dynamic_lighting = 0 /area/turret_protected/AIsatextAP name = "\improper AI Sat Ext" icon_state = "storage" luminosity = 1 - dynamic_lighting = 0 /area/turret_protected/NewAIMain name = "\improper AI Main New" diff --git a/code/game/area/asteroid_areas.dm b/code/game/area/asteroid_areas.dm index bba9d4ce1b9..9677f3f9612 100644 --- a/code/game/area/asteroid_areas.dm +++ b/code/game/area/asteroid_areas.dm @@ -8,7 +8,6 @@ /area/mine/explored name = "Mine" icon_state = "explored" - dynamic_lighting = 0 /area/mine/unexplored name = "Mine" @@ -137,4 +136,4 @@ name = "Research Kitchen" /area/outpost/research/disposal - name = "Research Waste Disposal" \ No newline at end of file + name = "Research Waste Disposal" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 8cfdfb87580..fd0a805054d 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -131,7 +131,8 @@ var/list/admin_verbs_fun = list( /datum/admins/proc/call_supply_drop, /datum/admins/proc/call_drop_pod, /client/proc/show_tip, - /client/proc/fab_tip + /client/proc/fab_tip, + /client/proc/apply_sunstate ) var/list/admin_verbs_spawn = list( @@ -1107,3 +1108,18 @@ var/list/admin_verbs_cciaa = list( log_and_message_admins("has regenerated all openturfs.") SSopenturf.hard_reset() + +/client/proc/apply_sunstate() + set category = "Fun" + set name = "Apply Sun Preset" + set desc = "Changes the sun preset. This takes a long time to apply, use sparingly!" + + if (!check_rights(R_FUN)) + return + + var/datum/sun_state/S = input("Choose a preset to apply:", "ILLUMINATE") as null|anything in SSsunlight.presets + if (!S) + to_chat(usr, "Cancelled.") + + SSsunlight.apply_sun_state(S) + log_and_message_admins("has set the sun state to '[S]'.") diff --git a/code/modules/lighting/_lighting_defs.dm b/code/modules/lighting/_lighting_defs.dm new file mode 100644 index 00000000000..2e1f49e1b81 --- /dev/null +++ b/code/modules/lighting/_lighting_defs.dm @@ -0,0 +1,39 @@ +// This is the define used to calculate falloff. +#define LUM_FALLOFF(C, T) (1 - CLAMP01(sqrt((C.x - T.x) ** 2 + (C.y - T.y) ** 2 + LIGHTING_HEIGHT) / max(1, light_range))) +#define LUM_FALLOFF_XY(Cx,Cy,Tx,Ty) (1 - CLAMP01(sqrt(((Cx) - (Tx)) ** 2 + ((Cy) - (Ty)) ** 2 + LIGHTING_HEIGHT) / max(1, light_range))) + +// Macro that applies light to a new corner. +// It is a macro in the interest of speed, yet not having to copy paste it. +// If you're wondering what's with the backslashes, the backslashes cause BYOND to not automatically end the line. +// As such this all gets counted as a single line. +// The braces and semicolons are there to be able to do this on a single line. +#define APPLY_CORNER_XY(C,now,Tx,Ty) \ + . = LUM_FALLOFF_XY(C.x, C.y, Tx, Ty); \ + \ + . *= light_power; \ + var/OLD = effect_str[C]; \ + \ + effect_str[C] = .; \ + \ + C.update_lumcount \ + ( \ + (. * lum_r) - (OLD * applied_lum_r), \ + (. * lum_g) - (OLD * applied_lum_g), \ + (. * lum_b) - (OLD * applied_lum_b), \ + (. * lum_u) - (OLD * applied_lum_u), \ + now \ + ); + +#define APPLY_CORNER(C,now) APPLY_CORNER_XY(C,now,source_turf.x,source_turf.y) + +// I don't need to explain what this does, do I? +#define REMOVE_CORNER(C,now) \ + . = -effect_str[C]; \ + C.update_lumcount \ + ( \ + . * applied_lum_r, \ + . * applied_lum_g, \ + . * applied_lum_b, \ + . * applied_lum_u, \ + now \ + ); diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index 3bffde40d69..bf2469c83c1 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -6,6 +6,7 @@ var/light_color // Hexadecimal RGB string representing the colour of the light. var/uv_intensity = 255 // How much UV light is being emitted by this object. Valid range: 0-255. var/light_wedge // The angle that the light's emission should be restricted to. null for omnidirectional. + var/light_novis // If TRUE, visibility checks will be skipped when calculating this light. var/tmp/datum/light_source/light // Our light source. Don't fuck with this directly unless you have a good reason! var/tmp/list/light_sources // Any light sources that are "inside" of us, for example, if src here was a mob that's carrying a flashlight, that flashlight's light source would be part of this list. @@ -71,6 +72,8 @@ if (light) // Update the light or create it if it does not exist. light.update(.) + else if (light_novis) + light = new/datum/light_source/novis(src, .) else light = new/datum/light_source(src, .) diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index 3844f7cda7d..d248f670bb3 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -65,7 +65,7 @@ update() - L_PROF(source_atom, "source_new") + L_PROF(source_atom, "source_new([type])") return ..() @@ -147,42 +147,6 @@ else lum_u = 0 -// Macro that applies light to a new corner. -// It is a macro in the interest of speed, yet not having to copy paste it. -// If you're wondering what's with the backslashes, the backslashes cause BYOND to not automatically end the line. -// As such this all gets counted as a single line. -// The braces and semicolons are there to be able to do this on a single line. -#define APPLY_CORNER_XY(C,now,Tx,Ty) \ - . = LUM_FALLOFF_XY(C.x, C.y, Tx, Ty); \ - \ - . *= light_power; \ - var/OLD = effect_str[C]; \ - \ - effect_str[C] = .; \ - \ - C.update_lumcount \ - ( \ - (. * lum_r) - (OLD * applied_lum_r), \ - (. * lum_g) - (OLD * applied_lum_g), \ - (. * lum_b) - (OLD * applied_lum_b), \ - (. * lum_u) - (OLD * applied_lum_u), \ - now \ - ); - -#define APPLY_CORNER(C,now) APPLY_CORNER_XY(C,now,source_turf.x,source_turf.y) - -// I don't need to explain what this does, do I? -#define REMOVE_CORNER(C,now) \ - . = -effect_str[C]; \ - C.update_lumcount \ - ( \ - . * applied_lum_r, \ - . * applied_lum_g, \ - . * applied_lum_b, \ - . * applied_lum_u, \ - now \ - ); - #define POLAR_TO_CART_X(R,T) ((R) * cos(T)) #define POLAR_TO_CART_Y(R,T) ((R) * sin(T)) #define PSEUDO_WEDGE(A_X,A_Y,B_X,B_Y) ((A_X)*(B_Y) - (A_Y)*(B_X)) @@ -267,10 +231,6 @@ #undef PSEUDO_WEDGE #undef MINMAX -// This is the define used to calculate falloff. -#define LUM_FALLOFF(C, T) (1 - CLAMP01(sqrt((C.x - T.x) ** 2 + (C.y - T.y) ** 2 + LIGHTING_HEIGHT) / max(1, light_range))) -#define LUM_FALLOFF_XY(Cx,Cy,Tx,Ty) (1 - CLAMP01(sqrt(((Cx) - (Tx)) ** 2 + ((Cy) - (Ty)) ** 2 + LIGHTING_HEIGHT) / max(1, light_range))) - /datum/light_source/proc/remove_lum(var/now = FALSE) applied = FALSE @@ -298,6 +258,7 @@ APPLY_CORNER(C,now) UNSETEMPTY(effect_str) +// If you update this, update the equivalent proc in lighting_source_novis.dm. /datum/light_source/proc/update_corners(now = FALSE) var/update = FALSE @@ -449,8 +410,3 @@ #undef QUEUE_UPDATE #undef DO_UPDATE #undef INTELLIGENT_UPDATE -#undef LUM_FALLOFF -#undef LUM_FALLOFF_XY -#undef REMOVE_CORNER -#undef APPLY_CORNER -#undef APPLY_CORNER_XY diff --git a/code/modules/lighting/lighting_source_novis.dm b/code/modules/lighting/lighting_source_novis.dm new file mode 100644 index 00000000000..7a184a4e521 --- /dev/null +++ b/code/modules/lighting/lighting_source_novis.dm @@ -0,0 +1,146 @@ +/datum/light_source/novis + +/datum/light_source/novis/update_corners(now = FALSE) + set waitfor = FALSE + var/update = FALSE + + if (QDELETED(source_atom)) + qdel(src) + return + + if (source_atom.light_power != light_power) + light_power = source_atom.light_power + update = TRUE + + if (source_atom.light_range != light_range) + light_range = source_atom.light_range + update = TRUE + + if (!top_atom) + top_atom = source_atom + update = TRUE + + if (top_atom.loc != source_turf) + source_turf = top_atom.loc + update = TRUE + + if (!light_range || !light_power) + qdel(src) + return + + if (isturf(top_atom)) + if (source_turf != top_atom) + source_turf = top_atom + update = TRUE + else if (top_atom.loc != source_turf) + source_turf = top_atom.loc + update = TRUE + + if (!source_turf) + return // Somehow we've got a light in nullspace, no-op. + + if (light_range && light_power && !applied) + update = TRUE + + if (source_atom.light_color != light_color) + light_color = source_atom.light_color + parse_light_color() + update = TRUE + + else if (applied_lum_r != lum_r || applied_lum_g != lum_g || applied_lum_b != lum_b) + update = TRUE + + if (update) + needs_update = LIGHTING_CHECK_UPDATE + else if (needs_update == LIGHTING_CHECK_UPDATE) + return // No change. + + var/list/datum/lighting_corner/corners = list() + var/list/turf/turfs = list() + var/thing + var/datum/lighting_corner/C + var/turf/T + var/Tthing + var/Sx = source_turf.x + var/Sy = source_turf.y + + // We don't need no damn vis checks! + for (Tthing in RANGE_TURFS(Ceiling(light_range), source_turf)) + T = Tthing + check_t: + for (thing in T.get_corners()) + C = thing + corners[C] = 0 + + turfs += T + + CHECK_TICK + + if (istype(T, /turf/simulated/open) && T:below) + T = T:below + goto check_t + + LAZYINITLIST(affecting_turfs) + + var/list/L = turfs - affecting_turfs // New turfs, add us to the affecting lights of them. + affecting_turfs += L + for (thing in L) + T = thing + LAZYADD(T.affecting_lights, src) + + L = affecting_turfs - turfs // Now-gone turfs, remove us from the affecting lights. + affecting_turfs -= L + for (thing in L) + T = thing + LAZYREMOVE(T.affecting_lights, src) + + LAZYINITLIST(effect_str) + if (needs_update == LIGHTING_VIS_UPDATE) + for (thing in corners - effect_str) + C = thing + LAZYADD(C.affecting, src) + if (!C.active) + effect_str[C] = 0 + continue + + APPLY_CORNER_XY(C, now, Sx, Sy) + else + L = corners - effect_str + for (thing in L) + C = thing + LAZYADD(C.affecting, src) + if (!C.active) + effect_str[C] = 0 + continue + + APPLY_CORNER_XY(C, now, Sx, Sy) + + for (thing in corners - L) + C = thing + if (!C.active) + effect_str[C] = 0 + continue + + APPLY_CORNER_XY(C, now, Sx, Sy) + + L = effect_str - corners + for (thing in L) + C = thing + REMOVE_CORNER(C, now) + LAZYREMOVE(C.affecting, src) + + effect_str -= L + + applied_lum_r = lum_r + applied_lum_g = lum_g + applied_lum_b = lum_b + applied_lum_u = lum_u + + UNSETEMPTY(effect_str) + UNSETEMPTY(affecting_turfs) + +/datum/light_source/novis/check_light_cone() + return FALSE + +/datum/light_source/novis/update_angle() + return diff --git a/code/modules/lighting/~lighting_undefs.dm b/code/modules/lighting/~lighting_undefs.dm index 46406a70d70..53fa2567cf7 100644 --- a/code/modules/lighting/~lighting_undefs.dm +++ b/code/modules/lighting/~lighting_undefs.dm @@ -3,3 +3,9 @@ #undef LIGHTING_ICON #undef LIGHTING_BASE_MATRIX + +#undef LUM_FALLOFF +#undef LUM_FALLOFF_XY +#undef REMOVE_CORNER +#undef APPLY_CORNER +#undef APPLY_CORNER_XY diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 39866b8e4c6..32b0cc0dc4e 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -69,3 +69,13 @@ ANIMAL_DELAY 1 ## Remove the # in front of this config option to have loyalty implants spawn by default on your server. #USE_LOYALTY_IMPLANTS + + +## Sunlight Settings ## + +# How many tiles should be between each light source. Higher is more accurate, but may take longer to process. Too low will freeze the server during updates. +# You probably should leave this unset. +#SUNLIGHT_ACCURACY 8 + +# The Z-level the sun is generated at. Keep in mind that light can only go downwards when setting this. +#SUNLIGHT_Z 7