From 4670bdec4dfcdcd33dd614446a2fd6a7533ba02e Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 19:27:04 -0400 Subject: [PATCH 1/8] does day and night the hard way --- .../subsystem/like_night_and_day.dm | 81 +++++++++++-------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index 041ac0177c258..62f2dad5d0980 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -3,8 +3,6 @@ SUBSYSTEM_DEF(daynight) wait = 10 SECONDS init_order = INIT_ORDER_NIGHT_AND_DAY runlevels = RUNLEVELS_DEFAULT - /// This is insanely stupid but it might work? The obj we keep in nullspace that we animate the colors and alpha on to modify our lighting from - var/obj/color_alpha_tracker /// List of all areas we check for in the day/night cycle var/list/areas_influenced = list( /area/vintage/surface_generator, @@ -37,17 +35,9 @@ SUBSYSTEM_DEF(daynight) /datum/controller/subsystem/daynight/Initialize() color_alpha_tracker = new - addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), daytime_duration) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), 3 MINUTES) return SS_INIT_SUCCESS -/datum/controller/subsystem/daynight/fire(resumed) - var/list/areas_to_transition = get_areas_to_edit() - for(var/area/transition_area in areas_to_transition) - if(!transition_area.base_lighting_alpha == color_alpha_tracker.alpha) - transition_area.base_lighting_alpha = color_alpha_tracker.alpha - if(!transition_area.base_lighting_color == color_alpha_tracker.color) - transition_area.base_lighting_color = color_alpha_tracker.color - /// Gets the areas the controller will need to edit /datum/controller/subsystem/daynight/proc/get_areas_to_edit() var/list/areas_to_edit = list() @@ -55,35 +45,62 @@ SUBSYSTEM_DEF(daynight) areas_to_edit += GLOB.areas_by_type[area_to_check] return areas_to_edit -/datum/controller/subsystem/daynight/proc/start_animation(color_to_trans, alpha_to_trans, time_to_trans) - animate(color_alpha_tracker, color = color_to_trans, alpha = alpha_to_trans, time = time_to_trans) - /// Starts the transition to afternoon -/datum/controller/subsystem/daynight/proc/start_afternoon_transition() - start_animation(day_transition_color,day_transition_alpha, day_transition_duration) - addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour)), day_transition_duration + 10 SECONDS) +/datum/controller/subsystem/daynight/proc/start_afternoon_transition(iteration) + var/list/areas_edited_now = get_areas_to_edit() + for(var/area/surface_area in areas_edited_now) + surface_area.base_lighting_alpha = LERP(daytime_alpha, day_transition_alpha, iteration / 5) + surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, daytime_color, 1, day_transition_color) + if(iteration < 5) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition), iteration + 1), day_transition_duration / 5) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour)), day_transition_duration / 5) /// Starts the transition to afternoon golden hour -/datum/controller/subsystem/daynight/proc/start_afternoon_golden_hour() - start_animation(golden_hour_color, golden_hour_alpha, golden_hour_duration) - addtimer(CALLBACK(src, PROC_REF(start_end_of_day)), golden_hour_duration + 10 SECONDS) +/datum/controller/subsystem/daynight/proc/start_afternoon_golden_hour(iteration) + var/list/areas_edited_now = get_areas_to_edit() + for(var/area/surface_area in areas_edited_now) + surface_area.base_lighting_alpha = LERP(day_transition_alpha, golden_hour_alpha, iteration / 5) + surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, day_transition_color, 1, golden_hour_color) + if(iteration < 5) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour), iteration + 1), day_transition_duration / 5) + addtimer(CALLBACK(src, PROC_REF(start_end_of_day)), golden_hour_duration / 5) /// Starts the transition to the end of the day -/datum/controller/subsystem/daynight/proc/start_end_of_day() - start_animation(night_color, night_alpha, night_duration) - addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour)), night_duration + 10 SECONDS) +/datum/controller/subsystem/daynight/proc/start_end_of_day(iteration) + var/list/areas_edited_now = get_areas_to_edit() + for(var/area/surface_area in areas_edited_now) + surface_area.base_lighting_alpha = LERP(golden_hour_alpha, night_alpha, iteration / 10) + surface_area.base_lighting_color = hsl_gradient(iteration / 10, 0, golden_hour_color, 1, night_color) + if(iteration < 10) + addtimer(CALLBACK(src, PROC_REF(start_end_of_day), iteration + 1), day_transition_duration / 10) + addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour)), night_duration / 10) /// Starts the transition to early morning -/datum/controller/subsystem/daynight/proc/start_morning_golden_hour() - start_animation(golden_hour_color, golden_hour_alpha, golden_hour_duration) - addtimer(CALLBACK(src, PROC_REF(start_morning_transition)), golden_hour_duration + 10 SECONDS) +/datum/controller/subsystem/daynight/proc/start_morning_golden_hour(iteration) + var/list/areas_edited_now = get_areas_to_edit() + for(var/area/surface_area in areas_edited_now) + surface_area.base_lighting_alpha = LERP(night_alpha, golden_hour_alpha, iteration / 5) + surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, night_color, 1, golden_hour_color) + if(iteration < 5) + addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour), iteration + 1), day_transition_duration / 5) + addtimer(CALLBACK(src, PROC_REF(start_morning_transition)), golden_hour_duration / 5) /// Starts the transition to morning -/datum/controller/subsystem/daynight/proc/start_morning_transition() - start_animation(day_transition_color, day_transition_alpha, day_transition_duration) - addtimer(CALLBACK(src, PROC_REF(start_mid_day)), day_transition_duration + 10 SECONDS) +/datum/controller/subsystem/daynight/proc/start_morning_transition(iteration) + var/list/areas_edited_now = get_areas_to_edit() + for(var/area/surface_area in areas_edited_now) + surface_area.base_lighting_alpha = LERP(golden_hour_alpha, day_transition_alpha, iteration / 5) + surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, golden_hour_color, 1, day_transition_color) + if(iteration < 5) + addtimer(CALLBACK(src, PROC_REF(start_morning_transition), iteration + 1), day_transition_duration / 5) + addtimer(CALLBACK(src, PROC_REF(start_mid_day)), day_transition_duration / 5) /// Starts mid-day -/datum/controller/subsystem/daynight/proc/start_mid_day() - start_animation(daytime_color, daytime_alpha, daytime_duration / 3) - addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), daytime_duration) +/datum/controller/subsystem/daynight/proc/start_mid_day(iteration) + var/list/areas_edited_now = get_areas_to_edit() + for(var/area/surface_area in areas_edited_now) + surface_area.base_lighting_alpha = LERP(day_transition_alpha, daytime_alpha, iteration / 15) + surface_area.base_lighting_color = hsl_gradient(iteration / 15, 0, day_transition_color, 1, daytime_color) + if(iteration < 15) + addtimer(CALLBACK(src, PROC_REF(start_mid_day), iteration + 1), day_transition_duration / 15) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), daytime_duration / 15) From c53c73cc87e51de944a1ca8c494596752a1e91b1 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 19:28:31 -0400 Subject: [PATCH 2/8] oops --- code/controllers/subsystem/like_night_and_day.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index 62f2dad5d0980..b193631cb808b 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -34,7 +34,6 @@ SUBSYSTEM_DEF(daynight) var/night_duration = 10 MINUTES /datum/controller/subsystem/daynight/Initialize() - color_alpha_tracker = new addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), 3 MINUTES) return SS_INIT_SUCCESS From 32593f9d9da5c44b9fc543dc844c5ed970986678 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 19:41:38 -0400 Subject: [PATCH 3/8] fixes some logic --- code/controllers/subsystem/like_night_and_day.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index b193631cb808b..45034b3954493 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -62,6 +62,7 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, day_transition_color, 1, golden_hour_color) if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour), iteration + 1), day_transition_duration / 5) + return addtimer(CALLBACK(src, PROC_REF(start_end_of_day)), golden_hour_duration / 5) /// Starts the transition to the end of the day @@ -72,6 +73,7 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_color = hsl_gradient(iteration / 10, 0, golden_hour_color, 1, night_color) if(iteration < 10) addtimer(CALLBACK(src, PROC_REF(start_end_of_day), iteration + 1), day_transition_duration / 10) + return addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour)), night_duration / 10) /// Starts the transition to early morning @@ -82,6 +84,7 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, night_color, 1, golden_hour_color) if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour), iteration + 1), day_transition_duration / 5) + return addtimer(CALLBACK(src, PROC_REF(start_morning_transition)), golden_hour_duration / 5) /// Starts the transition to morning @@ -92,6 +95,7 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, golden_hour_color, 1, day_transition_color) if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_morning_transition), iteration + 1), day_transition_duration / 5) + return addtimer(CALLBACK(src, PROC_REF(start_mid_day)), day_transition_duration / 5) /// Starts mid-day @@ -102,4 +106,5 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_color = hsl_gradient(iteration / 15, 0, day_transition_color, 1, daytime_color) if(iteration < 15) addtimer(CALLBACK(src, PROC_REF(start_mid_day), iteration + 1), day_transition_duration / 15) + return addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), daytime_duration / 15) From ca2245703b81ba7f2e9ce3b43492084bc9d2f0b8 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 19:47:11 -0400 Subject: [PATCH 4/8] single missed line (its over) --- code/controllers/subsystem/like_night_and_day.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index 45034b3954493..fbe3965400072 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -1,6 +1,6 @@ SUBSYSTEM_DEF(daynight) name = "Daynight" - wait = 10 SECONDS + flags = SS_NO_FIRE init_order = INIT_ORDER_NIGHT_AND_DAY runlevels = RUNLEVELS_DEFAULT /// List of all areas we check for in the day/night cycle @@ -52,6 +52,7 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, daytime_color, 1, day_transition_color) if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition), iteration + 1), day_transition_duration / 5) + return addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour)), day_transition_duration / 5) /// Starts the transition to afternoon golden hour From 82aff44610efa3ec23befd5ae09bfaec945a35d9 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 19:55:07 -0400 Subject: [PATCH 5/8] that makes sense, divide by zero --- code/controllers/subsystem/like_night_and_day.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index fbe3965400072..a630af72d67a1 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -34,7 +34,7 @@ SUBSYSTEM_DEF(daynight) var/night_duration = 10 MINUTES /datum/controller/subsystem/daynight/Initialize() - addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), 3 MINUTES) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), 1 MINUTES) return SS_INIT_SUCCESS /// Gets the areas the controller will need to edit @@ -45,7 +45,7 @@ SUBSYSTEM_DEF(daynight) return areas_to_edit /// Starts the transition to afternoon -/datum/controller/subsystem/daynight/proc/start_afternoon_transition(iteration) +/datum/controller/subsystem/daynight/proc/start_afternoon_transition(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(daytime_alpha, day_transition_alpha, iteration / 5) @@ -56,7 +56,7 @@ SUBSYSTEM_DEF(daynight) addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour)), day_transition_duration / 5) /// Starts the transition to afternoon golden hour -/datum/controller/subsystem/daynight/proc/start_afternoon_golden_hour(iteration) +/datum/controller/subsystem/daynight/proc/start_afternoon_golden_hour(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(day_transition_alpha, golden_hour_alpha, iteration / 5) @@ -67,7 +67,7 @@ SUBSYSTEM_DEF(daynight) addtimer(CALLBACK(src, PROC_REF(start_end_of_day)), golden_hour_duration / 5) /// Starts the transition to the end of the day -/datum/controller/subsystem/daynight/proc/start_end_of_day(iteration) +/datum/controller/subsystem/daynight/proc/start_end_of_day(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(golden_hour_alpha, night_alpha, iteration / 10) @@ -78,7 +78,7 @@ SUBSYSTEM_DEF(daynight) addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour)), night_duration / 10) /// Starts the transition to early morning -/datum/controller/subsystem/daynight/proc/start_morning_golden_hour(iteration) +/datum/controller/subsystem/daynight/proc/start_morning_golden_hour(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(night_alpha, golden_hour_alpha, iteration / 5) @@ -89,7 +89,7 @@ SUBSYSTEM_DEF(daynight) addtimer(CALLBACK(src, PROC_REF(start_morning_transition)), golden_hour_duration / 5) /// Starts the transition to morning -/datum/controller/subsystem/daynight/proc/start_morning_transition(iteration) +/datum/controller/subsystem/daynight/proc/start_morning_transition(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(golden_hour_alpha, day_transition_alpha, iteration / 5) @@ -100,7 +100,7 @@ SUBSYSTEM_DEF(daynight) addtimer(CALLBACK(src, PROC_REF(start_mid_day)), day_transition_duration / 5) /// Starts mid-day -/datum/controller/subsystem/daynight/proc/start_mid_day(iteration) +/datum/controller/subsystem/daynight/proc/start_mid_day(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(day_transition_alpha, daytime_alpha, iteration / 15) From 3095f7d6e14b873d649598915f5b75b97712a859 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 20:03:38 -0400 Subject: [PATCH 6/8] makes it possibly actually update when changed --- code/controllers/subsystem/like_night_and_day.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index a630af72d67a1..ba89a8ca55819 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -50,6 +50,7 @@ SUBSYSTEM_DEF(daynight) for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(daytime_alpha, day_transition_alpha, iteration / 5) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, daytime_color, 1, day_transition_color) + surface_area.update_base_lighting() if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition), iteration + 1), day_transition_duration / 5) return @@ -61,6 +62,7 @@ SUBSYSTEM_DEF(daynight) for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(day_transition_alpha, golden_hour_alpha, iteration / 5) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, day_transition_color, 1, golden_hour_color) + surface_area.update_base_lighting() if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_afternoon_golden_hour), iteration + 1), day_transition_duration / 5) return @@ -72,6 +74,7 @@ SUBSYSTEM_DEF(daynight) for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(golden_hour_alpha, night_alpha, iteration / 10) surface_area.base_lighting_color = hsl_gradient(iteration / 10, 0, golden_hour_color, 1, night_color) + surface_area.update_base_lighting() if(iteration < 10) addtimer(CALLBACK(src, PROC_REF(start_end_of_day), iteration + 1), day_transition_duration / 10) return @@ -83,6 +86,7 @@ SUBSYSTEM_DEF(daynight) for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(night_alpha, golden_hour_alpha, iteration / 5) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, night_color, 1, golden_hour_color) + surface_area.update_base_lighting() if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour), iteration + 1), day_transition_duration / 5) return @@ -94,6 +98,7 @@ SUBSYSTEM_DEF(daynight) for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(golden_hour_alpha, day_transition_alpha, iteration / 5) surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, golden_hour_color, 1, day_transition_color) + surface_area.update_base_lighting() if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_morning_transition), iteration + 1), day_transition_duration / 5) return @@ -105,6 +110,7 @@ SUBSYSTEM_DEF(daynight) for(var/area/surface_area in areas_edited_now) surface_area.base_lighting_alpha = LERP(day_transition_alpha, daytime_alpha, iteration / 15) surface_area.base_lighting_color = hsl_gradient(iteration / 15, 0, day_transition_color, 1, daytime_color) + surface_area.update_base_lighting() if(iteration < 15) addtimer(CALLBACK(src, PROC_REF(start_mid_day), iteration + 1), day_transition_duration / 15) return From 85c337a1f5cfd1a79bf7ea82bd74adb05f3921a8 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 20:27:47 -0400 Subject: [PATCH 7/8] fixes some transition durations --- code/controllers/subsystem/like_night_and_day.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index ba89a8ca55819..5e41793599247 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -75,10 +75,10 @@ SUBSYSTEM_DEF(daynight) surface_area.base_lighting_alpha = LERP(golden_hour_alpha, night_alpha, iteration / 10) surface_area.base_lighting_color = hsl_gradient(iteration / 10, 0, golden_hour_color, 1, night_color) surface_area.update_base_lighting() - if(iteration < 10) + if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_end_of_day), iteration + 1), day_transition_duration / 10) return - addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour)), night_duration / 10) + addtimer(CALLBACK(src, PROC_REF(start_morning_golden_hour)), night_duration / 2) /// Starts the transition to early morning /datum/controller/subsystem/daynight/proc/start_morning_golden_hour(iteration = 1) @@ -108,10 +108,10 @@ SUBSYSTEM_DEF(daynight) /datum/controller/subsystem/daynight/proc/start_mid_day(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) - surface_area.base_lighting_alpha = LERP(day_transition_alpha, daytime_alpha, iteration / 15) - surface_area.base_lighting_color = hsl_gradient(iteration / 15, 0, day_transition_color, 1, daytime_color) + surface_area.base_lighting_alpha = LERP(day_transition_alpha, daytime_alpha, iteration / 5) + surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, day_transition_color, 1, daytime_color) surface_area.update_base_lighting() - if(iteration < 15) + if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_mid_day), iteration + 1), day_transition_duration / 15) return - addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), daytime_duration / 15) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), daytime_duration / 3) From bf4fffa121359eb21a8f353a0a72272623389b27 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Fri, 28 Jun 2024 20:31:12 -0400 Subject: [PATCH 8/8] fixes debug starting time --- code/controllers/subsystem/like_night_and_day.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/like_night_and_day.dm b/code/controllers/subsystem/like_night_and_day.dm index 5e41793599247..db3464ff73dc4 100644 --- a/code/controllers/subsystem/like_night_and_day.dm +++ b/code/controllers/subsystem/like_night_and_day.dm @@ -34,7 +34,7 @@ SUBSYSTEM_DEF(daynight) var/night_duration = 10 MINUTES /datum/controller/subsystem/daynight/Initialize() - addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), 1 MINUTES) + addtimer(CALLBACK(src, PROC_REF(start_afternoon_transition)), 10 MINUTES) return SS_INIT_SUCCESS /// Gets the areas the controller will need to edit @@ -72,8 +72,8 @@ SUBSYSTEM_DEF(daynight) /datum/controller/subsystem/daynight/proc/start_end_of_day(iteration = 1) var/list/areas_edited_now = get_areas_to_edit() for(var/area/surface_area in areas_edited_now) - surface_area.base_lighting_alpha = LERP(golden_hour_alpha, night_alpha, iteration / 10) - surface_area.base_lighting_color = hsl_gradient(iteration / 10, 0, golden_hour_color, 1, night_color) + surface_area.base_lighting_alpha = LERP(golden_hour_alpha, night_alpha, iteration / 5) + surface_area.base_lighting_color = hsl_gradient(iteration / 5, 0, golden_hour_color, 1, night_color) surface_area.update_base_lighting() if(iteration < 5) addtimer(CALLBACK(src, PROC_REF(start_end_of_day), iteration + 1), day_transition_duration / 10)