mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 08:31:57 +00:00
* Base work for the unathi robot subspecies. * Adds metabolism species, kidney vars, and the robot unathi organs. * Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here. * First autakh implant power. * Fixes the organs action button this time. * Finishes more implants, and interactions with flashs and vaurca. * Prepare for great changes. * Drops the real bomb, boss. * He who fights with monsters. * Far more work into augments and limb removing powers. * Limb verbs should be good now. * A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case. * Probably the last work on implants. * Some extra touches. * Some tweaks to the species. * More fixes and adds kyre's sprites. * More runtime fixes. * Fixes the species name too. * Fixes travis. * Updates this file too to work with the new tools procs. * Adds changelog * Fixed changelog. * Unathi hair and lore description. * Some tweaks to this too. * Locks away them for now, they will be released after we got all the events and etc done. * Changes this chemical. * Fixes an airlock runtime. * Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning. * Organs removal changes; can't take out the organ if it is too damage. * Restricts them back again. * Robotic organs now have the proper icons and names. * Adds sprites for their organs and some extra tweaks. * Fixes this missing icon. * emp should also now hurt assited organs. * Tweaks more organ related things. * Fixes the head not being properly set as well. * Fixes their flags. * fixes the flag for real this time. * Poze's review. * Changes the au'takh organ buttons to don't be animated. * Helps with adminbus or something. * Fowl's requested changes. * Fixes a typo. * Robotic limb's brute and burn mods are now controlled by the limb model. * Fowl's changes once more. * Stops some spam. * More grammar. * No eal. * Skull's review.
84 lines
2.6 KiB
Plaintext
84 lines
2.6 KiB
Plaintext
//Solar tracker
|
|
|
|
//Machine that tracks the sun and reports it's direction to the solar controllers
|
|
//As long as this is working, solar panels on same powernet will track automatically
|
|
|
|
/obj/machinery/power/tracker
|
|
name = "solar tracker"
|
|
desc = "A solar directional tracker."
|
|
icon = 'icons/obj/power.dmi'
|
|
icon_state = "tracker"
|
|
anchored = 1
|
|
density = 1
|
|
use_power = 0
|
|
|
|
var/id = 0
|
|
var/sun_angle = 0 // sun angle as set by sun datum
|
|
var/obj/machinery/power/solar_control/control = null
|
|
|
|
/obj/machinery/power/tracker/Initialize(mapload, obj/item/solar_assembly/S)
|
|
. = ..()
|
|
Make(S)
|
|
connect_to_network()
|
|
|
|
/obj/machinery/power/tracker/Destroy()
|
|
unset_control() //remove from control computer
|
|
return ..()
|
|
|
|
//set the control of the tracker to a given computer if closer than SOLAR_MAX_DIST
|
|
/obj/machinery/power/tracker/proc/set_control(var/obj/machinery/power/solar_control/SC)
|
|
if(SC && (get_dist(src, SC) > SOLAR_MAX_DIST))
|
|
return 0
|
|
control = SC
|
|
return 1
|
|
|
|
//set the control of the tracker to null and removes it from the previous control computer if needed
|
|
/obj/machinery/power/tracker/proc/unset_control()
|
|
if(control)
|
|
control.connected_tracker = null
|
|
control = null
|
|
|
|
/obj/machinery/power/tracker/proc/Make(var/obj/item/solar_assembly/S)
|
|
if(!S)
|
|
S = new /obj/item/solar_assembly(src)
|
|
S.glass_type = /obj/item/stack/material/glass
|
|
S.tracker = 1
|
|
S.anchored = 1
|
|
S.forceMove(src)
|
|
update_icon()
|
|
|
|
//updates the tracker icon and the facing angle for the control computer
|
|
/obj/machinery/power/tracker/proc/set_angle(var/angle)
|
|
sun_angle = angle
|
|
|
|
//set icon dir to show sun illumination
|
|
set_dir(turn(NORTH, -angle - 22.5)) // 22.5 deg bias ensures, e.g. 67.5-112.5 is EAST
|
|
|
|
if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet
|
|
control.cdir = angle
|
|
|
|
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
|
|
|
|
if(W.iscrowbar())
|
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
|
user.visible_message("<span class='notice'>[user] begins to take the glass off the solar tracker.</span>")
|
|
if(do_after(user, 50))
|
|
var/obj/item/solar_assembly/S = locate() in src
|
|
if(S)
|
|
S.forceMove(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>")
|
|
qdel(src)
|
|
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
|