Add default values to TeleportEntity#1167
Add default values to TeleportEntity#1167dvander merged 1 commit intoalliedmodders:masterfrom Scags:teleport-defaulted
Conversation
|
I'm not sure if this is something we should consider promoting for the future of sourcepawn. @dvander can we get your input on this syntax and if it's something we're keeping? |
|
Regardless of whether or not named parameter operators are going to be kept, would that be a factor in implementing this pr? I think that defaulted null vectors would be beneficial, with tossing '.' around being a bonus. |
|
I believe so, I can’t think off the top of my head where else in the scripting api we’d promote using this syntax. I like the idea, but I want to make sure that it’s something we can move forward with Thanks! |
|
Sorry for the late reply - yes, I'm a big fan of this syntax. It greatly improves readability. And it's worth the implementation cost, which is small. |
|
Indeed - the more places where we can make scripting easier on people the better off we will be in the long run. Big proponent of sane, default values. |
TeleportEntity def value: alliedmodders/sourcemod#1167 MatchRegex added offset param: alliedmodders/sourcemod#1175 IsServerProcessing documentation wording: alliedmodders/sourcemod#1188 TR_EnumerateEntities(Sphere/Box/Point): alliedmodders/sourcemod#1145
Seems appropriate to me.
Now you'd be able to do something like:
With less taps on the keyboard.