Fixes brace style (#248)

This commit is contained in:
Kamron Batman 2020-09-13 21:49:46 -07:00 committed by GitHub
parent a236617ad9
commit 8149620b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1503 changed files with 28575 additions and 1717 deletions

View file

@ -94,9 +94,13 @@ namespace Server.Engines.Plants
int title;
if (m_ShowType || typeInfo.PlantCategory == PlantCategory.Default)
{
title = hueInfo.Name;
}
else
{
title = (int)typeInfo.PlantCategory;
}
if (Amount == 1)
{
@ -149,7 +153,9 @@ namespace Server.Engines.Plants
public override void OnAfterDuped(Item newItem)
{
if (!(newItem is Seed newSeed))
{
return;
}
newSeed.PlantType = m_PlantType;
newSeed.PlantHue = m_PlantHue;
@ -178,13 +184,19 @@ namespace Server.Engines.Plants
m_ShowType = reader.ReadBool();
if (Weight != 1.0)
{
Weight = 1.0;
}
if (version < 1)
{
Stackable = Core.SA;
}
if (version < 2 && PlantHueInfo.IsCrossable(m_PlantHue))
{
m_PlantHue |= PlantHue.Reproduces;
}
}
private class InternalTarget : Target
@ -200,7 +212,9 @@ namespace Server.Engines.Plants
protected override void OnTarget(Mobile from, object targeted)
{
if (m_Seed.Deleted)
{
return;
}
if (!m_Seed.IsChildOf(from.Backpack))
{
@ -209,11 +223,17 @@ namespace Server.Engines.Plants
}
if (targeted is PlantItem plant)
plant.PlantSeed(from, m_Seed);
{
plant.PlantSeed(@from, m_Seed);
}
else if (targeted is Item item)
item.LabelTo(from, 1061919); // You must use a seed on a bowl of dirt!
{
item.LabelTo(@from, 1061919); // You must use a seed on a bowl of dirt!
}
else
from.SendLocalizedMessage(1061919); // You must use a seed on a bowl of dirt!
{
@from.SendLocalizedMessage(1061919); // You must use a seed on a bowl of dirt!
}
}
}
}