/proc/command_alert(var/text, var/title = "")
boutput(world, "
[command_name()] Update
")
if (title && length(title) > 0)
boutput(world, "[sanitize(title)]
")
boutput(world, "[sanitize(text)]")
boutput(world, "
")
/proc/command_announcement(var/text, var/title) //Slightly less conspicuous, but requires a title.
if(!title || !text) return
boutput(world, "[sanitize(title)]
")
boutput(world, "[sanitize(text)]")
boutput(world, "
")
/proc/advanced_command_alert(var/text, var/title="")
if(!text) return 0
var/list/mob/mob_list = list()
for(var/mob/M in world)
if(M.client)
mob_list+=M
var/mob/rand_mob_single = pick(mob_list) //A single randomly selected player
for(var/mob/M in mob_list)
spawn(0)
if(M.client)
var/mob/rand_mob_mult = pick(mob_list) //A randomly selected player that's different to each viewer
var/atom/A = get_turf(M.loc)
if(A) A = A.loc
if(title != "")
title = replacetext(title, "%name%", M.real_name)
title = replacetext(title, "%key%", M.key)
title = replacetext(title, "%job%", M.job ? M.job : "space hobo")
title = replacetext(title, "%area_name%", A ? A.name : "some unknown place")
title = replacetext(title, "%srand_name%", rand_mob_single.name)
title = replacetext(title, "%srand_job%", rand_mob_single.job ? rand_mob_single.job : "space hobo" )
title = replacetext(title, "%mrand_name%", rand_mob_mult.name)
title = replacetext(title, "%mrand_job%", rand_mob_mult.job)
title = sanitize(title)
text = replacetext(text, "%name%", M.real_name)
text = replacetext(text, "%key%", M.key)
text = replacetext(text, "%job%", M.job ? M.job : "space hobo")
text = replacetext(text, "%area_name%", A ? A.name : "some unknown place")
text = replacetext(text, "%srand_name%", rand_mob_single.name)
text = replacetext(text, "%srand_job%", rand_mob_single.job ? rand_mob_single.job : "space hobo" )
text = replacetext(text, "%mrand_name%", rand_mob_mult.name)
text = replacetext(text, "%mrand_job%", rand_mob_mult.job)
text = sanitize(text)
boutput(M, "[command_name()] Update
")
if(title != "") boutput(M, "[title]
")
boutput(M, "[text]
")
return 1