cosmetics

This commit is contained in:
UbitUmarov
2026-04-09 20:02:41 +01:00
parent 144e0bf6bd
commit 435636acdc
9 changed files with 86 additions and 90 deletions

View File

@@ -2761,32 +2761,22 @@ namespace OpenSim.Framework
public static byte ConvertMaturityToAccessLevel(uint maturity)
{
byte retVal = 0;
switch (maturity)
return maturity switch
{
case 0: //PG
retVal = 13;
break;
case 1: //Mature
retVal = 21;
break;
case 2: // Adult
retVal = 42;
break;
}
return retVal;
//0 => 13, //PG
1 => 21, //Mature
2 => 42, // Adult
_ => 13 // PG
};
}
public static uint ConvertAccessLevelToMaturity(byte maturity)
{
if (maturity <= 13)
return 0;
else if (maturity <= 21)
if (maturity <= 21)
return 1;
else
return 2;
return 2;
}
/// <summary>