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() 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/heads = new()
var/list/sec = new() var/list/sec = new()
var/list/eng = 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"]"]} .manifest tr.alt td {[monochrome?"border-top-width: 2px":"background-color: [OOC?"#373737; color:white":"#DEF"]"]}
</style></head> </style></head>
<table class="manifest" width='350px'> <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> <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 var/even = 0
// sort mobs // sort mobs
for(var/datum/data/record/t in data_core.general) for(var/datum/data/record/t in data_core.general)

View File

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