Closed FluffierThanThou closed 5 years ago
Hi,
it's about time this thing here can finally die and rest in peace :D I wasn't aware of it, and I am glad that someone finally picked the ball up and solved this properly. My detour-library is a hack, was never intended to be more than that, and I cannot really advise anyone to use it. But it spawned good, made games more moddable, and ultimately made the world a better place, I guess -- so, mission accomplished!
Thanks for the link, I'll put it in the ReadMe file, so people can transition over to that library.
Best, Sebastian
Thanks for linking to Harmony. If you still have influence and contact to the CitySkyline community you could spread the word there about Harmony.
Also ppl really need to upvote my answer about patching on stackoverflow. The answer with the most answers is really old.
https://github.com/pardeike/Harmony was created for the RimWorld modding community, to replace the detour library/libraries in use there (which in turn were inspired by @sschoener's original code.)
It's a general purpose Mono (and now also .NET) patching library, which allows pre- and postfixing methods, leaving the original code intact. The prefix can be set up to not execute the original code, in essence acting like a detour.
It's also got an extremely powerful IL transpiling mechanic, which allows targeted replacement of individual instructions in the target method.
It's completely transformed the RimWorld modding scene - and could potentially do the same for C:S.