Fix NWNX_Player_SetPlaceableUsable(), to enable 'use' action on place…#1865
Open
alfa050moonshaes wants to merge 2 commits intonwnxee:masterfrom
Open
Fix NWNX_Player_SetPlaceableUsable(), to enable 'use' action on place…#1865alfa050moonshaes wants to merge 2 commits intonwnxee:masterfrom
alfa050moonshaes wants to merge 2 commits intonwnxee:masterfrom
Conversation
…ables that have been set to useable using this function Code written by Daztek - see the following thread for details: https://nwn.zulipchat.com/#narrow/channel/574443-nwnx/topic/NWNX_Player_SetPlaceableUsable.20in.20OnAreaEnter.20not.20working/near/579766652 Note that (as I understand it) this means the engine will treat any use event on a placeable as permissible when a player has actually been able to click on the placeable. It bypasses the checks the engine would usually make as to whether or not the placeable is designated 'useable'. This is based on the assumption that the player will only ever be able to click on a placeable when it is set to be useable for them.
(previous commit did not allow OnClicked event to fire; updates from Daz in this commit now mean that both OnClicked and OnUsed events fire properly)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ables that have been set to useable using this function
Code written by Daztek - see the following thread for details: https://nwn.zulipchat.com/#narrow/channel/574443-nwnx/topic/NWNX_Player_SetPlaceableUsable.20in.20OnAreaEnter.20not.20working/near/579766652
Note that (as I understand it) this means the engine will treat any use event on a placeable as permissible when a player has actually been able to click on the placeable. It bypasses the checks the engine would usually make as to whether or not the placeable is designated 'useable'. This is based on the assumption that the player will only ever be able to click on a placeable when it is set to be useable for them.