From 4c4a9a43e8e5d23918eaa6716499896296fd24fa Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Sat, 1 Jul 2023 19:49:09 +0100 Subject: [PATCH 1/3] update paper to work with the asset system --- code/modules/asset_cache/asset_list_items.dm | 1 - code/modules/paperwork/paper.dm | 22 +++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 4ca05fe8a93c..fdfd161d3427 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -139,7 +139,6 @@ ) /datum/asset/simple/paper - keep_local_name = TRUE assets = list( "wylogo.png" = 'html/images/wylogo.png', "uscmlogo.png" = 'html/images/uscmlogo.png', diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 60aa2f2c16e7..4750b9512010 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -213,6 +213,8 @@ /obj/item/paper/proc/parsepencode(t, obj/item/tool/pen/P, mob/user as mob, iscrayon = 0) + var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper) + t = replacetext(t, "\[center\]", "
") t = replacetext(t, "\[/center\]", "
") t = replacetext(t, "\[br\]", "
") @@ -251,9 +253,9 @@ t = replacetext(t, "\[/grid\]", "") t = replacetext(t, "\[row\]", "") t = replacetext(t, "\[cell\]", "") - t = replacetext(t, "\[logo\]", "") - t = replacetext(t, "\[wy\]", "") - t = replacetext(t, "\[uscm\]", "") + t = replacetext(t, "\[logo\]", "") + t = replacetext(t, "\[wy\]", "") + t = replacetext(t, "\[uscm\]", "[t]" else // If it is a crayon, and he still tries to use these, make them empty! @@ -619,11 +621,21 @@ /obj/item/paper/wy icon_state = "paper_wy" - info = "

\n" + +/obj/item/paper/wy/Initialize(mapload, photo_list) + . = ..() + + var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper) + info = "

\n" /obj/item/paper/uscm icon_state = "paper_uscm" - info = "

\n" + +/obj/item/paper/uscm/Initialize(mapload, photo_list) + . = ..() + + var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper) + info = "

\n" /obj/item/paper/research_notes icon_state = "paper_wy_words" From 75d919afc2acce038f9deb832ea7d20ae582bf41 Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Sat, 1 Jul 2023 19:49:43 +0100 Subject: [PATCH 2/3] restores the browse_rsc functionality for localhost --- code/modules/asset_cache/asset_list_items.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index fdfd161d3427..4ca05fe8a93c 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -139,6 +139,7 @@ ) /datum/asset/simple/paper + keep_local_name = TRUE assets = list( "wylogo.png" = 'html/images/wylogo.png', "uscmlogo.png" = 'html/images/uscmlogo.png', From 0a8b04f88b219b7a0b188783598c614ec0ded992 Mon Sep 17 00:00:00 2001 From: harryob Date: Sun, 2 Jul 2023 07:28:53 +0100 Subject: [PATCH 3/3] Update code/modules/paperwork/paper.dm --- code/modules/paperwork/paper.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 4750b9512010..98d27cc037be 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -255,7 +255,7 @@ t = replacetext(t, "\[cell\]", "") t = replacetext(t, "\[logo\]", "") t = replacetext(t, "\[wy\]", "") - t = replacetext(t, "\[uscm\]", "") t = "[t]" else // If it is a crayon, and he still tries to use these, make them empty!