chore(content): Updates to C# 9 syntax (#373)

This commit is contained in:
Kamron Batman 2020-12-30 12:50:10 -08:00 • committed by GitHub
parent a59fda6a3a
commit 1e2242bb1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 155 additions and 405 deletions

View file

@ -215,26 +215,14 @@ namespace Server.Engines.Doom
var random = Utility.Random(100);
if (random < 22)
trap = random switch
{
trap = new SawTrap(Utility.RandomBool() ? SawTrapType.WestFloor : SawTrapType.NorthFloor);
}
else if (random < 44)
{
trap = new SpikeTrap(Utility.RandomBool() ? SpikeTrapType.WestFloor : SpikeTrapType.NorthFloor);
}
else if (random < 66)
{
trap = new GasTrap(Utility.RandomBool() ? GasTrapType.NorthWall : GasTrapType.WestWall);
}
else if (random < 88)
{
trap = new FireColumnTrap();
}
else
{
trap = new MushroomTrap();
}
< 22 => new SawTrap(Utility.RandomBool() ? SawTrapType.WestFloor : SawTrapType.NorthFloor),
< 44 => new SpikeTrap(Utility.RandomBool() ? SpikeTrapType.WestFloor : SpikeTrapType.NorthFloor),
< 66 => new GasTrap(Utility.RandomBool() ? GasTrapType.NorthWall : GasTrapType.WestWall),
< 88 => new FireColumnTrap(),
_ => new MushroomTrap()
};
if (trap is FireColumnTrap || trap is MushroomTrap)
{