mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-31 09:09:49 +01:00
[MIRROR] More globals (#12530)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
de8fed65df
commit
4f5dce5ebe
@@ -1,4 +1,4 @@
|
||||
var/static/list/fake_sunlight_zs = list()
|
||||
GLOBAL_LIST_EMPTY(fake_sunlight_zs)
|
||||
|
||||
/obj/effect/fake_sun
|
||||
name = "fake sun"
|
||||
@@ -165,7 +165,7 @@ var/static/list/fake_sunlight_zs = list()
|
||||
sun.set_alpha(round(CLAMP01(choice["brightness"])*255,1))
|
||||
|
||||
if(do_sun)
|
||||
fake_sunlight_zs |= z
|
||||
GLOB.fake_sunlight_zs |= z
|
||||
for(var/turf/T as anything in turfs_to_use)
|
||||
sun.apply_to_turf(T)
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@
|
||||
|
||||
///Setter for the byond luminosity var
|
||||
/turf/proc/set_luminosity(new_luminosity, force)
|
||||
if(((is_outdoors() && !force) || outdoors_adjacent) && (z in fake_sunlight_zs)) //Special exception for fakesun lit tiles
|
||||
if(((is_outdoors() && !force) || outdoors_adjacent) && (z in GLOB.fake_sunlight_zs)) //Special exception for fakesun lit tiles
|
||||
return
|
||||
|
||||
luminosity = new_luminosity
|
||||
|
||||
///Checks planets and fake_suns to see if our turf should be handled by either
|
||||
/turf/proc/check_for_sun()
|
||||
if((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || (z in fake_sunlight_zs))
|
||||
if((SSplanets && SSplanets.z_to_planet.len >= z && SSplanets.z_to_planet[z]) || (z in GLOB.fake_sunlight_zs))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user