From 96b30fa61ea9841c34b6b8828be94ff6ea842e8b Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Mon, 13 Nov 2017 00:32:44 -0800 Subject: [PATCH] Prevent placing posters on diagonally-smoothed walls (#32558) Posters are also knocked off the walls if they change to being diagonally smoothed later. --- code/__HELPERS/icon_smoothing.dm | 4 ++++ code/game/objects/effects/contraband.dm | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 33189ffcee..fefc90f1ed 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -179,6 +179,10 @@ underlay_appearance.icon_state = DEFAULT_UNDERLAY_ICON_STATE underlays = U + // Drop posters which were previously placed on this wall. + for(var/obj/structure/sign/poster/P in src) + P.roll_and_drop(src) + /proc/cardinal_smooth(atom/A, adjacencies) //NW CORNER diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index f248409e0a..a337253c59 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -121,6 +121,13 @@ to_chat(user, "[P] has no poster... inside it? Inform a coder!") return + // Deny placing posters on currently-diagonal walls, although the wall may change in the future. + if (smooth & SMOOTH_DIAGONAL) + for (var/O in our_overlays) + var/image/I = O + if (copytext(I.icon_state, 1, 3) == "d-") + return + var/stuff_on_wall = 0 for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff if(istype(O, /obj/structure/sign/poster))