using System;
namespace Server.Items
{
public class TableWithBlueClothAddon2 : BaseAddon
{
[Constructable]
public TableWithBlueClothAddon2()
: base()
{
AddComponent(new LocalizedAddonComponent(1865, 1076791), -2, 0, -5);
AddComponent(new LocalizedAddonComponent(1312, 1076791), -1, 0, 0);
}
public TableWithBlueClothAddon2(Serial serial)
: base(serial)
{
}
public override BaseAddonDeed Deed
{
get
{
return new TableWithBlueClothDeed2();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
public class TableWithBlueClothDeed2 : BaseAddonDeed
{
[Constructable]
public TableWithBlueClothDeed2()
: base()
{
this.LootType = LootType.Blessed;
}
public TableWithBlueClothDeed2(Serial serial)
: base(serial)
{
}
public override BaseAddon Addon
{
get
{
return new TableWithBlueClothAddon2();
}
}
public override int LabelNumber
{
get
{
return 1076276;
}
}// Table With A Blue Tablecloth
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
public virtual AddonFitResult CouldFit(IPoint3D p, Map map, Mobile from, ref BaseHouse house)
{
if (Deleted)
return AddonFitResult.Blocked;
foreach (var c in m_Components)
{
var p3D = new Point3D(p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z);
if (!map.CanFit(p3D.X, p3D.Y, p3D.Z, c.ItemData.Height, false, true, (c.Z == 0)))
return AddonFitResult.Valid;
if (!CheckHouse(from, p3D, map, c.ItemData.Height, ref house))
return AddonFitResult.Valid;
if (c.NeedsWall)
{
var wall = c.WallPosition;
if (!IsWall(p3D.X + wall.X, p3D.Y + wall.Y, p3D.Z + wall.Z, map))
return AddonFitResult.Valid;
}
}
if (house != null)
{
var doors = house.Doors;
for (var i = 0; i < doors.Count; ++i)
{
var door = doors[i] as BaseDoor;
var doorLoc = door.GetWorldLocation();
var doorHeight = door.ItemData.CalcHeight;
foreach (var c in m_Components)
{
var addonLoc = new Point3D(p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z);
var addonHeight = c.ItemData.CalcHeight;
if (Utility.InRange(doorLoc, addonLoc, 1) && (addonLoc.Z == doorLoc.Z ||
((addonLoc.Z + addonHeight) > doorLoc.Z && (doorLoc.Z + doorHeight) > addonLoc.Z)))
return AddonFitResult.Valid;
}
}
}
var p3D = new Point3D(p.X, p.Y, p.Z);
if (!map.CanFit(p3D.X, p3D.Y, p3D.Z, c.ItemData.Height, false, true))
return AddonFitResult.Blocked;
if (!CheckHouse(from, p3D, map, c.ItemData.Height, ref house))
return AddonFitResult.NotInHouse;
I see what youre saying now. There is nothing keeping it visible you have to pass over the front steps to activate the pavers on the west and north sides... There is probably something in the code that we could edit to make it update from like 2 tiles all around the house. I will look into it but for now you can only exit west and north ;/Hey thanks for replying! Do you mean to the side of the foundation? because that only works on the southern/southeast sides, I'm hoping to open up the back of the foundation as well. I'm probably explaining it weird lol.
else if (AccessLevel == AccessLevel.Player)
{
Region r = item.GetRegion();
if (r is BaseRegion && !((BaseRegion)r).CanSee(this, item))
{
return false;
}
}
else if (AccessLevel == AccessLevel.Player)
{
Region r = item.GetRegion();
if (r is BaseRegion && !((BaseRegion)r).CanSee(this, item))
{
return true;
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.