Comment and tweak new topics, add borders to asays

Use Random Name now assigns a random name to the mob/char preferences
Add borders to View Asays table
Increase View Asays table size to 1200x825
Forgot to add View Asays to verb list again, whoops
This commit is contained in:
mochi
2020-06-06 15:38:52 +02:00
parent 960bac6976
commit 28e115ce7d
3 changed files with 30 additions and 10 deletions
+2
View File
@@ -65,6 +65,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
/client/proc/global_man_up,
/client/proc/delbook,
/client/proc/view_flagged_books,
/client/proc/view_asays,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
/client/proc/freeze,
@@ -140,6 +141,7 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
/datum/admins/proc/toggle_aliens,
/client/proc/delbook,
/client/proc/view_flagged_books,
/client/proc/view_asays,
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
/client/proc/set_ooc,
+9 -6
View File
@@ -1307,8 +1307,10 @@
log_admin("[key_name(usr)] has erased [key_name(M)]'s flavor text.")
message_admins("[key_name_admin(usr)] has erased [key_name_admin(M)]'s flavor text.")
// Clears the body's flavor text as well as the persistent one
// Clears the mob's flavor text
M.flavor_text = "";
// Clear and save the DB character's flavor text
M.client.prefs.flavor_text = "";
M.client.prefs.save_character(M.client)
@@ -1322,17 +1324,18 @@
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
return
if(M.client.prefs.be_random_name)
to_chat(usr, "<span class='warning'>[M] already uses a random name.</span>")
return
if(alert(usr, "Force [key_name(M)] to use a random name?", "Message", "Yes", "No") != "Yes")
return
log_admin("[key_name(usr)] has forced [key_name(M)] to use a random name.")
message_admins("[key_name_admin(usr)] has forced [key_name_admin(M)] to use a random name.")
M.client.prefs.be_random_name = TRUE;
// Update the mob's name with a random one straight away
var/random_name = random_name(M.client.prefs.gender, M.client.prefs.species)
M.rename_character(M.real_name, random_name)
// Save that random name for next rounds
M.client.prefs.real_name = random_name
M.client.prefs.save_character(M.client)
else if(href_list["tdome1"])
+19 -4
View File
@@ -6,7 +6,7 @@ GLOBAL_LIST_EMPTY(asays)
var/message = ""
var/time = 0
/client/proc/viewasays()
/client/proc/view_asays()
set name = "View Asays"
set desc = "View Asays from the current round."
set category = "Admin"
@@ -14,11 +14,26 @@ GLOBAL_LIST_EMPTY(asays)
if(!check_rights(R_ADMIN))
return
var/output = "<table style='width: 100%;'>"
var/output = {"
<style>
td, th
{
border: 1px solid #425c6e;
}
thead
{
color: #517087;
font-weight: bold;
table-layout: fixed;
}
</style>
<table style='width: 100%; border-collapse: collapse; table-layout: auto;'>
"}
// Header & body start
output += {"
<thead style='color: #517087; font-weight: bold; table-layout: fixed;'>
<thead>
<tr>
<th>Time</th>
<th>Ckey</th>
@@ -42,6 +57,6 @@ GLOBAL_LIST_EMPTY(asays)
</tbody>
</table>"}
var/datum/browser/popup = new(src, "asays", "<div align='center'>Current Round Asays</div>", 1000, 800)
var/datum/browser/popup = new(src, "asays", "<div align='center'>Current Round Asays</div>", 1200, 825)
popup.set_content(output)
popup.open(0)