sourcemod icon indicating copy to clipboard operation
sourcemod copied to clipboard

[Feature Request] Allow for static properties in Methodmaps

Open kinsi55 opened this issue 3 years ago • 4 comments

I have found it quite neat to split seperate functions of a plugin into Methodmaps in seperate files, essentially using them somewhat like Namespaces which then expose public static methods which in term reference local (static) variables.

Unfortunately, properties cannot be static, so for some use cases I am either required to use Setter / Getter methods, or use the Methodmaps as singletons - Both of these workarounds kinda suck so if static properties could just be supported that would be amazing as I dont really see a reason why they shouldnt be.

kinsi55 avatar Dec 07 '22 20:12 kinsi55

https://github.com/alliedmodders/sourcepawn/issues/235

KoNLiG avatar Dec 07 '22 21:12 KoNLiG

I even tried searching for it ._.

kinsi55 avatar Dec 07 '22 21:12 kinsi55

I even tried searching for it ._.

It's in the SourcePawn repo so you probably wouldn't find it here, it could've been neat to have it though!

KoNLiG avatar Dec 07 '22 21:12 KoNLiG

Ohhh you right my bad, I always forget that theres a seperate repo for SP.

kinsi55 avatar Dec 07 '22 21:12 kinsi55