Implement "FindLumpByFullName" helper function.

Remove days display from playtime counter (most people expect hours).
This commit is contained in:
Mari the Deer 2022-08-05 11:08:47 +02:00
commit c0691f4930
5 changed files with 82 additions and 14 deletions

View file

@ -252,6 +252,17 @@ Class SWWMUtility
return c;
}
// THANKS ZSCRIPT
static clearscope int FindLumpByFullName( String name, int startlump = 0, int ns = Wads.GlobalNamespace )
{
for ( int lmp = Wads.FindLump(name,startlump,ns); lmp != -1; lmp = Wads.FindLump(name,lmp+1,ns) )
{
if ( Wads.GetLumpFullName(lmp) ~== name )
return lmp;
}
return -1;
}
// not sure if I should use this, looks a bit ugly
static clearscope void ThousandsStr( out String s, int col = -1 )
{