Not logged inOpenClonk Forum
Up Topic Function pointers

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Günther
What I'd like to do is limit #include to one script per definition, and ban global functions from #appendto scripts. inherited would work as before, but you can always see exactly where it points by simply looking at the #include/#appendto script(s). For the remaining functionality, one could do "local IsPowerConsumer = Library_PowerConsumer.IsPowerConsumer". Another possibility would be to ban getting the same function from multiple #include-scripts.

Both would probably require that the including object calls LibFooInit() in Construction() instead of each Construction() calling _inherited. The total lines of code shouldn't grow too much from that. But I'm not sure how complicated and widespread other callback inherited-chains are.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill