Adding UNWRAP macro which removes config surrounding braces
This commit is contained in:
parent
e4faacae82
commit
04179fcd26
|
@ -142,7 +142,7 @@ function macro_BOOL($jsm, $expr)
|
|||
*/
|
||||
function macro_IS_DEV($jsm)
|
||||
{
|
||||
return taskman_propor("GAME_IS_DEV", 0);
|
||||
return \taskman\getor("GAME_IS_DEV", 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,3 +161,13 @@ function macro_ITEM($proc, $proto_id, $amount)
|
|||
return array('proto_id' => $proto_id, 'amount' => $amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @global @raw_args
|
||||
*/
|
||||
function macro_UNWRAP($jsm, $content)
|
||||
{
|
||||
$content = trim($content);
|
||||
$content = ltrim($content, '{');
|
||||
$content = rtrim($content, '}');
|
||||
return $content;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue