public static void OnTarget_Construct(Mobile from, object targeted, object state)
        {
            string name = (string)state;
            IPoint3D p = (IPoint3D)targeted;

            if (p != null)
            {
                Point3D point = new Point3D(p);

                BuildingEntry entry;

                if (FileBasedBuilding.BuildingTable.TryGetValue(name, out entry))
                {
                    FileBasedBuilding building = null;

                    switch (entry.BuildType)
                    {
                        case 0: building = new FileBasedBuilding(name); break;
                        case 1: building = new FileBasedBuildingAddon(name); break;
                        case 2: building = new FileBasedAddonBuilding(name); break;
                    }

                    if (building != null)
                        building.MoveToWorld(point, from.Map);
                }

                else
                    from.SendMessage("No building found with that name.");
            }
        }
        public void AddComponent(string name)
        {
            if (Deleted)
                return;

            BuildingEntry entry;
            if (FileBasedBuilding.BuildingTable.TryGetValue(name, out entry))
            {
                if (entry is ComponentEntry)
                {
                    ComponentEntry ent = (ComponentEntry)entry;
                    FileBasedBuildingAddon component = new FileBasedBuildingAddon(name);

                    m_AddonComponents.Add(component);

                    component.Addon = this;
                    component.Offset = new Point2D(ent.X_Offset, ent.Y_Offset);
                    component.MoveToWorld(new Point3D(X + ent.X_Offset, Y + ent.Y_Offset, Z), Map);
                }
            }
        }