mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
simplify
This commit is contained in:
@@ -89,10 +89,13 @@
|
||||
return data
|
||||
|
||||
/obj/machinery/keycard_auth/tgui_act(action, params)
|
||||
if(..() || !allowed(usr))
|
||||
if(..())
|
||||
return
|
||||
if(busy)
|
||||
to_chat(usr, "This device is busy.")
|
||||
to_chat(usr, "<span class='warning'>This device is busy.</span>")
|
||||
return
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
. = TRUE
|
||||
switch(action)
|
||||
|
||||
@@ -24,7 +24,7 @@ export const KeycardAuth = (props, context) => {
|
||||
label="Red Alert">
|
||||
<Button
|
||||
icon="exclamation-triangle"
|
||||
disabled={!data.redAvailable || data.busy}
|
||||
disabled={!data.redAvailable}
|
||||
onClick={() => act('triggerevent',
|
||||
{ 'triggerevent': 'Red Alert' })}
|
||||
content="Red Alert" />
|
||||
@@ -32,7 +32,6 @@ export const KeycardAuth = (props, context) => {
|
||||
<LabeledList.Item label="ERT">
|
||||
<Button
|
||||
icon="broadcast-tower"
|
||||
disabled={data.busy}
|
||||
onClick={() => act('triggerevent',
|
||||
{ 'triggerevent': 'Emergency Response Team' })}
|
||||
content="Call ERT" />
|
||||
@@ -40,14 +39,12 @@ export const KeycardAuth = (props, context) => {
|
||||
<LabeledList.Item label="Emergency Maint Access">
|
||||
<Button
|
||||
icon="door-open"
|
||||
disabled={data.busy}
|
||||
onClick={() => act('triggerevent',
|
||||
{ 'triggerevent':
|
||||
'Grant Emergency Maintenance Access' })}
|
||||
content="Grant" />
|
||||
<Button
|
||||
icon="door-closed"
|
||||
disabled={data.busy}
|
||||
onClick={() => act('triggerevent',
|
||||
{ 'triggerevent':
|
||||
'Revoke Emergency Maintenance Access' })}
|
||||
@@ -56,14 +53,12 @@ export const KeycardAuth = (props, context) => {
|
||||
<LabeledList.Item label="Emergency Station-Wide Access">
|
||||
<Button
|
||||
icon="door-open"
|
||||
disabled={data.busy}
|
||||
onClick={() => act('triggerevent',
|
||||
{ 'triggerevent':
|
||||
'Activate Station-Wide Emergency Access' })}
|
||||
content="Grant" />
|
||||
<Button
|
||||
icon="door-closed"
|
||||
disabled={data.busy}
|
||||
onClick={() => act('triggerevent',
|
||||
{ 'triggerevent':
|
||||
'Deactivate Station-Wide Emergency Access' })}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user