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
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue