* Fixes the ion law verbs announcing twice or announcing when you didn't want it to.

* Cleaned up some code with it.
 * Small tweak to the job preference window size.
This commit is contained in:
Giacomand
2013-08-09 01:45:14 +01:00
parent 8c61fbbeea
commit 8d1e51dfda
3 changed files with 421 additions and 413 deletions
+9 -19
View File
@@ -134,7 +134,7 @@ proc/cmd_admin_mute(whom, mute_type, automute = 0)
if(MUTE_DEADCHAT) mute_string = "deadchat and DSAY"
if(MUTE_ALL) mute_string = "everything"
else return
var/client/C
if(istype(whom, /client))
C = whom
@@ -142,12 +142,12 @@ proc/cmd_admin_mute(whom, mute_type, automute = 0)
C = directory[whom]
else
return
var/datum/preferences/P
if(C) P = C.prefs
else P = preferences_datums[whom]
if(!P) return
if(automute)
if(!config.automute_on) return
else
@@ -188,11 +188,9 @@ proc/cmd_admin_mute(whom, mute_type, automute = 0)
message_admins("[key_name_admin(src)] has added a random AI law.", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('sound/AI/ionstorm.ogg')
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
new /datum/round_event/ion_storm{botEmagChance=0}()
new /datum/round_event/ion_storm(0, announce_ion_laws)
feedback_add_details("admin_verb","ION") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -413,23 +411,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
if(!input)
return
for(var/mob/living/silicon/ai/M in mob_list)
if (M.stat == 2)
usr << "Upload failed. No signal is being detected from the AI."
else if (M.see_in_dark == 0)
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
else
M.add_ion_law(input)
for(var/mob/living/silicon/ai/O in mob_list)
O << "\red " + input + "\red...LAWS UPDATED"
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]", 1)
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
if(show_log == "Yes")
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('sound/AI/ionstorm.ogg')
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
new /datum/round_event/ion_storm(0, announce_ion_laws, input)
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)