refactors event announce chance (#47085)

This commit is contained in:
spessbandit
2019-10-15 10:15:18 -04:00
committed by Emmett Gaines
parent d724b87242
commit 1d1da3a961
7 changed files with 15 additions and 18 deletions
+1 -1
View File
@@ -727,7 +727,7 @@
E.processing = FALSE
if(E.announceWhen>0)
if(alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No") == "No")
E.announceWhen = -1
E.announceChance = 0
E.processing = TRUE
if (usr)
log_admin("[key_name(usr)] used secret [item]")
+3 -1
View File
@@ -166,11 +166,13 @@
event.processing = FALSE
var/prompt = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No", "Cancel")
switch(prompt)
if("Yes")
event.announceChance = 100
if("Cancel")
event.kill()
return
if("No")
event.announceWhen = -1
event.announceChance = 0
event.processing = TRUE
message_admins("[key_name_admin(usr)] has triggered an event. ([E.name])")
log_admin("[key_name(usr)] has triggered an event. ([E.name])")
+2 -2
View File
@@ -517,10 +517,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
var/announce_ion_laws = (show_log == "Yes" ? 100 : 0)
var/datum/round_event/ion_storm/add_law_only/ion = new()
ion.announceEvent = announce_ion_laws
ion.announceChance = announce_ion_laws
ion.ionMessage = input
SSblackbox.record_feedback("tally", "admin_verb", 1, "Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!