From 0f8d672fb8d9b5b35bf56ca95254bdd3f37750b1 Mon Sep 17 00:00:00 2001 From: Cody Brittain Date: Mon, 21 Aug 2023 16:03:07 -0400 Subject: [PATCH] Guns now use balloon alerts. (#17097) --- code/modules/projectiles/gun.dm | 18 ++++---- .../changelogs/GeneralCamo - Gun Balloons.yml | 41 +++++++++++++++++++ 2 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 html/changelogs/GeneralCamo - Gun Balloons.yml diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 736ce3e4517..abefe23c7a5 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -255,6 +255,7 @@ else if(needspin) to_chat(user, SPAN_WARNING("\The [src]'s trigger is locked. This weapon doesn't have a firing pin installed!")) + balloon_alert(user, "Trigger locked, firing pin needed!") return FALSE else return TRUE @@ -440,12 +441,9 @@ return (target in check_trajectory(target, user)) //called if there was no projectile to shoot -/obj/item/gun/proc/handle_click_empty(mob/user) - if(user) - to_chat(user, SPAN_DANGER("*click*")) - else - src.visible_message("*click*") - playsound(loc, empty_sound, 100, 1) +/obj/item/gun/proc/handle_click_empty() + balloon_alert_to_viewers("*click*") + playsound(loc, empty_sound, 30, TRUE) //called after successfully firing /obj/item/gun/proc/handle_post_fire(mob/user, atom/target, var/pointblank = FALSE, var/reflex = FALSE, var/playemote = TRUE) @@ -680,7 +678,7 @@ safety_state = !safety_state update_icon() if(user) - to_chat(user, SPAN_NOTICE("You switch the safety [safety_state ? "on" : "off"] on \the [src].")) + balloon_alert(user, "Safety [safety_state ? "on" : "off"].") if(!safety_state) playsound(src, safetyon_sound, 30, 1) else @@ -723,7 +721,7 @@ if(wielded) unwield() - to_chat(user, SPAN_NOTICE("You are no-longer stabilizing \the [name] with both hands.")) + to_chat(user, SPAN_NOTICE("You are no longer stabilizing \the [name] with both hands.")) var/obj/item/offhand/O = user.get_inactive_hand() if(istype(O)) @@ -843,7 +841,7 @@ if(user) var/obj/item/gun/O = user.get_inactive_hand() if(istype(O)) - to_chat(user, SPAN_NOTICE("You are no-longer stabilizing \the [O] with both hands.")) + to_chat(user, SPAN_NOTICE("You are no longer stabilizing \the [O] with both hands.")) O.unwield() unwield() @@ -893,7 +891,7 @@ return ..() if(bayonet) - to_chat(user, SPAN_DANGER("There is a bayonet attached to \the [src] already.")) + to_chat(user, SPAN_WARNING("There is a bayonet attached to \the [src] already!")) return TRUE user.drop_from_inventory(I,src) diff --git a/html/changelogs/GeneralCamo - Gun Balloons.yml b/html/changelogs/GeneralCamo - Gun Balloons.yml new file mode 100644 index 00000000000..2180c88b1bb --- /dev/null +++ b/html/changelogs/GeneralCamo - Gun Balloons.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: GeneralCamo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Guns now use balloon alerts for toggling the safety, and dry firing."