Removes literal variables (#257)
This commit is contained in:
parent
580da8a0cc
commit
4d6e584b6c
359 changed files with 1306 additions and 1306 deletions
|
|
@ -138,16 +138,16 @@ namespace Server.Commands
|
|||
}
|
||||
else
|
||||
{
|
||||
newItem.MoveToWorld(@from.Location, @from.Map);
|
||||
newItem.MoveToWorld(from.Location, from.Map);
|
||||
}
|
||||
|
||||
newItem.InvalidateProperties();
|
||||
|
||||
CommandLogging.WriteLine(
|
||||
@from,
|
||||
from,
|
||||
"{0} {1} duped {2} creating {3}",
|
||||
@from.AccessLevel,
|
||||
CommandLogging.Format(@from),
|
||||
from.AccessLevel,
|
||||
CommandLogging.Format(from),
|
||||
CommandLogging.Format(targ),
|
||||
CommandLogging.Format(newItem)
|
||||
);
|
||||
|
|
@ -166,7 +166,7 @@ namespace Server.Commands
|
|||
|
||||
if (!done)
|
||||
{
|
||||
@from.SendMessage("Unable to dupe. Item must have a 0 parameter constructor.");
|
||||
from.SendMessage("Unable to dupe. Item must have a 0 parameter constructor.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,11 +114,11 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
var entry = m_Responses[i];
|
||||
|
||||
@from.SendMessage(entry.ToString());
|
||||
from.SendMessage(entry.ToString());
|
||||
|
||||
if (flushToLog)
|
||||
{
|
||||
CommandLogging.WriteLine(@from, entry.ToString());
|
||||
CommandLogging.WriteLine(from, entry.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
for (var i = 0; i < m_Failures.Count; ++i)
|
||||
{
|
||||
@from.SendMessage(m_Failures[i].ToString());
|
||||
from.SendMessage(m_Failures[i].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
if (echo)
|
||||
{
|
||||
gm.SendMessage("{0} : has opened their web browser to : {1}", @from.Name, url);
|
||||
gm.SendMessage("{0} : has opened their web browser to : {1}", from.Name, url);
|
||||
}
|
||||
|
||||
from.LaunchBrowser(url);
|
||||
|
|
@ -243,7 +243,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
if (echo)
|
||||
{
|
||||
gm.SendMessage("{0} : has chosen not to open their web browser to : {1}", @from.Name, url);
|
||||
gm.SendMessage("{0} : has chosen not to open their web browser to : {1}", from.Name, url);
|
||||
}
|
||||
|
||||
from.SendMessage("You have chosen not to open your web browser.");
|
||||
|
|
@ -446,7 +446,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
if (m_InGump)
|
||||
{
|
||||
mob.SendGump(new MessageSentGump(mob, @from.Name, e.ArgString));
|
||||
mob.SendGump(new MessageSentGump(mob, from.Name, e.ArgString));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -188,13 +188,13 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
if (m_Foundations.Count == 0)
|
||||
{
|
||||
@from.SendMessage(
|
||||
from.SendMessage(
|
||||
"The item has been inserted into the house design. Press ESC when you are finished."
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage("The item has been inserted into the house design.");
|
||||
from.SendMessage("The item has been inserted into the house design.");
|
||||
}
|
||||
|
||||
if (!m_Foundations.Contains(house))
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
foreach (var update in parsed)
|
||||
{
|
||||
update.Optimize(@from, baseType, ref emitter);
|
||||
update.Optimize(from, baseType, ref emitter);
|
||||
}
|
||||
|
||||
if (size != args.Length)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
foreach (var obj in eable)
|
||||
{
|
||||
if ((!mobiles || obj is Mobile) && BaseCommand.IsAccessible(@from, obj) && ext.IsValid(obj))
|
||||
if ((!mobiles || obj is Mobile) && BaseCommand.IsAccessible(from, obj) && ext.IsValid(obj))
|
||||
{
|
||||
objs.Add(obj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
if (command.ValidateArgs(this, new CommandEventArgs(from, command.Commands[0], GenerateArgString(args), args)))
|
||||
{
|
||||
@from.BeginTarget(
|
||||
from.BeginTarget(
|
||||
-1,
|
||||
command.ObjectTypes == ObjectTypes.All,
|
||||
TargetFlags.None,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
if (command.ValidateArgs(this, new CommandEventArgs(from, command.Commands[0], GenerateArgString(args), args)))
|
||||
{
|
||||
@from.BeginTarget(
|
||||
from.BeginTarget(
|
||||
-1,
|
||||
command.ObjectTypes == ObjectTypes.All,
|
||||
TargetFlags.None,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Server.Commands.Generic
|
|||
{
|
||||
if (command.ValidateArgs(this, new CommandEventArgs(from, command.Commands[0], GenerateArgString(args), args)))
|
||||
{
|
||||
@from.BeginTarget(
|
||||
from.BeginTarget(
|
||||
-1,
|
||||
command.ObjectTypes == ObjectTypes.All,
|
||||
TargetFlags.None,
|
||||
|
|
|
|||
|
|
@ -162,11 +162,11 @@ namespace Server.Commands
|
|||
|
||||
if (pe?.Handler == from)
|
||||
{
|
||||
@from.SendMessage("You may only use this command if you are handling their help page.");
|
||||
from.SendMessage("You may only use this command if you are handling their help page.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage("You may only use this command on someone who has paged you.");
|
||||
from.SendMessage("You may only use this command on someone who has paged you.");
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -174,11 +174,11 @@ namespace Server.Commands
|
|||
|
||||
if (targ.AddToBackpack(held))
|
||||
{
|
||||
@from.SendMessage("The item they were holding has been placed into their backpack.");
|
||||
from.SendMessage("The item they were holding has been placed into their backpack.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage("The item they were holding has been placed at their feet.");
|
||||
from.SendMessage("The item they were holding has been placed at their feet.");
|
||||
}
|
||||
|
||||
held.ClearBounce();
|
||||
|
|
@ -642,7 +642,7 @@ namespace Server.Commands
|
|||
{
|
||||
if (Insensitive.Equals(r.Name, name))
|
||||
{
|
||||
@from.MoveToWorld(r.GoLocation, map);
|
||||
from.MoveToWorld(r.GoLocation, map);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -650,11 +650,11 @@ namespace Server.Commands
|
|||
|
||||
if (ser != 0)
|
||||
{
|
||||
@from.SendMessage("No object with that serial was found.");
|
||||
from.SendMessage("No object with that serial was found.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage("No region with that name was found.");
|
||||
from.SendMessage("No region with that name was found.");
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -683,11 +683,11 @@ namespace Server.Commands
|
|||
var y = int.Parse(e.GetString(1));
|
||||
var z = e.Length == 3 ? int.Parse(e.GetString(2)) : map.GetAverageZ(x, y);
|
||||
|
||||
@from.Location = new Point3D(x, y, z);
|
||||
from.Location = new Point3D(x, y, z);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@from.SendMessage("Region name not found.");
|
||||
from.SendMessage("Region name not found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -709,11 +709,11 @@ namespace Server.Commands
|
|||
|
||||
if (p != Point3D.Zero)
|
||||
{
|
||||
@from.Location = p;
|
||||
from.Location = p;
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage("Sextant reverse lookup failed.");
|
||||
from.SendMessage("Sextant reverse lookup failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -901,7 +901,7 @@ namespace Server.Commands
|
|||
|
||||
if (targeted is Mobile mobile)
|
||||
{
|
||||
@from.SendMenu(new EquipMenu(@from, mobile, GetEquip(mobile)));
|
||||
from.SendMenu(new EquipMenu(from, mobile, GetEquip(mobile)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1036,7 +1036,7 @@ namespace Server.Commands
|
|||
}
|
||||
else
|
||||
{
|
||||
box.DisplayTo(@from);
|
||||
box.DisplayTo(from);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1133,11 +1133,11 @@ namespace Server.Commands
|
|||
{
|
||||
if (mobile.AccessLevel >= from.AccessLevel && mobile != from)
|
||||
{
|
||||
@from.SendMessage("You can't do that to someone with higher Accesslevel than you!");
|
||||
from.SendMessage("You can't do that to someone with higher Accesslevel than you!");
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendGump(new StuckMenu(@from, mobile, false));
|
||||
from.SendGump(new StuckMenu(from, mobile, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ namespace Server.Commands
|
|||
|
||||
if (start == end)
|
||||
{
|
||||
sb.AppendFormat("at {0} in {1}", start, @from.Map);
|
||||
sb.AppendFormat("at {0} in {1}", start, from.Map);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("from {0} to {1} in {2}", start, end, @from.Map);
|
||||
sb.AppendFormat("from {0} to {1} in {2}", start, end, from.Map);
|
||||
}
|
||||
|
||||
sb.Append(":");
|
||||
|
|
@ -126,7 +126,7 @@ namespace Server.Commands
|
|||
|
||||
if (built > 0)
|
||||
{
|
||||
@from.SendMessage(
|
||||
from.SendMessage(
|
||||
"{0} object{1} generated in {2:F1} seconds.",
|
||||
built,
|
||||
built != 1 ? "s" : "",
|
||||
|
|
@ -135,7 +135,7 @@ namespace Server.Commands
|
|||
}
|
||||
else
|
||||
{
|
||||
SendUsage(type, @from);
|
||||
SendUsage(type, from);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,11 +195,11 @@ namespace Server.Commands
|
|||
|
||||
if (attr == null)
|
||||
{
|
||||
@from.SendMessage("Property ({0}) not found.", propName);
|
||||
from.SendMessage("Property ({0}) not found.", propName);
|
||||
}
|
||||
else if (from.AccessLevel < attr.WriteLevel)
|
||||
{
|
||||
@from.SendMessage(
|
||||
from.SendMessage(
|
||||
"Setting this property ({0}) requires at least {1} access level.",
|
||||
propName,
|
||||
Mobile.GetAccessLevelName(attr.WriteLevel)
|
||||
|
|
@ -207,7 +207,7 @@ namespace Server.Commands
|
|||
}
|
||||
else if (!thisProp.CanWrite || attr.ReadOnly)
|
||||
{
|
||||
@from.SendMessage("Property ({0}) is read only.", propName);
|
||||
from.SendMessage("Property ({0}) is read only.", propName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -354,7 +354,7 @@ namespace Server.Commands
|
|||
{
|
||||
if (sendError)
|
||||
{
|
||||
@from.SendMessage(result);
|
||||
from.SendMessage(result);
|
||||
}
|
||||
|
||||
hadError = true;
|
||||
|
|
@ -404,7 +404,7 @@ namespace Server.Commands
|
|||
|
||||
if (objectCount >= 20)
|
||||
{
|
||||
@from.SendMessage("Constructing {0} objects, please wait.", objectCount);
|
||||
from.SendMessage("Constructing {0} objects, please wait.", objectCount);
|
||||
}
|
||||
|
||||
var sendError = true;
|
||||
|
|
@ -448,7 +448,7 @@ namespace Server.Commands
|
|||
z = map.GetAverageZ(x, y);
|
||||
}
|
||||
|
||||
var built = Build(@from, ctor, values, props, realProps, ref sendError);
|
||||
var built = Build(from, ctor, values, props, realProps, ref sendError);
|
||||
|
||||
sb.AppendFormat("0x{0:X}; ", built.Serial.Value);
|
||||
|
||||
|
|
@ -500,7 +500,7 @@ namespace Server.Commands
|
|||
|
||||
if (!foundCtor)
|
||||
{
|
||||
@from.SendMessage("That type is not marked constructible.");
|
||||
from.SendMessage("That type is not marked constructible.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -557,14 +557,14 @@ namespace Server.Commands
|
|||
if (e.Length >= 1)
|
||||
{
|
||||
BoundingBoxPicker.Begin(
|
||||
@from,
|
||||
from,
|
||||
(map, start, end) =>
|
||||
TileBox_Callback(@from, start, end, new TileState(TileZType.Start, 0, e.Arguments, outline))
|
||||
TileBox_Callback(from, start, end, new TileState(TileZType.Start, 0, e.Arguments, outline))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage(
|
||||
from.SendMessage(
|
||||
"Format: {0} <type> [params] [set {{<propertyName> <value> ...}}]",
|
||||
outline ? "Outline" : "Tile"
|
||||
);
|
||||
|
|
@ -656,14 +656,14 @@ namespace Server.Commands
|
|||
if (e.Length >= 1)
|
||||
{
|
||||
BoundingBoxPicker.Begin(
|
||||
@from,
|
||||
from,
|
||||
(map, start, end) =>
|
||||
TileBox_Callback(@from, start, end, new TileState(TileZType.MapAverage, 0, e.Arguments, outline))
|
||||
TileBox_Callback(from, start, end, new TileState(TileZType.MapAverage, 0, e.Arguments, outline))
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendMessage(
|
||||
from.SendMessage(
|
||||
"Format: {0}Avg <type> [params] [set {{<propertyName> <value> ...}}]",
|
||||
outline ? "Outline" : "Tile"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if (m_Page > 0)
|
||||
{
|
||||
@from.SendGump(new AddGump(@from, m_SearchString, m_Page - 1, m_SearchResults, true));
|
||||
from.SendGump(new AddGump(from, m_SearchString, m_Page - 1, m_SearchResults, true));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -209,7 +209,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if ((m_Page + 1) * 10 < m_SearchResults.Length)
|
||||
{
|
||||
@from.SendGump(new AddGump(@from, m_SearchString, m_Page + 1, m_SearchResults, true));
|
||||
from.SendGump(new AddGump(from, m_SearchString, m_Page + 1, m_SearchResults, true));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -279,7 +279,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if (cancelType == TargetCancelType.Canceled)
|
||||
{
|
||||
@from.SendGump(new AddGump(@from, m_SearchString, m_Page, m_SearchResults, true));
|
||||
from.SendGump(new AddGump(from, m_SearchString, m_Page, m_SearchResults, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if (m_Page > 0)
|
||||
{
|
||||
@from.SendGump(new CategorizedAddGump(@from, m_Category, m_Page - 1));
|
||||
from.SendGump(new CategorizedAddGump(from, m_Category, m_Page - 1));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -284,7 +284,7 @@ namespace Server.Gumps
|
|||
{
|
||||
if ((m_Page + 1) * EntryCount < m_Category.Nodes.Length)
|
||||
{
|
||||
@from.SendGump(new CategorizedAddGump(@from, m_Category, m_Page + 1));
|
||||
from.SendGump(new CategorizedAddGump(from, m_Category, m_Page + 1));
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -295,7 +295,7 @@ namespace Server.Gumps
|
|||
|
||||
if (index >= 0 && index < m_Category.Nodes.Length)
|
||||
{
|
||||
m_Category.Nodes[index].OnClick(@from, m_Page);
|
||||
m_Category.Nodes[index].OnClick(from, m_Page);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace Server.Commands
|
|||
{
|
||||
if (count > 0)
|
||||
{
|
||||
@from.SendMessage(WarningHue, $"Partial Completion, {count} Teleporters Removed.");
|
||||
from.SendMessage(WarningHue, $"Partial Completion, {count} Teleporters Removed.");
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -88,12 +88,12 @@ namespace Server.Commands
|
|||
{
|
||||
if (c.DelCount > 0)
|
||||
{
|
||||
@from.SendMessage(WarningHue, $"Partial Completion: {c.DelCount} Teleporters Removed.");
|
||||
from.SendMessage(WarningHue, $"Partial Completion: {c.DelCount} Teleporters Removed.");
|
||||
}
|
||||
|
||||
if (c.Count > 0)
|
||||
{
|
||||
@from.SendMessage(WarningHue, $"Partial Completion: {c.Count} Teleporters Added.");
|
||||
from.SendMessage(WarningHue, $"Partial Completion: {c.Count} Teleporters Added.");
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@ namespace Server.Commands
|
|||
if (shouldLog)
|
||||
{
|
||||
CommandLogging.LogChangeProperty(
|
||||
@from,
|
||||
from,
|
||||
logObject,
|
||||
givenName,
|
||||
toSet?.ToString() ?? "(-null-)"
|
||||
|
|
@ -607,11 +607,11 @@ namespace Server.Commands
|
|||
{
|
||||
if (!BaseCommand.IsAccessible(from, o))
|
||||
{
|
||||
@from.SendLocalizedMessage(500447); // That is not accessible.
|
||||
from.SendLocalizedMessage(500447); // That is not accessible.
|
||||
}
|
||||
else
|
||||
{
|
||||
@from.SendGump(new PropertiesGump(@from, o));
|
||||
from.SendGump(new PropertiesGump(from, o));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -794,12 +794,12 @@ namespace Server
|
|||
|
||||
if ((access & PropertyAccess.Read) != 0 && from.AccessLevel < security.ReadLevel)
|
||||
{
|
||||
throw new ReadAccessException(this, @from.AccessLevel, security.ReadLevel);
|
||||
throw new ReadAccessException(this, from.AccessLevel, security.ReadLevel);
|
||||
}
|
||||
|
||||
if ((access & PropertyAccess.Write) != 0 && (from.AccessLevel < security.WriteLevel || security.ReadOnly))
|
||||
{
|
||||
throw new WriteAccessException(this, @from.AccessLevel, security.ReadLevel);
|
||||
throw new WriteAccessException(this, from.AccessLevel, security.ReadLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.Commands
|
|||
{
|
||||
if (o is Mobile mobile)
|
||||
{
|
||||
@from.SendGump(new SkillsGump(@from, mobile));
|
||||
from.SendGump(new SkillsGump(from, mobile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace Server
|
|||
if (map != null && map != Map.Internal)
|
||||
{
|
||||
SendWarning(
|
||||
@from,
|
||||
from,
|
||||
"You are about to freeze <u>all items in {0}</u>.",
|
||||
BaseFreezeWarning,
|
||||
map,
|
||||
|
|
@ -141,19 +141,19 @@ namespace Server
|
|||
if (targetMap == null)
|
||||
{
|
||||
CommandLogging.WriteLine(
|
||||
@from,
|
||||
from,
|
||||
"{0} {1} invoking freeze for every item in every map",
|
||||
@from.AccessLevel,
|
||||
CommandLogging.Format(@from)
|
||||
from.AccessLevel,
|
||||
CommandLogging.Format(from)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommandLogging.WriteLine(
|
||||
@from,
|
||||
from,
|
||||
"{0} {1} invoking freeze for every item in {0}",
|
||||
@from.AccessLevel,
|
||||
CommandLogging.Format(@from),
|
||||
from.AccessLevel,
|
||||
CommandLogging.Format(from),
|
||||
targetMap
|
||||
);
|
||||
}
|
||||
|
|
@ -380,7 +380,7 @@ namespace Server
|
|||
|
||||
if (totalFrozen == 0 && badDataFile)
|
||||
{
|
||||
@from.SendGump(
|
||||
from.SendGump(
|
||||
new NoticeGump(
|
||||
1060637,
|
||||
30720,
|
||||
|
|
@ -393,7 +393,7 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
@from.SendGump(
|
||||
from.SendGump(
|
||||
new NoticeGump(
|
||||
1060637,
|
||||
30720,
|
||||
|
|
@ -641,7 +641,7 @@ namespace Server
|
|||
|
||||
if (totalUnfrozen == 0 && badDataFile)
|
||||
{
|
||||
@from.SendGump(
|
||||
from.SendGump(
|
||||
new NoticeGump(
|
||||
1060637,
|
||||
30720,
|
||||
|
|
@ -654,7 +654,7 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
@from.SendGump(
|
||||
from.SendGump(
|
||||
new NoticeGump(
|
||||
1060637,
|
||||
30720,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue