mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-27 06:36:22 +01:00
Fixes #586
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:
@@ -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
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<div class="itemContent" style="width: 20%;">
|
||||
{{:helper.link(data.scanning ? 'Halt Scan' : 'Begin Scan', 'signal-diag', {'scanItem' : 1}, null)}}
|
||||
</div>
|
||||
<div class="itemContent" style="width: 20%;">
|
||||
{{:helper.link((data.lidstate ? 'Open Lid' : 'Close Lid'), (data.lidstate ? 'unlocked' : 'locked'), {'toggleLid' : 1}, null)}}
|
||||
</div>
|
||||
<div class="itemContent" style="width: 20%;">
|
||||
{{:helper.link('Eject item', 'eject', {'ejectItem' : 1}, (data.bloodsamp && !data.scanning) ? null : 'disabled')}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user