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
Bugged handling of items which have pockets both with and w/o "open_container" tag #42301
Comments
This issue appears to have been largely, if not entirely resolved by #42341, which added a prompt for where to spill liquids when dropping a spillable container. I tested this in August 22 edition of master 2d68329. First, I had to make some changes to your tactical test pouch - the "covers" field body parts need to be in lowercase now, and the total volume needs to be at least as much as the total of pocket volume (unless you use the magical TARDIS flag), so I increased it to 1500 ml. It will no longer fit in the pockets of a winter coat. {
"id": "test_spill_pouch",
"type": "ARMOR",
"//": "Test item submitted in issue #42301",
"name": { "str": "tactical test pouch", "str_pl": "tactical test pouches" },
"description": "test pouch. with regular and open pocket.",
"weight": "288 g",
"volume": "1500 ml",
"price": 4500,
"price_postapoc": 250,
"to_hit": 2,
"bashing": 1,
"material": [ "nylon", "plastic" ],
"symbol": "[",
"looks_like": "holster",
"color": "dark_gray",
"covers": [ "torso" ],
"coverage": 10,
"encumbrance": 1,
"max_encumbrance": 3,
"pocket_data": [
{
"pocket_type": "CONTAINER",
"max_contains_volume": "2 L",
"max_contains_weight": "4 kg",
"max_item_length": "20 cm",
"magazine_well": "500 ml",
"moves": 80
},
{
"pocket_type": "CONTAINER",
"rigid": true,
"watertight": true,
"open_container": true,
"max_contains_volume": "990 ml",
"max_contains_weight": "2 kg"
}
],
"material_thickness": 1,
"flags": [ "WAIST", "WATER_FRIENDLY" ]
} When I am wearing or wielding the pouch, I can This makes sense, because by wearing or wielding the spillable container, you can steady it and prevent it from spilling (if it's a beer helmet, say). When the pouch is simply in my inventory (contained in a backpack or something), I cannot This also makes sense, because if the pouch is stuffed in your backpack, it could go sideways and spill the liquid out. Now, I have wielded the tactical test pouch, and filled it with water: What if I try to put the pouch in my rucksack now? Rucksack, Notice the pouch is not available for insertion. Looks good. Can I drop the pouch in vehicle cargo? It appears so: But when I do, I have to figure out what to do with the water: I can pour it back into my water bottle, or pour it on the ground in any direction I choose - it does not automatically spill at my feet. There is only one curious edge case I can find with your test pouch - it is not available to be @GGgatherer Can you confirm in 2d68329 or later? Edit Using your attached save game, dropping the belt into vehicle cargo, I correctly get the prompt for what to do with the liquid. |
@wapcaplet The issue was not that the liquid was spilling, it's fine, it should be spilling. The issue was that the pouch ended up under my character's feet instead of being put in the box despite game specifically stating in the log that it was put in the box. And it still ends up under feet in b10946. |
Can confirm that it's somewhat of a low effort solution. It should be as stable as a "proper" solution with a popup to select if you want to spill the contents, though. |
@GGgatherer OK, now I see that the pouch is dropped at my character's feet, but only if there is a non-liquid item in one of its pockets. The liquid contents appears to have nothing to do with the dropping-at-your-feet issue. Here I have loaded your save game, using the revised tactical test pouch I posted in my comment above. Upon load, the avatar is wearing the pouch, with a cellphone in pocket 1, and clean water in pocket 2: As you say, when I try to drop the pouch into vehicle storage to the NW, I am prompted for what to do with the liquid. I will pour it back into the water bottle: This leaves the pouch with cellphone at my feet, as you have noted: But now, pick up the pouch (and Remove that item (leaving the test pouch empty), and it successfully drops into the storage space for me: All that said, we are working with an item you made up. Are there any existing in-game items that you have observed this behavior with? This is definitely a bug that should be fixed, but unless it is occurring with normal items in vanilla, or in a mainline mod, then it's quite an edge case.
It was partly that PR, and partly the "What to do with clean water?" prompt that fixes the bug of allowing an "open_container" of liquid to be placed into your coat pocket. You said it just masks the issue, and your original description suggested that it should simply spill. I don't understand what solution you would prefer to see here. And again, we are talking about a custom item that you made up - if you know of this happening with an existing mainline item, please share. Otherwise, this issue is not likely to be considered high priority. |
As far as I know, no.
Well, the issue in question was "it does neither ask to spill nor actually spill the liquid when it should", so... It should ask where to spill the liquid, then put the item wherever I decide, be it worn container or not. Just like the regular behavior of such items.
There are no similar things in vanilla (yet) but when I asked about it on discord, KorGgent said he made the NC system to support any combination of pockets so it should support this particular one. It isn't even something super wonky, like software pocket+magazine well. |
at wapcaplet's request this has been removed from release blockers. this is something we still want to fix but since no items in the repo have this particular combination it isn't high enough priority to stop the release. |
Describe the bug
If an item have pockets some of which have open_container tag and some do not have it, then:
Steps To Reproduce
Add this item to the game. I just pasted it into storage.json.
{ "id": "test_spill_pouch", "type": "ARMOR", "name": { "str": "tactical test pouch", "str_pl": "tactical test pouches" }, "description": "test pouch. with regular and open pocket.", "weight": "288 g", "volume": "525 ml", "price": 4500, "price_postapoc": 250, "to_hit": 2, "bashing": 1, "material": [ "nylon", "plastic" ], "symbol": "[", "looks_like": "holster", "color": "dark_gray", "covers": [ "TORSO" ], "coverage": 10, "encumbrance": 1, "max_encumbrance": 3, "pocket_data": [ { "pocket_type": "CONTAINER", "max_contains_volume": "2 L", "max_contains_weight": "4 kg", "max_item_length": "20 cm", "magazine_well": "500 ml", "moves": 80 }, { "pocket_type": "CONTAINER", "rigid": true, "watertight": true, "open_container": true, "max_contains_volume": "990 ml", "max_contains_weight": "2 kg" } ], "material_thickness": 1, "flags": [ "WAIST", "WATER_FRIENDLY" ] }
Load the save Testburg.zip
Try dropping the pouch into the box to the NE. Behold.
Try inserting it into your winter coat. See it working w/o spilling the water.
edit:
Expected behavior
Well, it doesn't drop everything, only liquid, which is ok (even if I don't yet understand why :p). But it should end up in vehicle storage, not under player's feet.
e: in case of storing it in worn container it should spill the liquid, like it says in description.
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food]
]
The text was updated successfully, but these errors were encountered: