Skip to content

Commit

Permalink
Gun safeties work in more slots (#3342)
Browse files Browse the repository at this point in the history
<!-- 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! -->
#3341 
Gun safeties can be toggled in 1st level storage slot (e.g hands, suit
slots, belts, pockets, back) instead of just the hands. Guns in
containers (e.g. backpacks) aren't togglable.

## 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. -->

Seems like a nice QOL thing to have.

## Changelog

:cl:
add: Gun safeties can be toggled from 1st level storage slots.
/: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 Sep 9, 2024
1 parent b6940df commit cdb30e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@
. = ..()
if(!has_safety)
return

if(src != user.get_active_held_item())
// only checks for first level storage e.g pockets, hands, suit storage, belts, nothing in containers
if(!in_contents_of(user))
return

if(isliving(user) && in_range(src, user))
Expand Down

0 comments on commit cdb30e3

Please sign in to comment.