Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -16,10 +16,8 @@ namespace Server.Engines.Help
|
|||
|
||||
public ContainedMenu(Mobile from) : base(
|
||||
"You already have an open help request. We will have someone assist you as soon as possible. What would you like to do?",
|
||||
new[] { "Leave my old help request like it is.", "Remove my help request from the queue." })
|
||||
{
|
||||
new[] { "Leave my old help request like it is.", "Remove my help request from the queue." }) =>
|
||||
m_From = from;
|
||||
}
|
||||
|
||||
public override void OnCancel(NetState state)
|
||||
{
|
||||
|
|
@ -211,10 +209,7 @@ namespace Server.Engines.Help
|
|||
e.Mobile.SendGump(new HelpGump(e.Mobile));
|
||||
}
|
||||
|
||||
private static bool IsYoung(Mobile m)
|
||||
{
|
||||
return m is PlayerMobile mobile && mobile.Young;
|
||||
}
|
||||
private static bool IsYoung(Mobile m) => m is PlayerMobile mobile && mobile.Young;
|
||||
|
||||
public static bool CheckCombat(Mobile m)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@ namespace Server.Engines.Help
|
|||
{
|
||||
private PageType m_Type;
|
||||
|
||||
public PagePrompt(PageType type)
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
public PagePrompt(PageType type) => m_Type = type;
|
||||
|
||||
public override void OnCancel(Mobile from)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -87,10 +87,7 @@ namespace Server.Engines.Help
|
|||
|
||||
private PageEntry m_Entry;
|
||||
|
||||
public InternalTimer(PageEntry entry) : base(TimeSpan.FromSeconds(1.0), StatusDelay)
|
||||
{
|
||||
m_Entry = entry;
|
||||
}
|
||||
public InternalTimer(PageEntry entry) : base(TimeSpan.FromSeconds(1.0), StatusDelay) => m_Entry = entry;
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
|
|
@ -180,20 +177,11 @@ namespace Server.Engines.Help
|
|||
e.Mobile.SendMessage("The page queue is empty.");
|
||||
}
|
||||
|
||||
public static bool IsHandling(Mobile check)
|
||||
{
|
||||
return m_KeyedByHandler.ContainsKey(check);
|
||||
}
|
||||
public static bool IsHandling(Mobile check) => m_KeyedByHandler.ContainsKey(check);
|
||||
|
||||
public static bool Contains(Mobile sender)
|
||||
{
|
||||
return m_KeyedBySender.ContainsKey(sender);
|
||||
}
|
||||
public static bool Contains(Mobile sender) => m_KeyedBySender.ContainsKey(sender);
|
||||
|
||||
public static int IndexOf(PageEntry e)
|
||||
{
|
||||
return List.IndexOf(e);
|
||||
}
|
||||
public static int IndexOf(PageEntry e) => List.IndexOf(e);
|
||||
|
||||
public static void Remove(PageEntry e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -154,14 +154,12 @@ namespace Server.Engines.Help
|
|||
{
|
||||
string path = Path.Combine(Core.BaseDirectory, "Data/pageresponse.cfg");
|
||||
|
||||
using (StreamWriter op = new StreamWriter(path))
|
||||
using StreamWriter op = new StreamWriter(path);
|
||||
for (int i = 0; i < List.Count; ++i)
|
||||
{
|
||||
for (int i = 0; i < List.Count; ++i)
|
||||
{
|
||||
PredefinedResponse resp = List[i];
|
||||
PredefinedResponse resp = List[i];
|
||||
|
||||
op.WriteLine("{0}\t{1}", resp.Title, resp.Message);
|
||||
}
|
||||
op.WriteLine("{0}\t{1}", resp.Title, resp.Message);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
@ -181,20 +179,18 @@ namespace Server.Engines.Help
|
|||
|
||||
try
|
||||
{
|
||||
using (StreamReader ip = new StreamReader(path))
|
||||
using StreamReader ip = new StreamReader(path);
|
||||
string line;
|
||||
|
||||
while ((line = ip.ReadLine()?.Trim()) != null)
|
||||
{
|
||||
string line;
|
||||
if (line.Length == 0 || line.StartsWith("#"))
|
||||
continue;
|
||||
|
||||
while ((line = ip.ReadLine()?.Trim()) != null)
|
||||
{
|
||||
if (line.Length == 0 || line.StartsWith("#"))
|
||||
continue;
|
||||
string[] split = line.Split('\t');
|
||||
|
||||
string[] split = line.Split('\t');
|
||||
|
||||
if (split.Length == 2)
|
||||
list.Add(new PredefinedResponse(split[0], split[1]));
|
||||
}
|
||||
if (split.Length == 2)
|
||||
list.Add(new PredefinedResponse(split[0], split[1]));
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
@ -305,15 +301,9 @@ namespace Server.Engines.Help
|
|||
}
|
||||
}
|
||||
|
||||
public string Center(string text)
|
||||
{
|
||||
return $"<CENTER>{text}</CENTER>";
|
||||
}
|
||||
public string Center(string text) => $"<CENTER>{text}</CENTER>";
|
||||
|
||||
public string Color(string text, int color)
|
||||
{
|
||||
return $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
}
|
||||
public string Color(string text, int color) => $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
|
||||
public void AddTextInput(int x, int y, int w, int h, int id, string def)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,28 +21,19 @@ namespace Server.Engines.Help
|
|||
|
||||
private Queue<SpeechLogEntry> m_Queue;
|
||||
|
||||
public SpeechLog()
|
||||
{
|
||||
m_Queue = new Queue<SpeechLogEntry>();
|
||||
}
|
||||
public SpeechLog() => m_Queue = new Queue<SpeechLogEntry>();
|
||||
|
||||
public int Count => m_Queue.Count;
|
||||
|
||||
#region IEnumerable<SpeechLogEntry> Members
|
||||
|
||||
IEnumerator<SpeechLogEntry> IEnumerable<SpeechLogEntry>.GetEnumerator()
|
||||
{
|
||||
return m_Queue.GetEnumerator();
|
||||
}
|
||||
IEnumerator<SpeechLogEntry> IEnumerable<SpeechLogEntry>.GetEnumerator() => m_Queue.GetEnumerator();
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEnumerable Members
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return m_Queue.GetEnumerator();
|
||||
}
|
||||
IEnumerator IEnumerable.GetEnumerator() => m_Queue.GetEnumerator();
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -141,11 +141,9 @@ namespace Server.Menus.Questions
|
|||
AddHtmlLocalized(90, 265, 200, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
private static bool IsInSecondAgeArea(Mobile m)
|
||||
{
|
||||
return (m.Map == Map.Trammel || m.Map == Map.Felucca) &&
|
||||
(m.X >= 5120 && m.Y >= 2304 || m.Region.IsPartOf("Terathan Keep"));
|
||||
}
|
||||
private static bool IsInSecondAgeArea(Mobile m) =>
|
||||
(m.Map == Map.Trammel || m.Map == Map.Felucca) &&
|
||||
(m.X >= 5120 && m.Y >= 2304 || m.Region.IsPartOf("Terathan Keep"));
|
||||
|
||||
public void BeginClose()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue