Removes literal variables (#257)

This commit is contained in:
Kamron Batman 2020-09-18 18:41:26 -07:00 • committed by GitHub
parent 580da8a0cc
commit 4d6e584b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
359 changed files with 1306 additions and 1306 deletions

View file

@ -1354,12 +1354,12 @@ namespace Server.Multis
if (item is ISecurable securable)
{
return HasSecureAccess(@from, securable.Level);
return HasSecureAccess(from, securable.Level);
}
if (item is Container)
{
return IsCoOwner(@from);
return IsCoOwner(from);
}
if (item.Stackable)
@ -1369,12 +1369,12 @@ namespace Server.Multis
if (item is BaseLight)
{
return IsFriend(@from);
return IsFriend(from);
}
if (item is PotionKeg)
{
return IsFriend(@from);
return IsFriend(from);
}
if (item is Dices)
@ -1859,7 +1859,7 @@ namespace Server.Multis
{
if (from != null)
{
door.KeyValue = CreateKeys(@from);
door.KeyValue = CreateKeys(from);
}
AddDoor(door, xOffset, yOffset, zOffset);
@ -1956,9 +1956,9 @@ namespace Server.Multis
if (from.Z + 16 >= p.Z && p.Z + 16 >= from.Z)
{
if (@from.InRange(p, 1))
if (from.InRange(p, 1))
{
@from.SendLocalizedMessage(502120); // You cannot place a trash barrel near a door or near steps.
from.SendLocalizedMessage(502120); // You cannot place a trash barrel near a door or near steps.
return;
}
}
@ -2148,7 +2148,7 @@ namespace Server.Multis
if (!isValid)
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1062067
); // In order to transfer the house, you and the recipient must both be outside the building and within two paces of the house sign.
}
@ -2527,9 +2527,9 @@ namespace Server.Multis
if (from.Z + 16 >= p.Z && p.Z + 16 >= from.Z)
{
if (@from.InRange(p, 1))
if (from.InRange(p, 1))
{
@from.SendLocalizedMessage(502113); // You cannot place a strongbox near a door or near steps.
from.SendLocalizedMessage(502113); // You cannot place a strongbox near a door or near steps.
return;
}
}
@ -3912,7 +3912,7 @@ namespace Server.Multis
{
if (component.Addon != null)
{
m_House.Release(@from, component.Addon);
m_House.Release(from, component.Addon);
}
}
else
@ -3942,7 +3942,7 @@ namespace Server.Multis
{
if (component.Addon != null)
{
m_House.LockDown(@from, component.Addon);
m_House.LockDown(from, component.Addon);
}
}
else
@ -3995,7 +3995,7 @@ namespace Server.Multis
{
if (component.Addon != null)
{
m_House.ReleaseSecure(@from, component.Addon);
m_House.ReleaseSecure(from, component.Addon);
}
}
else
@ -4020,7 +4020,7 @@ namespace Server.Multis
{
if (component.Addon != null)
{
m_House.AddSecure(@from, component.Addon);
m_House.AddSecure(from, component.Addon);
}
}
else
@ -4057,11 +4057,11 @@ namespace Server.Multis
if (targeted is Mobile mobile)
{
m_House.Kick(@from, mobile);
m_House.Kick(from, mobile);
}
else
{
@from.SendLocalizedMessage(501347); // You cannot eject that from the house!
from.SendLocalizedMessage(501347); // You cannot eject that from the house!
}
}
}
@ -4090,11 +4090,11 @@ namespace Server.Multis
{
if (m_Banning)
{
m_House.Ban(@from, mobile);
m_House.Ban(from, mobile);
}
else
{
m_House.RemoveBan(@from, mobile);
m_House.RemoveBan(from, mobile);
}
}
else
@ -4124,11 +4124,11 @@ namespace Server.Multis
if (targeted is Mobile mobile)
{
m_House.GrantAccess(@from, mobile);
m_House.GrantAccess(from, mobile);
}
else
{
@from.SendLocalizedMessage(1060712); // That is not a player.
from.SendLocalizedMessage(1060712); // That is not a player.
}
}
}
@ -4157,11 +4157,11 @@ namespace Server.Multis
{
if (m_Add)
{
m_House.AddCoOwner(@from, mobile);
m_House.AddCoOwner(from, mobile);
}
else
{
m_House.RemoveCoOwner(@from, mobile);
m_House.RemoveCoOwner(from, mobile);
}
}
else
@ -4195,11 +4195,11 @@ namespace Server.Multis
{
if (m_Add)
{
m_House.AddFriend(@from, mobile);
m_House.AddFriend(from, mobile);
}
else
{
m_House.RemoveFriend(@from, mobile);
m_House.RemoveFriend(from, mobile);
}
}
else
@ -4224,11 +4224,11 @@ namespace Server.Multis
{
if (targeted is Mobile mobile)
{
m_House.BeginConfirmTransfer(@from, mobile);
m_House.BeginConfirmTransfer(from, mobile);
}
else
{
@from.SendLocalizedMessage(501384); // Only a player can own a house!
from.SendLocalizedMessage(501384); // Only a player can own a house!
}
}
}

