Adds Librarian Stuff (#8141)

This commit is contained in:
Geeves
2020-02-14 14:26:17 +01:00
committed by GitHub
parent 556be56924
commit 8ca937a328
10 changed files with 94 additions and 28 deletions
@@ -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)
@@ -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
@@ -3,6 +3,7 @@
name = "laptop computer"
desc = "A portable computer."
hardware_flag = PROGRAM_LAPTOP
can_reset = TRUE
icon_state_unpowered = "laptop-open"
icon = 'icons/obj/modular_laptop.dmi'
icon_state = "laptop-open"
@@ -37,4 +38,4 @@
if(damage >= broken_damage)
icon_state = icon_state_broken + "-closed"
else
icon_state = icon_state_closed
icon_state = icon_state_closed
@@ -5,6 +5,7 @@
icon_state = "tablet"
icon_state_unpowered = "tablet"
icon_state_menu = "menu"
can_reset = TRUE
hardware_flag = PROGRAM_TABLET
max_hardware_size = 1
w_class = 2
@@ -14,4 +15,4 @@
. = ..()
icon_state += pick("", "-blue", "-green", "-red", "-brown")
icon_state_unpowered = icon_state
icon_state_broken = icon_state
icon_state_broken = icon_state