Mining Drone control access override

Drone Controllers should now sync on creation with the nearest fabricator

Additionally IF a mining fabricator is detected access should automatically be given to mining instead of engineering.
This commit is contained in:
Sharkmare
2019-03-05 14:04:37 +01:00
committed by GitHub
parent 12fef0aa80
commit 2ff250778a
@@ -1,5 +1,5 @@
/obj/machinery/computer/drone_control
name = "Maintenance Drone Control"
name = "Drone Control"
desc = "Used to monitor the station's drone population and the assembler that services them."
icon_keyboard = "power_key"
icon_screen = "generic" //VOREStation Edit
@@ -11,6 +11,14 @@
//Used to enable or disable drone fabrication.
var/obj/machinery/drone_fabricator/dronefab
/obj/machinery/computer/drone_control/New()
..()
for(var/obj/machinery/drone_fabricator/fab in oview(3,src))
dronefab = fab
if(istype(dronefab, /obj/machinery/drone_fabricator/mining))
req_access = = list(access_mining)
/obj/machinery/computer/drone_control/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
@@ -118,4 +126,4 @@
dronefab.produce_drones = !dronefab.produce_drones
usr << "<span class='notice'>You [dronefab.produce_drones ? "enable" : "disable"] drone production in the nearby fabricator.</span>"
src.updateUsrDialog()
src.updateUsrDialog()