This commit is contained in:
Alexey Chubar 2023-06-20 19:34:54 +03:00
commit ab4ce6d96a
1 changed files with 12 additions and 2 deletions

View File

@ -114,7 +114,7 @@ function macro_SELF_CONF_ID($jsm)
$proto_id = 0; $proto_id = 0;
$alias = ""; $alias = "";
if(!\taskman\config_get_header($file, $proto_id, $alias)) if(!\taskman\config_get_header($file, $proto_id, $alias))
$proto_id = \taskman\config_get_id($file); throw new Exception("No valid header for config: $file");
return $proto_id; return $proto_id;
} }
@ -142,7 +142,7 @@ function macro_BOOL($jsm, $expr)
*/ */
function macro_IS_DEV($jsm) function macro_IS_DEV($jsm)
{ {
return taskman_propor("GAME_IS_DEV", 0); return \taskman\getor("GAME_IS_DEV", 0);
} }
/** /**
@ -169,3 +169,13 @@ function macro_ITEM($proc, $proto_id, $amount)
return array('proto_id' => $proto_id, 'amount' => $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;
}