diff --git a/src/common/scripting/interface/vmnatives.cpp b/src/common/scripting/interface/vmnatives.cpp index 5a7d25cce7..8f9f8dfad8 100644 --- a/src/common/scripting/interface/vmnatives.cpp +++ b/src/common/scripting/interface/vmnatives.cpp @@ -758,6 +758,16 @@ DEFINE_ACTION_FUNCTION(_Wads, FindLump) ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLump(name, &startlump, 0 != ns) : -1); } +DEFINE_ACTION_FUNCTION(_Wads, FindLumpFullName) +{ + PARAM_PROLOGUE; + PARAM_STRING(name); + PARAM_INT(startlump); + PARAM_BOOL(noext); + const bool isLumpValid = startlump >= 0 && startlump < fileSystem.GetNumEntries(); + ACTION_RETURN_INT(isLumpValid ? fileSystem.FindLumpFullName(name, &startlump, noext) : -1); +} + DEFINE_ACTION_FUNCTION(_Wads, GetLumpName) { PARAM_PROLOGUE; diff --git a/wadsrc/static/zscript/engine/base.zs b/wadsrc/static/zscript/engine/base.zs index a37369847e..e8b58c3e79 100644 --- a/wadsrc/static/zscript/engine/base.zs +++ b/wadsrc/static/zscript/engine/base.zs @@ -829,6 +829,7 @@ struct Wads // todo: make FileSystem an alias to 'Wads' native static int CheckNumForName(string name, int ns, int wadnum = -1, bool exact = false); native static int CheckNumForFullName(string name); native static int FindLump(string name, int startlump = 0, FindLumpNamespace ns = GlobalNamespace); + native static int FindLumpFullName(string name, int startlump = 0, bool noext = false); native static string ReadLump(int lump); native static int GetNumLumps();