mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 16:13:49 +01:00
-Added constructable solar arrays.
-Added a solar pack crate to order. -Machines that have a use_power of 0 will no longer be turned off due to lack of power in the area. -Fixed a bug with the solar computer not reconnecting to the powernet when dismantled and remantled. -Increased the cap of crates to 30. -Some performance tweaks. -Some standardization. -All objects of type /obj/machinery/power will try to disconnect from the powernet before deleting, this will help reduce the node list size. -Added a heat_proof variable for doors. It will effect glass airlocks and it'll determine whether they can block heat or not. Research glass airlocks will always have it enabled. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5344 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -14,6 +14,15 @@
|
||||
|
||||
var/sun_angle = 0 // sun angle as set by sun datum
|
||||
|
||||
/obj/machinery/power/tracker/New(var/turf/loc, var/obj/item/solar_assembly/S)
|
||||
..(loc)
|
||||
if(!S)
|
||||
S = new /obj/item/solar_assembly(src)
|
||||
S.glass_type = /obj/item/stack/sheet/glass
|
||||
S.tracker = 1
|
||||
S.anchored = 1
|
||||
S.loc = src
|
||||
connect_to_network()
|
||||
|
||||
// called by datum/sun/calc_position() as sun's angle changes
|
||||
/obj/machinery/power/tracker/proc/set_angle(var/angle)
|
||||
@@ -31,12 +40,29 @@
|
||||
// ***TODO: better communication system using network
|
||||
if(powernet)
|
||||
for(var/obj/machinery/power/solar_control/C in powernet.nodes)
|
||||
C.tracker_update(angle)
|
||||
if(get_dist(C, src) < SOLAR_MAX_DIST)
|
||||
C.tracker_update(angle)
|
||||
|
||||
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
if(iscrowbar(W))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
var/obj/item/solar_assembly/S = locate() in src
|
||||
if(S)
|
||||
S.loc = src.loc
|
||||
S.give_glass()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] takes the glass off the tracker.</span>")
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
|
||||
// timed process
|
||||
// make sure we can draw power from the powernet
|
||||
/obj/machinery/power/tracker/process()
|
||||
|
||||
var/avail = surplus()
|
||||
|
||||
if(avail > 500)
|
||||
@@ -47,4 +73,14 @@
|
||||
|
||||
// override power change to do nothing since we don't care about area power
|
||||
/obj/machinery/power/tracker/power_change()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
// Tracker Electronic
|
||||
|
||||
/obj/item/weapon/tracker_electronics
|
||||
|
||||
name = "tracker electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
w_class = 2.0
|
||||
Reference in New Issue
Block a user