From 29c8bc57accb7fc9aa066af316b42b7e8c18eee6 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Tue, 6 Jul 2021 13:10:36 -0400 Subject: [PATCH 1/2] Check access for removal of arts --- code/game/objects/structures/artstuff.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 5324e215766..28537865bff 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -418,6 +418,9 @@ update_appearance() /obj/structure/sign/painting/proc/unframe_canvas(mob/living/user) + if(!allowed(user)) + to_chat(user, "You're not comfortable removing this prestigious canvas!") + return if(current_canvas) current_canvas.forceMove(drop_location()) current_canvas = null From a80bc998749db53e4d71c3f1415f31b166adc70c Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Tue, 6 Jul 2021 13:24:16 -0400 Subject: [PATCH 2/2] Add hints about removal safety --- code/game/objects/structures/artstuff.dm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 28537865bff..f465a7f03dc 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -345,6 +345,7 @@ ///Description set when canvas is added. var/desc_with_canvas var/persistence_id + var/loaded = FALSE //Presets for art gallery mapping, for paintings to be shared across stations /obj/structure/sign/painting/public @@ -402,10 +403,18 @@ . = ..() if(persistence_id) . += "Any painting placed here will be archived at the end of the shift." + if(current_canvas) current_canvas.tgui_interact(user) . += "Use wirecutters to remove the painting." + // Painting loaded and persistent frame, give a hint about removal safety + if(persistence_id) + if(loaded) + . += "Don't worry, the currently framed painting has already been entered into the archives and can be safely removed. It will still be used on future shifts." + else + . += "This painting has not been entered into the archives yet. Removing it will prevent that from happening." + /obj/structure/sign/painting/proc/frame_canvas(mob/user,obj/item/canvas/new_canvas) if(!allowed(user)) to_chat(user, "You're not comfortable framing this canvas in such a prestigious spot!") @@ -424,6 +433,7 @@ if(current_canvas) current_canvas.forceMove(drop_location()) current_canvas = null + loaded = FALSE to_chat(user, "You remove the painting from the frame.") update_appearance() @@ -505,6 +515,7 @@ new_canvas.author_ckey = author_ckey new_canvas.name = "painting - [title]" current_canvas = new_canvas + loaded = TRUE update_appearance() /obj/structure/sign/painting/proc/save_persistent() @@ -561,4 +572,5 @@ if(P.current_canvas && md5(P.current_canvas.get_data_string()) == md5) QDEL_NULL(P.current_canvas) P.update_appearance() + loaded = FALSE log_and_message_admins("[key_name_admin(user)] has deleted persistent painting made by [author].") \ No newline at end of file