Closed Unrepentant-Atheist closed 2 months ago
This is my first time checking the games code, but I think that happens because metal door has examine action set as "locked_object" which first tries to use prying tool, and only then a lockpicking one, instead of "locked_object_pickable" which goes for lockpicking first: (https://github.com/cataclysmbnteam/Cataclysm-BN/blob/f5a0677b9d94c40ed9d17f299f8e531973a462cf/data/json/furniture_and_terrain/terrain-doors.json#L2313)](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/f5a0677b9d94c40ed9d17f299f8e531973a462cf/data/json/furniture_and_terrain/terrain-doors.json#L2322C1-L2322C39) The fix would probably to simply change this line to "locked_object_pickable", but I guess prying is usually faster and more convenient and that's why it's set this way. Tho I do remember that you sometimes get to pick what you want to do with a door.
And another part of this issue, it should not allow you to use worn hairpins and fancy hairpins for lockpicking. If an item with tool qualities is worn as clothing and not inside a holster/toolbelt it should disallow using it in situations where it may get destroyed.
If no one tackles this I might mess with it, possibly alongside making locked display cases pickable, tomorrow.
Okay so I found a problem here: locked_object_pickable
flat-out doesn't even allow you to use a prying tool at all, if you drop your lockpick I found that doors set to use that examine object leave you pining for
Re-reading the OP tells me that locked doors as they are now still freely use lockpicks OR crowbars, which is entirely as expected. I misread this at first and mistakenly assumed that only one tool was being permitted. So the root issue here is the code doesn't give you any sane way to prioritize which tool to use.
I'd close this as invalid except there is a legit flaw in the logic for it. If you have a prying tool, but it lacks the quality to actually work on the door you're targeting, it isn't smart enough to skip the futile attempts to pry and instead go straight to lockpicking:
So, I see three potential fixes here:
I'd go with 1., probably performance-wise the best option. And lockpicks are dime-a-dozen and crafted quickly. And high-end lockpicks, reinforced are often mid to late game, and don't break that quick.
The other options seem to be extra code and checks and probably a miniscule performance hit.
Another idea that came up was making it favor prying if you're standing up and lockpicking if you're crouching, which would also be fairly easy to add in and of itself but run into the issue of whether I'd still want to bother trying to make it automatically skip prying if it'd be softlocked by prying difficulty, vs. just trying to explain to the player to crouch if they want to lockpick first...
Describe the bug
If you have an improvised lockpick, a crowbar and a toolbox in your inventory and try to open a closed metal door.
It first tries the crowbar, if you drop the crowbar and try again, it'll use the toolbox (probably due to prying? quality?).
If you then drop the toolbox it'll correctly use the improvised lockpic to open the closed metal door.
Steps To Reproduce
Screenshots
No response
Versions and configuration
Additional context
No response