From f2fe624ca4d265578c1fcf9999e09fd0a53ea91d Mon Sep 17 00:00:00 2001 From: Thunder12345 Date: Sat, 15 Jul 2023 02:07:42 +0100 Subject: [PATCH] Stops CTF players delivering the flag to the flag (#76789) ## About The Pull Request Adds more warnings telling CTF players the flag has to be taken to the controller to capture it by: Text when picking up the flag Text and angry buzz when trying to hit another flag with it ## Why It's Good For The Game Players continue to obliviously drop flags on the ground on top of their own flag despite being told what to do when joining the match, so this information needs to be reiterated during the match when relevant to the player. ## Changelog :cl: qol: CTF has more reminders of how to capture flags. /:cl: --------- Co-authored-by: san7890 --- code/modules/capture_the_flag/ctf_game.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/capture_the_flag/ctf_game.dm b/code/modules/capture_the_flag/ctf_game.dm index 9ca6fe89d8b..fc8cc0ceb15 100644 --- a/code/modules/capture_the_flag/ctf_game.dm +++ b/code/modules/capture_the_flag/ctf_game.dm @@ -256,9 +256,19 @@ anchored = TRUE // Avoid directly assigning to anchored and prefer to use set_anchored() on normal circumstances. return //passing means the user picked up the flag so we can now apply this + to_chat(user, span_userdanger("Take \the [initial(name)] to your team's controller!")) user.set_anchored(TRUE) user.status_flags &= ~CANPUSH +/obj/item/ctf_flag/attackby(obj/item/item, mob/user, params) + if(!istype(item, /obj/item/ctf_flag)) + return ..() + + var/obj/item/ctf_flag/flag = item + if(flag.team != team) + to_chat(user, span_userdanger("Take \the [initial(flag.name)] to your team's controller!")) + user.playsound_local(get_turf(user), 'sound/machines/buzz-sigh.ogg', 100, vary = FALSE, use_reverb = FALSE) + /obj/item/ctf_flag/dropped(mob/user) ..() user.anchored = FALSE // Hacky usage that bypasses set_anchored()