Code cleanup.

This commit is contained in:
Mari the Deer 2022-06-15 10:58:47 +02:00
commit 27e979091b
3 changed files with 3 additions and 33 deletions

View file

@ -1894,7 +1894,7 @@ Class SWWMLamp : Inventory
if ( (Charge >= Default.Charge) && (Amount+item.Amount > MaxAmount) )
{
// sell excess
int sellprice = SWWMUtility.Round100(abs(Stamina)*.7);
int sellprice = abs(Stamina)/2;
SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2));
SWWMCredits.Give(Owner.player,sellprice);
if ( Owner.player )

View file

@ -354,31 +354,6 @@ Class SWWMUtility
return str;
}
static clearscope String BlockBar( int a, int b, int width, int acol, int bcol )
{
String str = "";
int blocks = clamp(int(a/double(b)*width),0,width);
int eblocks = width-blocks;
if ( blocks )
{
str.AppendCharacter(0x1C);
str.AppendCharacter(0x41+acol);
}
for ( int i=0; i<blocks; i++ ) str.AppendCharacter(0x258F);
if ( eblocks )
{
str.AppendCharacter(0x1C);
str.AppendCharacter(0x41+bcol);
}
for ( int i=0; i<eblocks; i++ ) str.AppendCharacter(0x258F);
if ( blocks || eblocks )
{
str.AppendCharacter(0x1C);
str.AppendCharacter(0x2D);
}
return str;
}
static clearscope void ObscureText( out String str, int seed )
{
int len = str.CodePointCount();
@ -729,11 +704,6 @@ Class SWWMUtility
SetToSlopeSpecific(a,dang,plane,flipnorm);
}
static clearscope int Round100( double x )
{
return int(ceil(x/100.)*100.);
}
static clearscope bool IsDoorSector( Sector s, int part )
{
// super-easy mode: check for boss special sectors