Formatting #2 (#59)

This commit is contained in:
Kamron Batman 2019-10-05 00:37:03 -07:00 committed by GitHub
parent 096d39609e
commit 8e9221bb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
400 changed files with 3688 additions and 5969 deletions

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Server.Commands;
using Server.Items;
using Server.Mobiles;
using Server.Regions;
@ -90,18 +89,13 @@ namespace Server.Engines.Doom
int hue = 0;
bool lockDoors = m_State == GauntletSpawnerState.InProgress;
switch (m_State)
hue = m_State switch
{
case GauntletSpawnerState.InSequence:
hue = InSequenceItemHue;
break;
case GauntletSpawnerState.InProgress:
hue = InProgressItemHue;
break;
case GauntletSpawnerState.Completed:
hue = CompletedItemHue;
break;
}
GauntletSpawnerState.InSequence => InSequenceItemHue,
GauntletSpawnerState.InProgress => InProgressItemHue,
GauntletSpawnerState.Completed => CompletedItemHue,
_ => hue
};
if (Door != null)
{

View file

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Commands;
using Server.Mobiles;
using Server.Network;
using Server.Spells;
@ -239,7 +238,7 @@ namespace Server.Engines.Doom
{
LeverPuzzleRegion region = m_Tiles[index];
if (region?.Occupant != null && region.Occupant.Alive) return (PlayerMobile)region.Occupant;
if (region?.Occupant?.Alive == true) return (PlayerMobile)region.Occupant;
return null;
}
@ -338,7 +337,7 @@ namespace Server.Engines.Doom
else
{
for (int i = 0; i < 16; i++) /* Count matching SET bits, ie correct codes */
if (((MyKey >> i) & 1) == 1 && ((TheirKey >> i) & 1) == 1)
if ((MyKey >> i & 1) == 1 && (TheirKey >> i & 1) == 1)
correct++;
PuzzleStatus(Statue_Msg[correct], correct > 0 ? correct.ToString() : null);

View file

@ -28,7 +28,7 @@ namespace Server.Engines.Doom
if (m_Controller.Enabled)
return;
if (m_Wanderer == null || !m_Wanderer.Alive)
if (m_Wanderer?.Alive != true)
{
m_Wanderer = new WandererOfTheVoid();
m_Wanderer.MoveToWorld(LeverPuzzleController.lr_Enter, Map.Malas);