Adds a "Toggle lid" option to the UI of the DNA scanner. This is mainly
an aesthetic enhancement, making the system completely usable from the
UI, so you don't need to faff with right clicking/verbing.

It also revises the check for the toggle_lid verb: basically, silicons
and anyone else living, who can open the UI, can now toggle it. Makse
sense if it's mechanized and a button.
This commit is contained in:
skull132
2015-06-04 12:45:10 +03:00
parent 2921ab37c4
commit 6e8505ab4e
2 changed files with 8 additions and 4 deletions
+5 -4
View File
@@ -552,6 +552,7 @@
"scanning" = scanning,
"bloodsamp" = (bloodsamp ? bloodsamp.name : ""),
"bloodsamp_desc" = (bloodsamp ? (bloodsamp.desc ? bloodsamp.desc : "No information on record.") : ""),
"lidstate" = closed
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
@@ -592,6 +593,9 @@
bloodsamp.loc = src.loc
bloodsamp = null
if(href_list["toggleLid"])
toggle_lid()
return 1
/obj/machinery/dnaforensics/process()
@@ -650,13 +654,10 @@
set category = "Object"
set name = "Toggle Lid"
set src in oview(1)
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
if(usr.stat || !isliving(usr))
usr << "No."
return
if(issilicon(usr))
return
if(scanning)
usr << "<span class='warning'>You can't do that while [src] is scanning!</span>"
return