chore(content): Updates to C# 9 syntax (#373)
This commit is contained in:
parent
a59fda6a3a
commit
1e2242bb1a
25 changed files with 155 additions and 405 deletions
|
|
@ -80,27 +80,14 @@ namespace Server
|
|||
* 6:00 AM -> 9:59 PM : Day
|
||||
*/
|
||||
|
||||
if (hours < 4)
|
||||
return hours switch
|
||||
{
|
||||
return NightLevel;
|
||||
}
|
||||
|
||||
if (hours < 6)
|
||||
{
|
||||
return NightLevel + ((hours - 4) * 60 + minutes) * (DayLevel - NightLevel) / 120;
|
||||
}
|
||||
|
||||
if (hours < 22)
|
||||
{
|
||||
return DayLevel;
|
||||
}
|
||||
|
||||
if (hours < 24)
|
||||
{
|
||||
return DayLevel + ((hours - 22) * 60 + minutes) * (NightLevel - DayLevel) / 120;
|
||||
}
|
||||
|
||||
return NightLevel; // should never be
|
||||
< 4 => NightLevel,
|
||||
< 6 => NightLevel + ((hours - 4) * 60 + minutes) * (DayLevel - NightLevel) / 120,
|
||||
< 22 => DayLevel,
|
||||
< 24 => DayLevel + ((hours - 22) * 60 + minutes) * (NightLevel - DayLevel) / 120,
|
||||
_ => NightLevel
|
||||
};
|
||||
}
|
||||
|
||||
private class LightCycleTimer : Timer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue