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

@ -20,7 +20,7 @@ namespace Server.Items
{
if (MondainsLegacy.CheckML(from))
{
base.Drink(@from);
base.Drink(from);
}
}

View file

@ -19,7 +19,7 @@ namespace Server.Items
{
if (MondainsLegacy.CheckML(from))
{
@from.SendGump(new ConfirmGump(this));
from.SendGump(new ConfirmGump(this));
}
}
else

View file

@ -70,7 +70,7 @@ namespace Server.Items
if (to is ChaosDragoon || to is ChaosDragoonElite)
{
@from.SendLocalizedMessage(1042047); // You fail to knock the rider from its mount.
from.SendLocalizedMessage(1042047); // You fail to knock the rider from its mount.
}
var mt = to.Mount;
@ -83,7 +83,7 @@ namespace Server.Items
{
if (AnimalForm.UnderTransformation(mobile))
{
mobile.SendLocalizedMessage(1114066, @from.Name); // ~1_NAME~ knocked you out of animal form!
mobile.SendLocalizedMessage(1114066, from.Name); // ~1_NAME~ knocked you out of animal form!
}
else if (mobile.Mounted)
{
@ -95,7 +95,7 @@ namespace Server.Items
if (Core.AOS) /* only failsafe, attacker should already be dismounted */
{
(@from as PlayerMobile)?.SetMountBlock(
(from as PlayerMobile)?.SetMountBlock(
BlockMountType.BolaRecovery,
TimeSpan.FromSeconds(Core.ML ? 10 : 3),
true

View file

@ -169,11 +169,11 @@ namespace Server.Items
state.Send(new BBDisplayBoard(this));
if (state.ContainerGridLines)
{
state.Send(new ContainerContent6017(@from, this));
state.Send(new ContainerContent6017(from, this));
}
else
{
state.Send(new ContainerContent(@from, this));
state.Send(new ContainerContent(from, this));
}
}
else
@ -304,11 +304,11 @@ namespace Server.Items
{
if (thread == null)
{
@from.SendMessage("You must wait {0} before creating a new thread.", FormatTS(ThreadCreateTime));
from.SendMessage("You must wait {0} before creating a new thread.", FormatTS(ThreadCreateTime));
}
else
{
@from.SendMessage("You must wait {0} before replying to another thread.", FormatTS(ThreadReplyTime));
from.SendMessage("You must wait {0} before replying to another thread.", FormatTS(ThreadReplyTime));
}
return;

View file

@ -115,7 +115,7 @@ namespace Server.Items
if (Receivers.Count > 0)
{
LabelTo(@from, 1060746, Receivers.Count.ToString()); // links: ~1_val~
LabelTo(from, 1060746, Receivers.Count.ToString()); // links: ~1_val~
}
}
@ -142,7 +142,7 @@ namespace Server.Items
}
else if (Charges > 0)
{
receiver.TransmitMessage(@from, speech);
receiver.TransmitMessage(from, speech);
Charges--;
}
else

View file

@ -201,7 +201,7 @@ namespace Server.Items
}
else
{
@from.SendLocalizedMessage(500446); // That is too far away.
from.SendLocalizedMessage(500446); // That is too far away.
}
}
}

View file

