mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Merge pull request #9482 from Thalpy/Wiki
Gives chemistry a library (and updates buttons at the top right of the game too).
This commit is contained in:
@@ -175,6 +175,9 @@
|
||||
/datum/config_entry/string/banappeals
|
||||
|
||||
/datum/config_entry/string/wikiurl
|
||||
config_entry_value = "https://katlin.dog/citadel-wiki"
|
||||
|
||||
/datum/config_entry/string/wikiurltg
|
||||
config_entry_value = "http://www.tgstation13.org/wiki"
|
||||
|
||||
/datum/config_entry/string/forumurl
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/book/manual/wiki/proc/initialize_wikibook()
|
||||
var/wikiurl = CONFIG_GET(string/wikiurl)
|
||||
var/wikiurl = CONFIG_GET(string/wikiurltg)
|
||||
if(wikiurl)
|
||||
dat = {"
|
||||
|
||||
@@ -270,13 +270,67 @@
|
||||
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/wiki/chemistry
|
||||
/obj/item/book/manual/wiki/cit
|
||||
name = "Citadel infobook"
|
||||
icon_state ="book8"
|
||||
author = "Nanotrasen"
|
||||
title = "Citadel infobook"
|
||||
page_link = ""
|
||||
window_size = "1500x800" //Too squashed otherwise
|
||||
|
||||
/obj/item/book/manual/wiki/cit/initialize_wikibook()
|
||||
var/wikiurl = CONFIG_GET(string/wikiurl)
|
||||
if(wikiurl)
|
||||
dat = {"
|
||||
|
||||
<html><head>
|
||||
<style>
|
||||
iframe {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
function pageloaded(myframe) {
|
||||
document.getElementById("loading").style.display = "none";
|
||||
myframe.style.display = "block";
|
||||
}
|
||||
</script>
|
||||
<p id='loading'>You start skimming through the manual...</p>
|
||||
<iframe width='100%' height='97%' onload="pageloaded(this)" src="[wikiurl]/[page_link]" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
"}
|
||||
|
||||
/obj/item/book/manual/wiki/cit/chemistry
|
||||
name = "Chemistry Textbook"
|
||||
icon_state ="chemistrybook"
|
||||
author = "Nanotrasen"
|
||||
title = "Chemistry Textbook"
|
||||
page_link = "main/guides/guide_chemistry"
|
||||
|
||||
/obj/item/book/manual/wiki/cit/chem_recipies
|
||||
name = "Chemistry Recipies"
|
||||
icon_state ="chemrecibook"
|
||||
author = "Chemcat"
|
||||
title = "Chemistry Recipies"
|
||||
page_link = "main/guides/chem_recipies"
|
||||
|
||||
/obj/item/book/manual/wiki/chemistry
|
||||
name = "Outdated Chemistry Textbook"
|
||||
icon_state ="chemistrybook_old"
|
||||
author = "Nanotrasen"
|
||||
title = "Outdated Chemistry Textbook"
|
||||
page_link = "Guide_to_chemistry"
|
||||
|
||||
/obj/item/book/manual/wiki/chemistry/Initialize()
|
||||
..()
|
||||
new /obj/item/book/manual/wiki/cit/chemistry(loc)
|
||||
new /obj/item/book/manual/wiki/cit/chem_recipies(loc)
|
||||
|
||||
/obj/item/book/manual/wiki/engineering_construction
|
||||
name = "Station Repairs and Construction"
|
||||
icon_state ="bookEngineering"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@@ -4,11 +4,15 @@
|
||||
set desc = "Type what you want to know about. This will open the wiki in your web browser. Type nothing to go to the main page."
|
||||
set hidden = 1
|
||||
var/wikiurl = CONFIG_GET(string/wikiurl)
|
||||
var/wikiurltg = CONFIG_GET(string/wikiurltg)
|
||||
if(wikiurl)
|
||||
if(query)
|
||||
var/output = wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
|
||||
var/output = wikiurl + "?search=" + query
|
||||
src << link(output)
|
||||
output = wikiurltg + "/index.php?title=Special%3ASearch&profile=default&search=" + query
|
||||
src << link(output)
|
||||
else if (query != null)
|
||||
src << link(wikiurltg)
|
||||
src << link(wikiurl)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
|
||||
|
||||
Reference in New Issue
Block a user