Dr Elmer Jiggle said:I'm not going to make a formal post following your template for this one yet, but I've also been working on prototyping some ideas about making it easier to merge multiple event handler mods. Currently it's not far beyond the idea stage and doesn't really work in any useful way. What I have is actually fairly similar in concept to some stuff that SimCutie posted recently, though my implementation is somewhat different.
Basically the idea is to allow you to register your custom handler functions with a single custom event handler that would never be changed. So each new mod would simply register its interest in whatever events it needs to deal with, and the custom handler would notify it whenever that event occurs. Essentially it's the standard observer or listener design pattern (which is the way it should have been implemented from the get-go by Firaxis ... Anyway ...)
Agreed, though I've been on projects where we've done it the way that Firaxis did it as it's easier to code (but a biatch if you want to expand it). Eventually, we switched to the listener method because of code maintainability, but if you're under time pressures.....
Req