Glorious /vg/ Lighting Port (#66)
* fuck * [CANT WAKE UP] * AAAAAAAAAHHHHHHHHHHHH * SAAAAVE MEEEEEEEEEEEEEEEE * this is so bad how can i even call myself a coder * thanks fam * hello darkness my old friend i've come to talk with you again * ugh go away * OH * much less broken * ayy * aaaaa * OH YEAAAAAAAAHHHHHHHHHHH * aaaa * k * dfgjtxkytkjyd * debug * dangerously cheesy * mm * OH YEAAAAAAAAAAAAAAAAAAAAAAAAAA * oH YEAH * Some final touches and cleanup of the lighting port. * One more * More fixes. * varedit hack for easy modification * fixed * C O L O R * slym * fffff * oh great what the fuck is wrong now * Revert "oh great what the fuck is wrong now" This reverts commit e589ad51facb5464e107ca515317d41136dd1e5e. * fu * will it blend * aaaaaaaaaaaaaaaaaaaa * this is why im bad at porting falalalala, lala la la * k * yeh * can't forget majestic fire
This commit is contained in:
@@ -222,7 +222,7 @@
|
||||
|
||||
update_icon()
|
||||
if(on)
|
||||
if(!light || light.luminosity != brightness)
|
||||
if(!light || light.light_range != brightness)
|
||||
switchcount++
|
||||
if(rigged)
|
||||
if(status == LIGHT_OK && trigger)
|
||||
@@ -232,13 +232,13 @@
|
||||
status = LIGHT_BURNED
|
||||
icon_state = "[base_state]-burned"
|
||||
on = 0
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
else
|
||||
use_power = 2
|
||||
SetLuminosity(brightness)
|
||||
set_light(brightness)
|
||||
else
|
||||
use_power = 1
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
active_power_usage = (brightness * 10)
|
||||
if(on != on_gs)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 100
|
||||
circuit = /obj/item/weapon/circuitboard/computer/powermonitor
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
var/obj/structure/cable/attached
|
||||
|
||||
|
||||
@@ -86,9 +86,18 @@
|
||||
// can override if needed
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
|
||||
if(!use_auto_lights)
|
||||
return
|
||||
set_light(light_range_on, light_power_on)
|
||||
|
||||
else
|
||||
|
||||
stat |= NOPOWER
|
||||
|
||||
if(!use_auto_lights)
|
||||
return
|
||||
set_light(0)
|
||||
return
|
||||
|
||||
// connect the machine to a powernet if a node cable is present on the turf
|
||||
|
||||
@@ -299,9 +299,13 @@
|
||||
var/lastgen = 0
|
||||
var/track = 0 // 0= off 1=timed 2=auto (tracker)
|
||||
var/trackrate = 600 // 300-900 seconds
|
||||
var/nexttime = 0 // time for a panel to rotate of 1° in manual tracking
|
||||
var/nexttime = 0 // time for a panel to rotate of 1� in manual tracking
|
||||
var/obj/machinery/power/tracker/connected_tracker = null
|
||||
var/list/connected_panels = list()
|
||||
use_auto_lights = 1
|
||||
light_power_on = 1
|
||||
light_range_on = 3
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
|
||||
/obj/machinery/power/solar_control/New()
|
||||
@@ -503,9 +507,9 @@
|
||||
connected_tracker.unset_control()
|
||||
|
||||
if(track==1 && trackrate) //manual tracking and set a rotation speed
|
||||
if(nexttime <= world.time) //every time we need to increase/decrease the angle by 1°...
|
||||
if(nexttime <= world.time) //every time we need to increase/decrease the angle by 1�...
|
||||
targetdir = (targetdir + trackrate/abs(trackrate) + 360) % 360 //... do it
|
||||
nexttime += 36000/abs(trackrate) //reset the counter for the next 1°
|
||||
nexttime += 36000/abs(trackrate) //reset the counter for the next 1�
|
||||
|
||||
//rotates the panel to the passed angle
|
||||
/obj/machinery/power/solar_control/proc/set_panels(currentdir)
|
||||
|
||||
Reference in New Issue
Block a user