mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
27 lines
926 B
Plaintext
27 lines
926 B
Plaintext
/decl/webhook/roundend
|
|
id = WEBHOOK_ROUNDEND
|
|
|
|
// Data expects three numerical fields: "survivors", "escaped", "ghosts", "clients"
|
|
/decl/webhook/roundend/get_message(var/list/data)
|
|
. = ..()
|
|
var/desc = "A round of **[SSticker.mode ? SSticker.mode.name : "Unknown"]** (Round ID: [GLOB.round_id ? GLOB.round_id : "No database"]) has ended.\n\n"
|
|
if(data)
|
|
var/s_escaped = "Escaped"
|
|
if(!emergency_shuttle.evac)
|
|
s_escaped = "Transferred"
|
|
if(data["survivors"] > 0)
|
|
desc += "Survivors: **[data["survivors"]]**\n"
|
|
desc += "[s_escaped]: **[data["escaped"]]**\n"
|
|
else
|
|
desc += "There were **no survivors**.\n\n"
|
|
desc += "Ghosts: **[data["ghosts"]]**\n"
|
|
desc += "Players: **[data["clients"]]**\n"
|
|
desc += "Round duration: **[roundduration2text()]**"
|
|
|
|
.["embeds"] = list(list(
|
|
// "title" = global.end_credits_title,
|
|
"title" = "Round Has Ended",
|
|
"description" = desc,
|
|
"color" = COLOR_WEBHOOK_DEFAULT
|
|
))
|