Improves friendly commendation code (#56453)

This commit is contained in:
Ryll Ryll
2021-02-05 04:42:34 -05:00
committed by GitHub
parent a78dce538e
commit e6cae4fac5
8 changed files with 58 additions and 47 deletions
+10 -2
View File
@@ -2184,9 +2184,17 @@
to_chat(usr, "<span class='warning'>The round must be in progress to use this!</span>")
return
var/mob/heart_recepient = locate(href_list["admincommend"])
if(tgui_alert(usr, "Are you sure you'd like to anonymously commend [heart_recepient.ckey]? NOTE: This is logged, please use this sparingly and only for actual kind behavior, not as a reward for your friends.", "<3?", list("Yes", "No")) == "No")
if(!heart_recepient?.ckey)
to_chat(usr, "<span class='warning'>This mob either no longer exists or no longer is being controlled by someone!</span>")
return
usr.nominate_heart(heart_recepient)
switch(tgui_alert(usr, "Would you like the effects to apply immediately or at the end of the round? Applying them now will make it clear it was an admin commendation.", "<3?", list("Apply now", "Apply at round end", "Cancel")))
if("Apply now")
usr.nominate_heart(heart_recepient, instant = TRUE)
if("Apply at round end")
usr.nominate_heart(heart_recepient)
else
return
else if(href_list["force_war"])
if(!check_rights(R_ADMIN))
-1
View File
@@ -744,7 +744,6 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
nameWords += string
for(var/string in nameWords)
testing("Name word [string]")
if(string in msglist)
potential_hits += M
break