Skip to content

Commit

Permalink
debug pda lockdown
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Apr 24, 2024
1 parent 205258d commit bc2b38b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/game/machinery/ARES/debug_pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,13 @@
message_admins("BIOSCAN: [key_name(user)] triggered a Marine bioscan via ARES AIST.")
return TRUE

if("security_lockdown")
if(!COOLDOWN_FINISHED(datacore, aicore_lockdown))
to_chat(user, SPAN_BOLDWARNING("AI Core Lockdown procedures are on cooldown! They will be ready in [COOLDOWN_SECONDSLEFT(datacore, aicore_lockdown)] seconds!"))
return FALSE
aicore_lockdown(user)
return TRUE


if(playsound)
var/sound = pick('sound/machines/pda_button1.ogg', 'sound/machines/pda_button2.ogg')
Expand Down
17 changes: 17 additions & 0 deletions tgui/packages/tgui/interfaces/AresAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ const { is_pda } = data;
let remotelock = !is_pda;
let remotetip = 'You cannot do this via remote console.';
let deletetip = remotetip;
let lockdowntip = remotetip;
if (!remotelock) {
remotetip = '';
deletetip = 'Delete Record';
lockdowntip = 'Activate/Deactivate the AI Core Lockdown.';
}

export const AresAdmin = (props, context) => {
Expand Down Expand Up @@ -384,6 +386,21 @@ const MainMenu = (props, context) => {
onClick={() => act('page_core_sec')}
/>
</Stack.Item>
<Stack.Item grow>
<Button.Confirm
content="AI Core Lockdown"
align="center"
disabled={remotelock}
tooltip={lockdowntip}
icon="lock"
color="red"
ml="auto"
px="2rem"
width="100%"
bold
onClick={() => act('security_lockdown')}
/>
</Stack.Item>
</Stack>
</Section>
<Section>
Expand Down

0 comments on commit bc2b38b

Please sign in to comment.