@ -162,7 +162,7 @@ namespace Server.Items
{
if (TriggerType == EffectTriggerType.DoubleClick)
{
DoEffect(@from);
DoEffect(from);
}
}
@ -337,7 +337,7 @@ namespace Server.Items
{
if (from == this)
{
@from = EffectItem.Create(@from.Location, @from.Map, EffectItem.DefaultDuration);
from = EffectItem.Create(from.Location, from.Map, EffectItem.DefaultDuration);
}
if (to == this)

View file

@ -70,7 +70,7 @@ namespace Server.Items
if (!m_Users.Contains(from))
{
m_Users.Add(@from);
m_Users.Add(from);
}
from.Target = new ThrowTarget(this);

View file

@ -45,7 +45,7 @@ namespace Server.Items
ClearComponents(addon);
flipMethod.Invoke(addon, new object[] { @from, Directions[index] });
flipMethod.Invoke(addon, new object[] { from, Directions[index] });
BaseHouse house = null;
var result = AddonFitResult.Valid;
@ -54,14 +54,14 @@ namespace Server.Items
if (addon is BaseAddon baseAddon)
{
result = baseAddon.CouldFit(baseAddon.Location, @from.Map, @from, ref house);
result = baseAddon.CouldFit(baseAddon.Location, from.Map, from, ref house);
}
else if (addon is BaseAddonContainer container)
{
result = container.CouldFit(container.Location, @from.Map, @from, ref house);
result = container.CouldFit(container.Location, from.Map, from, ref house);
}
addon.Map = @from.Map;
addon.Map = from.Map;
if (result != AddonFitResult.Valid)
{
@ -76,27 +76,27 @@ namespace Server.Items
ClearComponents(addon);
flipMethod.Invoke(addon, new object[2] { @from, Directions[index] });
flipMethod.Invoke(addon, new object[2] { from, Directions[index] });
if (result == AddonFitResult.Blocked)
{
@from.SendLocalizedMessage(500269); // You cannot build that there.
from.SendLocalizedMessage(500269); // You cannot build that there.
}
else if (result == AddonFitResult.NotInHouse)
{
@from.SendLocalizedMessage(500274); // You can only place this in a house that you own!
from.SendLocalizedMessage(500274); // You can only place this in a house that you own!
}
else if (result == AddonFitResult.DoorsNotClosed)
{
@from.SendMessage("You must close all house doors before placing this.");
from.SendMessage("You must close all house doors before placing this.");
}
else if (result == AddonFitResult.DoorTooClose)
{
@from.SendLocalizedMessage(500271); // You cannot build near the door.
from.SendLocalizedMessage(500271); // You cannot build near the door.
}
else if (result == AddonFitResult.NoWall)
{
@from.SendLocalizedMessage(500268); // This object needs to be mounted on something.
from.SendLocalizedMessage(500268); // This object needs to be mounted on something.
}
}

View file

@ -74,12 +74,12 @@ namespace Server.Items
if (!from.HasGump<InternalGump>())
{
@from.SendGump(new InternalGump(this));
from.SendGump(new InternalGump(this));
}
if (m_Command != DecorateCommand.None)
{
@from.Target = new InternalTarget(this);
from.Target = new InternalTarget(this);
}
}
@ -97,7 +97,7 @@ namespace Server.Items
else*/
if (!InHouse(from))
{
@from.SendLocalizedMessage(502092); // You must be in your house to do this.
from.SendLocalizedMessage(502092); // You must be in your house to do this.
}
else
{
@ -224,15 +224,15 @@ namespace Server.Items
{
if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Up)
{
@from.SendLocalizedMessage(1042274); // You cannot raise it up any higher.
from.SendLocalizedMessage(1042274); // You cannot raise it up any higher.
}
else if (item is AddonComponent && m_Decorator.Command == DecorateCommand.Down)
{
@from.SendLocalizedMessage(1042275); // You cannot lower it down any further.
from.SendLocalizedMessage(1042275); // You cannot lower it down any further.
}
else
{
@from.SendLocalizedMessage(1042271); // That is not locked down.
from.SendLocalizedMessage(1042271); // That is not locked down.
}
}
else if (item is VendorRentalContract)
@ -267,7 +267,7 @@ namespace Server.Items
{
if (cancelType == TargetCancelType.Canceled)
{
@from.CloseGump<InternalGump>();
from.CloseGump<InternalGump>();
}
}
@ -310,7 +310,7 @@ namespace Server.Items
}
else
{
@from.SendLocalizedMessage(1042273); // You cannot turn that.
from.SendLocalizedMessage(1042273); // You cannot turn that.
}
}
@ -324,7 +324,7 @@ namespace Server.Items
}
else
{
@from.SendLocalizedMessage(1042274); // You cannot raise it up any higher.
from.SendLocalizedMessage(1042274); // You cannot raise it up any higher.
}
}
@ -338,7 +338,7 @@ namespace Server.Items
}
else
{
@from.SendLocalizedMessage(1042275); // You cannot lower it down any further.
from.SendLocalizedMessage(1042275); // You cannot lower it down any further.
}
}

View file

@ -90,11 +90,11 @@ namespace Server.Items
if (weapon.PoisonCharges > 0)
{
@from.SendLocalizedMessage(1005423); // You have removed some of the caustic substance, but not all.
from.SendLocalizedMessage(1005423); // You have removed some of the caustic substance, but not all.
}
else
{
@from.SendLocalizedMessage(1010497); // You have cleaned the item.
from.SendLocalizedMessage(1010497); // You have cleaned the item.
}
}
}

View file

@ -36,7 +36,7 @@ namespace Server.Items
if (i != null)
{
@from.AddToBackpack(i);
from.AddToBackpack(i);
}
from.SendLocalizedMessage(1070822); // You fold the paper into an interesting shape.

