mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-17 10:02:41 +01:00
Adjustable tint windows. Use buttons to change opacity. Super advanced technology to introduce milder alternative to metal shutters everywhere.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user