Storing Items in lockers with Unauthorized Access
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [ ] My issue happened while using mods.
What happened?
While exploring a ruined ship, I miss-clicked and was able to store a cargo scooter in a Secure Steel Locker. This Cargo scooter had the key card that would normally grant access to the locker inside it already. This permanently locked us out of that locker. We ran some further tests and found that we were able to store a key card in the locker even though we didn't have access to it.
It would seem that you are able to drag items into a locker and store them there as long as there is space in there even when you do not have access to them.
Reproduction steps
- Find a Secure Steel Locker on a wrecked submarine.
- Get the ID card to give you access to that locker.
- Place the ID card in a cargo scooter.
- Drag the cargo scooter over the Secure Steel Locker.
Bug prevalence
Just once
Version
0.18.15.0
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
For clarification, we were able to drag a different key card into the locker after the cargo scooter (the one with the proper id card) was already in it.
Tested in 0.18.15.1
If I use two ID cards (One spawned via console with presumably no tags) and then place my real ID card (that grants access) into a container in my inventory (IE. storage container briefcase), I may store that container into the secure cabinet with the ID that should grant access inside, meanwhile I'm unable to select the container (and open the UI) as its currently inside the container before or after I place it within the locked secure cabinet.
At anytime, your able to store the ID card that does grant access into the secure cabinet and lose access by doing so, but that is not strictly the issue here.
I cannot open a container without the required ID being in my any/worn slots. inside a container it won't work even if I have the correct ID inside a container and a second, incorrect ID inside my worn/any slots. this only triggers when you have a second ID card and the correct tags are in a container within your inventory (where it normally wouldn't grant access).
Can't repro the bug, need more info or clearer steps to repro.
Reproduced on 0.18.15.1 and against release/Summer-Update commit https://github.com/FakeFishGames/Barotrauma-development/commit/7e226fa509499eed3d6667ccc08fd6670d7062d0
Needed to use a ID with access to secure storage, and any other ID card (might not be necessary? but had one anyways) that doesn't have access to said secure storage. Have a storage container in hands that can be placed into the secure storage and place your ID card inside, this should close the interface and you won't be able to drag items over the secure storage in world to place them (and without the UI, cannot drag inside normally). However if you do not deselect it you may then double click to "quickly store" it inside the secure locker you otherwise cannot access.
So reproduction steps:
- Start in a submarine like dugong (or any with a secure locker in its armoury really), I used singleplayer campaign for this.
- If you want to try multiple ways of getting the ID card back out of the locker, I Recommend spawning a securityofficer inside the sub and placing the ID card inside some other nearby container (so you can repeat the issue easily)
- control the captain
- Spawn a "storage container" into inventory of captain
- Take an ID card from an engineer (or other without access to locker) into captain inventory
- Select (open UI) of the secure locker in the submarine (IE. armoury)
- Place Captain ID into storage container in hands, UI should disappear and items can no longer be dragged into the secure locker (Note: they may still drag to another nearby container like dugong has, make sure to read the text)
- without clicking anywhere (so secure locker still selected) double click the storage container, this will store it into the secure locker you do not have access to.
Video of issue on 0.18.15.1 (fundamentally the same as current code) shows me placing it when I Shouldn't be able to, getting it out, showing in world dragging when possible, showing that it cannot be in world dragged or added via UI when ID cards inside container, and then repeating again with ID in container (which should prevent this):
https://github.com/FakeFishGames/Barotrauma/assets/29177976/ff48cc56-7495-4776-a8a9-ba7782e75efa