From cdb769a7c71c91821f7c72c2fd97147da6747917 Mon Sep 17 00:00:00 2001 From: ShiftyRail <31417754+ShiftyRail@users.noreply.github.com> Date: Mon, 5 May 2025 21:51:24 +0100 Subject: [PATCH] 516 compatibility for simple HTML (#37508) * 516 compat: HTML wrappers * More HTML * Legacy gult * Forgot these * forgot that thanks travis --- __DEFINES/html_wrappers.dm | 8 +++++ .../trinary_devices/pressure_valve.dm | 2 +- code/ZAS/NewSettings.dm | 2 +- code/controllers/subsystem/garbage.dm | 2 +- code/datums/datumvars.dm | 4 +-- code/datums/gamemode/dynamic/dynamic.dm | 2 +- .../factions/bloodcult/bloodcult_items.dm | 11 ++++--- .../gamemode/factions/legacy_cult/ritual.dm | 2 +- .../gamemode/factions/legacy_cult/talisman.dm | 2 +- code/datums/gamemode/powers/powers.dm | 2 +- code/datums/helper_datums/getrev.dm | 2 +- code/datums/mind.dm | 4 +-- code/game/gamemodes/nuclear/nuclearbomb.dm | 2 +- code/game/gamemodes/sandbox/h_sandbox.dm | 2 +- code/game/gamemodes/wizard/spellbook.dm | 2 +- code/game/machinery/ATM.dm | 2 +- code/game/machinery/Freezer.dm | 4 +-- code/game/machinery/Sleeper.dm | 2 +- code/game/machinery/adv_med.dm | 2 +- code/game/machinery/alarm.dm | 6 ++-- code/game/machinery/atmo_control.dm | 2 +- code/game/machinery/biogenerator.dm | 2 +- code/game/machinery/computer/Operating.dm | 2 +- code/game/machinery/computer/aifixer.dm | 2 +- code/game/machinery/computer/arcade/arcade.dm | 4 +-- code/game/machinery/computer/message.dm | 2 +- code/game/machinery/computer/pod.dm | 2 +- code/game/machinery/computer/prisonshuttle.dm | 2 +- .../machinery/computer/specops_shuttle.dm | 2 +- code/game/machinery/computer/station_alert.dm | 2 +- .../computer/syndicate_specops_shuttle.dm | 2 +- code/game/machinery/doors/brigdoors.dm | 2 +- code/game/machinery/magnet.dm | 2 +- code/game/machinery/metaldetector.dm | 2 +- code/game/machinery/newscaster.dm | 2 +- code/game/machinery/suit_storage_unit.dm | 10 +++--- code/game/machinery/syndicate_beacon.dm | 2 +- code/game/machinery/telecomms/logbrowser.dm | 2 +- code/game/machinery/telecomms/telemonitor.dm | 2 +- .../machinery/telecomms/traffic_control.dm | 4 +-- code/game/machinery/turrets.dm | 2 +- code/game/machinery/vending.dm | 4 +-- code/game/objects/items/blueprints.dm | 2 +- code/game/objects/items/devices/PDA/PDA.dm | 2 +- .../objects/items/devices/PDA/PDA_types.dm | 4 +-- code/game/objects/items/devices/aicard.dm | 2 +- .../items/devices/healthanalyzerpro.dm | 4 +-- code/game/objects/items/devices/megaphone.dm | 2 +- code/game/objects/items/devices/paicard.dm | 2 +- .../objects/items/devices/radio/cyborg.dm | 2 +- .../items/devices/radio/electropack.dm | 2 +- .../game/objects/items/devices/radio/radio.dm | 6 ++-- .../objects/items/devices/transfer_valve.dm | 2 +- .../items/weapons/implants/implantchair.dm | 2 +- .../items/weapons/implants/implantpad.dm | 2 +- code/game/objects/items/weapons/scrolls.dm | 2 +- .../objects/items/weapons/storage/secure.dm | 2 +- .../objects/items/weapons/teleportation.dm | 2 +- code/game/objects/objs.dm | 2 +- code/hub.dm | 2 +- code/modules/Economy/Accounts.dm | 2 +- code/modules/Economy/AdminTools.dm | 2 +- code/modules/Economy/EFTPOS.dm | 2 +- code/modules/Economy/POS.dm | 2 +- code/modules/admin/DB ban/functions.dm | 2 +- code/modules/admin/NewBan.dm | 2 +- code/modules/admin/admin.dm | 24 +++++++------- code/modules/admin/admin_mass_del_in_zone.dm | 2 +- code/modules/admin/artifacts_panel.dm | 2 +- code/modules/admin/body_archive_panel.dm | 2 +- code/modules/admin/check_antagonists.dm | 2 +- code/modules/admin/climate_panel.dm | 2 +- code/modules/admin/diseases_panel.dm | 2 +- code/modules/admin/emergency_shuttle_panel.dm | 2 +- code/modules/admin/newbanjob.dm | 2 +- .../admin/permissionverbs/permissionedit.dm | 2 +- code/modules/admin/player_panel.dm | 4 +-- code/modules/admin/topic.dm | 33 +++++++++++-------- code/modules/admin/verbs/atmosdebug.dm | 4 +-- .../admin/verbs/check_customitem_activity.dm | 2 +- code/modules/admin/verbs/diagnostics.dm | 2 +- code/modules/admin/verbs/mapping.dm | 4 +-- code/modules/admin/verbs/one_click_antag.dm | 2 +- code/modules/assembly/proximity.dm | 2 +- code/modules/assembly/signaler.dm | 2 +- code/modules/assembly/timer.dm | 2 +- .../awaymissions/bluespaceartillery.dm | 2 +- code/modules/client/preferences.dm | 6 ++-- code/modules/clothing/suits/miscellaneous.dm | 8 ++--- code/modules/detectivework/detective_work.dm | 2 +- code/modules/hydroponics/hydro_tools.dm | 2 +- code/modules/library/computers/checkout.dm | 3 +- code/modules/library/lib_machines.dm | 2 +- .../media/broadcast/receivers/radio.dm | 2 +- code/modules/medical/computer/cloning.dm | 2 +- code/modules/mob/dead/observer/verbs.dm | 2 +- code/modules/mob/language.dm | 4 +-- code/modules/mob/living/silicon/ai/ai.dm | 2 +- .../modules/mob/living/silicon/mommi/mommi.dm | 2 +- .../modules/mob/living/silicon/pai/recruit.dm | 4 +-- .../mob/living/silicon/pai/software.dm | 2 +- .../modules/mob/living/silicon/robot/robot.dm | 4 +-- code/modules/mob/living/silicon/silicon.dm | 4 +-- .../borer/verbs_attached_chest.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 2 +- code/modules/mob/mob.dm | 4 +-- code/modules/mob/new_player/new_player.dm | 6 ++-- code/modules/mob/new_player/poll.dm | 10 +++--- code/modules/paperwork/fax.dm | 2 +- code/modules/paperwork/folders.dm | 2 +- code/modules/paperwork/photocopier.dm | 2 +- code/modules/power/gravitygenerator.dm | 2 +- code/modules/power/rust/fuel_control.dm | 2 +- .../particle_accelerator/particle_control.dm | 2 +- code/modules/power/turbine.dm | 2 +- .../projectile/constructable/flamethrower.dm | 2 +- code/modules/reagents/dartgun.dm | 2 +- .../artifact/artifact_replicator.dm | 2 +- .../machinery/artifact_harvester.dm | 2 +- .../tools/ano_device_battery.dm | 2 +- .../tools/suspension_generator.dm | 2 +- .../tools/tools_depthscanner.dm | 2 +- .../xenoarchaeology/tools/tools_locater.dm | 2 +- .../security levels/keycard authentication.dm | 4 +-- code/modules/virus2/curer.dm | 2 +- maps/randomvaults/objects.dm | 4 +-- vgstation13.dme | 1 + 127 files changed, 208 insertions(+), 188 deletions(-) create mode 100644 __DEFINES/html_wrappers.dm diff --git a/__DEFINES/html_wrappers.dm b/__DEFINES/html_wrappers.dm new file mode 100644 index 00000000000..ed7b985a926 --- /dev/null +++ b/__DEFINES/html_wrappers.dm @@ -0,0 +1,8 @@ +// Wrappers needed for webview 2.0 / 516 compat. + +#define HTML_SKELETON_INTERNAL(head, body, style) \ +"[head][body]" + +#define HTML_SKELETON_TITLE_STYLE(title, body, style) HTML_SKELETON_INTERNAL("[title]", body, style) +#define HTML_SKELETON_TITLE(title, body) HTML_SKELETON_INTERNAL("[title]", body, "") +#define HTML_SKELETON(body) HTML_SKELETON_INTERNAL("", body, "") diff --git a/code/ATMOSPHERICS/components/trinary_devices/pressure_valve.dm b/code/ATMOSPHERICS/components/trinary_devices/pressure_valve.dm index 8f2906bf32c..a09f1fb7a2f 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/pressure_valve.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/pressure_valve.dm @@ -99,7 +99,7 @@ "} - user << browse(dat, "window=atmo_conditional_valve") + user << browse(HTML_SKELETON(dat), "window=atmo_conditional_valve") onclose(user, "atmo_conditional_valve") return diff --git a/code/ZAS/NewSettings.dm b/code/ZAS/NewSettings.dm index 2d833fed4d0..9304115654c 100644 --- a/code/ZAS/NewSettings.dm +++ b/code/ZAS/NewSettings.dm @@ -420,7 +420,7 @@ a { color: white; } dat += {"
[s.name] = [s.value] \[Change\]
[s.desc]
"} dat += "" - user << browse(dat,"window=settings") + user << browse(HTML_SKELETON(dat),"window=settings") /ZAS_Settings/Topic(href,href_list) if("changevar" in href_list) diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 0785f117d01..183b89667e1 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -228,7 +228,7 @@ List of hard deletions:"} if(L.len == 1) to_chat(usr, "No garbage collector deletions this round") return - usr << browse(jointext(L,""),"window=harddellogs") + usr << browse(HTML_SKELETON(jointext(L, "")),"window=harddellogs") /* * NEVER USE THIS FOR /atom OTHER THAN /atom/movable diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 09cdb5fadbc..39fbc98d112 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -346,7 +346,7 @@ function loadPage(list) { html += "" - usr << browse(html, "window=variables\ref[D];size=475x650") + usr << browse(HTML_SKELETON(html), "window=variables\ref[D];size=475x650") /client/proc/debug_variable(name, value, list/searched, var/datum/DA = null) var/html = "" @@ -453,7 +453,7 @@ function loadPage(list) { html += "
" html += debug_variable(null, L) - usr << browse(html, "window=listedit\ref[L];size=475x650") + usr << browse(HTML_SKELETON(html), "window=listedit\ref[L];size=475x650") /client/proc/view_var_Topic(href, href_list, hsrc) //This should all be moved over to datum/admins/Topic() or something ~Carn diff --git a/code/datums/gamemode/dynamic/dynamic.dm b/code/datums/gamemode/dynamic/dynamic.dm index 74ade9321fb..bf69c1b9dcc 100644 --- a/code/datums/gamemode/dynamic/dynamic.dm +++ b/code/datums/gamemode/dynamic/dynamic.dm @@ -146,7 +146,7 @@ var/stacking_limit = 90 out += "Remaining threat/threat_level: [threat]/[threat_level]
" out += "Remaining midround threat/threat_level: [midround_threat]/[midround_threat_level]" - usr << browse(out, "window=threatlog;size=700x500") + usr << browse(HTML_SKELETON(out), "window=threatlog;size=700x500") /datum/gamemode/dynamic/GetScoreboard() diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm index 85476ba6e4b..6f2ef33a5de 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm @@ -75,8 +75,11 @@ var/list/arcane_tomes = list() /obj/item/weapon/tome/proc/tome_text() var/page_data = null - var/dat = {"arcane tome - + var/title = "arcane tome" + var/body_style = {" + "color:#FFFFFF" bgcolor="#110000" + "} + var/dat = {"