Where: Community server, reproduced on a local vanilla server (no mods), Nasdara
Description
When a 3-dial or 4-dial combination lock is locked on a door of a restored house, the lock slot on the house gets inventory-locked. This slot lock is only released by the "Detach combination lock" action. If the locked lock leaves the slot in any other way (the item is deleted by the economy/cleanup, fails to load from storage, or is removed by an admin tool or a mod), the empty slot stays locked forever. After that, no 3-dial or 4-dial combination lock can be attached to that door: the "Attach" action never appears, also for a brand new lock. The state survives server restarts, and destroying and rebuilding the door does not fix it. A digital code lock can still be attached, because it uses a different slot.
Steps to reproduce
On a restored house (tested on Land_House_3S1 and Land_House_1M5, Nasdara), build a metal door and close it.
Attach a 3-dial combination lock and lock it.
Remove the lock from the slot without the "Detach" action, for example delete the item with the Script Console or an admin tool (GetGame().ObjectDelete(lock)).
Take a new 3-dial combination lock and try to attach it to the same door: the "Attach" action does not appear.
Restart the server, or destroy and rebuild the door: the lock still cannot be attached.
Try a digital code lock on the same door: it attaches.
Cause (1.30 scripts)
CombinationLock.LockServer locks the slot (SetSlotLock(true)); it is only released in CombinationLock.UnlockOnServer, which runs from the Detach action. ConstructionBase.DropEssentialAttachments (door dismantle/destroy) only releases slot locks on slots that still hold an item, so an empty locked slot is never released, and rebuilding the door does not help.
Suggested fix
Release the slot lock whenever a combination lock leaves the slot (EEItemDetached on the building), and always clear slot locks of the door's lock slots in DropEssentialAttachments.
Notes
Seen on a community server after a player was killed while opening the door and another player later removed the lock from inside; afterwards no combination lock could be attached to that door, even a new one and even after rebuilding the door. Possibly related to DZG-1269 (cannot attach 3/4-dial locks to Nasdara doors).