Discord HTML Manifest

This commit is contained in:
Cadyn
2021-02-23 12:03:02 -08:00
parent 98385e5fe5
commit e10c15065a
2 changed files with 12 additions and 12 deletions

View File

@@ -17,7 +17,7 @@
var/static/list/locked = list()
/datum/datacore/proc/get_manifest(monochrome, OOC)
/datum/datacore/proc/get_manifest(monochrome, OOC,var/snowflake = FALSE) //CHOMPStation Edit
var/list/heads = new()
var/list/sec = new()
var/list/eng = new()
@@ -40,8 +40,9 @@
.manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: [OOC?"#373737; color:white":"#DEF"]"]}
</style></head>
<table class="manifest" width='350px'>
[snowflake?"<tr><th colspan=3 style = \"background-color: #026e6a\"><b>Online players:</b> [TGS_CLIENT_COUNT]</th></tr><tr><th colspan=3 style = \"background-color: #027a76\"><b>Crew members:</b> [data_core.general.len]</th></tr><tr class='head'>":""]
<tr class='head'><th>Name</th><th>Rank</th><th>Activity</th></tr>
"}
"} //Also a chompstation edit with the snowflake stuff on line 43
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)

View File

@@ -28,18 +28,17 @@
help_text = "Shows the current crew manifest"
admin_only = FALSE
/datum/tgs_chat_command/manifest/Run(datum/tgs_chat_user/sender, params)
var/outp = "Crew Manifest:"
var/list/total = list()
/proc/ManifestToHtml()
var/html = ""
if(data_core)
data_core.get_manifest_list()
for(var/list/item in PDA_Manifest)
outp += "\n__**[item["cat"]]:**__"
for(var/list/person in item["elems"])
total |= person
outp += "\n[person["name"]] -:- [person["rank"]]"
html = data_core.get_manifest(FALSE,TRUE,snowflake = TRUE)
else
html = "<b>ERROR: NO DATACORE</b>" //Could make the error more fancy later
rustg_file_write(html,"C:\\nodebot\\html.html")
return "**Total crew members:** [total.len]\n" + outp
/datum/tgs_chat_command/manifest/Run(datum/tgs_chat_user/sender, params)
ManifestToHtml()
return "!!ManifestCompiled"
/datum/tgs_chat_command/discordping
name = "discordping"