diff --git a/src/r_data/r_translate.cpp b/src/r_data/r_translate.cpp index 3c61ec4ac7..b069aa9f36 100644 --- a/src/r_data/r_translate.cpp +++ b/src/r_data/r_translate.cpp @@ -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)); +} + //---------------------------------------------------------------------------- // // diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 7d0e542135..bb941b4148 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -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;