diff --git a/.github/workflows/generate_web_assets.yml b/.github/workflows/generate_web_assets.yml
new file mode 100644
index 00000000000..bbb8d31c42a
--- /dev/null
+++ b/.github/workflows/generate_web_assets.yml
@@ -0,0 +1,23 @@
+name: Generate web assets
+on:
+ push:
+ branches:
+ - master
+jobs:
+ generate_static_assets:
+ if: ( !contains(github.event.head_commit.message, '[ci skip]') )
+ runs-on: ubuntu-latest
+ concurrency: gen-assets
+ steps:
+ - uses: actions/checkout@v3
+ - name: Generate static assets
+ run: |
+ mv tgui/public/ assets
+ - name: Deploy
+ uses: JamesIves/github-pages-deploy-action@3.7.1
+ with:
+ BRANCH: gh-pages
+ CLEAN: true
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SINGLE_COMMIT: true
+ FOLDER: assets
diff --git a/aurorastation.dme b/aurorastation.dme
index 874d116dfe0..58aa86c0943 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -72,6 +72,7 @@
#include "code\__DEFINES\gradient.dm"
#include "code\__DEFINES\guns.dm"
#include "code\__DEFINES\hallucinations.dm"
+#include "code\__DEFINES\html.dm"
#include "code\__DEFINES\hud.dm"
#include "code\__DEFINES\hydroponics.dm"
#include "code\__DEFINES\icon_layering.dm"
diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 91bf1e1c1bc..395e52b8d88 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -113,7 +113,7 @@ GLOBAL_DATUM_INIT(vsc, /vs_control, new())
if("[ch]_NAME" in vars) vw_name = vars["[ch]_NAME"]
dat += "[vw_name] = [vw] \[Change\]
"
dat += "[vw_desc]
"
- user << browse(dat,"window=settings")
+ user << browse(HTML_SKELETON(dat), "window=settings")
/vs_control/Topic(href,href_list)
if("changevar" in href_list)
diff --git a/code/__DEFINES/html.dm b/code/__DEFINES/html.dm
new file mode 100644
index 00000000000..91af96a95c7
--- /dev/null
+++ b/code/__DEFINES/html.dm
@@ -0,0 +1,5 @@
+#define HTML_SKELETON_INTERNAL(head, body) \
+"
[head][body]"
+
+#define HTML_SKELETON_TITLE(title, body) HTML_SKELETON_INTERNAL("[title]", body)
+#define HTML_SKELETON(body) HTML_SKELETON_INTERNAL("", body)
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 8aa0d89aff3..9f6c40eb39b 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -477,6 +477,8 @@ GLOBAL_LIST_EMPTY(gamemode_cache)
var/asset_cdn_webroot = ""
var/asset_cdn_url = null
+ var/storage_cdn_iframe = "https://aurorastation.github.io/aurora.3/iframe.html"
+
GENERAL_PROTECT_DATUM(/datum/configuration)
/datum/configuration/New()
@@ -1087,6 +1089,9 @@ GENERAL_PROTECT_DATUM(/datum/configuration)
if("asset_cdn_url")
asset_cdn_url = (value[length(value)] != "/" ? (value + "/") : value)
+ if("storage_cdn_iframe")
+ storage_cdn_iframe = value
+
else
log_config("Unknown setting in configuration: '[name]'")
@@ -1181,6 +1186,8 @@ GENERAL_PROTECT_DATUM(/datum/configuration)
load_away_sites_config()
load_exoplanets_config()
+ Master.OnConfigLoad()
+
/datum/configuration/proc/save_logging_config()
rustg_file_write(json_encode(GLOB.config.logsettings), "config/logging.json")
rustg_file_write(json_encode(GLOB.config.logfiles), "config/logging_files.json")
diff --git a/code/controllers/subsystems/processing/tgui.dm b/code/controllers/subsystems/processing/tgui.dm
index 6d298f446c6..144691ac791 100644
--- a/code/controllers/subsystems/processing/tgui.dm
+++ b/code/controllers/subsystems/processing/tgui.dm
@@ -34,6 +34,24 @@ PROCESSING_SUBSYSTEM_DEF(tgui)
basehtml = replacetextEx(basehtml, "", polyfill)
basehtml = replacetextEx(basehtml, "", "NanoTrasen © 2457-[text2num(time2text(world.realtime, "YYYY")) + 442]")
+/datum/controller/subsystem/processing/tgui/OnConfigLoad()
+ var/storage_iframe = GLOB.config.storage_cdn_iframe
+ if(storage_iframe && storage_iframe != /datum/configuration::storage_cdn_iframe)
+ basehtml = replacetextEx(basehtml, "tgui:storagecdn", storage_iframe)
+ return
+
+ if(GLOB.config.asset_transport == "webroot")
+ var/datum/asset_transport/webroot/webroot = SSassets.transport
+
+ var/datum/asset_cache_item/item = webroot.register_asset("iframe.html", file("tgui/public/iframe.html"))
+ basehtml = replacetext(basehtml, "tgui:storagecdn", webroot.get_asset_url("iframe.html", item))
+ return
+
+ if(!storage_iframe)
+ return
+
+ basehtml = replacetextEx(basehtml, "tgui:storagecdn", storage_iframe)
+
/datum/controller/subsystem/processing/tgui/Shutdown()
close_all_uis()
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 7545dbe35a8..68002870f95 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -187,7 +187,7 @@
out += "None."
out += "
\[add\]"
out += "Ambitions: [ambitions ? ambitions : "None"] \[edit\]"
- usr << browse(out, "window=edit_memory[src]")
+ usr << browse(HTML_SKELETON(out), "window=edit_memory[src]")
/datum/mind/Topic(href, href_list)
if(!check_rights(R_ADMIN)) return
diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm
index f3b1ed92390..fa36cb01cd0 100644
--- a/code/game/gamemodes/technomancer/catalog.dm
+++ b/code/game/gamemodes/technomancer/catalog.dm
@@ -152,7 +152,7 @@ GLOBAL_LIST_INIT(all_technomancer_assistance, (typesof(/datum/technomancer/assis
dat += "Purchase ([spell.cost])
"
else
dat += "Cannot afford!
"
- user << browse(dat, "window=radio")
+ user << browse(HTML_SKELETON(dat), "window=radio")
onclose(user, "radio")
if(1) //Equipment
var/dat = ""
@@ -173,7 +173,7 @@ GLOBAL_LIST_INIT(all_technomancer_assistance, (typesof(/datum/technomancer/assis
dat += "Purchase ([E.cost])
"
else
dat += "Cannot afford!
"
- user << browse(dat, "window=radio")
+ user << browse(HTML_SKELETON(dat), "window=radio")
onclose(user, "radio")
if(2) //Consumables
var/dat = ""
@@ -194,7 +194,7 @@ GLOBAL_LIST_INIT(all_technomancer_assistance, (typesof(/datum/technomancer/assis
dat += "Purchase ([C.cost])
"
else
dat += "Cannot afford!
"
- user << browse(dat, "window=radio")
+ user << browse(HTML_SKELETON(dat), "window=radio")
onclose(user, "radio")
if(3) //Assistance
var/dat = ""
@@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(all_technomancer_assistance, (typesof(/datum/technomancer/assis
dat += "Purchase ([A.cost])
"
else
dat += "Cannot afford!
"
- user << browse(dat, "window=radio")
+ user << browse(HTML_SKELETON(dat), "window=radio")
onclose(user, "radio")
if(4) //Info
var/dat = ""
@@ -281,7 +281,7 @@ GLOBAL_LIST_INIT(all_technomancer_assistance, (typesof(/datum/technomancer/assis
dat += "When a function refers to 'allies', it means you, your apprentices, currently controlled entities (with the \
Control function), and friendly simple-minded entities that you've summoned with the Scepter of Enhancement.
"
dat += "A meter is equal to one 'tile'.
"
- user << browse(dat, "window=radio")
+ user << browse(HTML_SKELETON(dat), "window=radio")
onclose(user, "radio")
// Proc: Topic()
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index dc3406b9876..862bd69161e 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -217,7 +217,7 @@
dat += "No"
- user << browse(dat, "window=cloning")
+ user << browse(HTML_SKELETON(dat), "window=cloning")
onclose(user, "cloning")
return
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 2b59349c4cf..288428b821b 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -169,7 +169,7 @@
//onclose(user, "suit_storage_unit")
- user << browse(dat, "window=suit_storage_unit;size=400x500")
+ user << browse(HTML_SKELETON(dat), "window=suit_storage_unit;size=400x500")
onclose(user, "suit_storage_unit")
return
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 876d1273e59..4ddfb0a8c39 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -1495,7 +1495,7 @@
/obj/item/book/manual/tcaf_pamphlet/attack_self(var/mob/user as mob)
if(src.dat)
- user << browse("Penned by [author].
" + "[dat]", "window=book")
+ user << browse(HTML_SKELETON("Penned by [author].
" + "[dat]"), "window=book")
user.visible_message("[user] opens a pamphlet titled \"[src.title]\" and begins reading intently.")
playsound(loc, 'sound/bureaucracy/paperfold.ogg', 50, 1)
onclose(user, "book")
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index cce402709f0..46e7d147215 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -92,7 +92,7 @@ ABSTRACT_TYPE(/obj/item/storage/secure)
message = "*****"
dat += "
\n>[message]
\n1-2-3
\n4-5-6
\n7-8-9
\nR-0-E
\n"
- user << browse(dat, "window=caselock;size=300x280")
+ user << browse(HTML_SKELETON(dat), "window=caselock;size=300x280")
/obj/item/storage/secure/Topic(href, href_list)
..()
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 185fb9b51a8..ca5772e5321 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -55,7 +55,7 @@ Frequency:
+
Refresh"}
- user << browse(dat, "window=radio")
+ user << browse(HTML_SKELETON(dat), "window=radio")
onclose(user, "radio")
return
diff --git a/code/modules/admin/DB ban/ban_mirroring.dm b/code/modules/admin/DB ban/ban_mirroring.dm
index bc6c6ef40c4..ef8d5ec480c 100644
--- a/code/modules/admin/DB ban/ban_mirroring.dm
+++ b/code/modules/admin/DB ban/ban_mirroring.dm
@@ -188,7 +188,7 @@
i = (++i % 2)
output += ""
- user << browse(output, "window=banmirrors;size=600x400")
+ user << browse(HTML_SKELETON(output), "window=banmirrors;size=600x400")
/proc/display_mirrors_ckeys(mob/user, mirror_id)
if (!user || !check_rights(R_MOD|R_ADMIN) || !mirror_id)
@@ -223,7 +223,7 @@
return
output += "
Back"
- user << browse(output, "window=banmirrors")
+ user << browse(HTML_SKELETON(output), "window=banmirrors")
/proc/toggle_mirror_status(mob/user, mirror_id, inactive = FALSE)
if (!user || !check_rights(R_MOD|R_ADMIN) || !mirror_id)
diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm
index 4a666396fd8..33bc0acc17c 100644
--- a/code/modules/admin/NewBan.dm
+++ b/code/modules/admin/NewBan.dm
@@ -189,7 +189,7 @@ var/savefile/Banlist
dat += ""
dat = "
Bans: (U) = Unban , (E) = Edit Ban - ([count] Bans)
[dat]"
- usr << browse(dat, "window=unbanp;size=875x400")
+ usr << browse(HTML_SKELETON(dat), "window=unbanp;size=875x400")
//////////////////////////////////// DEBUG ////////////////////////////////////
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 430f9dc8a9d..a9c63574d8e 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -281,7 +281,7 @@ var/global/enabled_spooking = 0
if(index == page)
dat += ""
- usr << browse(dat, "window=player_notes;size=400x400")
+ usr << browse(HTML_SKELETON(dat), "window=player_notes;size=400x400")
/datum/admins/proc/player_has_info(var/key as text)
@@ -598,7 +598,7 @@ var/global/enabled_spooking = 0
dat+="Please report this on GitHub, along with what you did to make this appear."
- usr << browse(dat, "window=admincaster_main;size=400x600")
+ usr << browse(HTML_SKELETON(dat), "window=admincaster_main;size=400x600")
onclose(usr, "admincaster_main")
@@ -618,7 +618,7 @@ var/global/enabled_spooking = 0
dat += "| [ckey] - [ban[2]] - (unban) |
"
dat += "
"
- usr << browse(dat, "window=ban;size=400x400")
+ usr << browse(HTML_SKELETON(dat), "window=ban;size=400x400")
/datum/admins/proc/Game()
if(!check_rights(0)) return
@@ -640,7 +640,7 @@ var/global/enabled_spooking = 0
Choose a default ZAS setting
"}
- usr << browse(dat, "window=admin2;size=210x280")
+ usr << browse(HTML_SKELETON(dat), "window=admin2;size=210x280")
return
/datum/admins/proc/Secrets()
@@ -658,7 +658,7 @@ var/global/enabled_spooking = 0
continue
dat += "[item.name()]
"
dat += "
"
- usr << browse(dat, "window=secrets")
+ usr << browse(HTML_SKELETON(dat), "window=secrets")
return
@@ -1139,7 +1139,7 @@ var/global/enabled_spooking = 0
out += " None."
out += " \[+\]
"
- usr << browse(out, "window=edit_mode[src]")
+ usr << browse(HTML_SKELETON(out), "window=edit_mode[src]")
feedback_add_details("admin_verb","SGM")
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 28a84a90003..6af1a9a78a9 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -499,6 +499,7 @@ GLOBAL_LIST_INIT(admin_verbs_dev, list( //will need to be altered - Ryan784
/client/proc/cmd_generate_lag,
/client/proc/create_poll, //Allows to create polls
/client/proc/profiler_start,
+ /client/proc/allow_browser_inspect,
))
GLOBAL_LIST_INIT(admin_verbs_cciaa, list(
diff --git a/code/modules/admin/secrets/admin_secrets/admin_logs.dm b/code/modules/admin/secrets/admin_secrets/admin_logs.dm
index 24be5c701b0..a42452e7b4a 100644
--- a/code/modules/admin/secrets/admin_secrets/admin_logs.dm
+++ b/code/modules/admin/secrets/admin_secrets/admin_logs.dm
@@ -10,4 +10,4 @@
dat += "[l]"
if(!GLOB.admin_log.len)
dat += "No-one has done anything this round!"
- user << browse(dat, "window=admin_log")
+ user << browse(HTML_SKELETON(dat), "window=admin_log")
diff --git a/code/modules/admin/secrets/admin_secrets/bombing_list.dm b/code/modules/admin/secrets/admin_secrets/bombing_list.dm
index 54feb9ee277..cabe401e4d3 100644
--- a/code/modules/admin/secrets/admin_secrets/bombing_list.dm
+++ b/code/modules/admin/secrets/admin_secrets/bombing_list.dm
@@ -9,4 +9,4 @@
var/dat = "Bombing List"
for(var/l in GLOB.bombers)
dat += "[l]
"
- user << browse(dat, "window=bombers")
+ user << browse(HTML_SKELETON(dat), "window=bombers")
diff --git a/code/modules/admin/secrets/admin_secrets/list_dna.dm b/code/modules/admin/secrets/admin_secrets/list_dna.dm
index 7492da9c3df..518a5e0775a 100644
--- a/code/modules/admin/secrets/admin_secrets/list_dna.dm
+++ b/code/modules/admin/secrets/admin_secrets/list_dna.dm
@@ -11,4 +11,4 @@
if(H.dna && H.ckey)
dat += "| [H] | [H.dna.unique_enzymes] | [H.b_type] |
"
dat += ""
- user << browse(dat, "window=DNA;size=440x410")
+ user << browse(HTML_SKELETON(dat), "window=DNA;size=440x410")
diff --git a/code/modules/admin/secrets/admin_secrets/list_fingerprints.dm b/code/modules/admin/secrets/admin_secrets/list_fingerprints.dm
index 146d0ac7738..29f3800976b 100644
--- a/code/modules/admin/secrets/admin_secrets/list_fingerprints.dm
+++ b/code/modules/admin/secrets/admin_secrets/list_fingerprints.dm
@@ -16,4 +16,4 @@
else if(!H.dna)
dat += "| [H] | H.dna = null |
"
dat += ""
- user << browse(dat, "window=fingerprints;size=440x410")
+ user << browse(HTML_SKELETON(dat), "window=fingerprints;size=440x410")
diff --git a/code/modules/admin/secrets/admin_secrets/show_law_changes.dm b/code/modules/admin/secrets/admin_secrets/show_law_changes.dm
index e870d74381a..6de35377450 100644
--- a/code/modules/admin/secrets/admin_secrets/show_law_changes.dm
+++ b/code/modules/admin/secrets/admin_secrets/show_law_changes.dm
@@ -12,4 +12,4 @@
var/dat = "Showing last [length(GLOB.lawchanges)] law changes.
"
for(var/sig in GLOB.lawchanges)
dat += "[sig]
"
- user << browse(dat, "window=lawchanges;size=800x500")
+ user << browse(HTML_SKELETON(dat), "window=lawchanges;size=800x500")
diff --git a/code/modules/admin/secrets/admin_secrets/show_signalers.dm b/code/modules/admin/secrets/admin_secrets/show_signalers.dm
index 44acb294c2f..13f2bd6faf5 100644
--- a/code/modules/admin/secrets/admin_secrets/show_signalers.dm
+++ b/code/modules/admin/secrets/admin_secrets/show_signalers.dm
@@ -12,4 +12,4 @@
var/dat = "Showing last [length(GLOB.lastsignalers)] signalers.
"
for(var/sig in GLOB.lastsignalers)
dat += "[sig]
"
- user << browse(dat, "window=lastsignalers;size=800x500")
+ user << browse(HTML_SKELETON(dat), "window=lastsignalers;size=800x500")
diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm
index 43f30b37ab6..48056e144c0 100644
--- a/code/modules/admin/stickyban.dm
+++ b/code/modules/admin/stickyban.dm
@@ -369,7 +369,7 @@
[banhtml.Join("")]