SixHourDays Posted December 18, 2015 Share Posted December 18, 2015 (edited) Like it says. I don't want to inherit the module class, or stop the original function..i want to piggyback it. I'd like to get a callback event when the Module gets theirs from a right click UI. Is that possible? I'd like to listen for ModuleScienceContainer::CollectDataExternalEvent, so I get notified when an EVA kerb takes the data from a container. Afaik no GameEvent goes off during that action. If I did subclass ModuleScienceContainer, and hid CollectDataExternalEvent with a wrapper implementation...the lack of virtual makes me fear it'll get called wrong from places I don't know about - and it seems like overkill just to observe. If someone knows a game event that _does_ go off during an EVA "take data", I'd love to hear it... Edited December 18, 2015 by SixHourDays Link to comment Share on other sites More sharing options...
Diazo Posted December 18, 2015 Share Posted December 18, 2015 I'm not sure. This feels like something that should be possible, but looking at the Object Brower, the BaseEvent.onEvent delegate is tagged as 'protected' so I'm not sure how to access it. The only other option is to directly hook into the button on the GUI somehow, but that would be tricky. I think RemoteTech's done something similar? But that might have been replacing BaseEvent with their own custom Event class. D. Link to comment Share on other sites More sharing options...
SixHourDays Posted December 18, 2015 Author Share Posted December 18, 2015 (edited) Updated original post. Edited December 18, 2015 by SixHourDays Link to comment Share on other sites More sharing options...
jkortech Posted December 20, 2015 Share Posted December 20, 2015 My suggestion would be to try out creating a new method with the KSPEvent attribute set up the same way and remove the other one during OnStart from the EventList. I don't think it is called from anywhere other than when the UI button is clicked. It'll just require some testing to make sure that it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now