Adds assemblies config, fixes crash bugs. (#134)

This commit is contained in:
Kamron Batman 2020-05-09 12:55:56 -07:00 • committed by GitHub
parent 0140eb73b4
commit 8ec166bcd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3223 changed files with 191 additions and 191 deletions

View file

@ -1,29 +0,0 @@
using Server.Targeting;
namespace Server.Engines.Plants
{
public class PlantPourTarget : Target
{
private readonly PlantItem m_Plant;
public PlantPourTarget(PlantItem plant) : base(3, true, TargetFlags.None) => m_Plant = plant;
protected override void OnTarget(Mobile from, object targeted)
{
if (!m_Plant.Deleted && from.InRange(m_Plant.GetWorldLocation(), 3) && targeted is Item item)
m_Plant.Pour(from, item);
}
protected override void OnTargetFinish(Mobile from)
{
if (!m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant &&
from.InRange(m_Plant.GetWorldLocation(), 3) && m_Plant.IsUsableBy(from))
{
if (from.HasGump<MainPlantGump>())
from.CloseGump<MainPlantGump>();
from.SendGump(new MainPlantGump(m_Plant));
}
}
}
}