View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-04-2015 , 11:49   Re: New API and Syntax
Reply With Quote #329

So I stumbled across the feature that you can chain methodmaps (see below).

Spoiler


I think this would be useful to implement in some of the methodmaps that come with sourcemod, such as StringMap. Of course, this would only work with functions where return value isn't needed.

Here would be an example:
Spoiler


This wouldn't be difficult to change in the current methodmaps for at least the functions that would normally return void, or even some like StringMap.GetValue() that returns a boolean. It could be modified to support default values like KeyValues.GetNum().

If not possible, I could even write up some extended methodmaps to apply this functionality under types (tags? I don't know the term here) like StringMapEx.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline