diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm index e3d47a5c0cd6..c07adc61d830 100644 --- a/code/controllers/subsystem/pai.dm +++ b/code/controllers/subsystem/pai.dm @@ -70,6 +70,13 @@ SUBSYSTEM_DEF(pai) candidate.savefile_load(user) ui.send_full_update() return TRUE + if("withdraw") + if(!candidate.ready) + to_chat(user, span_warning("You need to submit an application before you can withdraw one.")) + return FALSE + candidate.ready = FALSE + to_chat(user, span_notice("Your pAI candidacy has been withdrawn.")) + return TRUE return FALSE /** diff --git a/tgui/packages/tgui/interfaces/PaiSubmit.tsx b/tgui/packages/tgui/interfaces/PaiSubmit.tsx index ca72f584b83f..6a2474593a50 100644 --- a/tgui/packages/tgui/interfaces/PaiSubmit.tsx +++ b/tgui/packages/tgui/interfaces/PaiSubmit.tsx @@ -145,6 +145,14 @@ const ButtonsDisplay = (props) => { SUBMIT + + + );