-
Notifications
You must be signed in to change notification settings - Fork 95
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
Adding new functions: NWNX_ON_PLACEABLE_OPEN_{OPEN|CLOSE}_{BEFORE|AFTER} #1691
Conversation
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.
Sorry I also missed this in the first review. But you need to do another commit anyway:
Should I delete this PR and do a new "clean" PR with just the finalized changes? |
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.
Since those events only run for placeables I think it's better to name the events NWNX_ON_PLACEABLE_{OPEN|CLOSE}_*
or NWNX_ON_PLACEABLE_INVENTORY_{OPEN|CLOSE}_*
Also please fix whatever's going on with that SWIG postprocess.sh!
auto PushAndSignal = [&](const std::string& ev) -> bool { | ||
PushEventData("OBJECT", Utils::ObjectIDToString(thisPtr->m_idSelf)); | ||
return SignalEvent(ev, oidOpener); | ||
}; |
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.
I'd prefer SignalEvent being called with thisPtr->m_idSelf
so OBJECT_SELF
is the placeable, since that's most, if not all events do, and push the opener as event data, eg: PushEventData("OPENER", Utils::ObjectIDToString(oidOpener));
Same for the CloseInventory event
…to NWNX_ON_PLACEABLE_[OPEN|CLOSE]
…OBJECT" in NWNX_Events_GetEventData
updated.
Sorry about that, but not sure what is going on here. When I do a new pull of repo it looks fine. cat Plugins/SWIG/SWIG_DotNET/postprocess.sh
#!/bin/bash
#Cleanup macro comments left by SWIG.
for f in out/*.cs
do
sed -i 's/\/\*@SWIG.*\*\///' "$f"
done I tried a few things to remove it from PR entirely, but still showing as empty under Files. It was "undeleted" in this change: https://github.com/ReachPW/unified/commit/88d6c18213fb6640ce24cd3646d3afe5107c4541 so should be same as before, but I still don't understand why it showing 'empty' in the PR. I can delete this PR and do a fresh PR with just the finalized changes and excluding that postprocess.sh ? Otherwise not sure how to resolve/fix. |
This adds new events for Placeables, when opening and closing inventory.
NWNX_ON_OBJECT_OPEN_BEFORE
NWNX_ON_OBJECT_OPEN_AFTER
NWNX_ON_OBJECT_CLOSE_BEFORE
NWNX_ON_OBJECT_CLOSE_AFTER