Implement "FindLumpByFullName" helper function.
Remove days display from playtime counter (most people expect hours).
This commit is contained in:
parent
fa6c8f68d6
commit
c0691f4930
5 changed files with 82 additions and 14 deletions
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue