adventuregamestudio/ags — pull request #132 by gurok (2014-03-10 11:04:28+00:00)
Title: Scripting: Static extender functions

Scripting support for defining an extender function that exists as a
static method on an object. Syntax is as follows:

Module:
function AbsInt(static Maths, int value)
{
if(value < 0)
value = 0 - value;

return(value);
}

Header:
import function AbsInt(static Maths, int value);

The function can then be called as a static method, e.g:
int x = Maths.AbsInt(-3);