View file

@ -756,31 +756,31 @@ namespace Server.Multis
if (result == DryDockResult.Dead)
{
@from.SendLocalizedMessage(502493); // You appear to be dead.
from.SendLocalizedMessage(502493); // You appear to be dead.
}
else if (result == DryDockResult.NoKey)
{
@from.SendLocalizedMessage(502494); // You must have a key to the ship to dock the boat.
from.SendLocalizedMessage(502494); // You must have a key to the ship to dock the boat.
}
else if (result == DryDockResult.NotAnchored)
{
@from.SendLocalizedMessage(1010570); // You must lower the anchor to dock the boat.
from.SendLocalizedMessage(1010570); // You must lower the anchor to dock the boat.
}
else if (result == DryDockResult.Mobiles)
{
@from.SendLocalizedMessage(502495); // You cannot dock the ship with beings on board!
from.SendLocalizedMessage(502495); // You cannot dock the ship with beings on board!
}
else if (result == DryDockResult.Items)
{
@from.SendLocalizedMessage(502496); // You cannot dock the ship with a cluttered deck.
from.SendLocalizedMessage(502496); // You cannot dock the ship with a cluttered deck.
}
else if (result == DryDockResult.Hold)
{
@from.SendLocalizedMessage(502497); // Make sure your hold is empty, and try again!
from.SendLocalizedMessage(502497); // Make sure your hold is empty, and try again!
}
else if (result == DryDockResult.Valid)
{
@from.SendGump(new ConfirmDryDockGump(@from, this));
from.SendGump(new ConfirmDryDockGump(from, this));
}
}
@ -795,27 +795,27 @@ namespace Server.Multis
if (result == DryDockResult.Dead)
{
@from.SendLocalizedMessage(502493); // You appear to be dead.
from.SendLocalizedMessage(502493); // You appear to be dead.
}
else if (result == DryDockResult.NoKey)
{
@from.SendLocalizedMessage(502494); // You must have a key to the ship to dock the boat.
from.SendLocalizedMessage(502494); // You must have a key to the ship to dock the boat.
}
else if (result == DryDockResult.NotAnchored)
{
@from.SendLocalizedMessage(1010570); // You must lower the anchor to dock the boat.
from.SendLocalizedMessage(1010570); // You must lower the anchor to dock the boat.
}
else if (result == DryDockResult.Mobiles)
{
@from.SendLocalizedMessage(502495); // You cannot dock the ship with beings on board!
from.SendLocalizedMessage(502495); // You cannot dock the ship with beings on board!
}
else if (result == DryDockResult.Items)
{
@from.SendLocalizedMessage(502496); // You cannot dock the ship with a cluttered deck.
from.SendLocalizedMessage(502496); // You cannot dock the ship with a cluttered deck.
}
else if (result == DryDockResult.Hold)
{
@from.SendLocalizedMessage(502497); // Make sure your hold is empty, and try again!
from.SendLocalizedMessage(502497); // Make sure your hold is empty, and try again!
}
if (result != DryDockResult.Valid)

View file

@ -79,11 +79,11 @@ namespace Server.Multis
{
if (Core.SE)
{
@from.SendLocalizedMessage(502482); // Where do you wish to place the ship?
from.SendLocalizedMessage(502482); // Where do you wish to place the ship?
}
else
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502482); // Where do you wish to place the ship?
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502482); // Where do you wish to place the ship?
}
from.Target = new InternalTarget(this);
@ -185,15 +185,15 @@ namespace Server.Multis
if (region.IsPartOf<DungeonRegion>())
{
@from.SendLocalizedMessage(502488); // You can not place a ship inside a dungeon.
from.SendLocalizedMessage(502488); // You can not place a ship inside a dungeon.
}
else if (region.IsPartOf<HouseRegion>() || region.IsPartOf<ChampionSpawnRegion>())
{
@from.SendLocalizedMessage(1042549); // A boat may not be placed in this area.
from.SendLocalizedMessage(1042549); // A boat may not be placed in this area.
}
else
{
m_Deed.OnPlacement(@from, p);
m_Deed.OnPlacement(from, p);
}
}
}

View file

@ -118,11 +118,11 @@ namespace Server.Multis
{
if (m_ShipName != null)
{
LabelTo(@from, m_ShipName);
LabelTo(from, m_ShipName);
}
else
{
base.OnSingleClick(@from);
base.OnSingleClick(from);
}
}
@ -207,15 +207,15 @@ namespace Server.Multis
if (region.IsPartOf<DungeonRegion>())
{
@from.SendLocalizedMessage(502488); // You can not place a ship inside a dungeon.
from.SendLocalizedMessage(502488); // You can not place a ship inside a dungeon.
}
else if (region.IsPartOf<HouseRegion>() || region.IsPartOf<ChampionSpawnRegion>())
{
@from.SendLocalizedMessage(1042549); // A boat may not be placed in this area.
from.SendLocalizedMessage(1042549); // A boat may not be placed in this area.
}
else
{
m_Model.OnPlacement(@from, p);
m_Model.OnPlacement(from, p);
}
}
}

View file

@ -88,7 +88,7 @@ namespace Server.Items
}
else
{
base.OnDoubleClick(@from);
base.OnDoubleClick(from);
}
}

View file

@ -191,7 +191,7 @@ namespace Server.Misc
if (canFit)
{
@from.Location = new Point3D(x, y, z);
from.Location = new Point3D(x, y, z);
}
}
}

View file

@ -62,11 +62,11 @@ namespace Server.Items
{
if (m_Boat?.ShipName != null)
{
LabelTo(@from, 1042884, m_Boat.ShipName); // the tiller man of the ~1_SHIP_NAME~
LabelTo(from, 1042884, m_Boat.ShipName); // the tiller man of the ~1_SHIP_NAME~
}
else
{
base.OnSingleClick(@from);
base.OnSingleClick(from);
}
}
@ -74,11 +74,11 @@ namespace Server.Items
{
if (m_Boat?.Contains(from) == true)
{
m_Boat.BeginRename(@from);
m_Boat.BeginRename(from);
}
else
{
m_Boat?.BeginDryDock(@from);
m_Boat?.BeginDryDock(from);
}
}

View file

@ -24,27 +24,27 @@ namespace Server.Multis.Deeds
if (from.AccessLevel >= AccessLevel.GameMaster || reg.AllowHousing(from, p))
{
m_Deed.OnPlacement(@from, p);
m_Deed.OnPlacement(from, p);
}
else if (reg.IsPartOf<TempNoHousingRegion>())
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
501270
); // Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
}
else if (reg.IsPartOf<TreasureRegion>() || reg.IsPartOf<HouseRegion>())
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1043287
); // The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
}
else if (reg.IsPartOf<HouseRaffleRegion>())
{
@from.SendLocalizedMessage(1150493); // You must have a deed for this plot of land in order to build here.
from.SendLocalizedMessage(1150493); // You must have a deed for this plot of land in order to build here.
}
else
{
@from.SendLocalizedMessage(501265); // Housing can not be created in this area.
from.SendLocalizedMessage(501265); // Housing can not be created in this area.
}
}
}

