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

@ -52,18 +52,13 @@ namespace Server.Items
{
m_BagOfSendingHue = value;
switch (value)
Hue = value switch
{
case BagOfSendingHue.Yellow:
Hue = 0x8A5;
break;
case BagOfSendingHue.Blue:
Hue = 0x8AD;
break;
case BagOfSendingHue.Red:
Hue = 0x89B;
break;
}
BagOfSendingHue.Yellow => 0x8A5,
BagOfSendingHue.Blue => 0x8AD,
BagOfSendingHue.Red => 0x89B,
_ => Hue
};
}
}
@ -111,12 +106,12 @@ namespace Server.Items
public static BagOfSendingHue RandomHue()
{
switch (Utility.Random(3))
return Utility.Random(3) switch
{
case 0: return BagOfSendingHue.Yellow;
case 1: return BagOfSendingHue.Blue;
default: return BagOfSendingHue.Red;
}
0 => BagOfSendingHue.Yellow,
1 => BagOfSendingHue.Blue,
_ => BagOfSendingHue.Red
};
}
public override void GetProperties(ObjectPropertyList list)

View file

@ -102,7 +102,7 @@ namespace Server.Items
list.Add(1054131,
m_Charges + (PetName.Length == 0
? "\t "
: "\t" + PetName)); // a crystal ball of pet summoning: [charges: ~1_charges~] : [linked pet: ~2_petName~]
: $"\t{PetName}")); // a crystal ball of pet summoning: [charges: ~1_charges~] : [linked pet: ~2_petName~]
}
public override void OnSingleClick(Mobile from)
@ -110,7 +110,7 @@ namespace Server.Items
LabelTo(from, 1054131,
m_Charges + (PetName.Length == 0
? "\t "
: "\t" + PetName)); // a crystal ball of pet summoning: [charges: ~1_charges~] : [linked pet: ~2_petName~]
: $"\t{PetName}")); // a crystal ball of pet summoning: [charges: ~1_charges~] : [linked pet: ~2_petName~]
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)

View file

@ -104,7 +104,7 @@ namespace Server.Items
list.Add(1054000,
m_Charges + (m_Inscription.Length == 0
? "\t "
: " :\t" + m_Inscription)); // a bracelet of binding : ~1_val~ ~2_val~
: $" :\t{m_Inscription}")); // a bracelet of binding : ~1_val~ ~2_val~
}
public override void OnSingleClick(Mobile from)
@ -112,7 +112,7 @@ namespace Server.Items
LabelTo(from, 1054000,
m_Charges + (m_Inscription.Length == 0
? "\t "
: " :\t" + m_Inscription)); // a bracelet of binding : ~1_val~ ~2_val~
: $" :\t{m_Inscription}")); // a bracelet of binding : ~1_val~ ~2_val~
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)