-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grenade pouch and tac vest causing absurd inventory display #53044
Comments
It is probably due to the odd pockets. Pockets without defined size default to 2000000 liters (big default value so pocket without defined size will fit anything inside). The grenade pouch has container pocket that takes only grenades. Since it accepts only grenades the volume doesn't matter so the pocket has no defined size. So it defaults to 2000000 liters. Tac vest has one more of such pocket. Since these are "just normal" container pockets they get added to the carry volume limit. And since the default 20000000 liters is already near the max integer (in ml) limit it rolls over. The fix would be to set some sensible "max_contains_volume" to these pockets. |
It may be a good idea to reduce the default pocketsize by at least one order of magnitude. Probably unnecessary, especially for this specific issue, but it might be a good way to avoid any unforeseen problems with overflow. |
Pockets with specific item type filters probably should not contribute to free volume display at all. |
Yeah, that's kind of a problem anyway. The volume display is often highly misleading because it's counting "free" space in holsters, scabbards and ammo pouches that can't actually be filled any further. |
I ran up against this problem in #52745 originally I didn't want the pockets to interact with the max volume and free volume entries. It was easy to make a pocket with certain characteristics not be added to the displays (total_container_capacity) however the issue is the items in the pocket still have volume. So if you were only wearing an ammo pouch with 5 shells in it your display would show something like Volume(L): .55/0 which is also undesirable. I guess you would have to track what items are stored in such pockets and also ignore their volume when calculating Character::free_space() Or when calculating max volume, determine the exact volume of items in holsters and ammo in ammo items. Alright I'm taking a crack at fixing this and also making some of the other issues with volume go away |
Describe the bug
Wearing the Tac Vest or Grenade Pouch causes the inventory "free volume" and "Volume (L)" values to display absurdly high values. Wearing both actually causes the Volume (L) maximum display to overflow and become negative.
This is presumably caused by #53009, in which is it likely applies to all wearable ammo-type containers.
Steps to reproduce
Expected behavior
The effectively infinite volume of ammo containers should not be include in the calculations for inventory volume.
Screenshots
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food],
Bionic Professions [package_bionic_professions],
Bionic Slots [cbm_slots],
Extra Mutated Scenarios [extra_mut_scens],
Military Profession Pack [military_professions]
]
Additional context
No response
The text was updated successfully, but these errors were encountered: