[MIRROR] Adds fake weather options to fake sun (#6849)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2023-08-22 00:01:02 -07:00
committed by GitHub
parent 04c8ecc4ec
commit 857f496bed
9 changed files with 21 additions and 13 deletions

View File

@@ -5,10 +5,14 @@
icon_state = "fakesun"
invisibility = INVISIBILITY_ABSTRACT
var/atom/movable/sun_visuals/sun
var/atom/movable/weather_visuals/visuals
var/family = null //Allows multipe maps that are THEORETICALLY connected to use the same settings when not in a connected Z stack
var/shared_settings //Automatically set if using the family var
var/static/world_suns = list() //List of all the fake_suns in the world, used for checking for family members
var/do_sun = TRUE
var/do_weather = FALSE
var/list/possible_light_setups = list(
list(
"brightness" = 6.0,
@@ -81,6 +85,9 @@
)
var/weather_visuals_icon = 'icons/effects/weather.dmi'
var/weather_visuals_icon_state = null
/obj/effect/fake_sun/New(loc, ...)
. = ..()
world_suns += src
@@ -125,12 +132,21 @@
sun = new(null)
visuals = new(null)
visuals.icon = weather_visuals_icon
visuals.icon_state = weather_visuals_icon_state
sun.set_color(choice["color"])
sun.set_alpha(round(CLAMP01(choice["brightness"])*255,1))
if(do_sun)
for(var/turf/T as anything in turfs_to_use)
sun.apply_to_turf(T)
if(do_weather)
for(var/turf/T as anything in turfs_to_use)
T.vis_contents += visuals
/obj/effect/fake_sun/warm
name = "warm fake sun"
desc = "Deletes itself, but first updates all the lighting on outdoor turfs to warm colors."

View File

@@ -613,7 +613,6 @@ var/datum/planet/virgo3b/planet_virgo3b = null
/datum/weather/virgo3b/confetti
name = "confetti"
icon = 'icons/effects/weather_vr.dmi'
icon_state = "confetti"
transition_chances = list(

View File

@@ -617,7 +617,6 @@ var/datum/planet/virgo3c/planet_virgo3c = null
/datum/weather/virgo3c/confetti
name = "confetti"
icon = 'icons/effects/weather_vr.dmi'
icon_state = "confetti"
transition_chances = list(

View File

@@ -588,7 +588,6 @@ var/datum/planet/virgo4/planet_virgo4 = null
/datum/weather/virgo4/confetti
name = "confetti"
icon = 'icons/effects/weather_vr.dmi'
icon_state = "confetti"
transition_chances = list(

View File

@@ -15,6 +15,8 @@
var/atom/movable/weather_visuals/visuals = null
var/atom/movable/weather_visuals/special/special_visuals = null
var/firework_override = FALSE
/datum/weather_holder/New(var/source)
..()
our_planet = source
@@ -134,6 +136,7 @@
/datum/weather_holder/proc/update_icon_effects()
visuals.icon_state = current_weather.icon_state
visuals.icon = current_weather.icon
/datum/weather_holder/proc/update_temperature()
temperature = LERP(current_weather.temp_low, current_weather.temp_high, our_planet.sun_position)

View File

@@ -1,7 +0,0 @@
/datum/weather_holder
var/firework_override = FALSE
/datum/weather_holder/update_icon_effects()
..()
if(current_weather.icon)
visuals.icon = current_weather.icon

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

View File

@@ -3776,7 +3776,6 @@
#include "code\modules\planet\sun.dm"
#include "code\modules\planet\time.dm"
#include "code\modules\planet\weather.dm"
#include "code\modules\planet\weather_vr.dm"
#include "code\modules\player_tips_vr\player_tips_controller_vr.dm"
#include "code\modules\power\apc.dm"
#include "code\modules\power\apc_vr.dm"