View file

@ -113,7 +113,7 @@ namespace Server.Multis
var reg = Region.Find(testPoint, map);
if (!reg.AllowHousing(@from, testPoint)) // Cannot place houses in dungeons, towns, treasure map areas etc
if (!reg.AllowHousing(from, testPoint)) // Cannot place houses in dungeons, towns, treasure map areas etc
{
if (reg.IsPartOf<TempNoHousingRegion>())
{
@ -426,9 +426,9 @@ namespace Server.Multis
}
}
/*Point2D yardPoint = yard[i];
IPooledEnumerable eable = map.GetMultiTilesAt( yardPoint.X, yardPoint.Y );
foreach ( StaticTile[] tile in eable )
{
for ( int j = 0; j < tile.Length; ++j )
@ -440,7 +440,7 @@ namespace Server.Multis
}
}
}
eable.Free();*/
return HousePlacementResult.Valid;

View file

@ -30,11 +30,11 @@ namespace Server.Items
{
if (IsChildOf(from.Backpack))
{
@from.SendGump(new HousePlacementCategoryGump(@from));
from.SendGump(new HousePlacementCategoryGump(from));
}
else
{
@from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
}
}
@ -268,27 +268,27 @@ namespace Server.Items
if (from.AccessLevel >= AccessLevel.GameMaster || reg.AllowHousing(from, p))
{
m_Placed = m_Entry.OnPlacement(@from, p);
m_Placed = m_Entry.OnPlacement(from, p);
}
else if (reg.IsPartOf<TempNoHousingRegion>())
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
501270
); // Lord British has decreed a 'no build' period, thus you cannot build this house at this time.
}
else if (reg.IsPartOf<TreasureRegion>() || reg.IsPartOf<HouseRegion>())
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1043287
); // The house could not be created here. Either something is blocking the house, or the house would not be on valid terrain.
}
else if (reg.IsPartOf<HouseRaffleRegion>())
{
@from.SendLocalizedMessage(1150493); // You must have a deed for this plot of land in order to build here.
from.SendLocalizedMessage(1150493); // You must have a deed for this plot of land in order to build here.
}
else
{
@from.SendLocalizedMessage(501265); // Housing can not be created in this area.
from.SendLocalizedMessage(501265); // Housing can not be created in this area.
}
}
}
@ -302,7 +302,7 @@ namespace Server.Items
if (!m_Placed)
{
@from.SendGump(new HousePlacementListGump(@from, m_Entries));
from.SendGump(new HousePlacementListGump(from, m_Entries));
}
}
}
@ -1960,15 +1960,15 @@ namespace Server.Items
if (Type == typeof(HouseFoundation))
{
args = new object[] { @from, MultiID, m_Storage, m_Lockdowns };
args = new object[] { from, MultiID, m_Storage, m_Lockdowns };
}
else if (Type == typeof(SmallOldHouse) || Type == typeof(SmallShop) || Type == typeof(TwoStoryHouse))
{
args = new object[] { @from, MultiID };
args = new object[] { from, MultiID };
}
else
{
args = new object[] { @from };
args = new object[] { from };
}
return ActivatorUtil.CreateInstance(Type, args) as BaseHouse;

View file

@ -246,13 +246,13 @@ namespace Server.Multis
if (from.Map != m_Sign.Map || !from.InRange(m_Sign, 5))
{
@from.SendLocalizedMessage(
from.SendLocalizedMessage(
1062429
); // You must be within five paces of the house sign to use this option.
}
else
{
@from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Vendors, @from, m_Sign.Owner));
from.SendGump(new HouseGumpAOS(HouseGumpPageAOS.Vendors, from, m_Sign.Owner));
}
}
}