#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
35
Scripts/Engines/Plants/PlantPourTarget.cs
Normal file
35
Scripts/Engines/Plants/PlantPourTarget.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Engines.Plants
|
||||
{
|
||||
public class PlantPourTarget : Target
|
||||
{
|
||||
private 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 )
|
||||
{
|
||||
m_Plant.Pour( from, (Item)targeted );
|
||||
}
|
||||
}
|
||||
|
||||
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( typeof( MainPlantGump ) ) )
|
||||
from.CloseGump( typeof( MainPlantGump ) );
|
||||
|
||||
from.SendGump( new MainPlantGump( m_Plant ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue