mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
fix hardcoded para URLs, add wiki link formatter (#22504)
* fix hardcoded para URLs, introduce wiki link helper * add tiny doc
This commit is contained in:
committed by
GitHub
parent
2cc10ec5d6
commit
fcde6a37d9
@@ -768,3 +768,10 @@
|
||||
if(ofthree == 0)
|
||||
return "[num]"
|
||||
return "[num / (10 ** (ofthree * 3))][GLOB.si_suffixes[round(length(GLOB.si_suffixes) / 2) + ofthree + 1]]"
|
||||
|
||||
/**
|
||||
* Creates a hyperlink for a specified wiki article.
|
||||
*/
|
||||
/proc/wiki_link(article_name, link_text = null)
|
||||
var/url = "[GLOB.configuration.url.wiki_url]/index.php?title=[article_name]"
|
||||
return "<a href=\"[url]\">[link_text ? link_text : url]</a>"
|
||||
|
||||
@@ -432,26 +432,26 @@ SUBSYSTEM_DEF(jobs)
|
||||
var/list/L = list("<br><br><center><span class='green'>----------------</span>")
|
||||
L.Add("<b>Your role on the station is: [alt_title ? alt_title : rank].")
|
||||
L.Add("You answer directly to [job.supervisors]. Special circumstances may change this.")
|
||||
L.Add("For more information on how the station works, see <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure\">Standard Operating Procedure (SOP)</a>.")
|
||||
L.Add("For more information on how the station works, see [wiki_link("Standard_Operating_Procedure", "Standard Operating Procedure (SOP)")].")
|
||||
if(job.job_department_flags & DEP_FLAG_SERVICE)
|
||||
L.Add("As a member of Service, make sure to read up on your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Service)\">Department SOP</a>.")
|
||||
L.Add("As a member of Service, make sure to read up on your [wiki_link("Standard_Operating_Procedure_(Service)", "Department SOP")].")
|
||||
if(job.job_department_flags & DEP_FLAG_SUPPLY)
|
||||
L.Add("As a member of Supply, make sure to read up on your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Supply)\">Department SOP</a>.")
|
||||
L.Add("As a member of Supply, make sure to read up on your [wiki_link("Standard_Operating_Procedure_(Supply)", "Department SOP")].")
|
||||
if(job.job_department_flags == DEP_FLAG_COMMAND) // Check if theyre only command, like captain/hop/bs/ntrep, to not spam their chatbox
|
||||
L.Add("As an important member of Command, read up on your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Command)\">Department SOP</a>.")
|
||||
L.Add("As an important member of Command, read up on your [wiki_link("Standard_Operating_Procedure_(Command)", "Department SOP")].")
|
||||
if(job.job_department_flags & DEP_FLAG_LEGAL)
|
||||
L.Add("Your job requires complete knowledge of <a href=\"https://www.paradisestation.org/wiki/index.php/Space_law\">Space Law</a> and <a href=\"https://www.paradisestation.org/wiki/index.php/Legal_Standard_Operating_Procedure\">Legal Standard Operating Procedure</a>.")
|
||||
L.Add("Your job requires complete knowledge of [wiki_link("Space Law", "Space Law")] and [wiki_link("Legal_Standard_Operating_Procedure", "Legal Standard Operating Procedure")].")
|
||||
if(job.job_department_flags & DEP_FLAG_ENGINEERING)
|
||||
L.Add("As a member of Engineering, make sure to read up on your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Engineering)\">Department SOP</a>.")
|
||||
L.Add("As a member of Engineering, make sure to read up on your [wiki_link("Standard_Operating_Procedure_(Engineering)", "Department SOP")].")
|
||||
if(job.job_department_flags & DEP_FLAG_MEDICAL)
|
||||
L.Add("As a member of Medbay, make sure to read up on your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Medical)\">Department SOP</a>.")
|
||||
L.Add("As a member of Medbay, make sure to read up on your [wiki_link("Standard_Operating_Procedure_(Medical)", "Department SOP")].")
|
||||
if(job.job_department_flags & DEP_FLAG_SCIENCE) // geneticist gets both, yeah sure why not
|
||||
L.Add("As a member of Science, make sure to read up on your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Science)\">Department SOP</a>.")
|
||||
L.Add("As a member of Science, make sure to read up on your [wiki_link("Standard_Operating_Procedure_(Science)", "Department SOP")].")
|
||||
if(job.job_department_flags & DEP_FLAG_SECURITY)
|
||||
L.Add("As a member of Security, you are to know <a href=\"https://www.paradisestation.org/wiki/index.php/Space_law\">Space Law</a>, <a href=\"https://www.paradisestation.org/wiki/index.php/Legal_Standard_Operating_Procedure\">Legal Standard Operating Procedure</a>, as well as your <a href=\"https://www.paradisestation.org/wiki/index.php/Standard_Operating_Procedure_(Security)\">Department SOP</a>.")
|
||||
L.Add("As a member of Security, you are to know [wiki_link("Space Law", "Space Law")] and [wiki_link("Legal_Standard_Operating_Procedure", "Legal Standard Operating Procedure")], as well as your [wiki_link("Standard_Operating_Procedure_(Security)", "Department SOP")].")
|
||||
if(job.req_admin_notify)
|
||||
L.Add("You are playing a job that is important for the game progression. If you have to disconnect, please go to cryo and inform command. If you are unable to do so, please notify the admins via adminhelp.")
|
||||
L.Add("<br>If you need help, check the <a href=\"https://paradisestation.org/wiki/index.php/Main_Page\">wiki</a> or use Mentorhelp(F1)!</b>")
|
||||
L.Add("<br>If you need help, check the [wiki_link("Main_Page", "wiki")] or use Mentorhelp(F1)!</b>")
|
||||
if(job.important_information)
|
||||
L.Add("</b><span class='userdanger' style='width: 80%'>[job.important_information]</span>")
|
||||
L.Add("<span class='green'>----------------</span></center><br><br>")
|
||||
|
||||
Reference in New Issue
Block a user