Adds Librarian Stuff (#8141)

This commit is contained in:
Geeves
2020-02-14 15:26:17 +02:00
committed by GitHub
parent 556be56924
commit 8ca937a328
10 changed files with 94 additions and 28 deletions

View File

@@ -124,6 +124,19 @@
turn_on(user)
/obj/item/modular_computer/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/card/tech_support))
if(!can_reset)
to_chat(user, span("notice", "You cannot reset this type of device."))
return
if(!enabled)
to_chat(user, span("notice", "You cannot reset the device if it isn't powered on."))
return
if(!hard_drive)
to_chat(user, span("notice", "You cannot reset a device that has no hard drive."))
return
enrolled = 0
hard_drive.reset_drive()
visible_message("\icon[src.icon] <b>[src]</b> pings, <span class='notice'>\"Enrollment status reset! Have a NanoTrasen day.\"</span>")
if(istype(W, /obj/item/card/id)) // ID Card, try to insert it.
var/obj/item/card/id/I = W
if(!card_slot)

View File

@@ -7,6 +7,7 @@
var/enabled = 0 // Whether the computer is turned on.
var/screen_on = 1 // Whether the computer is active/opened/it's screen is on.
var/working = 1 // Whether the computer is working.
var/can_reset = FALSE // Whether you can reset this device with the tech support card.
var/datum/computer_file/program/active_program = null // A currently active program running on the computer.
var/hardware_flag = 0 // A flag that describes this device type
var/last_power_usage = 0 // Last tick power usage of this computer