CleverRaven / CleverRaven/Cataclysm-DDA

Refill of 'gas mask cartridge' and 'filter mask cartridge' is unrealistic

Open
#46,992 11 comments 4 reactions 0 assignees View on GitHub
(S2 - Confirmed) <Bug> Items: Ammo / Guns Items: Magazines
Dominant language
C++
Stars
13.1k
Forks
4.6k
Avg merge
2d 1h
Merged PRs (30d)
200

Description

# Describe the bug

At present you can (r)efill a 73 charge gas mask cartridge using a 13 charge gas mask cartridge and get a 86 charge gas mask cartridge as the end product. While this is handy, it is not realistic. Gas mask cartridges (and filter mask cartridges) should be treated like disposable batteries. You can't refill them, only replace them. Same for filter mask cartridges.

# Steps To Reproduce

1. Load save file
2. Note that the character is wearing a gas mask with 14 charges and has 86 charges in a gas mask cartridge in their inventory.
3. (r)eload the gas mask from the loose cartridge
4. Note that the charges are added to 100

# Expected behavior

I would expect the cartridge in the gas mask to be entirely replaced by the loose cartridge. There is not some sort of 'liquid filter' charge than can be poured from one container into another, it is just a measure of how much crap the filter has had to remove from the air you breathe.

# Screenshots

# Versions and configuration

- OS: Windows x64 8.1
- Game Version: 0.E-9155-g1319073-dirty [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Bionic Professions [package_bionic_professions],
No Fungal Monsters [No_Fungi],
Stats Through Skills [StatsThroughSkills],
SpeedyDex [speedydex],
Stats Through Kills [stats_through_kills]
]

# Additional context

[Narnia.zip](https://github.com/CleverRaven/Cataclysm-DDA/files/5861993/Narnia.zip)

Note that when you debug spawn in gas mask cartridges the number you spawn in is actually the charges it has. You can also drop half a gas mask cartridge (e.g. if you have
* gas mask cartridge (100)
in your inventory you can drop 50 or whatever .

Contributor guide

Open the contributing guide

Research direction

Start by tracing the reload action for gas mask and filter mask cartridges from the reproduction steps. Check how charges are transferred or cartridges are replaced, then verify that reloading uses the loose cartridge as a replacement rather than combining charges.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.