View file

@ -162,7 +162,7 @@ namespace Server.Items
{
if (house.Public || !house.IsAosRules)
{
return !house.IsBanned(@from);
return !house.IsBanned(from);
}
return house.HasAccess(from);
@ -174,15 +174,15 @@ namespace Server.Items
if (house?.HasLockedDownItem(this) != true)
{
@from.SendLocalizedMessage(1062396); // This bulletin board must be locked down in a house to be usable.
from.SendLocalizedMessage(1062396); // This bulletin board must be locked down in a house to be usable.
}
else if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this))
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
else if (CheckAccess(house, from))
{
@from.SendGump(new PlayerBBGump(@from, house, this, 0));
from.SendGump(new PlayerBBGump(from, house, this, 0));
}
}

View file

@ -17,11 +17,11 @@ namespace Server.Items
{
if (!from.InRange(GetWorldLocation(), 3))
{
@from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
}
else
{
@from.SendAsciiMessage("This looks like part of a larger contraption.");
from.SendAsciiMessage("This looks like part of a larger contraption.");
}
}

View file

@ -263,7 +263,7 @@ namespace Server.Items
for (var i = 0; i < SideLength; i++)
{
@from.AddToBackpack(new ArcaneGem());
from.AddToBackpack(new ArcaneGem());
}
from.AddToBackpack(new Diamond(SideLength));

View file

@ -148,7 +148,7 @@ namespace Server.Items
{
if (from?.Account != null)
{
return new SoulstoneFragment(@from.Account.ToString());
return new SoulstoneFragment(from.Account.ToString());
}
return null;

View file

@ -34,11 +34,11 @@ namespace Server.Items
if (from.InRange(GetWorldLocation(), 1))
{
UseGate(@from);
UseGate(from);
}
else
{
@from.SendLocalizedMessage(500446); // That is too far away.
from.SendLocalizedMessage(500446); // That is too far away.
}
}

View file

@ -187,15 +187,15 @@ namespace Server.Items
{
if (m_MapDest != null && m_PointDest != Point3D.Zero)
{
LabelTo(@from, "{0} [{1}]", m_PointDest, m_MapDest);
LabelTo(from, "{0} [{1}]", m_PointDest, m_MapDest);
}
else if (m_MapDest != null)
{
LabelTo(@from, "[{0}]", m_MapDest);
LabelTo(from, "[{0}]", m_MapDest);
}
else if (m_PointDest != Point3D.Zero)
{
LabelTo(@from, m_PointDest.ToString());
LabelTo(from, m_PointDest.ToString());
}
}
else

View file

@ -32,11 +32,11 @@ namespace Server.Items
{
if (ItemID == 0xF7E)
{
@from.SendMessage("You destroy the bone.");
from.SendMessage("You destroy the bone.");
}
else
{
@from.SendMessage("You destroy the bone pile.");
from.SendMessage("You destroy the bone pile.");
}
var gold = new Gold(25, 100);
@ -51,11 +51,11 @@ namespace Server.Items
{
if (ItemID == 0xF7E)
{
@from.SendMessage("You damage the bone.");
from.SendMessage("You damage the bone.");
}
else
{
@from.SendMessage("You damage the bone pile.");
from.SendMessage("You damage the bone pile.");
}
}
}

View file

@ -65,11 +65,11 @@ namespace Server.Items
if (m_Next == null)
{
LabelTo(@from, "(Unlinked)");
LabelTo(from, "(Unlinked)");
}
else
{
LabelTo(@from, "(Linked: {0})", m_Next.Location);
LabelTo(from, "(Linked: {0})", m_Next.Location);
}
}
@ -113,7 +113,7 @@ namespace Server.Items
}
else
{
@from.SendMessage("Target a way point.");
from.SendMessage("Target a way point.");
}
}
}

View file

@ -62,11 +62,11 @@ namespace Server.Items
{
if (IsOwner(from))
{
@from.SendGump(new OnOffGump(this));
from.SendGump(new OnOffGump(this));
}
else
{
@from.SendLocalizedMessage(502691); // You must be the owner to use this.
from.SendLocalizedMessage(502691); // You must be the owner to use this.
}
}
@ -123,7 +123,7 @@ namespace Server.Items
if (newValue && !m_Chimes.IsLockedDown)
{
@from.SendLocalizedMessage(502693); // Remember, this only works when locked down.
from.SendLocalizedMessage(502693); // Remember, this only works when locked down.
}
}
else