Lighting overhaul.

This commit overhauls the lighting system to Bay12 standards. It is better
in pretty much every way.
This commit is contained in:
Tigercat2000
2015-05-10 12:03:27 -07:00
parent 73838ac55d
commit e1249fc640
141 changed files with 1195 additions and 1449 deletions
+2 -2
View File
@@ -65,7 +65,7 @@
do_the_flick()
sleep(4)
density = 0
SetOpacity(0)
set_opacity(0)
update_icon(0)
else
var/srcturf = get_turf(src)
@@ -75,7 +75,7 @@
do_the_flick()
density = 1
sleep(4)
SetOpacity(1)
set_opacity(1)
update_icon()
opening = 0
@@ -179,7 +179,7 @@
/obj/structure/mineral_door/uranium
mineralType = "uranium"
hardness = 3
luminosity = 2
light_range = 2
/obj/structure/mineral_door/sandstone
mineralType = "sandstone"
+5 -7
View File
@@ -62,13 +62,11 @@
//lighting check
var/light_amount = 0
var/turf/T = get_turf(src)
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic)
light_amount = T.lighting_lumcount
else
light_amount = 10
var/atom/movable/lighting_overlay/LO = locate(/atom/movable/lighting_overlay) in T
if(LO)
light_amount = max(0,min(10,LO.lum_r + LO.lum_g + LO.lum_b)-5)
else
light_amount = 5
if(light_amount > 2)
M << "<span class='warning'>It's too bright here to use [src.name]!</span>"
+51 -1
View File
@@ -467,4 +467,54 @@ var/global/wcColored
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
icon_state = "fwindow"
basestate = "fwindow"
health = 30
health = 30
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
var/id
/obj/structure/window/reinforced/polarized/proc/toggle()
if(opacity)
animate(src, color="#FFFFFF", time=5)
set_opacity(0)
else
animate(src, color="#222222", time=5)
set_opacity(1)
/obj/machinery/button/windowtint
name = "window tint control"
icon = 'icons/obj/power.dmi'
icon_state = "light0"
desc = "A remote control switch for polarized windows."
var/range = 7
var/id = 0
var/active = 0
/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
if(..())
return 1
toggle_tint()
/obj/machinery/button/windowtint/proc/toggle_tint()
use_power(5)
active = !active
update_icon()
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
if (W.id == src.id || !W.id)
spawn(0)
W.toggle()
return
/obj/machinery/button/windowtint/power_change()
..()
if(active && !powered(power_channel))
toggle_tint()
/obj/machinery/button/windowtint/update_icon()
icon_state = "light[active]"