Re: Stay in bed
Posted: Sun Dec 09, 2018 6:19 am
I'll take a look when I can and get back to you.
I have no problems with how its implemented, and I like the idea of being able to add custom activation callbacks. Will happily merge this one.Hazelnut wrote: ↑Sun Dec 09, 2018 12:17 am So tonight I gave this a try. Thought I would see how allowing custom methods to be registered in PlayerActivate would work. See PR #1075 for the core codebase changes, and https://github.com/ajrb/dfunity-mods/tr ... layRealism for the mod code that uses it.
Would like feedback on this approach which matches the GameObject name (everywhere is calling same method to generate it to ensure consistency) and calls the delegate method registered. This is different from the existing way of adding a component to the GO when laying out the models, and has the advantage of not needing the different model layout code (interiors & dungeons) to both allow action registration. Instead it's registered and checking in the PlayerActivate class.
Not entirely sure this advantage is worth diverging from existing process, but thought I would give it a shot and see what others thought.
Pango, Interkarma - thoughts? Should I switch this to registering MonoBehaviour components to be added to the model GO or do you think this is a better way for mods to register custom model actions?
Cool, I'm glad because I took a stab at changing it and it actually it turned to be quite awkward code in comparison.Interkarma wrote: ↑Mon Dec 10, 2018 10:02 pm I have no problems with how its implemented, and I like the idea of being able to add custom activation callbacks. Will happily merge this one.