mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Merge pull request #15288 from Heroman3003/fake-weather
Adds fake weather options to fake sun
This commit is contained in:
@@ -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,11 +132,20 @@
|
||||
|
||||
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))
|
||||
|
||||
for(var/turf/T as anything in turfs_to_use)
|
||||
sun.apply_to_turf(T)
|
||||
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"
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user