runuo/Scripts/Commands/Generic/Implementors/FacetCommandImplementor.cs
eos 2c829d38ed - Fixed 'or' operator for object conditionals.
- Fixed train context menu occasionally showing the train option as available when it shouldn't be.
- Fixed a crash in the documentation generator.
- Added 3 new command implementors, serving as aliases for various Area usages: Range, Screen and Facet
- Fixed house placement allowing placed houses to intersect other house regions.
2012-02-19 03:04:32 +00:00

33 lines
983 B
C#

using System;
using Server;
namespace Server.Commands.Generic
{
public class FacetCommandImplementor : BaseCommandImplementor
{
public FacetCommandImplementor()
{
Accessors = new string[]{ "Facet" };
SupportRequirement = CommandSupport.Area;
SupportsConditionals = true;
AccessLevel = AccessLevel.GameMaster;
Usage = "Facet <command> [condition]";
Description = "Invokes the command on all appropriate objects within your facet's map bounds. Optional condition arguments can further restrict the set of objects.";
}
public override void Process( Mobile from, BaseCommand command, string[] args )
{
AreaCommandImplementor impl = AreaCommandImplementor.Instance;
if ( impl == null )
return;
Map map = from.Map;
if ( map == null || map == Map.Internal )
return;
impl.OnTarget( from, map, Point3D.Zero, new Point3D( map.Width - 1, map.Height - 1, 0 ), new object[] { command, args } );
}
}
}