mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 06:40:08 +01:00
[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:
co-authored by
Heroman3003
CHOMPStation2
parent
04c8ecc4ec
commit
857f496bed
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user