mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Merge branch 'master' into nanoui-is-dead
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/********************************************************************************************************
|
||||
* DO NOT EDIT ANYTHING IN HERE WITHOUT CHECKING THE DISCORD API SPEC AND TESTING THE JSON POST FORMAT *
|
||||
* OTHERWISE, YOU **WILL** BREAK STUFF -aa *************************************************************
|
||||
********************************************/
|
||||
/*
|
||||
DO NOT EDIT ANYTHING IN HERE WITHOUT CHECKING THE DISCORD API SPEC AND TESTING THE JSON POST FORMAT
|
||||
OTHERWISE, YOU **WILL** BREAK STUFF -aa
|
||||
*/
|
||||
|
||||
/**
|
||||
* # Discord Webhook Payload
|
||||
@@ -37,6 +37,9 @@
|
||||
var/sanitized_content = webhook_content
|
||||
sanitized_content = replacetext(sanitized_content, "@everyone", "(Attempted atEveryone)")
|
||||
sanitized_content = replacetext(sanitized_content, "@here", "(Attempted atHere)")
|
||||
// Fixes speech marks being replaced by invalid chars
|
||||
// Note that we dont have to care about having to sanitize <> out, because discord handles that
|
||||
sanitized_content = html_decode(sanitized_content)
|
||||
json["content"] = sanitized_content
|
||||
|
||||
// Now serialize the embeds
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
GLOBAL_DATUM_INIT(revision_info, /datum/code_revision, new)
|
||||
GLOBAL_PROTECT(revision_info) // Dont mess with this
|
||||
|
||||
/**
|
||||
* Code Revision Datum
|
||||
*
|
||||
* Allows the server code to be aware of the Git environment it is running in, and lets commit hash be viewed
|
||||
*/
|
||||
/datum/code_revision
|
||||
/// Current commit hash the server is running
|
||||
var/commit_hash
|
||||
/// Date that this commit was made
|
||||
var/commit_date
|
||||
|
||||
/datum/code_revision/New()
|
||||
commit_hash = rustg_git_revparse("HEAD")
|
||||
if(commit_hash)
|
||||
commit_date = rustg_git_commit_date(commit_hash)
|
||||
|
||||
/**
|
||||
* Code Revision Logging Helper
|
||||
*
|
||||
* Small proc to simplify logging all this stuff
|
||||
*/
|
||||
/datum/code_revision/proc/log_info()
|
||||
// Put revision info in the world log
|
||||
var/logmsg
|
||||
if(commit_hash && commit_date)
|
||||
logmsg = "Running ParaCode commit: [commit_hash] (Date: [commit_date])"
|
||||
else
|
||||
logmsg = "Unable to determine revision info! Code may not be running in a git repository."
|
||||
|
||||
// Log it in all these
|
||||
log_world(logmsg)
|
||||
log_runtime_txt(logmsg)
|
||||
log_runtime_summary(logmsg)
|
||||
|
||||
/client/verb/get_revision_info()
|
||||
set name = "Get Revision Info"
|
||||
set category = "OOC"
|
||||
set desc = "Retrieve technical information about the server"
|
||||
|
||||
var/list/msg = list()
|
||||
msg += "<span class='notice'><b>Server Revision Info</b></span>"
|
||||
// Commit info first
|
||||
if(GLOB.revision_info.commit_hash && GLOB.revision_info.commit_date)
|
||||
msg += "<b>Server Commit:</b> <a href='[config.githuburl]/commit/[GLOB.revision_info.commit_hash]'>[GLOB.revision_info.commit_hash]</a> (Date: [GLOB.revision_info.commit_date])"
|
||||
else
|
||||
msg += "<b>Server Commit:</b> <i>Unable to determine</i>"
|
||||
|
||||
// Show server BYOND version
|
||||
msg += "<b>Server BYOND Version:</b> [world.byond_version].[world.byond_build]"
|
||||
// And the clients for good measure
|
||||
msg += "<b>Client (your) BYOND Version:</b> [byond_version].[byond_build]"
|
||||
|
||||
to_chat(usr, msg.Join("<br>"))
|
||||
@@ -6,7 +6,7 @@
|
||||
range = -1
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 750
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
cooldown_min = 10 //Gun wizard
|
||||
action_icon_state = "bolt_action"
|
||||
|
||||
Reference in New Issue
Block a user