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

@ -19,21 +19,14 @@ namespace Server.Items
public void SetFacing(Direction dir)
{
switch (dir)
ItemID = dir switch
{
case Direction.South:
ItemID = 0x3E4B;
break;
case Direction.North:
ItemID = 0x3E4E;
break;
case Direction.West:
ItemID = 0x3E50;
break;
case Direction.East:
ItemID = 0x3E55;
break;
}
Direction.South => 0x3E4B,
Direction.North => 0x3E4E,
Direction.West => 0x3E50,
Direction.East => 0x3E55,
_ => ItemID
};
}
public override void GetProperties(ObjectPropertyList list)
@ -71,7 +64,7 @@ namespace Server.Items
public override void OnDoubleClick(Mobile from)
{
if (m_Boat != null && m_Boat.Contains(from))
if (m_Boat?.Contains(from) == true)
m_Boat.BeginRename(from);
else
m_Boat?.BeginDryDock(from);
@ -79,7 +72,7 @@ namespace Server.Items
public override bool OnDragDrop(Mobile from, Item dropped)
{
if (dropped is MapItem item && m_Boat != null && m_Boat.CanCommand(from) && m_Boat.Contains(from))
if (dropped is MapItem item && m_Boat?.CanCommand(from) == true && m_Boat.Contains(from))
m_Boat.AssociateMap(item);
return false;
@ -119,4 +112,4 @@ namespace Server.Items
}
}
}
}
}