Saibot393 / LocknKey

A Foundry VTT module to handle locking and unlocking of doors and other objects
MIT License
10 stars 7 forks source link

[Suggestion] Create API function to create a key that has the same ID sas the hovered lock #71

Closed Enthropx closed 9 months ago

Enthropx commented 9 months ago

I like to use custom ID keys that have explicit titles (e.g. 'scene-room-keynumber') to be able to remember what does the key open. I think that for those of us doing that, I would be great to have an API function that we can call in a macro that just creates a key with the same ID key (or multiple keys if multiple ID keys are used) that have the same ID key(s) as those entered in the lock 'ID keys'. It's a small qol enhancement but it would prevent us to have to copy-paste the ID key from the lock to the key.

Saibot393 commented 9 months ago

Should be easy enough to do, i will look into it.

Saibot393 commented 9 months ago

I have released v2.3.0 which adds two macros to more easily customize new keys, including a macro to create a key with the same ids as the hovered lock. I have also added a world setting to have a field to enter the new key id in the key creation menu. Let me know, should you require more macros or api for you purpose.

Enthropx commented 9 months ago

Just tested it, it's great, thanks a lot. The world setting to enter the key id is even better !!

Saibot393 commented 9 months ago

Glad to hear that the features are of use.