Made traitor classes rerollable, reassignable by admins

This commit is contained in:
Putnam
2020-04-18 14:40:41 -07:00
parent 0e55de55a7
commit 9976fab42b
6 changed files with 75 additions and 20 deletions
+13
View File
@@ -511,6 +511,19 @@
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
else if(href_list["traitor_class"])
var/static/list/choices
if(!choices)
choices = list()
for(var/C in GLOB.traitor_classes)
var/datum/traitor_class/t = C
choices[initial(t.employer)] = C
var/datum/antagonist/traitor/T = locate(href_list["target_antag"]) in antag_datums
if(T)
var/selected_type = input("Select traitor class:", "Traitor class", T.traitor_kind.employer) as null|anything in choices
selected_type = choices[selected_type]
T.set_traitor_kind(selected_type)
else if (href_list["obj_delete"])
var/datum/objective/objective