Adjustable tint windows. Use buttons to change opacity. Super advanced technology to introduce milder alternative to metal shutters everywhere.

This commit is contained in:
Chinsky
2015-02-06 10:02:33 +03:00
parent 3ea720fd9d
commit b83f1ac3d2
+35
View File
@@ -470,3 +470,38 @@
update_icon() //icon_state has to be set manually
return
/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)
SetOpacity(0)
else
animate(src, color="#222222", time=5)
SetOpacity(1)
/obj/machinery/button/windowtint
name = "window tint control"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
desc = "A remote control switch for polarized windows."
var/range = 7
/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
if(..())
return 1
use_power(5)
active = !active
icon_state = "light[active]"
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
if (W.id == src.id || !W.id)
spawn( 0 )
W.toggle()
return