CleverRaven / CleverRaven/Cataclysm-DDA

Can reload bullets directly into magazine while it's in the gun

Open
#46,151 6 comments 1 reaction 0 assignees View on GitHub
<Bug> <Exploit> Items: Ammo / Guns Items: Magazines
Dominant language
C++
Stars
13.1k
Forks
4.6k
Avg merge
1d 21h
Merged PRs (30d)
185

Description

# Describe the bug

Given a gun with a removable magazine, using `r`eload on the gun allows reloading bullets directly into the magazine, while it's in the gun.

# Steps To Reproduce

1. Get a gun, compatible magazine, and some bullets
2. Make the magazine partially empty, then load it into the gun
3. Select the gun and `r`eload - ammo is inserted directly into the installed magazine

# Expected behavior

It should be necessary to remove the magazine from the gun before reloading bullets into it.

# Screenshots

Here I have a Glock 21 with a 13-round magazine, with only 2 bullets left. I have 5 more bullets in my inventory:

![image](https://user-images.githubusercontent.com/238395/102694384-dca04180-41dd-11eb-92c2-1781f6e82ba9.png)

When I `r`eload the gun, it puts bullets directly into the magazine:

![image](https://user-images.githubusercontent.com/238395/102694407-16714800-41de-11eb-831a-931de53ddb68.png)

# Versions and configuration

- OS: Linux
- OS Version: Distributor ID: Pop; Description: Pop!_OS 20.04 LTS; Release: 20.04; Codename: focal;
- Game Version: 0.E-8292-g00db780b75 [64-bit]
- Graphics Version: Tiles
- Game Language: System language []
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Bionic Professions [package_bionic_professions]
]

# Additional context

This is closely related to the complementary bug #46122 which prohibits reloading the entire magazine from a gun, unless you remove the current magazine first. They may have the same cause, but the symptoms and use cases are different.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.