From 5065221dd63a4797d3671f6251b8ea82bcc0d56f Mon Sep 17 00:00:00 2001 From: Rasmus Dyhr Larsen Date: Thu, 5 Apr 2018 23:59:33 +0200 Subject: [PATCH] Added agent id occupation options --- code/game/objects/items/weapons/cards_ids.dm | 32 +++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 2c080cdafcc..98ea2c758e1 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -440,7 +440,37 @@ RebuildHTML() if("Occupation") - var/new_job = sanitize(stripped_input(user,"What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) + var/list/departments =list( + "Civilian", + "Engineering", + "Medical", + "Science", + "Security", + "Support", + "Command", + "Custom", + ) + + var/department = input(user, "What job would you like to put on this card?\nChoose a department or a custom job title.\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in departments + var/new_job = "Civilian" + + if(department == "Custom") + new_job = sanitize(stripped_input(user,"Choose a custom jon title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN)) + else if(department != "Civilian") + switch(department) + if("Engineering") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in engineering_positions + if("Medical") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in medical_positions + if("Science") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in science_positions + if("Security") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in security_positions + if("Support") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in support_positions + if("Command") + new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in command_positions + if(!Adjacent(user)) return src.assignment = new_job