alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
973 stars 421 forks source link

[Feature Request] Allow for static properties in Methodmaps #1875

Open kinsi55 opened 1 year ago

kinsi55 commented 1 year ago

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.

KoNLiG commented 1 year ago

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

kinsi55 commented 1 year ago

I even tried searching for it ._.

KoNLiG commented 1 year ago

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!

kinsi55 commented 1 year ago

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