- added Translation.GetID.

This commit is contained in:
Christoph Oelckers 2017-04-14 17:40:05 +02:00
parent 2add60a4c4
commit d03c33f393
2 changed files with 8 additions and 0 deletions

View file

@ -1356,6 +1356,13 @@ int R_FindCustomTranslation(FName name)
return (t != nullptr)? *t : -1;
}
DEFINE_ACTION_FUNCTION(_Translation, GetID)
{
PARAM_PROLOGUE;
PARAM_NAME(t);
ACTION_RETURN_INT(R_FindCustomTranslation(t));
}
//----------------------------------------------------------------------------
//
//

View file

@ -258,6 +258,7 @@ struct Translation version("2.4")
native int AddTranslation();
native static bool SetPlayerTranslation(int group, int num, int plrnum, PlayerClass pclass);
native static int GetID(Name transname);
static int MakeID(int group, int num)
{
return (group << 16) + num;