Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -918,10 +918,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
[Constructible]
|
||||
public BRBoard()
|
||||
: base(7774)
|
||||
{
|
||||
: base(7774) =>
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public BRBoard(Serial serial)
|
||||
: base(serial)
|
||||
|
|
@ -1088,15 +1086,9 @@ namespace Server.Engines.ConPVP
|
|||
AddButton(314, height - 42, 247, 248, 1);
|
||||
}
|
||||
|
||||
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>";
|
||||
|
||||
private void AddBorderedText(int x, int y, int width, int height, string text, int color, int borderColor)
|
||||
{
|
||||
|
|
@ -1362,15 +1354,9 @@ namespace Server.Engines.ConPVP
|
|||
public override string Title => "Bombing Run";
|
||||
public override string DefaultName => "Bombing Run Controller";
|
||||
|
||||
public override string GetTeamName(int teamID)
|
||||
{
|
||||
return TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
}
|
||||
public override string GetTeamName(int teamID) => TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
|
||||
public override EventGame Construct(DuelContext context)
|
||||
{
|
||||
return new BRGame(this, context);
|
||||
}
|
||||
public override EventGame Construct(DuelContext context) => new BRGame(this, context);
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
@ -1421,10 +1407,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private TimerCallback m_UnhideCallback;
|
||||
|
||||
public BRGame(BRController controller, DuelContext context) : base(context)
|
||||
{
|
||||
Controller = controller;
|
||||
}
|
||||
public BRGame(BRController controller, DuelContext context) : base(context) => Controller = controller;
|
||||
|
||||
public BRController Controller{ get; }
|
||||
|
||||
|
|
@ -1439,10 +1422,7 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
public override bool CantDoAnything(Mobile mob)
|
||||
{
|
||||
return mob.Backpack?.FindItemByType<BRBomb>() != null && GetTeamInfo(mob) != null;
|
||||
}
|
||||
public override bool CantDoAnything(Mobile mob) => mob.Backpack?.FindItemByType<BRBomb>() != null && GetTeamInfo(mob) != null;
|
||||
|
||||
public void ReturnBomb()
|
||||
{
|
||||
|
|
@ -1508,10 +1488,7 @@ namespace Server.Engines.ConPVP
|
|||
return pm.DuelContext.Participants.IndexOf(pm.DuelPlayer.Participant);
|
||||
}
|
||||
|
||||
public int GetColor(Mobile mob)
|
||||
{
|
||||
return GetTeamInfo(mob)?.Color ?? -1;
|
||||
}
|
||||
public int GetColor(Mobile mob) => GetTeamInfo(mob)?.Color ?? -1;
|
||||
|
||||
private void ApplyHues(Participant p, int hueOverride)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,10 +15,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
[Constructible]
|
||||
public CTFBoard()
|
||||
: base(7774)
|
||||
{
|
||||
: base(7774) =>
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public CTFBoard(Serial serial)
|
||||
: base(serial)
|
||||
|
|
@ -181,15 +179,9 @@ namespace Server.Engines.ConPVP
|
|||
AddButton(314, height - 42, 247, 248, 1);
|
||||
}
|
||||
|
||||
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>";
|
||||
|
||||
private void AddBorderedText(int x, int y, int width, int height, string text, int color, int borderColor)
|
||||
{
|
||||
|
|
@ -223,10 +215,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
[Constructible]
|
||||
public CTFFlag()
|
||||
: base(5643)
|
||||
{
|
||||
: base(5643) =>
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public CTFFlag(Serial serial)
|
||||
: base(serial)
|
||||
|
|
@ -684,10 +674,7 @@ namespace Server.Engines.ConPVP
|
|||
op.Write(Origin);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "...";
|
||||
}
|
||||
public override string ToString() => "...";
|
||||
}
|
||||
|
||||
public sealed class CTFController : EventController
|
||||
|
|
@ -742,15 +729,9 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
public override string Title => "CTF";
|
||||
|
||||
public override string GetTeamName(int teamID)
|
||||
{
|
||||
return TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
}
|
||||
public override string GetTeamName(int teamID) => TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
|
||||
public override EventGame Construct(DuelContext context)
|
||||
{
|
||||
return new CTFGame(this, context);
|
||||
}
|
||||
public override EventGame Construct(DuelContext context) => new CTFGame(this, context);
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
@ -809,10 +790,7 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
private Timer m_FinishTimer;
|
||||
|
||||
public CTFGame(CTFController controller, DuelContext context) : base(context)
|
||||
{
|
||||
Controller = controller;
|
||||
}
|
||||
public CTFGame(CTFController controller, DuelContext context) : base(context) => Controller = controller;
|
||||
|
||||
public CTFController Controller{ get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
[Constructible]
|
||||
public DDBoard()
|
||||
: base(7774)
|
||||
{
|
||||
: base(7774) =>
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public DDBoard(Serial serial)
|
||||
: base(serial)
|
||||
|
|
@ -177,15 +175,9 @@ namespace Server.Engines.ConPVP
|
|||
AddButton(314, height - 42, 247, 248, 1);
|
||||
}
|
||||
|
||||
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>";
|
||||
|
||||
private void AddBorderedText(int x, int y, int width, int height, string text, int color, int borderColor)
|
||||
{
|
||||
|
|
@ -354,10 +346,7 @@ namespace Server.Engines.ConPVP
|
|||
op.Write(Origin);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "...";
|
||||
}
|
||||
public override string ToString() => "...";
|
||||
}
|
||||
|
||||
public sealed class DDController : EventController
|
||||
|
|
@ -402,15 +391,9 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
public override string DefaultName => "DD Controller";
|
||||
|
||||
public override string GetTeamName(int teamID)
|
||||
{
|
||||
return TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
}
|
||||
public override string GetTeamName(int teamID) => TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
|
||||
public override EventGame Construct(DuelContext context)
|
||||
{
|
||||
return new DDGame(this, context);
|
||||
}
|
||||
public override EventGame Construct(DuelContext context) => new DDGame(this, context);
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
@ -464,10 +447,7 @@ namespace Server.Engines.ConPVP
|
|||
private Timer m_FinishTimer;
|
||||
private Timer m_UncaptureTimer;
|
||||
|
||||
public DDGame(DDController controller, DuelContext context) : base(context)
|
||||
{
|
||||
Controller = controller;
|
||||
}
|
||||
public DDGame(DDController controller, DuelContext context) : base(context) => Controller = controller;
|
||||
|
||||
public DDController Controller{ get; }
|
||||
|
||||
|
|
@ -525,10 +505,7 @@ namespace Server.Engines.ConPVP
|
|||
return pm.DuelContext.Participants.IndexOf(pm.DuelPlayer.Participant);
|
||||
}
|
||||
|
||||
public int GetColor(Mobile mob)
|
||||
{
|
||||
return GetTeamInfo(mob)?.Color ?? -1;
|
||||
}
|
||||
public int GetColor(Mobile mob) => GetTeamInfo(mob)?.Color ?? -1;
|
||||
|
||||
private void ApplyHues(Participant p, int hueOverride)
|
||||
{
|
||||
|
|
@ -1077,10 +1054,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
public class DDStep : AddonComponent
|
||||
{
|
||||
public DDStep(int itemID) : base(itemID)
|
||||
{
|
||||
Visible = true;
|
||||
}
|
||||
public DDStep(int itemID) : base(itemID) => Visible = true;
|
||||
|
||||
public DDStep(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
@ -1100,10 +1074,7 @@ namespace Server.Engines.ConPVP
|
|||
writer.Write(0); //version
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
return Addon.OnMoveOver(m);
|
||||
}
|
||||
public override bool OnMoveOver(Mobile m) => Addon.OnMoveOver(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,24 +47,15 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
protected DuelContext m_Context;
|
||||
|
||||
public EventGame(DuelContext context)
|
||||
{
|
||||
m_Context = context;
|
||||
}
|
||||
public EventGame(DuelContext context) => m_Context = context;
|
||||
|
||||
public DuelContext Context => m_Context;
|
||||
|
||||
public virtual bool FreeConsume => true;
|
||||
|
||||
public virtual bool OnDeath(Mobile mob, Container corpse)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool OnDeath(Mobile mob, Container corpse) => true;
|
||||
|
||||
public virtual bool CantDoAnything(Mobile mob)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public virtual bool CantDoAnything(Mobile mob) => false;
|
||||
|
||||
public virtual void OnStart()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -463,15 +463,9 @@ namespace Server.Engines.ConPVP
|
|||
AddButton(314, height - 42, 247, 248, 1);
|
||||
}
|
||||
|
||||
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>";
|
||||
|
||||
private void AddBorderedText(int x, int y, int width, int height, string text, int color, int borderColor)
|
||||
{
|
||||
|
|
@ -650,10 +644,7 @@ namespace Server.Engines.ConPVP
|
|||
op.WriteEncodedInt(Color);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return TeamName != null ? $"({Name}) ..." : "...";
|
||||
}
|
||||
public override string ToString() => TeamName != null ? $"({Name}) ..." : "...";
|
||||
}
|
||||
|
||||
public sealed class KHController : EventController
|
||||
|
|
@ -745,15 +736,9 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
public override string Title => "King of the Hill";
|
||||
|
||||
public override string GetTeamName(int teamID)
|
||||
{
|
||||
return TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
}
|
||||
public override string GetTeamName(int teamID) => TeamInfo[teamID % TeamInfo.Length].Name;
|
||||
|
||||
public override EventGame Construct(DuelContext context)
|
||||
{
|
||||
return new KHGame(this, context);
|
||||
}
|
||||
public override EventGame Construct(DuelContext context) => new KHGame(this, context);
|
||||
|
||||
public void RemoveBoard(KHBoard b)
|
||||
{
|
||||
|
|
@ -824,10 +809,7 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
private Timer m_FinishTimer;
|
||||
|
||||
public KHGame(KHController controller, DuelContext context) : base(context)
|
||||
{
|
||||
Controller = controller;
|
||||
}
|
||||
public KHGame(KHController controller, DuelContext context) : base(context) => Controller = controller;
|
||||
|
||||
public KHController Controller{ get; }
|
||||
|
||||
|
|
@ -895,10 +877,7 @@ namespace Server.Engines.ConPVP
|
|||
return pm.DuelContext.Participants.IndexOf(pm.DuelPlayer.Participant);
|
||||
}
|
||||
|
||||
public int GetColor(Mobile mob)
|
||||
{
|
||||
return GetTeamInfo(mob)?.Color ?? -1;
|
||||
}
|
||||
public int GetColor(Mobile mob) => GetTeamInfo(mob)?.Color ?? -1;
|
||||
|
||||
private void ApplyHues(Participant p, int hueOverride)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue