mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Adds supply department to agent ID options and cleans code (#22613)
Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
@@ -544,15 +544,16 @@
|
||||
RebuildHTML()
|
||||
|
||||
if("Occupation")
|
||||
var/list/departments =list(
|
||||
"Assistant",
|
||||
"Engineering",
|
||||
"Medical",
|
||||
"Science",
|
||||
"Security",
|
||||
"Support",
|
||||
"Command",
|
||||
"Custom",
|
||||
var/list/departments = list(
|
||||
"Assistant" = null,
|
||||
"Engineering" = GLOB.engineering_positions,
|
||||
"Medical" = GLOB.medical_positions,
|
||||
"Science" = GLOB.science_positions,
|
||||
"Security" = GLOB.security_positions,
|
||||
"Support" = GLOB.support_positions,
|
||||
"Supply" = GLOB.supply_positions,
|
||||
"Command" = GLOB.command_positions,
|
||||
"Custom" = null,
|
||||
)
|
||||
|
||||
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
|
||||
@@ -560,20 +561,8 @@
|
||||
|
||||
if(department == "Custom")
|
||||
new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Assistant", MAX_MESSAGE_LEN))
|
||||
else if(department != "Assistant")
|
||||
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 GLOB.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 GLOB.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 GLOB.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 GLOB.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 GLOB.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 GLOB.command_positions
|
||||
else if(department != "Assistant" && !isnull(departments[department]))
|
||||
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 departments[department]
|
||||
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user