Skip to content

Commit

Permalink
Fixes Attachments preventing interaction with energy gun latches (shi…
Browse files Browse the repository at this point in the history
…ptest-ss13#4196)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

Title

## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

I fucked up, and fixes are good.

## Changelog

:cl:
fix: Attachments should no longer block interaction with energy gun
latches when they shouldnt.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Gristlebee authored Feb 15, 2025
1 parent 74c1298 commit a2132ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions code/game/objects/items/attachments/_attachment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@
return FALSE

/obj/item/attachment/proc/on_alt_click(obj/item/gun/gun, mob/user, list/examine_list)
AltClick(user)
return TRUE
return FALSE

/obj/item/attachment/examine(mob/user)
. = ..()
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/attachments/_gun_attachment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,8 @@

/obj/item/attachment/gun/on_alt_click(obj/item/gun/gun, mob/user, list/examine_list)
if(gun.gun_firemodes[gun.firemode_index] == FIREMODE_UNDERBARREL)
return ..()
AltClick(user)
return TRUE
else
return FALSE

2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
/obj/item/gun/energy/examine(mob/user)
. = ..()
if(!internal_magazine)
. += "The cell retainment latch is [latch_closed ? "<span class='green'>CLOSED</span>" : "<span class='red'>OPEN</span>"]. Alt-Click on <b>help</b> intent to toggle the latch."
. += "The cell retainment latch is [latch_closed ? "<span class='green'>CLOSED</span>" : "<span class='red'>OPEN</span>"]. Alt-Click to toggle the latch."
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(ammo_type.len > 1)
. += "You can switch firemodes by pressing the <b>unique action</b> key. By default, this is <b>space</b>"
Expand Down

0 comments on commit a2132ed

Please sign in to comment.