-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock Interaction Component & Dual Interaction Rework #292
Conversation
Reworked the door locking to match the proposed ideas in Phazorknight#269
Oooh, making locks their own interaction component is not a bad idea, opens some cool possibilities actually. Could you include a component scene for the lock interaction as well? Personally, I'm not the biggest fan of needing two different interaction buttons to unlock then open a door, but using the DualInteraction component, this can be remedied (press for open/close, hold for lock/unlock). |
Added Dual Interaction to the Lock interaction Added support for multiple interaction texts being passed to the interaction text in Dual Interaction Still need to implement buffer time, and figure out why interaction text won't update until player looks at object again
Added buffer time to prevent Hold UI from showing on press Changed hold and press interaction text to onready to avoid them being defined both multiple places
Still need to solve a couple of problems before merging this one: First is when to run the key check, as running it on the end of hold down feels wrong, like it feels like you should have been using the key during the hold down time. May have to redo key check and run it at the start of an interaction to see if its valid. Second is that the interaction text label doesn't seem to update until the player looks at the object again. Can't seem to figure out what's causing that one. |
Needs refactoring into the lock component really but added a key check on hold start to avoid holding when key not found
LockComponent Scene added Added hold_key_check as a temporary way of determining if key check should be run before hold interaction begins, off by default.
Refactored to Removed Key logic from Dual Interaction component and into the Lock component This now requires a direct reference to the lock node in order to receive info back from it without having to setup lots of signals back and forth
Was having an issue with the interaction prompt not updating until the object was interacted with a second time or relooked at by the player. This fixes it by using a signal that instructs when the interaction prompt should be updated, the signal is used only after the correct interaction text is generated.
Managed to solve both issues, also updated the title since the PR has also become a Dual interaction component rework at this point. Give it a try and let me know what you think |
Removed the key check from the door, Added Lockpick as an alternate key to the door, currently behaves exactly like a key Refactored Check for Key into generic Check for Item
Great work! The way this is set up makes sense and fits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good to merge in! Thanks so much for this!
Reworked the door locking to match the proposed ideas in #269
Introduced Lock Interaction Component to support this