sourcemod
sourcemod copied to clipboard
[Feature request] GetFunctionByName for methodmaps
GetFunctionByName
is not currently able to find functions within methodmaps, static or not, afaik.
Use case: If implemented, would allow to develop a kind of forward routing system when methodmaps are being used for namespace separation purposes. (At least until https://github.com/alliedmodders/sourcepawn/issues/789 gets resolved).
This can technically already be implemented if you edit the sourcepawn compiler. So i wonder if that issue would also warrant being opened on the other repo ? Either way I second this idea, I used it in my own plugins https://github.com/Kenzzer/VSH-Rewrite
But since public functions arent supposed to have default parameters, and SM code base already has methodmap functions with default parameters, it's too late to correct the potential misuse ? of the public
keyword to declare methodmap functions. We would need to introduce a new keyword when declaring actually public mm functions.
Does it work if you use the encoded name? Eg GetFunctionByName("Methodmap.Method") ?
It does not. I've tried every combination I could think of.