Not sure if I understand what you are asking. Does it currently work with multiple keys per door? I know that the perl flag/door system has a problem, it doesn't work 100% of the time, and I have no idea why. I can stand in PoI at the factory door and click it for 10 minutes, keeps telling me its locked, then it finally opens saying I got it open, but still says its locked.
If multiple keys per door does not work, then there should be an extra table to break keyitem out of the doors table. Remove field 'keyitem' from the doors table completely, after creating the new data.
create table keys(
door_id integer not null,
item_id integer not null
);
Then you insert into keys selecting from doors. Master keys would have multiple rows in keys table where the item_id is the same. The primary key for the table would be composite of both fields if we desired the constraint to make each row unique.
Then a simple change to some code, or even just make a view to the doors data to join the tables. Whatever, its pretty easy, and it doesn't have to go to ugly inconsistent perl.
So I don't know what doors use multiple keys to try this with... Does it already work or should I implement this change?
__________________
Expert developer, I do it for a living.
Don't let the "Junior" tag fool you.
|