From 4d90bc0573d7e06ed25be8fbb1a9e7b70f1b479b Mon Sep 17 00:00:00 2001 From: fernerr <35879136+fernerr@users.noreply.github.com> Date: Fri, 13 Dec 2019 07:24:46 +0100 Subject: [PATCH] Adds the ability to place flags directly onto windows (#7637) No need to kerfuffle with a screwdriver to get your consulate looking its best. Now you can just click with your flag to hang it up over windows. --- code/game/objects/structures/signs.dm | 19 ++++++++----------- .../Ferner-191210-coding_windowflags.yml | 5 +++++ 2 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 html/changelogs/Ferner-191210-coding_windowflags.yml diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 1a4ce2130e3..505e94c0905 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -614,14 +614,13 @@ if (!adjacent) return - var/turf/W = A - if (!iswall(W) || !isturf(user.loc)) - to_chat(user, "You can't place this here!") + if((!iswall(A) && !istype(A, /obj/structure/window)) || !isturf(user.loc)) + to_chat(user, span("warning","You can't place this here!")) return - var/placement_dir = get_dir(user, W) + var/placement_dir = get_dir(user, A) if (!(placement_dir in cardinal)) - to_chat(user, "You must stand directly in front of the wall you wish to place that on.") + to_chat(user, span("warning","You must stand directly in front of the location you wish to place that on.")) return var/obj/structure/sign/flag/P = new(user.loc) @@ -666,14 +665,12 @@ /obj/structure/sign/flag/attack_hand(mob/user as mob) - - if(alert("Do you want to rip \the [src] from the wall?","You think...","Yes","No") == "Yes") + if(alert("Do you want to rip \the [src] from its place?","You think...","Yes","No") == "Yes") if(!do_after(user, 2 SECONDS, act_target = src)) return 0 - - visible_message("\The [user] rips \the [src] in a single, decisive motion!" ) + visible_message(span("warning","\The [user] rips \the [src] in a single, decisive motion!" )) playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1) icon_state = "poster_ripped" name = "ripped poster" @@ -685,11 +682,11 @@ if(istype(W, /obj/item/flame/lighter)) - visible_message("\The [user] starts to burn \the [src] down!") + visible_message(span("warning","\The [user] starts to burn \the [src] down!")) if(!do_after(user, 2 SECONDS, act_target = src)) return 0 - visible_message("\The [user] burns \the [src] down!") + visible_message(span("warning","\The [user] burns \the [src] down!")) playsound(src.loc, 'sound/items/cigs_lighters/zippo_on.ogg', 100, 1) new /obj/effect/decal/cleanable/ash(src.loc) diff --git a/html/changelogs/Ferner-191210-coding_windowflags.yml b/html/changelogs/Ferner-191210-coding_windowflags.yml new file mode 100644 index 00000000000..72ac57d7338 --- /dev/null +++ b/html/changelogs/Ferner-191210-coding_windowflags.yml @@ -0,0 +1,5 @@ +author: Ferner +delete-after: True + +changes: + - tweak: "Flags can now be placed onto windows directly."